summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-02-11 18:22:16 +0000
committerjstebbins <[email protected]>2011-02-11 18:22:16 +0000
commit975236f11438cbb859866efefc9486b6fb50a146 (patch)
tree9fee93025eac419a1fff251a15c3c2a9fad9d81b /gtk
parent4c04eed8e4b78c34a455516653d2af2ce24a8cb0 (diff)
LinGui: do not uncheck chapter markers when single chapter selected
Instead, grey out the chapter marker checkbox to indicate it is inactive (but leave it checked) and do not enable chapter markers in the job. This way, if the user modifies chapter selections, chapter markers will automatically be re-enabled when more than one chapter is selected again. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3792 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/callbacks.c24
-rw-r--r--gtk/src/hb-backend.c10
-rw-r--r--gtk/src/makedeps.py1
3 files changed, 17 insertions, 18 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 939a16134..d6dcb7a31 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -1517,15 +1517,15 @@ title_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
gint end;
widget = GHB_WIDGET (ud->builder, "ChapterMarkers");
- gtk_widget_set_sensitive(widget, TRUE);
end = ghb_settings_get_int(ud->settings, "end_point");
if (1 == end)
{
- ud->dont_clear_presets = TRUE;
- ghb_ui_update(ud, "ChapterMarkers", ghb_boolean_value(FALSE));
- ud->dont_clear_presets = FALSE;
gtk_widget_set_sensitive(widget, FALSE);
}
+ else
+ {
+ gtk_widget_set_sensitive(widget, TRUE);
+ }
}
G_MODULE_EXPORT void
@@ -1709,16 +1709,16 @@ start_point_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
set_destination(ud);
}
widget = GHB_WIDGET (ud->builder, "ChapterMarkers");
- gtk_widget_set_sensitive(widget, TRUE);
// End may have been changed above, get it again
end = ghb_settings_get_int(ud->settings, "end_point");
if (start == end)
{
- ud->dont_clear_presets = TRUE;
- ghb_ui_update(ud, "ChapterMarkers", ghb_boolean_value(FALSE));
- ud->dont_clear_presets = FALSE;
gtk_widget_set_sensitive(widget, FALSE);
}
+ else
+ {
+ gtk_widget_set_sensitive(widget, TRUE);
+ }
update_title_duration(ud);
}
else if (ghb_settings_combo_int(ud->settings, "PtoPType") == 1)
@@ -1761,16 +1761,16 @@ end_point_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
set_destination(ud);
}
widget = GHB_WIDGET (ud->builder, "ChapterMarkers");
- gtk_widget_set_sensitive(widget, TRUE);
// Start may have been changed above, get it again
start = ghb_settings_get_int(ud->settings, "start_point");
if (start == end)
{
- ud->dont_clear_presets = TRUE;
- ghb_ui_update(ud, "ChapterMarkers", ghb_boolean_value(FALSE));
- ud->dont_clear_presets = FALSE;
gtk_widget_set_sensitive(widget, FALSE);
}
+ else
+ {
+ gtk_widget_set_sensitive(widget, TRUE);
+ }
update_title_duration(ud);
}
else if (ghb_settings_combo_int(ud->settings, "PtoPType") == 1)
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 30534a866..c73d63dfe 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -4438,6 +4438,7 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
gint start, end;
gint num_chapters = hb_list_count(title->list_chapter);
gint duration = title->duration / 90000;
+ job->chapter_markers = FALSE;
job->chapter_start = 1;
job->chapter_end = num_chapters;
@@ -4451,8 +4452,6 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
}
if (ghb_settings_combo_int(js, "PtoPType") == 1)
{
- job->chapter_start = 1;
- job->chapter_end = num_chapters;
start = ghb_settings_get_int(js, "start_point");
end = ghb_settings_get_int(js, "end_point");
job->pts_to_start = (int64_t)MIN(duration-1, start) * 90000;
@@ -4461,8 +4460,6 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
}
if (ghb_settings_combo_int(js, "PtoPType") == 2)
{
- job->chapter_start = 1;
- job->chapter_end = num_chapters;
start = ghb_settings_get_int(js, "start_point");
end = ghb_settings_get_int(js, "end_point");
gint64 max_frames;
@@ -4471,7 +4468,10 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
job->frame_to_stop = (int64_t)MAX(start, end-1) -
job->frame_to_start;
}
- job->chapter_markers = ghb_settings_get_boolean(js, "ChapterMarkers");
+ if (job->chapter_start != job->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 )
diff --git a/gtk/src/makedeps.py b/gtk/src/makedeps.py
index 2e07eda3e..3f894287d 100644
--- a/gtk/src/makedeps.py
+++ b/gtk/src/makedeps.py
@@ -61,7 +61,6 @@ dep_map = (
DepEntry("x264_subme", "x264_psy_rd", "<6", True, False),
DepEntry("x264_subme", "x264_psy_trell", "<6", True, False),
DepEntry("x264_trellis", "x264_psy_trell", "0", True, False),
- DepEntry("ChapterMarkers", "chapters_list", "TRUE", False, False),
DepEntry("use_source_name", "chapters_in_destination", "TRUE", False, False),
DepEntry("use_source_name", "title_no_in_destination", "TRUE", False, False),
)