summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-06-09 16:54:36 +0000
committerjstebbins <[email protected]>2010-06-09 16:54:36 +0000
commit6892a1d090340bceb7ef1dc475c402b2ba2da644 (patch)
tree8de650fdfd6c42e9f125fbb1e277cf2b771538ec
parent18089d241a97abbfdaefb18a230defd351e2c0bd (diff)
LinGui: initialize srt language with preferred language from prefernces
whenever a new srt is added to the subtitle list. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3374 b64f7644-9d1e-0410-96f1-a4d463321fa5
-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");