summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <jstebbins.hb@gmail.com>2009-04-20 16:18:19 +0000
committerjstebbins <jstebbins.hb@gmail.com>2009-04-20 16:18:19 +0000
commit6dbd37eb5f981cc747088944b9f81e5fc521cd52 (patch)
treebe1d80e7591563bfa7b52be55845347b3c6cf63c /gtk
parent4fffefa4da3832f6883fb21527847deaaf8455b4 (diff)
LinGui:
change destination file extension from mp4 to m4v when chapter markers are enabled git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2345 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/callbacks.c37
-rw-r--r--gtk/src/ghb.ui2
2 files changed, 38 insertions, 1 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 5fc55f410..f8362a58e 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -1083,6 +1083,8 @@ G_MODULE_EXPORT void
container_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
const GValue *audio_list;
+ gboolean markers;
+
g_debug("container_changed_cb ()");
ghb_widget_to_setting(ud->settings, widget);
update_destination_extension(ud);
@@ -1103,6 +1105,18 @@ container_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
}
g_free(container);
}
+ markers = ghb_settings_get_boolean(ud->settings, "ChapterMarkers");
+ if (markers)
+ {
+ gchar *container;
+
+ container = ghb_settings_get_string(ud->settings, "FileFormat");
+ if (strcmp(container, "mp4") == 0)
+ {
+ ghb_ui_update(ud, "FileFormat", ghb_string_value("m4v"));
+ }
+ g_free(container);
+ }
}
static gchar*
@@ -1280,6 +1294,29 @@ setting_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
}
G_MODULE_EXPORT void
+chapter_markers_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ gboolean markers;
+
+ ghb_widget_to_setting(ud->settings, widget);
+ ghb_check_dependency(ud, widget);
+ ghb_clear_presets_selection(ud);
+ ghb_live_reset(ud);
+ markers = ghb_settings_get_boolean(ud->settings, "ChapterMarkers");
+ if (markers)
+ {
+ gchar *container;
+
+ container = ghb_settings_get_string(ud->settings, "FileFormat");
+ if (strcmp(container, "mp4") == 0)
+ {
+ ghb_ui_update(ud, "FileFormat", ghb_string_value("m4v"));
+ }
+ g_free(container);
+ }
+}
+
+G_MODULE_EXPORT void
vquality_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
ghb_widget_to_setting(ud->settings, widget);
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 0ae7f93c7..0e6139893 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -3018,7 +3018,7 @@ no-dct-decimate=0:cabac=1</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">Chapter Markers</property>
<property name="draw_indicator">True</property>
- <signal handler="setting_widget_changed_cb" name="toggled"/>
+ <signal handler="chapter_markers_changed_cb" name="toggled"/>
</object>
<packing>
<property name="expand">False</property>