store a pointer to the list selection
authorBrandon Lewis <brandon@collabora.co.uk>
Wed, 21 Jul 2010 11:53:01 +0000 (13:53 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Thu, 2 Sep 2010 16:04:24 +0000 (18:04 +0200)
tests/examples/ges-ui.c

index 70bb134..abd3b76 100644 (file)
@@ -29,6 +29,7 @@ typedef struct App
   GESTimelineLayer *layer;
   GtkWidget *main_window;
   GtkListStore *model;
+  GtkTreeSelection *selection;
 } App;
 
 App *app_new (void);
@@ -205,6 +206,11 @@ create_ui (App * app)
     goto fail;
   }
 
+  app->selection = gtk_tree_view_get_selection (timeline);
+
+  if (!app->selection)
+    goto fail;
+
   gtk_tree_view_set_model (timeline, GTK_TREE_MODEL (app->model));
 
   gtk_builder_connect_signals (builder, app);