From 283526803d7fbb7b75412ceb2338dfd9d68c0c9a Mon Sep 17 00:00:00 2001 From: jstebbins Date: Tue, 18 Aug 2015 20:27:47 +0000 Subject: LinGui: 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/trunk@7403 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- gtk/src/ghb-3.12.ui | 1 - gtk/src/ghb-3.14.ui | 1 - gtk/src/ghb.ui | 1 - gtk/src/presets.c | 25 ++----------------------- 4 files changed, 2 insertions(+), 26 deletions(-) (limited to 'gtk') diff --git a/gtk/src/ghb-3.12.ui b/gtk/src/ghb-3.12.ui index 486d77b37..a2ae6ccc6 100644 --- a/gtk/src/ghb-3.12.ui +++ b/gtk/src/ghb-3.12.ui @@ -1544,7 +1544,6 @@ This allows a player to initiate playback before downloading the entire file.

none 6 6 - True diff --git a/gtk/src/ghb-3.14.ui b/gtk/src/ghb-3.14.ui index 3f90c84d2..a074f81a5 100644 --- a/gtk/src/ghb-3.14.ui +++ b/gtk/src/ghb-3.14.ui @@ -1545,7 +1545,6 @@ This allows a player to initiate playback before downloading the entire file.

none 6 6 - True diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index da314b4ca..efa73a39a 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -1544,7 +1544,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 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); } } @@ -2401,29 +2403,6 @@ ghb_clear_presets_selection(signal_user_data_t *ud) ghb_dict_set_bool(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) { -- cgit v1.2.3