diff options
author | jstebbins <[email protected]> | 2009-05-05 16:00:13 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-05-05 16:00:13 +0000 |
commit | 5d088d3fbd23bc18024afe964f3894a4c6befa70 (patch) | |
tree | 7ee8b933f1a74690aef1c94c9449b95be65c4270 | |
parent | 5d3a0ec24c831e9f5f1875f62613e64b45a62e27 (diff) |
LinGui:
disable chapters markers when there is only one chapter in the title
or when the user chooses to encode only one chapter of the title
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2385 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | gtk/src/callbacks.c | 22 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 2 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 184f8e35c..f2d964290 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -1410,6 +1410,17 @@ start_chapter_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { set_destination(ud); } + widget = GHB_WIDGET (ud->builder, "chapters_tab"); + // End may have been changed above, get it again + end = ghb_settings_get_int(ud->settings, "end_chapter"); + if (start == end) + { + gtk_widget_hide(widget); + } + else + { + gtk_widget_show(widget); + } } G_MODULE_EXPORT void @@ -1429,6 +1440,17 @@ end_chapter_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { set_destination(ud); } + widget = GHB_WIDGET (ud->builder, "chapters_tab"); + // Start may have been changed above, get it again + start = ghb_settings_get_int(ud->settings, "start_chapter"); + if (start == end) + { + gtk_widget_hide(widget); + } + else + { + gtk_widget_show(widget); + } } G_MODULE_EXPORT void diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 64b7bf7be..0b7633da6 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -3413,6 +3413,8 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex) job->chapter_end = MAX( job->chapter_start, chapter_end ); job->chapter_markers = ghb_settings_get_boolean(js, "ChapterMarkers"); + if (job->chapter_start == job->chapter_end) + job->chapter_markers = 0; if ( job->chapter_markers ) { GValue *chapters; |