summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-11-20 16:14:07 +0000
committerjstebbins <[email protected]>2009-11-20 16:14:07 +0000
commit557ce97371d16613017e537a3d20dd2972fcda51 (patch)
treee4dfafc0f44ae11535edf16cd5c2d1b34a002908 /gtk
parentf2ed381129d68657f6da6825d6d1b1762ba46b7e (diff)
LinGui: make subtitle burned and default checkboxes mutually exclusive
"default" doesn't really apply to burned in subtitles so it shouldn't be checked when burned. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2947 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/subtitlehandler.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c
index 759caae21..537440806 100644
--- a/gtk/src/subtitlehandler.c
+++ b/gtk/src/subtitlehandler.c
@@ -552,6 +552,7 @@ subtitle_burned_toggled_cb(
GValue *subtitle_list;
gint count;
GValue *settings;
+ gint source;
g_debug("burned toggled");
tp = gtk_tree_path_new_from_string (path);
@@ -574,12 +575,21 @@ subtitle_burned_toggled_cb(
return;
settings = ghb_array_get_nth(subtitle_list, row);
+ source = ghb_settings_get_int(settings, "SubtitleSource");
+ if (source != VOBSUB)
+ return;
if (!active && mustBurn(ud, settings))
return;
ghb_settings_set_boolean(settings, "SubtitleBurned", active);
-
gtk_list_store_set(GTK_LIST_STORE(tm), &ti, 2, active, -1);
+
+ if (active)
+ {
+ ghb_settings_set_boolean(settings, "SubtitleDefaultTrack", !active);
+ gtk_list_store_set(GTK_LIST_STORE(tm), &ti, 3, !active, -1);
+ }
+
// Unburn the rest
if (active)
ghb_subtitle_exclusive_burn(ud, row);
@@ -603,6 +613,7 @@ subtitle_default_toggled_cb(
GValue *subtitle_list;
gint count;
GValue *settings;
+ gboolean burned;
g_debug("default toggled");
tp = gtk_tree_path_new_from_string (path);
@@ -625,10 +636,17 @@ subtitle_default_toggled_cb(
return;
settings = ghb_array_get_nth(subtitle_list, row);
+ if (active && mustBurn(ud, settings))
+ return;
ghb_settings_set_boolean(settings, "SubtitleDefaultTrack", active);
-
gtk_list_store_set(GTK_LIST_STORE(tm), &ti, 3, active, -1);
+
+ if (active)
+ {
+ ghb_settings_set_boolean(settings, "SubtitleBurned", !active);
+ gtk_list_store_set(GTK_LIST_STORE(tm), &ti, 2, !active, -1);
+ }
// allow only one default
ghb_subtitle_exclusive_default(ud, row);
ghb_live_reset(ud);