diff options
author | jstebbins <[email protected]> | 2009-06-30 17:22:43 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-06-30 17:22:43 +0000 |
commit | b5526f35fe83ede6affbdeb9eed3e4e6d9c8f6b1 (patch) | |
tree | 8be97016c13fbe13023381a5bf979ad5625835c8 /gtk/src/presets.c | |
parent | e7a1a9f47c475028b6e73f36ed704bc65ca6c77d (diff) |
LinGui: SRT support
- there are now two buttons to add subtitles
one button adds normal subtitles from the source.
the second adds SRT subtitles.
- when an SRT subtitle is selected in the list, the available controls change
SRT controls are: Language, Character Codeset, File, and Time Offset (ms)
- A combo entry box is used for character code. A subset of the most common
character codes is available in the popup. Other codes can be manually
entered in the entry box.
- The last used SRT file directory is remembered.
- Remove the debug printf eddyg left in decsrtsub.c
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2648 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/presets.c')
-rw-r--r-- | gtk/src/presets.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk/src/presets.c b/gtk/src/presets.c index 01183d1a6..c17a902d4 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -1392,6 +1392,8 @@ ghb_prefs_load(signal_user_data_t *ud) } ghb_dict_insert(dict, g_strdup("destination_dir"), ghb_value_dup(ghb_string_value(dir))); + ghb_dict_insert(dict, + g_strdup("SrtDir"), ghb_value_dup(ghb_string_value(dir))); #if defined(_WIN32) gchar *source; @@ -3064,7 +3066,7 @@ update_subtitle_presets(signal_user_data_t *ud) g_debug("update_subtitle_presets"); const GValue *subtitle_list, *subtitle; GValue *slist, *dict; - gint count, ii; + gint count, ii, source; subtitle_list = ghb_settings_get_value(ud->settings, "subtitle_list"); slist = ghb_array_value_new(8); @@ -3072,10 +3074,14 @@ update_subtitle_presets(signal_user_data_t *ud) for (ii = 0; ii < count; ii++) { subtitle = ghb_array_get_nth(subtitle_list, ii); - dict = ghb_value_dup(subtitle); - ghb_array_append(slist, dict); + source = ghb_settings_get_int(subtitle, "SubtitleSource"); + if (source != SRTSUB) + { + dict = ghb_value_dup(subtitle); + ghb_array_append(slist, dict); + } } - ghb_settings_set_value(ud->settings, "SubtitleList", slist); + ghb_settings_take_value(ud->settings, "SubtitleList", slist); } void |