diff options
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/src/audiohandler.c | 1 | ||||
-rw-r--r-- | gtk/src/callbacks.c | 15 | ||||
-rw-r--r-- | gtk/src/subtitlehandler.c | 21 | ||||
-rw-r--r-- | gtk/src/subtitlehandler.h | 1 |
4 files changed, 29 insertions, 9 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index 4a6c77fb6..b57f42152 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -603,6 +603,7 @@ audio_add_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) { gtk_widget_set_sensitive(xwidget, FALSE); } + ghb_update_destination_extension(ud); } G_MODULE_EXPORT void diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index bd06126b1..eda462875 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -522,21 +522,18 @@ get_extension(signal_user_data_t *ud) int container; const gchar *extension = "error"; GValue *audio_list; + GValue *subtitle_list; container = ghb_settings_combo_int(ud->settings, "FileFormat"); if (container == HB_MUX_MP4) { extension = "mp4"; audio_list = ghb_settings_get_value(ud->settings, "audio_list"); - if (ghb_ac3_in_audio_list (audio_list)) - { - extension = "m4v"; - } - else if (ghb_settings_get_boolean(ud->settings, "ChapterMarkers")) - { - extension = "m4v"; - } - else if (ghb_settings_get_boolean(ud->settings, "UseM4v")) + subtitle_list = ghb_settings_get_value(ud->settings, "subtitle_list"); + if (ghb_ac3_in_audio_list(audio_list) || + ghb_soft_in_subtitle_list(subtitle_list) || + ghb_settings_get_boolean(ud->settings, "ChapterMarkers") || + ghb_settings_get_boolean(ud->settings, "UseM4v")) { extension = "m4v"; } diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c index c2ee73cfd..7968e5dae 100644 --- a/gtk/src/subtitlehandler.c +++ b/gtk/src/subtitlehandler.c @@ -59,6 +59,24 @@ mustBurn(signal_user_data_t *ud, gint track) return FALSE; } +gboolean +ghb_soft_in_subtitle_list(GValue *subtitle_list) +{ + gint count, ii; + GValue *settings; + + count = ghb_array_len(subtitle_list); + for (ii = 0; ii < count; ii++) + { + settings = ghb_array_get_nth(subtitle_list, ii); + if (!ghb_settings_get_boolean(settings, "SubtitleBurned")) + { + return TRUE; + } + } + return FALSE; +} + void ghb_subtitle_exclusive_burn(signal_user_data_t *ud, gint index) { @@ -167,6 +185,7 @@ ghb_add_srt(signal_user_data_t *ud, GValue *settings) widget = GHB_WIDGET (ud->builder, "srt_add"); gtk_widget_set_sensitive(widget, FALSE); } + ghb_update_destination_extension(ud); ghb_live_reset(ud); } @@ -225,6 +244,7 @@ ghb_add_subtitle(signal_user_data_t *ud, GValue *settings) widget = GHB_WIDGET (ud->builder, "srt_add"); gtk_widget_set_sensitive(widget, FALSE); } + ghb_update_destination_extension(ud); ghb_live_reset(ud); } @@ -563,6 +583,7 @@ subtitle_burned_toggled_cb( // Unburn the rest if (active) ghb_subtitle_exclusive_burn(ud, row); + ghb_update_destination_extension(ud); ghb_live_reset(ud); } diff --git a/gtk/src/subtitlehandler.h b/gtk/src/subtitlehandler.h index a2b920f34..c0970d09c 100644 --- a/gtk/src/subtitlehandler.h +++ b/gtk/src/subtitlehandler.h @@ -36,5 +36,6 @@ void ghb_add_subtitle( signal_user_data_t *ud, GValue *settings); void ghb_reset_subtitles(signal_user_data_t *ud, GValue *settings); void ghb_subtitle_prune(signal_user_data_t *ud); +gboolean ghb_soft_in_subtitle_list(GValue *subtitle_list); #endif // _SUBTITLEHANDLER_H_ |