[gpointing-device-settings] move speed settings support.
- From: Hiroyuki Ikezoe <hiikezoe src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gpointing-device-settings] move speed settings support.
- Date: Thu, 14 Jan 2010 10:28:02 +0000 (UTC)
commit 2cf20e05d436ab332893e07d6fb79b1d4008843b
Author: Hiroyuki Ikezoe <poincare ikezoe net>
Date: Thu Jan 14 19:27:07 2010 +0900
move speed settings support.
Fix for bug #601901.
data/touchpad.ui | 362 ++++++++++++++++++++
modules/common/gpds-touchpad-definitions.h | 4 +
.../gsd-pointing-device-manager.c | 16 +
.../gsd-pointing-device-manager.h | 5 +
.../gsd-touchpad-manager.c | 40 +++
modules/gpds-touchpad-ui.c | 107 ++++++
6 files changed, 534 insertions(+), 0 deletions(-)
---
diff --git a/data/touchpad.ui b/data/touchpad.ui
index 7bc935d..a6df643 100644
--- a/data/touchpad.ui
+++ b/data/touchpad.ui
@@ -54,6 +54,21 @@
<property name="step_increment">50</property>
<property name="page_size">0</property>
</object>
+ <object class="GtkAdjustment" id="minimum_speed_scale_adjustment">
+ <property name="upper">10</property>
+ <property name="lower">0</property>
+ <property name="page_size">0</property>
+ </object>
+ <object class="GtkAdjustment" id="maximum_speed_scale_adjustment">
+ <property name="upper">10</property>
+ <property name="lower">0</property>
+ <property name="page_size">0</property>
+ </object>
+ <object class="GtkAdjustment" id="acceleration_factor_scale_adjustment">
+ <property name="upper">1</property>
+ <property name="lower">0</property>
+ <property name="page_size">0</property>
+ </object>
<object class="GtkAdjustment" id="adjustment7">
<property name="upper">1000</property>
<property name="lower">0</property>
@@ -1420,6 +1435,353 @@
<property name="angle">0</property>
</object>
</child>
+ <child>
+ <object class="GtkVBox" id="speed_vbox">
+ <property name="border_width">12</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkFrame" id="speed_frame">
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <object class="GtkAlignment" id="alignment9">
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+ <child>
+ <object class="GtkVBox" id="vbox20">
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="minimum_speed_label">
+ <property name="label" translatable="yes">Mimimum speed</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="minimum_speed_box">
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="minimum_speed_slow_label">
+ <property name="label" translatable="yes"><i>Slow</i></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHScale" id="minimum_speed_scale">
+ <property name="can_focus">True</property>
+ <property name="draw_value">False</property>
+ <property name="value_pos">GTK_POS_RIGHT</property>
+ <property name="digits">1</property>
+ <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
+ <property name="inverted">False</property>
+ <property name="adjustment">minimum_speed_scale_adjustment</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="minimum_speed_fast_label">
+ <property name="label" translatable="yes"><i>Fast</i></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="maximum_speed_label">
+ <property name="label" translatable="yes">Maximum speed</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="maximum_speed_box">
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="maximum_speed_slow_label">
+ <property name="label" translatable="yes"><i>Slow</i></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHScale" id="maximum_speed_scale">
+ <property name="can_focus">True</property>
+ <property name="draw_value">False</property>
+ <property name="value_pos">GTK_POS_TOP</property>
+ <property name="digits">0</property>
+ <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
+ <property name="inverted">False</property>
+ <property name="adjustment">maximum_speed_scale_adjustment</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="maximum_speed_fast_label">
+ <property name="label" translatable="yes"><i>Fast</i></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="acceleration_factor_label">
+ <property name="label" translatable="yes">Acceleration</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="acceleration_factor_box">
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="accelaration_factor_low_label">
+ <property name="label" translatable="yes" context="yes"><i>Low</i></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHScale" id="acceleration_factor_scale">
+ <property name="can_focus">True</property>
+ <property name="draw_value">False</property>
+ <property name="value_pos">GTK_POS_TOP</property>
+ <property name="digits">0</property>
+ <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
+ <property name="inverted">False</property>
+ <property name="adjustment">acceleration_factor_scale_adjustment</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="accelaration_factor_high_label">
+ <property name="label" translatable="yes" context="yes"><i>High</i></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="speed-label">
+ <property name="label" translatable="yes">Speed</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </object>
+ </child>
</object>
<packing>
<property name="padding">0</property>
diff --git a/modules/common/gpds-touchpad-definitions.h b/modules/common/gpds-touchpad-definitions.h
index 62f105f..12e6910 100644
--- a/modules/common/gpds-touchpad-definitions.h
+++ b/modules/common/gpds-touchpad-definitions.h
@@ -45,6 +45,10 @@
#define GPDS_TOUCHPAD_CLICK_ACTION_FINGER1_KEY "click_action_finger1"
#define GPDS_TOUCHPAD_CLICK_ACTION_FINGER2_KEY "click_action_finger2"
#define GPDS_TOUCHPAD_CLICK_ACTION_FINGER3_KEY "click_action_finger3"
+#define GPDS_TOUCHPAD_ACCELERATION_FACTOR_KEY "acceleration_factor"
+#define GPDS_TOUCHPAD_MINIMUM_SPEED_KEY "minimum_speed"
+#define GPDS_TOUCHPAD_MAXIMUM_SPEED_KEY "maximum_speed"
+#define GPDS_TOUCHPAD_TRACKSTICK_SPEED_KEY "trackstick_speed"
#endif /* __GPDS_TOUCHPAD_GCONF_H__ */
/*
diff --git a/modules/gnome-settings-daemon-plugins/gsd-pointing-device-manager.c b/modules/gnome-settings-daemon-plugins/gsd-pointing-device-manager.c
index 2e6bd7b..f98532e 100644
--- a/modules/gnome-settings-daemon-plugins/gsd-pointing-device-manager.c
+++ b/modules/gnome-settings-daemon-plugins/gsd-pointing-device-manager.c
@@ -314,6 +314,22 @@ gsd_pointing_device_manager_get_gconf_int (GsdPointingDeviceManager *manager,
return value_exist;
}
+gboolean
+gsd_pointing_device_manager_get_gconf_float (GsdPointingDeviceManager *manager,
+ GConfClient *gconf,
+ const gchar *key,
+ gdouble *value)
+{
+ gboolean value_exist;
+ gchar *gconf_key;
+
+ gconf_key = gsd_pointing_device_manager_build_gconf_key(manager, key);
+ value_exist = gpds_gconf_get_float(gconf, gconf_key, value);
+ g_free(gconf_key);
+
+ return value_exist;
+}
+
/*
vi:ts=4:nowrap:ai:expandtab:sw=4
*/
diff --git a/modules/gnome-settings-daemon-plugins/gsd-pointing-device-manager.h b/modules/gnome-settings-daemon-plugins/gsd-pointing-device-manager.h
index c35ac5e..426e731 100644
--- a/modules/gnome-settings-daemon-plugins/gsd-pointing-device-manager.h
+++ b/modules/gnome-settings-daemon-plugins/gsd-pointing-device-manager.h
@@ -78,6 +78,11 @@ gboolean gsd_pointing_device_manager_get_gconf_int
GConfClient *gconf,
const gchar *key,
gint *value);
+gboolean gsd_pointing_device_manager_get_gconf_float
+ (GsdPointingDeviceManager *manager,
+ GConfClient *gconf,
+ const gchar *key,
+ gdouble *value);
#define DEFINE_SET_VALUE_FUNCTION(function_name, key_name, value_type) \
static void \
diff --git a/modules/gnome-settings-daemon-plugins/gsd-touchpad-manager.c b/modules/gnome-settings-daemon-plugins/gsd-touchpad-manager.c
index d86d2c0..eef8665 100644
--- a/modules/gnome-settings-daemon-plugins/gsd-touchpad-manager.c
+++ b/modules/gnome-settings-daemon-plugins/gsd-touchpad-manager.c
@@ -149,6 +149,37 @@ set_click_action (GsdPointingDeviceManager *manager,
}
static void
+set_move_speed (GsdPointingDeviceManager *manager,
+ GpdsXInput *xinput,
+ GConfClient *gconf)
+{
+ gdouble properties[4];
+
+ gsd_pointing_device_manager_get_gconf_float(manager,
+ gconf,
+ GPDS_TOUCHPAD_MINIMUM_SPEED_KEY,
+ &properties[0]);
+ gsd_pointing_device_manager_get_gconf_float(manager,
+ gconf,
+ GPDS_TOUCHPAD_MAXIMUM_SPEED_KEY,
+ &properties[1]);
+ gsd_pointing_device_manager_get_gconf_float(manager,
+ gconf,
+ GPDS_TOUCHPAD_ACCELERATION_FACTOR_KEY,
+ &properties[2]);
+ gsd_pointing_device_manager_get_gconf_float(manager,
+ gconf,
+ GPDS_TOUCHPAD_TRACKSTICK_SPEED_KEY,
+ &properties[3]);
+
+ gpds_xinput_set_float_properties(xinput,
+ GPDS_TOUCHPAD_MOVE_SPEED,
+ NULL,
+ properties,
+ 4);
+}
+
+static void
set_disable_while_other_device_exists (GsdPointingDeviceManager *manager,
GpdsXInput *xinput,
GConfClient *gconf)
@@ -296,6 +327,7 @@ start_manager (GsdPointingDeviceManager *manager)
set_circular_scrolling_trigger(manager, xinput, gconf);
set_two_finger_scrolling(manager, xinput, gconf);
set_click_action(manager, xinput, gconf);
+ set_move_speed(manager, xinput, gconf);
set_disable_while_other_device_exists(manager, xinput, gconf);
add_device_presence_filter(manager);
@@ -383,6 +415,14 @@ _gconf_client_notify (GsdPointingDeviceManager *manager,
set_click_action(manager, xinput, client);
}
break;
+ case GCONF_VALUE_FLOAT:
+ if (!strcmp(key, GPDS_TOUCHPAD_MINIMUM_SPEED_KEY) ||
+ !strcmp(key, GPDS_TOUCHPAD_MAXIMUM_SPEED_KEY) ||
+ !strcmp(key, GPDS_TOUCHPAD_ACCELERATION_FACTOR_KEY) ||
+ !strcmp(key, GPDS_TOUCHPAD_TRACKSTICK_SPEED_KEY)) {
+ set_move_speed(manager, xinput, client);
+ }
+ break;
default:
break;
}
diff --git a/modules/gpds-touchpad-ui.c b/modules/gpds-touchpad-ui.c
index 467d6b3..57c1f44 100644
--- a/modules/gpds-touchpad-ui.c
+++ b/modules/gpds-touchpad-ui.c
@@ -509,6 +509,78 @@ cb_disable_while_other_device_exists_toggled (GtkToggleButton *button, gpointer
}
static void
+set_move_speed_property (GpdsXInput *xinput, GtkBuilder *builder)
+{
+ GError *error = NULL;
+ GObject *object;
+ gdouble properties[4];
+
+ object = gtk_builder_get_object(builder, "minimum_speed_scale");
+ properties[0] = gtk_range_get_value(GTK_RANGE(object));
+
+ object = gtk_builder_get_object(builder, "maximum_speed_scale");
+ properties[1] = gtk_range_get_value(GTK_RANGE(object));
+
+ object = gtk_builder_get_object(builder, "acceleration_factor_scale");
+ properties[2] = gtk_range_get_value(GTK_RANGE(object));
+
+ if (!gpds_xinput_set_float_properties(xinput,
+ GPDS_TOUCHPAD_MOVE_SPEED,
+ &error,
+ properties,
+ 4)) {
+ if (error) {
+ show_error(error);
+ g_error_free(error);
+ }
+ }
+}
+
+static void
+cb_move_speed_scale_value_changed (GtkRange *range, gpointer user_data)
+{
+ GtkBuilder *builder;
+ GpdsXInput *xinput;
+
+ xinput = gpds_xinput_ui_get_xinput(GPDS_XINPUT_UI(user_data));
+ if (!xinput)
+ return;
+
+ builder = gpds_ui_get_builder(GPDS_UI(user_data));
+ set_move_speed_property(xinput, builder);
+}
+
+static void
+cb_minimum_speed_scale_value_changed (GtkRange *range, gpointer user_data)
+{
+ gdouble value;
+ cb_move_speed_scale_value_changed(range, user_data);
+
+ value = gtk_range_get_value(range);
+ gpds_ui_set_gconf_float(GPDS_UI(user_data), GPDS_TOUCHPAD_MINIMUM_SPEED_KEY, value);
+}
+
+static void
+cb_maximum_speed_scale_value_changed (GtkRange *range, gpointer user_data)
+{
+ gdouble value;
+ cb_move_speed_scale_value_changed(range, user_data);
+
+ value = gtk_range_get_value(range);
+ gpds_ui_set_gconf_float(GPDS_UI(user_data), GPDS_TOUCHPAD_MAXIMUM_SPEED_KEY, value);
+}
+
+static void
+cb_acceleration_factor_scale_value_changed (GtkRange *range, gpointer user_data)
+{
+ gdouble value;
+ cb_move_speed_scale_value_changed(range, user_data);
+
+ value = gtk_range_get_value(range);
+ gpds_ui_set_gconf_float(GPDS_UI(user_data), GPDS_TOUCHPAD_ACCELERATION_FACTOR_KEY, value);
+}
+
+static void
setup_signals (GpdsUI *ui, GtkBuilder *builder)
{
GObject *object;
@@ -539,6 +611,10 @@ setup_signals (GpdsUI *ui, GtkBuilder *builder)
CONNECT(two_finger_vertical_scrolling, toggled);
CONNECT(two_finger_horizontal_scrolling, toggled);
+ CONNECT(minimum_speed_scale, value_changed);
+ CONNECT(maximum_speed_scale, value_changed);
+ CONNECT(acceleration_factor_scale, value_changed);
+
/* cirlular scrolling trigger */
CONNECT(trigger_top_toggle, button_press_event);
CONNECT(trigger_top_right_toggle, button_press_event);
@@ -731,6 +807,36 @@ set_click_action (GpdsUI *ui)
}
static void
+set_move_speed_properties_from_preference (GpdsUI *ui, GtkBuilder *builder)
+{
+ GObject *object;
+ gdouble *values;
+ gulong n_values;
+ gdouble value;
+
+ if (!gpds_xinput_ui_get_xinput_float_property(GPDS_XINPUT_UI(ui),
+ GPDS_TOUCHPAD_MOVE_SPEED,
+ &values, &n_values)) {
+ return;
+ }
+
+ if (!gpds_ui_get_gconf_float(ui, GPDS_TOUCHPAD_MINIMUM_SPEED_KEY, &value))
+ value = values[0];
+ object = gtk_builder_get_object(builder, "minimum_speed_scale");
+ gtk_range_set_value(GTK_RANGE(object), value);
+ if (!gpds_ui_get_gconf_float(ui, GPDS_TOUCHPAD_MAXIMUM_SPEED_KEY, &value))
+ value = values[1];
+ object = gtk_builder_get_object(builder, "maximum_speed_scale");
+ gtk_range_set_value(GTK_RANGE(object), value);
+ if (!gpds_ui_get_gconf_float(ui, GPDS_TOUCHPAD_ACCELERATION_FACTOR_KEY, &value))
+ value = values[2];
+ object = gtk_builder_get_object(builder, "acceleration_factor_scale");
+ gtk_range_set_value(GTK_RANGE(object), value);
+
+ g_free(values);
+}
+
+static void
setup_current_values (GpdsUI *ui, GtkBuilder *builder)
{
GpdsXInputUI *xinput_ui = GPDS_XINPUT_UI(ui);
@@ -763,6 +869,7 @@ setup_current_values (GpdsUI *ui, GtkBuilder *builder)
set_two_finger_scrolling_property_from_preference(ui, builder);
set_touchpad_use_type_property_from_preference(ui);
set_circular_scrolling_trigger_property_from_preference(ui);
+ set_move_speed_properties_from_preference(ui, builder);
set_click_action(ui);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]