summaryrefslogtreecommitdiffstats
path: root/gtk/src/queuehandler.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-09-12 12:43:11 -0700
committerJohn Stebbins <[email protected]>2017-11-06 08:19:49 -0800
commitd024e58390c5900d7badefa298f803cade8f356c (patch)
treed4984dc3e3d2769af4fb6c0204ff8e2a193be9c0 /gtk/src/queuehandler.c
parentb64e2ff7ad7aaa500f4927998f67c7c29070bd5a (diff)
LinGui: Reorgainize Summary pane
Synching up with https://github.com/HandBrake/HandBrake/issues/833
Diffstat (limited to 'gtk/src/queuehandler.c')
-rw-r--r--gtk/src/queuehandler.c47
1 files changed, 43 insertions, 4 deletions
diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c
index a708598fa..c8fdd00fc 100644
--- a/gtk/src/queuehandler.c
+++ b/gtk/src/queuehandler.c
@@ -78,6 +78,47 @@ queue_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_t
}
}
+char *
+ghb_subtitle_short_description(const GhbValue *subsource,
+ const GhbValue *subsettings)
+{
+ GhbValue *srt;
+ char *desc = NULL;
+
+ srt = ghb_dict_get(subsettings, "SRT");
+ if (srt != NULL)
+ {
+ const gchar *code;
+ const gchar *lang;
+ const iso639_lang_t *iso;
+
+ lang = ghb_dict_get_string(srt, "Language");
+ code = ghb_dict_get_string(srt, "Codeset");
+
+ iso = lang_lookup(lang);
+ if (iso != NULL)
+ {
+ if (iso->native_name != NULL)
+ lang = iso->native_name;
+ else
+ lang = iso->eng_name;
+ }
+
+ desc = g_strdup_printf("%s (%s)(SRT)", lang, code);
+ }
+ else if (subsource == NULL)
+ {
+ desc = g_strdup(_("Foreign Audio Scan"));
+ }
+ else
+ {
+ const char * lang = ghb_dict_get_string(subsource, "Language");
+ desc = g_strdup_printf("%s", lang);
+ }
+
+ return desc;
+}
+
static char *
subtitle_get_track_description(const GhbValue *subsource,
const GhbValue *subsettings)
@@ -120,15 +161,13 @@ subtitle_get_track_description(const GhbValue *subsource,
}
else if (subsource == NULL)
{
- desc = g_strdup(_("Foreign Audio Search"));
+ desc = g_strdup(_("Foreign Audio Scan"));
}
else
{
int track = ghb_dict_get_int(subsettings, "Track");
- int source = ghb_dict_get_int(subsource, "Source");
const char * lang = ghb_dict_get_string(subsource, "Language");
- desc = g_strdup_printf("%d - %s (%s)", track + 1,
- lang, hb_subsource_name(source));
+ desc = g_strdup_printf("%d - %s", track + 1, lang);
}
return desc;