store index in treeview data
authorMaksym Veremeyenko <verem@m1stereo.tv>
Sun, 19 Jun 2011 14:44:55 +0000 (17:44 +0300)
committerMaksym Veremeyenko <verem@m1stereo.tv>
Sun, 19 Jun 2011 14:44:55 +0000 (17:44 +0300)
src/playlist.c
src/ui.c

index 8656cf1..0fece7b 100644 (file)
@@ -214,6 +214,7 @@ void omnplay_playlist_draw(omnplay_instance_t* app)
             4, frames2tc(app->playlist.item[i].in, 25.0, tc1),
             5, frames2tc(app->playlist.item[i].dur, 25.0, tc2),
             6, app->playlist.item[i].title,
+            7, i,
             -1 );
     }
 
index ab313dd..a4ac024 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -131,8 +131,9 @@ static GtkWidget* create_treeview(GtkWidget* top, char* name, const column_desc_
 
     for(i = 0, count = 0; columns[i].title; i++, count++)
         list_store_types[i] = (columns[i].type == G_TYPE_OBJECT)?GDK_TYPE_PIXBUF:columns[i].type;
+    list_store_types[count + 1] = G_TYPE_INT;
 
-    list_store = gtk_list_store_newv(count, list_store_types);
+    list_store = gtk_list_store_newv(count + 1, list_store_types);
 
     gtk_tree_view_set_model( GTK_TREE_VIEW( treeview ), GTK_TREE_MODEL( list_store ) );