summaryrefslogtreecommitdiffstats
path: root/gtk/src/callbacks.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-12-14 19:49:26 +0000
committerjstebbins <[email protected]>2009-12-14 19:49:26 +0000
commitb4487bf6de437d77ebdd2cc137f54631b22fc9c8 (patch)
treea71ce5bf0680421f9d2c824cc6a52178f3c89c71 /gtk/src/callbacks.c
parent4d312d2288983fd54866c447e667cbcedd0b9cbe (diff)
LinGui: fix m4v file extension selection when the source has only 1 chapter
the chapter markers settings wasn't actually disabled, even though it was being filtered out of the job settings. This caused the m4v file extension selection logic to use m4v. And there was no way to change it since the chapter markers widget was hidden. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3029 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/callbacks.c')
-rw-r--r--gtk/src/callbacks.c41
1 files changed, 29 insertions, 12 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index fb319b297..087185dcf 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -1490,6 +1490,18 @@ title_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
set_destination(ud);
}
ghb_preview_set_visible(ud);
+
+ gint end;
+ widget = GHB_WIDGET (ud->builder, "ChapterMarkers");
+ gtk_widget_set_sensitive(widget, TRUE);
+ end = ghb_settings_get_int(ud->settings, "end_chapter");
+ 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);
+ }
}
G_MODULE_EXPORT void
@@ -1600,16 +1612,16 @@ start_chapter_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
set_destination(ud);
}
- widget = GHB_WIDGET (ud->builder, "chapters_tab");
+ 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_chapter");
if (start == end)
{
- gtk_widget_hide(widget);
- }
- else
- {
- gtk_widget_show(widget);
+ 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);
}
update_title_duration(ud);
}
@@ -1631,16 +1643,16 @@ end_chapter_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
set_destination(ud);
}
- widget = GHB_WIDGET (ud->builder, "chapters_tab");
+ 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_chapter");
if (start == end)
{
- gtk_widget_hide(widget);
- }
- else
- {
- gtk_widget_show(widget);
+ 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);
}
update_title_duration(ud);
}
@@ -2467,6 +2479,11 @@ ghb_backend_events(signal_user_data_t *ud)
gtk_progress_bar_set_fraction (scan_prog, 1.0);
gtk_widget_hide(GTK_WIDGET(scan_prog));
+ if (!ghb_settings_get_boolean(ud->settings, "preset_modified"))
+ {
+ ghb_refresh_preset(ud);
+ }
+
ghb_title_info_t tinfo;
ghb_update_ui_combo_box(ud, "title", 0, FALSE);