diff options
Diffstat (limited to 'gtk')
-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; |