summaryrefslogtreecommitdiffstats
path: root/gtk/src/x264handler.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-06-18 17:31:46 +0000
committerjstebbins <[email protected]>2010-06-18 17:31:46 +0000
commit52cc84bfac801b89127403139a3cd67d786700c5 (patch)
tree14031dcc7e43596594376f010ecd377c12bc4bc0 /gtk/src/x264handler.c
parent66e0b095b658b047bb155ec9cdcb0a3d1b4fa466 (diff)
LinGui: change psy_trellis increments to 0.05
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3387 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/x264handler.c')
-rw-r--r--gtk/src/x264handler.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gtk/src/x264handler.c b/gtk/src/x264handler.c
index 2368801a6..11be36eb8 100644
--- a/gtk/src/x264handler.c
+++ b/gtk/src/x264handler.c
@@ -42,6 +42,38 @@ x264_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
}
G_MODULE_EXPORT void
+x264_slider_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ ghb_widget_to_setting(ud->settings, widget);
+
+ // Lock slider values to multiples of step_increment
+ GtkAdjustment * adj = gtk_range_get_adjustment(GTK_RANGE(widget));
+ gdouble step = gtk_adjustment_get_step_increment(adj);
+ gdouble val = gtk_range_get_value(GTK_RANGE(widget));
+ gdouble new_val = ((int)((val + step / 2) / step)) * step;
+ gdouble diff = val - new_val;
+ if ( diff > 0.0001 || diff < -0.0001 )
+ {
+ gtk_range_set_value(GTK_RANGE(widget), new_val);
+ }
+ else if (!ignore_options_update)
+ {
+ ignore_options_update = TRUE;
+ x264_opt_update(ud, widget);
+ ignore_options_update = FALSE;
+ }
+ ghb_check_dependency(ud, widget, NULL);
+ ghb_clear_presets_selection(ud);
+}
+
+G_MODULE_EXPORT gchar*
+x264_format_slider_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud)
+{
+ return g_strdup_printf("%-6.6g", val);
+}
+
+
+G_MODULE_EXPORT void
x264_me_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
gint me;