diff options
Diffstat (limited to 'gtk/src/presets.c')
-rw-r--r-- | gtk/src/presets.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/gtk/src/presets.c b/gtk/src/presets.c index 5db88440b..00a9bfcba 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -556,6 +556,8 @@ select_preset2(GtkBuilder *builder, hb_preset_index_t *path) if (gtk_tree_model_get_iter_first(store, &iter)) gtk_tree_selection_select_iter(selection, &iter); } + // Make the selection visible in scroll window if it is not. + gtk_tree_view_scroll_to_cell(treeview, treepath, NULL, FALSE, 0, 0); gtk_tree_path_free(treepath); } } @@ -2402,29 +2404,6 @@ ghb_clear_presets_selection(signal_user_data_t *ud) } G_MODULE_EXPORT void -presets_frame_size_allocate_cb( - GtkWidget *widget, - GtkAllocation *allocation, - signal_user_data_t *ud) -{ - GtkTreeView *treeview; - GtkTreeSelection *selection; - GtkTreeModel *store; - GtkTreeIter iter; - - treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list")); - selection = gtk_tree_view_get_selection(treeview); - if (gtk_tree_selection_get_selected(selection, &store, &iter)) - { - GtkTreePath *path; - path = gtk_tree_model_get_path (store, &iter); - // Make the parent visible in scroll window if it is not. - gtk_tree_view_scroll_to_cell (treeview, path, NULL, FALSE, 0, 0); - gtk_tree_path_free(path); - } -} - -G_MODULE_EXPORT void presets_default_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) { hb_preset_index_t *path = get_selected_path(ud); |