summaryrefslogtreecommitdiffstats
path: root/gtk/src/subtitlehandler.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-04-30 16:28:49 +0000
committerjstebbins <[email protected]>2015-04-30 16:28:49 +0000
commit617dbd847bc9d0b395f83c1bc00ce688491d48fc (patch)
tree69c85d50a773c4a30989279d61cb278fedf8e3c3 /gtk/src/subtitlehandler.c
parentbbbb8f80a9c22a91579ef5e9d08de983ff361892 (diff)
LinGui: Fix issue with editing audio or subtitles
The edited settings were having unpredictable effects on loading default audio or subtitle settings when a new source was scanned. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7137 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/subtitlehandler.c')
-rw-r--r--gtk/src/subtitlehandler.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c
index b42b482b3..33e9e106a 100644
--- a/gtk/src/subtitlehandler.c
+++ b/gtk/src/subtitlehandler.c
@@ -1049,6 +1049,19 @@ ghb_clear_subtitle_list_settings(GhbValue *settings)
ghb_array_reset(subtitle_list);
}
+void
+ghb_clear_subtitle_selection(GtkBuilder *builder)
+{
+ GtkTreeView *tv;
+ GtkTreeSelection *tsel;
+
+ tv = GTK_TREE_VIEW(GHB_WIDGET(builder, "subtitle_list_view"));
+ // Clear tree selection so that updates are not triggered
+ // that cause a recursive attempt to clear the tree selection (crasher)
+ tsel = gtk_tree_view_get_selection(tv);
+ gtk_tree_selection_unselect_all(tsel);
+}
+
static void
ghb_clear_subtitle_list_ui(GtkBuilder *builder)
{