checkbox with image arrow for playing item display
[rugen] / src / page_clips.c
index 6a85d82..ac536ab 100644 (file)
@@ -154,7 +154,7 @@ static void list_queue( page_clips this, int clip )
                GtkTreeViewColumn *column;
 
                list_store = gtk_list_store_new( 6,
-                       G_TYPE_BOOLEAN,
+                       GDK_TYPE_PIXBUF,
                        G_TYPE_STRING,
                        G_TYPE_STRING,
                        G_TYPE_STRING,
@@ -162,8 +162,8 @@ static void list_queue( page_clips this, int clip )
                        G_TYPE_INT );
                gtk_tree_view_set_model( GTK_TREE_VIEW( treeview ), GTK_TREE_MODEL( list_store ) );
 
-               renderer = gtk_cell_renderer_toggle_new( );
-               column = gtk_tree_view_column_new_with_attributes ( "", renderer, "active", 0, NULL);
+               renderer = gtk_cell_renderer_pixbuf_new( );
+               column = gtk_tree_view_column_new_with_attributes ( "", renderer, "pixbuf", 0, NULL);
                gtk_tree_view_append_column( GTK_TREE_VIEW( treeview ), column );
 
                renderer = gtk_cell_renderer_text_new( );
@@ -197,7 +197,7 @@ static void list_queue( page_clips this, int clip )
                mvcp_list_get( list, index, &entry );
                gtk_list_store_append( list_store, &iter );
                gtk_list_store_set( list_store, &iter,
-                       0, index == clip,
+                       0, this->app->playing[(index == clip)?1:0],
                        1, entry.full,
                        2, frames2tc( entry.in, entry.fps, tc1),
                        3, frames2tc( entry.out, entry.fps, tc2),
@@ -226,14 +226,14 @@ static void list_active( page_clips this, int clip )
 
        gtk_tree_model_get_iter( GTK_TREE_MODEL (list_store), &iter, path );
        gtk_tree_path_free( path );
-       gtk_list_store_set( list_store, &iter, 0, FALSE, -1 );
+       gtk_list_store_set( list_store, &iter, 0, this->app->playing[0], -1 );
        
        this->clip = clip;
        path = gtk_tree_path_new_from_indices( this->clip, -1 );
        gtk_tree_view_scroll_to_cell( GTK_TREE_VIEW( treeview ), path, NULL, TRUE, 0.5, 0 );
        gtk_tree_model_get_iter( GTK_TREE_MODEL (list_store), &iter, path );
        gtk_tree_path_free( path );
-       gtk_list_store_set( list_store, &iter, 0, TRUE, -1 );
+       gtk_list_store_set( list_store, &iter, 0, this->app->playing[1], -1 );
 }
 
 static gboolean on_ok( GtkWidget *dummy, gpointer data )