summaryrefslogtreecommitdiffstats
path: root/gtk/src/callbacks.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-01-28 23:18:21 +0000
committerjstebbins <[email protected]>2011-01-28 23:18:21 +0000
commitf839f412fb7c05e20201d3b09560e5ba085a4fe1 (patch)
tree92be215f512b5801337b3363bbb3ed597a72dcbc /gtk/src/callbacks.c
parent5eac1c0562ead268ffa4ace6bf86981c7f884faf (diff)
LinGui: add CFR option for "Same as source" framerate.
Since there seem to be a lot of players that do not properly support VFR, add a CFR option that can be used with "Same as source". The framerate to use comes from the title and the cfr flag is set in the job. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3770 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/callbacks.c')
-rw-r--r--gtk/src/callbacks.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index f225ff93a..3bc6c0d41 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -1584,6 +1584,28 @@ ptop_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
}
G_MODULE_EXPORT void
+framerate_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ ghb_widget_to_setting(ud->settings, widget);
+
+ if (ghb_settings_combo_int(ud->settings, "VideoFramerate") != 0)
+ {
+ if (!ghb_settings_get_boolean(ud->settings, "VideoFrameratePFR"))
+ {
+ ghb_ui_update(ud, "VideoFramerateCFR", ghb_boolean_value(TRUE));
+ }
+ }
+ if (ghb_settings_combo_int(ud->settings, "VideoFramerate") == 0 &&
+ ghb_settings_get_boolean(ud->settings, "VideoFrameratePFR"))
+ {
+ ghb_ui_update(ud, "VideoFramerateVFR", ghb_boolean_value(TRUE));
+ }
+ ghb_check_dependency(ud, widget, NULL);
+ ghb_clear_presets_selection(ud);
+ ghb_live_reset(ud);
+}
+
+G_MODULE_EXPORT void
setting_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
ghb_widget_to_setting(ud->settings, widget);
@@ -2159,7 +2181,7 @@ ghb_cancel_encode(signal_user_data_t *ud, const gchar *extra_msg)
NULL);
response = gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy (dialog);
- switch (response)
+ switch ((int)response)
{
case 1:
ghb_stop_queue();
@@ -2197,7 +2219,7 @@ ghb_cancel_encode2(signal_user_data_t *ud, const gchar *extra_msg)
NULL);
response = gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy (dialog);
- switch (response)
+ switch ((int)response)
{
case 1:
ghb_stop_queue();