From: jstebbins Date: Tue, 18 Aug 2015 20:36:33 +0000 (+0000) Subject: LinGui: merge: fix a scrolling issue in presets pane X-Git-Tag: 0.10.3~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20716410f9da4a6e12bf30d1b04818a5ff19c23a;p=handbrake LinGui: merge: fix a scrolling issue in presets pane Expanding a folder was causing the pane to scroll back to the currently selected preset. git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.10.x@7404 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index 2a3d97647..f741f90b0 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -1562,7 +1562,6 @@ This allows a player to initiate playback before downloading the entire file.

none 6 6 - True diff --git a/gtk/src/presets.c b/gtk/src/presets.c index 6d3b099e7..0a6d3dbc7 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -1082,6 +1082,8 @@ ghb_select_preset2( 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, path, NULL, FALSE, 0, 0); gtk_tree_path_free(path); } } @@ -4251,26 +4253,6 @@ ghb_clear_presets_selection(signal_user_data_t *ud) ghb_settings_set_boolean(ud->settings, "preset_modified", TRUE); } -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) {