diff options
author | jstebbins <[email protected]> | 2009-05-20 00:28:51 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-05-20 00:28:51 +0000 |
commit | 05b33621d3c1c742f003129e3ab2e90e9851905a (patch) | |
tree | 332b8f904019723a1ad462612230a013075afd3e /gtk | |
parent | 2d4f59325e770fae5841550cbaf5e1f5cbe1c81b (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')
-rw-r--r-- | gtk/src/ghb.ui | 3 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 15 | ||||
-rw-r--r-- | gtk/src/subtitlehandler.c | 11 |
3 files changed, 19 insertions, 10 deletions
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index 57a941f7e..ba9113a2c 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -2130,6 +2130,8 @@ <object class="GtkAlignment" id="alignment57"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="xscale">0</property> <property name="top_padding">6</property> <property name="bottom_padding">2</property> <property name="left_padding">12</property> @@ -2272,7 +2274,6 @@ </child> <child> <object class="GtkComboBox" id="SubtitleTrack"> - <property name="width_request">150</property> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <signal handler="subtitle_track_changed_cb" name="changed"/> diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index bb30d2c28..f5e96d7cd 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -1028,11 +1028,15 @@ ghb_subtitle_track_source_name(signal_user_data_t *ud, gint track) const gchar * name = "Unknown"; if (track == -2) - return CC608SUB; - if (track < 0) - return VOBSUB; - if (track < 0) + { + name = "Text"; goto done; + } + if (track == -1) + { + name = "Bitmap"; + goto done; + } titleindex = ghb_settings_combo_int(ud->settings, "title"); if (titleindex < 0) @@ -1042,7 +1046,8 @@ ghb_subtitle_track_source_name(signal_user_data_t *ud, gint track) hb_title_t * title; hb_subtitle_t * sub; - if (h_scan == NULL) return VOBSUB; + if (h_scan == NULL) + goto done; list = hb_get_titles( h_scan ); if( !hb_list_count( list ) ) goto done; 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); } |