diff options
author | jstebbins <[email protected]> | 2014-10-29 23:04:11 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-10-29 23:04:11 +0000 |
commit | 238f2aeca97a566a243bc96a5fd5c78a2cae5a3c (patch) | |
tree | ad15605087a74c2aaacaa08179a33a30a3cbf532 /gtk/src/subtitlehandler.c | |
parent | 387a47a9e2704ec4bd0b29d40859cff295de3b69 (diff) |
LinGui: fix several small memory leaks
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6479 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/subtitlehandler.c')
-rw-r--r-- | gtk/src/subtitlehandler.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c index dd4faef4b..0c3933dd1 100644 --- a/gtk/src/subtitlehandler.c +++ b/gtk/src/subtitlehandler.c @@ -1336,6 +1336,28 @@ subtitle_update_pref_lang(signal_user_data_t *ud, const iso639_lang_t *lang) gtk_widget_set_visible(GTK_WIDGET(button), visible); } +void +ghb_subtitle_set_pref_lang(GValue *settings) +{ + GValue *lang_list; + gboolean set = FALSE; + lang_list = ghb_settings_get_value(settings, "SubtitleLanguageList"); + if (ghb_array_len(lang_list) > 0) + { + GValue *glang = ghb_array_get_nth(lang_list, 0); + if (glang != NULL) + { + ghb_settings_set_string(settings, "PreferredLanguage", + g_value_get_string(glang)); + set = TRUE; + } + } + if (!set) + { + ghb_settings_set_string(settings, "PreferredLanguage", "und"); + } +} + G_MODULE_EXPORT void subtitle_add_lang_clicked_cb(GtkWidget *widget, signal_user_data_t *ud) { |