gpointing-device-settings r191 - in trunk: data modules modules/common modules/gnome-settings-daemon-plugins
- From: hiikezoe svn gnome org
- To: svn-commits-list gnome org
- Subject: gpointing-device-settings r191 - in trunk: data modules modules/common modules/gnome-settings-daemon-plugins
- Date: Mon, 9 Mar 2009 06:55:30 +0000 (UTC)
Author: hiikezoe
Date: Mon Mar 9 06:55:29 2009
New Revision: 191
URL: http://svn.gnome.org/viewvc/gpointing-device-settings?rev=191&view=rev
Log:
support for continuous edge scrolling option.
Modified:
trunk/data/touchpad.ui.in
trunk/modules/common/gpds-touchpad-definitions.h
trunk/modules/gnome-settings-daemon-plugins/gsd-touchpad-manager.c
trunk/modules/gpds-touchpad-ui.c
Modified: trunk/data/touchpad.ui.in
==============================================================================
--- trunk/data/touchpad.ui.in (original)
+++ trunk/data/touchpad.ui.in Mon Mar 9 06:55:29 2009
@@ -574,6 +574,24 @@
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="continuous_edge_scrolling">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Enable continuous edge scrolling</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkCheckButton" id="circular_scrolling">
<property name="visible">True</property>
<property name="can_focus">True</property>
Modified: trunk/modules/common/gpds-touchpad-definitions.h
==============================================================================
--- trunk/modules/common/gpds-touchpad-definitions.h (original)
+++ trunk/modules/common/gpds-touchpad-definitions.h Mon Mar 9 06:55:29 2009
@@ -29,6 +29,7 @@
#define GPDS_TOUCHPAD_HORIZONTAL_SCROLLING_KEY "horizontal_scrolling"
#define GPDS_TOUCHPAD_VERTICAL_SCROLLING_DISTANCE_KEY "vertical_scrolling_distance"
#define GPDS_TOUCHPAD_VERTICAL_SCROLLING_KEY "vertical_scrolling"
+#define GPDS_TOUCHPAD_CONTINUOUS_EDGE_SCROLLING_KEY "continuous_edge_scrolling"
#define GPDS_TOUCHPAD_CIRCULAR_SCROLLING_KEY "circular_scrolling"
#define GPDS_TOUCHPAD_CIRCULAR_SCROLLING_DISTANCE_KEY "circular_scrolling_distance"
#define GPDS_TOUCHPAD_CIRCULAR_SCROLLING_TRIGGER_KEY "circular_scrolling_trigger"
Modified: trunk/modules/gnome-settings-daemon-plugins/gsd-touchpad-manager.c
==============================================================================
--- trunk/modules/gnome-settings-daemon-plugins/gsd-touchpad-manager.c (original)
+++ trunk/modules/gnome-settings-daemon-plugins/gsd-touchpad-manager.c Mon Mar 9 06:55:29 2009
@@ -108,21 +108,22 @@
DEFINE_SET_INT_FUNCTION (circular_scrolling_trigger, GPDS_TOUCHPAD_CIRCULAR_SCROLLING_TRIGGER)
static void
-set_horizontal_and_vertical_scrolling (GsdPointingDeviceManager *manager,
- GpdsXInput *xinput,
- GConfClient *gconf)
+set_edge_scrolling (GsdPointingDeviceManager *manager,
+ GpdsXInput *xinput,
+ GConfClient *gconf)
{
- gboolean h_enable, v_enable;
+ gboolean h_enable, v_enable, c_enable = FALSE;
gint properties[3];
if (!gpds_gconf_get_boolean(gconf, GPDS_TOUCHPAD_VERTICAL_SCROLLING_KEY, &v_enable))
return;
if (!gpds_gconf_get_boolean(gconf, GPDS_TOUCHPAD_HORIZONTAL_SCROLLING_KEY, &h_enable))
return;
+ gpds_gconf_get_boolean(gconf, GPDS_TOUCHPAD_CONTINUOUS_EDGE_SCROLLING_KEY, &c_enable);
properties[0] = v_enable ? 1 : 0;
properties[1] = h_enable ? 1 : 0;
- properties[2] = 0;
+ properties[2] = c_enable ? 1 : 0;
gpds_xinput_set_int_properties(xinput,
gpds_touchpad_xinput_get_name(GPDS_TOUCHPAD_EDGE_SCROLLING),
@@ -175,7 +176,7 @@
set_touchpad_off(manager, xinput, gconf);
set_tap_fast_tap(manager, xinput, gconf);
set_tap_time(manager, xinput, gconf);
- set_horizontal_and_vertical_scrolling(manager, xinput, gconf);
+ set_edge_scrolling(manager, xinput, gconf);
set_horizontal_and_vertical_scrolling_distance(manager, xinput, gconf);
set_circular_scrolling(manager, xinput, gconf);
set_circular_scrolling_trigger(manager, xinput, gconf);
@@ -212,11 +213,12 @@
case GCONF_VALUE_BOOL:
if (!strcmp(key, GPDS_TOUCHPAD_TAP_FAST_TAP_KEY)) {
set_tap_fast_tap(manager, xinput, client);
- } else if (!strcmp(key, GPDS_TOUCHPAD_CIRCULAR_SCROLLING_KEY)) {
+ } else if (!strcmp(key, GPDS_TOUCHPAD_CIRCULAR_SCROLLING_KEY)) {
set_circular_scrolling(manager, xinput, client);
- } else if (!strcmp(key, GPDS_TOUCHPAD_VERTICAL_SCROLLING_KEY) ||
- !strcmp(key, GPDS_TOUCHPAD_HORIZONTAL_SCROLLING_KEY)) {
- set_horizontal_and_vertical_scrolling(manager, xinput, client);
+ } else if (!strcmp(key, GPDS_TOUCHPAD_VERTICAL_SCROLLING_KEY) ||
+ !strcmp(key, GPDS_TOUCHPAD_HORIZONTAL_SCROLLING_KEY) ||
+ !strcmp(key, GPDS_TOUCHPAD_CONTINUOUS_EDGE_SCROLLING_KEY)) {
+ set_edge_scrolling(manager, xinput, client);
}
break;
case GCONF_VALUE_INT:
Modified: trunk/modules/gpds-touchpad-ui.c
==============================================================================
--- trunk/modules/gpds-touchpad-ui.c (original)
+++ trunk/modules/gpds-touchpad-ui.c Mon Mar 9 06:55:29 2009
@@ -178,7 +178,8 @@
properties[1] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(object)) ? 1 :0;
set_widget_sensitivity(builder, "horizontal_scrolling_box", properties[1]);
- properties[2] = 0;
+ object = gtk_builder_get_object(builder, "continuous_edge_scrolling");
+ properties[2] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(object)) ? 1 :0;
if (!gpds_xinput_set_int_properties(xinput,
gpds_touchpad_xinput_get_name(GPDS_TOUCHPAD_EDGE_SCROLLING),
@@ -360,6 +361,21 @@
}
static void
+cb_continuous_edge_scrolling_toggled (GtkToggleButton *button, gpointer user_data)
+{
+ GpdsTouchpadUI *ui = GPDS_TOUCHPAD_UI(user_data);
+ GtkBuilder *builder;
+ gboolean check;
+
+ builder = gpds_ui_get_builder(GPDS_UI(user_data));
+
+ set_edge_scroll_toggle_property(ui->xinput, builder);
+
+ check = gtk_toggle_button_get_active(button);
+ gpds_ui_set_gconf_bool(GPDS_UI(ui), GPDS_TOUCHPAD_CONTINUOUS_EDGE_SCROLLING_KEY, check);
+}
+
+static void
set_circular_scrolling_trigger_button_state (GpdsTouchpadUI *ui,
GpdsTouchpadCircularScrollingTrigger trigger)
{
@@ -516,6 +532,7 @@
CONNECT(faster_tapping_check, toggled);
CONNECT(circular_scrolling, toggled);
CONNECT(vertical_scrolling, toggled);
+ CONNECT(continuous_edge_scrolling, toggled);
CONNECT(vertical_scrolling_scale, value_changed);
CONNECT(horizontal_scrolling, toggled);
CONNECT(horizontal_scrolling_scale, value_changed);
@@ -636,6 +653,11 @@
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(object), enable);
set_widget_sensitivity(builder, "horizontal_scrolling_box", enable);
+ if (!gpds_ui_get_gconf_bool(GPDS_UI(ui), GPDS_TOUCHPAD_CONTINUOUS_EDGE_SCROLLING_KEY, &enable))
+ enable = (values[0] == 1);
+ object = gtk_builder_get_object(builder, "continuos_edge_scrolling");
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(object), enable);
+
g_free(values);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]