summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-08-18 20:27:47 +0000
committerjstebbins <[email protected]>2015-08-18 20:27:47 +0000
commit283526803d7fbb7b75412ceb2338dfd9d68c0c9a (patch)
tree26784029319cdc7b107f8dfb2af8cc649e82803c /gtk/src
parent4ffa869d091efecbb19b5dafc18fcb7ecdb73629 (diff)
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
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/ghb-3.12.ui1
-rw-r--r--gtk/src/ghb-3.14.ui1
-rw-r--r--gtk/src/ghb.ui1
-rw-r--r--gtk/src/presets.c25
4 files changed, 2 insertions, 26 deletions
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.</p
<property name="shadow_type">none</property>
<property name="margin-right">6</property>
<property name="margin-bottom">6</property>
- <signal name="size-allocate" handler="presets_frame_size_allocate_cb" swapped="no"/>
<child>
<object class="GtkScrolledWindow" id="presets_scroll">
<property name="visible">True</property>
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.</p
<property name="shadow_type">none</property>
<property name="margin-end">6</property>
<property name="margin-bottom">6</property>
- <signal name="size-allocate" handler="presets_frame_size_allocate_cb" swapped="no"/>
<child>
<object class="GtkScrolledWindow" id="presets_scroll">
<property name="visible">True</property>
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.</p
<property name="shadow_type">none</property>
<property name="margin-right">6</property>
<property name="margin-bottom">6</property>
- <signal name="size-allocate" handler="presets_frame_size_allocate_cb" swapped="no"/>
<child>
<object class="GtkScrolledWindow" id="presets_scroll">
<property name="visible">True</property>
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);