summaryrefslogtreecommitdiffstats
path: root/gtk/src/subtitlehandler.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-05-20 00:28:51 +0000
committerjstebbins <[email protected]>2009-05-20 00:28:51 +0000
commit05b33621d3c1c742f003129e3ab2e90e9851905a (patch)
tree332b8f904019723a1ad462612230a013075afd3e /gtk/src/subtitlehandler.c
parent2d4f59325e770fae5841550cbaf5e1f5cbe1c81b (diff)
LinGui:
- fix a couple ui widget size/position issues - fix subtitle selection when no match is found in a title for a subtitle preset - fix an error in generating strings that describe a subtitles type git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2431 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/subtitlehandler.c')
-rw-r--r--gtk/src/subtitlehandler.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c
index cfea4726f..a910e2a99 100644
--- a/gtk/src/subtitlehandler.c
+++ b/gtk/src/subtitlehandler.c
@@ -93,11 +93,14 @@ ghb_set_pref_subtitle(gint titleindex, signal_user_data_t *ud)
// select sequential tracks for each. The hash keeps track
// of the tracks used for each language.
track = ghb_find_subtitle_track(titleindex, lang, track_indices);
- ghb_settings_set_int(subtitle, "SubtitleTrack", track);
- // Add to subtitle list
- add_pref(ud, subtitle);
- ghb_ui_update(ud, "SubtitleTrack", ghb_int64_value(track));
g_free(lang);
+ if (track >= 0)
+ {
+ ghb_settings_set_int(subtitle, "SubtitleTrack", track);
+ // Add to subtitle list
+ add_pref(ud, subtitle);
+ ghb_ui_update(ud, "SubtitleTrack", ghb_int64_value(track));
+ }
}
g_hash_table_destroy(track_indices);
}