checkbox with image arrow for playing item display
authorMaksym Veremeyenko <verem@m1stereo.tv>
Fri, 24 Jun 2011 14:59:37 +0000 (17:59 +0300)
committerMaksym Veremeyenko <verem@m1stereo.tv>
Fri, 24 Jun 2011 14:59:37 +0000 (17:59 +0300)
pixmaps/item_playing_16x16_(Axialis_Team).png [new file with mode: 0644]
src/dv1394app.c
src/dv1394app.h
src/page_clips.c

diff --git a/pixmaps/item_playing_16x16_(Axialis_Team).png b/pixmaps/item_playing_16x16_(Axialis_Team).png
new file mode 100644 (file)
index 0000000..ef3a0d9
Binary files /dev/null and b/pixmaps/item_playing_16x16_(Axialis_Team).png differ
index 5ccdcbe..6de7d91 100644 (file)
@@ -599,6 +599,9 @@ dv1394app dv1394app_init( GtkWidget *window, char *instance )
                        gtk_signal_connect( GTK_OBJECT( trim ), "button_release_event", GTK_SIGNAL_FUNC (trim_released), this );
                }
                this->seek_flag = 1;
+
+               this->playing[0] = create_pixbuf("empty_16x16.png");
+               this->playing[1] = create_pixbuf("item_playing_16x16_(Axialis_Team).png");
        }
 
        if ( instance != NULL )
index 0287e1d..4a91a5f 100644 (file)
@@ -50,6 +50,7 @@ typedef struct
        int guard;
        int eof[16];
        char* playlist_folder;
+       GdkPixbuf *playing[2];
 }
 *dv1394app, dv1394app_t;
 
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 )