diff options
Diffstat (limited to 'gtk/src/queuehandler.c')
-rw-r--r-- | gtk/src/queuehandler.c | 58 |
1 files changed, 41 insertions, 17 deletions
diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c index dcac384f0..19fce60d1 100644 --- a/gtk/src/queuehandler.c +++ b/gtk/src/queuehandler.c @@ -22,6 +22,7 @@ #include "callbacks.h" #include "presets.h" #include "audiohandler.h" +#include "subtitlehandler.h" #include "ghb-dvd.h" #include "plist.h" @@ -597,17 +598,38 @@ add_to_queue_list(signal_user_data_t *ud, GhbValue *settings, GtkTreeIter *piter // Subtitle Tracks: count // Subtitle description(Subtitle options) // ... - const GhbValue *sub_list; + const GhbValue *sub_settings, *sub_list, *sub_search; + gboolean search; - sub_list = ghb_dict_get_value(settings, "subtitle_list"); + sub_settings = ghb_get_subtitle_settings(settings); + sub_list = ghb_dict_get(sub_settings, "SubtitleList"); + sub_search = ghb_dict_get(sub_settings, "Search"); + search = ghb_dict_get_bool(sub_search, "Enable"); count = ghb_array_len(sub_list); - if (count == 1) + if (count + search == 1) { XPRINT(_("<b>Subtitle:</b> ")); } - else if (count > 1) + else if (count + search > 1) { - XPRINT(_("<b>Subtitle Tracks: %d</b>\n"), count); + XPRINT(_("<b>Subtitle Tracks: %d</b>\n"), count + search); + } + if (search) + { + const gchar *track; + gboolean force, burn, def; + + track = ghb_dict_get_string(sub_search, "Description"); + force = ghb_dict_get_bool(sub_search, "Forced"); + burn = ghb_dict_get_bool(sub_search, "Burn"); + def = ghb_dict_get_bool(sub_search, "Default"); + if (count + search > 1) + XPRINT("\t"); + XPRINT("<small>%s%s%s%s</small>\n", track, + force ? _(" (Forced Only)") : "", + burn ? _(" (Burn)") : "", + def ? _(" (Default)") : "" + ); } for (ii = 0; ii < count; ii++) { @@ -617,32 +639,34 @@ add_to_queue_list(signal_user_data_t *ud, GhbValue *settings, GtkTreeIter *piter gint source; settings = ghb_array_get(sub_list, ii); - track = ghb_dict_get_string(settings, "SubtitleTrackDescription"); - source = ghb_dict_get_int(settings, "SubtitleSource"); - force = ghb_dict_get_bool(settings, "SubtitleForced"); - burn = ghb_dict_get_bool(settings, "SubtitleBurned"); - def = ghb_dict_get_bool(settings, "SubtitleDefaultTrack"); - if (count > 1) + track = ghb_dict_get_string(settings, "Description"); + source = ghb_dict_get_int(settings, "Source"); + force = ghb_dict_get_bool(settings, "Forced"); + burn = ghb_dict_get_bool(settings, "Burn"); + def = ghb_dict_get_bool(settings, "Default"); + if (count + search > 1) XPRINT("\t"); if (source != SRTSUB) { XPRINT("<small>%s%s%s%s</small>\n", track, - force ? _(" (Force)"):"", - burn ? _(" (Burn)"):"", - def ? _(" (Default)"):"" + force ? _(" (Forced Only)") : "", + burn ? _(" (Burn)") : "", + def ? _(" (Default)") : "" ); } else { + GhbValue *srt; gint offset; const gchar *filename, *code; gchar *basename; - offset = ghb_dict_get_int(settings, "SrtOffset"); - filename = ghb_dict_get_string(settings, "SrtFile"); + srt = ghb_dict_get(settings, "SRT"); + offset = ghb_dict_get_int(settings, "Offset"); + filename = ghb_dict_get_string(srt, "File"); basename = g_path_get_basename(filename); - code = ghb_dict_get_string(settings, "SrtCodeset"); + code = ghb_dict_get_string(srt, "Codeset"); XPRINT(_("<small> %s (%s), %s, Offset (ms) %d%s</small>\n"), track, code, basename, offset, def ? " (Default)":""); |