summaryrefslogtreecommitdiffstats
path: root/gtk/src/subtitlehandler.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-09-26 18:01:26 +0000
committerjstebbins <[email protected]>2009-09-26 18:01:26 +0000
commitec407541651b15e9ac2947613e87fc0796628a77 (patch)
treedcd0d670a4bdcdd060cbee0056748316124657f3 /gtk/src/subtitlehandler.c
parent5a30aed7d252c467635729f25a7d3288b202d51f (diff)
LinGui: don't remove srt subs when changing from mkv to mp4
The logic to remove extra vobsubs that can't all be burned was also sweeping away srt's. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2841 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/subtitlehandler.c')
-rw-r--r--gtk/src/subtitlehandler.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c
index 7968e5dae..54fcede5a 100644
--- a/gtk/src/subtitlehandler.c
+++ b/gtk/src/subtitlehandler.c
@@ -1245,9 +1245,8 @@ ghb_subtitle_prune(signal_user_data_t *ud)
GtkTreeView *tv;
GtkTreeModel *tm;
GtkTreeIter ti;
- GValue *subtitle_list, *settings;
- gint count, ii, track;
- gboolean burned;
+ GValue *subtitle_list;
+ gint count, ii;
gint first_track = 0, one_burned = 0;
subtitle_list = ghb_settings_get_value(ud->settings, "subtitle_list");
@@ -1260,19 +1259,27 @@ ghb_subtitle_prune(signal_user_data_t *ud)
tm = gtk_tree_view_get_model(tv);
for (ii = count-1; ii >= 0; ii--)
{
+ gint source, track;
+ gboolean burned;
+ GValue *settings;
+
settings = ghb_array_get_nth(subtitle_list, ii);
burned = ghb_settings_get_boolean(settings, "SubtitleBurned");
- track = ghb_settings_combo_int(settings, "SubtitleTrack");
- if (!burned && mustBurn(ud, track))
- {
- gtk_tree_model_iter_nth_child(tm, &ti, NULL, ii);
- gtk_list_store_remove (GTK_LIST_STORE(tm), &ti);
- ghb_array_remove(subtitle_list, ii);
- }
- if (burned)
+ source = ghb_settings_get_int(settings, "SubtitleSource");
+ if (source == VOBSUB)
{
- first_track = ii;
- one_burned++;
+ track = ghb_settings_combo_int(settings, "SubtitleTrack");
+ if (!burned && mustBurn(ud, track))
+ {
+ gtk_tree_model_iter_nth_child(tm, &ti, NULL, ii);
+ gtk_list_store_remove (GTK_LIST_STORE(tm), &ti);
+ ghb_array_remove(subtitle_list, ii);
+ }
+ if (burned)
+ {
+ first_track = ii;
+ one_burned++;
+ }
}
}
if (one_burned)