summaryrefslogtreecommitdiffstats
path: root/gtk/src/subtitlehandler.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src/subtitlehandler.c')
-rw-r--r--gtk/src/subtitlehandler.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c
index fddb6a9fd..a7f06712a 100644
--- a/gtk/src/subtitlehandler.c
+++ b/gtk/src/subtitlehandler.c
@@ -1124,13 +1124,15 @@ srt_add_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
{
// Add the current subtitle settings to the list.
GValue *settings;
- gchar *dir, *filename;
+ gchar *dir, *filename, *lang;
g_debug("subtitle_add_clicked_cb ()");
settings = ghb_dict_value_new();
ghb_settings_set_int(settings, "SubtitleSource", SRTSUB);
- ghb_settings_set_string(settings, "SrtLanguage", "und");
+ lang = ghb_settings_get_string(ud->settings, "PreferredLanguage");
+ ghb_settings_set_string(settings, "SrtLanguage", lang);
+ g_free(lang);
ghb_settings_set_string(settings, "SrtCodeset", "UTF-8");
dir = ghb_settings_get_string(ud->settings, "SrtDir");