introduce timecodes display
[rugen] / src / page_clips.c
index 50b8912..173f97e 100644 (file)
@@ -155,7 +155,13 @@ static void list_queue( page_clips this, int clip )
                GtkCellRenderer *renderer;
                GtkTreeViewColumn *column;
 
-               list_store = gtk_list_store_new( 6, G_TYPE_BOOLEAN, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING, G_TYPE_INT );
+               list_store = gtk_list_store_new( 6,
+                       G_TYPE_BOOLEAN,
+                       G_TYPE_STRING,
+                       G_TYPE_STRING,
+                       G_TYPE_STRING,
+                       G_TYPE_STRING,
+                       G_TYPE_INT );
                gtk_tree_view_set_model( GTK_TREE_VIEW( treeview ), GTK_TREE_MODEL( list_store ) );
                
                renderer = gtk_cell_renderer_toggle_new( );
@@ -188,9 +194,17 @@ static void list_queue( page_clips this, int clip )
        
        for ( index = 0; index < mvcp_list_count( list ); index ++ )
        {
+               char tc1[12], tc2[12], tc3[12];
                mvcp_list_get( list, index, &entry );
                gtk_list_store_append( list_store, &iter );
-               gtk_list_store_set( list_store, &iter, 0, index == clip, 1, ( int )entry.in, 2, ( int )entry.out, 3, ( int )entry.size, 4, entry.full, 5, entry.clip, -1 );
+               gtk_list_store_set( list_store, &iter,
+                       0, index == clip,
+                       1, frames2tc( entry.in, entry.fps, tc1),
+                       2, frames2tc( entry.out, entry.fps, tc2),
+                       3, frames2tc( entry.size, entry.fps, tc3),
+                       4, entry.full,
+                       5, entry.clip,
+                       -1 );
        }
 
        this->clip = clip;