store a pointer to the list selection

This commit is contained in:
Brandon Lewis 2010-07-21 13:53:01 +02:00 committed by Edward Hervey
parent c46c03504a
commit bdc7dc7cd7

View 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);