gpointing-device-settings r51 - trunk/modules
- From: hiikezoe svn gnome org
- To: svn-commits-list gnome org
- Subject: gpointing-device-settings r51 - trunk/modules
- Date: Sat, 28 Feb 2009 05:21:50 +0000 (UTC)
Author: hiikezoe
Date: Sat Feb 28 05:21:50 2009
New Revision: 51
URL: http://svn.gnome.org/viewvc/gpointing-device-settings?rev=51&view=rev
Log:
GConf key in gpds-touchpad-gconf.h.
Added:
trunk/modules/gpds-touchpad-gconf.h
Modified:
trunk/modules/Makefile.am
trunk/modules/gpds-touchpad-ui.c
Modified: trunk/modules/Makefile.am
==============================================================================
--- trunk/modules/Makefile.am (original)
+++ trunk/modules/Makefile.am Sat Feb 28 05:21:50 2009
@@ -9,9 +9,11 @@
$(GNOME_SETTINGS_DAEMON_CFLAGS)
$(COVERAGE_CFLAGS)
-AM_LDFLAGS = \
- -avoid-version -module \
- -no-undefined -export-dynamic $(LIBTOOL_EXPORT_OPTIONS)
+AM_LDFLAGS = \
+ -avoid-version -module \
+ -no-undefined \
+ -export-dynamic \
+ $(LIBTOOL_EXPORT_OPTIONS)
gpds_module_LTLIBRARIES = \
trackpoint.la \
@@ -24,4 +26,6 @@
$(GNOME_SETTINGS_DAEMON_LIBS)
trackpoint_la_SOURCES = gpds-trackpoint-ui.c
-touchpad_la_SOURCES = gpds-touchpad-ui.c
+touchpad_la_SOURCES = \
+ gpds-touchpad-ui.c \
+ gpds-touchpad-gconf.h
Added: trunk/modules/gpds-touchpad-gconf.h
==============================================================================
--- (empty file)
+++ trunk/modules/gpds-touchpad-gconf.h Sat Feb 28 05:21:50 2009
@@ -0,0 +1,46 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Copyright (C) 2009 Hiroyuki Ikezoe <poincare ikezoe net>
+ *
+ * This library is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __GPDS_TOUCHPAD_GCONF_H__
+#define __GPDS_TOUCHPAD_GCONF_H__
+
+#define GPDS_TOUCHPAD_SENSITIVITY_KEY "/desktop/gnome/peripherals/touchpad/sensitivity"
+#define GPDS_TOUCHPAD_OFF_KEY "/desktop/gnome/peripherals/touchpad/off"
+#define GPDS_TOUCHPAD_MAX_TAP_TIME_KEY "/desktop/gnome/peripherals/touchpad/max_tap_time"
+#define GPDS_TOUCHPAD_HORIZONTAL_SCROLL_DELTA_KEY "/desktop/gnome/peripherals/touchpad/horiz_scroll_delta"
+#define GPDS_TOUCHPAD_HORIZONTAL_SCROLLING_KEY "/desktop/gnome/peripherals/touchpad/horizontal_scrolling"
+#define GPDS_TOUCHPAD_VERTICAL_SCROLL_DELTA_KEY "/desktop/gnome/peripherals/touchpad/vert_scroll_delta"
+#define GPDS_TOUCHPAD_VERTICAL_SCROLLING_KEY "/desktop/gnome/peripherals/touchpad/vertical_scrolling"
+#define GPDS_TOUCHPAD_EDGEMOTIONUSEALWAYS_KEY "/desktop/gnome/peripherals/touchpad/edge_motion_use_always"
+#define GPDS_TOUCHPAD_COASTENABLE_KEY "/desktop/gnome/peripherals/touchpad/coast_enable"
+#define GPDS_TOUCHPAD_CIRCULAR_SCROLLING_KEY "/desktop/gnome/peripherals/touchpad/circular_scrolling"
+#define GPDS_TOUCHPAD_CIRCSCROLLDELTA_KEY "/desktop/gnome/peripherals/touchpad/circ_scroll_delta"
+#define GPDS_TOUCHPAD_CIRCSCROLLTRIGGER_KEY "/desktop/gnome/peripherals/touchpad/circ_scroll_trigger"
+#define GPDS_TOUCHPAD_FASTTAPS_KEY "/desktop/gnome/peripherals/touchpad/fast_taps"
+#define GPDS_TOUCHPAD_BUTTONFORTAP_KEY "/desktop/gnome/peripherals/touchpad/button_for_tap"
+#define GPDS_TOUCHPAD_ABSCOORDX_KEY "/desktop/gnome/peripherals/touchpad/abs_coord_x"
+#define GPDS_TOUCHPAD_ABSCOORDY_KEY "/desktop/gnome/peripherals/touchpad/abs_coord_y"
+#define GPDS_TOUCHPAD_MINSPEED_KEY "/desktop/gnome/peripherals/touchpad/min_speed"
+#define GPDS_TOUCHPAD_MAXSPEED_KEY "/desktop/gnome/peripherals/touchpad/max_speed"
+#define GPDS_TOUCHPAD_ACCELFACTOR_KEY "/desktop/gnome/peripherals/touchpad/accel_factor"
+
+#endif /* __GPDS_TOUCHPAD_GCONF_H__ */
+/*
+vi:ts=4:nowrap:ai:expandtab:sw=4
+*/
Modified: trunk/modules/gpds-touchpad-ui.c
==============================================================================
--- trunk/modules/gpds-touchpad-ui.c (original)
+++ trunk/modules/gpds-touchpad-ui.c Sat Feb 28 05:21:50 2009
@@ -26,6 +26,8 @@
#include <gpointing-device-settings.h>
#include <gconf/gconf-client.h>
+#include "gpds-touchpad-gconf.h"
+
#define DEVICE_NAME "SynPS/2 Synaptics TouchPad"
#define EDGES "Synaptics Edges"
@@ -59,26 +61,6 @@
#define PRESSURE_MOTION "Synaptics Pressure Motion"
#define GRAB_EVENT_DEVICE "Synaptics Grab Event Device"
-#define SENSITIVITY_KEY "/desktop/gnome/peripherals/touchpad/sensitivity"
-#define OFF_KEY "/desktop/gnome/peripherals/touchpad/off"
-#define MAX_TAP_TIME_KEY "/desktop/gnome/peripherals/touchpad/max_tap_time"
-#define HORIZONTAL_SCROLL_DELTA_KEY "/desktop/gnome/peripherals/touchpad/horiz_scroll_delta"
-#define HORIZONTAL_SCROLLING_KEY "/desktop/gnome/peripherals/touchpad/horizontal_scrolling"
-#define VERTICAL_SCROLL_DELTA_KEY "/desktop/gnome/peripherals/touchpad/vert_scroll_delta"
-#define VERTICAL_SCROLLING_KEY "/desktop/gnome/peripherals/touchpad/vertical_scrolling"
-#define EDGEMOTIONUSEALWAYS_KEY "/desktop/gnome/peripherals/touchpad/edge_motion_use_always"
-#define COASTENABLE_KEY "/desktop/gnome/peripherals/touchpad/coast_enable"
-#define CIRCULAR_SCROLLING_KEY "/desktop/gnome/peripherals/touchpad/circular_scrolling"
-#define CIRCSCROLLDELTA_KEY "/desktop/gnome/peripherals/touchpad/circ_scroll_delta"
-#define CIRCSCROLLTRIGGER_KEY "/desktop/gnome/peripherals/touchpad/circ_scroll_trigger"
-#define FASTTAPS_KEY "/desktop/gnome/peripherals/touchpad/fast_taps"
-#define BUTTONFORTAP_KEY "/desktop/gnome/peripherals/touchpad/button_for_tap"
-#define ABSCOORDX_KEY "/desktop/gnome/peripherals/touchpad/abs_coord_x"
-#define ABSCOORDY_KEY "/desktop/gnome/peripherals/touchpad/abs_coord_y"
-#define MINSPEED_KEY "/desktop/gnome/peripherals/touchpad/min_speed"
-#define MAXSPEED_KEY "/desktop/gnome/peripherals/touchpad/max_speed"
-#define ACCELFACTOR_KEY "/desktop/gnome/peripherals/touchpad/accel_factor"
-
static const gchar *touchpad_device_names[] =
{
"SynPS/2 Synaptics TouchPad",
@@ -351,7 +333,7 @@
set_range_property(ui->xinput, range, TAP_TIME);
time = gtk_range_get_value(range);
- gconf_client_set_int(ui->gconf, MAX_TAP_TIME_KEY, (gint)time, NULL);
+ gconf_client_set_int(ui->gconf, GPDS_TOUCHPAD_MAX_TAP_TIME_KEY, (gint)time, NULL);
}
static void
@@ -365,7 +347,7 @@
set_toggle_property(ui->xinput, button, TAP_FAST_TAP);
check = gtk_toggle_button_get_active(button);
- gconf_client_set_bool(ui->gconf, FASTTAPS_KEY, check, NULL);
+ gconf_client_set_bool(ui->gconf, GPDS_TOUCHPAD_FASTTAPS_KEY, check, NULL);
}
static void
@@ -381,7 +363,7 @@
set_widget_sensitivity(builder, "circular_scroll_box", button);
check = gtk_toggle_button_get_active(button);
- gconf_client_set_bool(ui->gconf, CIRCULAR_SCROLLING_KEY, check, NULL);
+ gconf_client_set_bool(ui->gconf, GPDS_TOUCHPAD_CIRCULAR_SCROLLING_KEY, check, NULL);
}
static void
@@ -396,7 +378,7 @@
set_edge_scroll_toggle_property(ui->xinput, builder);
check = gtk_toggle_button_get_active(button);
- gconf_client_set_bool(ui->gconf, VERTICAL_SCROLLING_KEY, check, NULL);
+ gconf_client_set_bool(ui->gconf, GPDS_TOUCHPAD_VERTICAL_SCROLLING_KEY, check, NULL);
}
static void
@@ -411,7 +393,7 @@
set_edge_scroll_toggle_property(ui->xinput, builder);
check = gtk_toggle_button_get_active(button);
- gconf_client_set_bool(ui->gconf, HORIZONTAL_SCROLLING_KEY, check, NULL);
+ gconf_client_set_bool(ui->gconf, GPDS_TOUCHPAD_HORIZONTAL_SCROLLING_KEY, check, NULL);
}
static void
@@ -426,7 +408,7 @@
set_scrolling_distance_range_property(ui->xinput, builder);
distance = gtk_range_get_value(range);
- gconf_client_set_int(ui->gconf, HORIZONTAL_SCROLL_DELTA_KEY, (gint)distance, NULL);
+ gconf_client_set_int(ui->gconf, GPDS_TOUCHPAD_HORIZONTAL_SCROLL_DELTA_KEY, (gint)distance, NULL);
}
static void
@@ -441,7 +423,7 @@
set_scrolling_distance_range_property(ui->xinput, builder);
distance = gtk_range_get_value(range);
- gconf_client_set_int(ui->gconf, VERTICAL_SCROLL_DELTA_KEY, (gint)distance, NULL);
+ gconf_client_set_int(ui->gconf, GPDS_TOUCHPAD_VERTICAL_SCROLL_DELTA_KEY, (gint)distance, NULL);
}
static void
@@ -560,14 +542,14 @@
return;
}
- enable = gconf_client_get_bool(ui->gconf, VERTICAL_SCROLLING_KEY, &error);
+ enable = gconf_client_get_bool(ui->gconf, GPDS_TOUCHPAD_VERTICAL_SCROLLING_KEY, &error);
object = gtk_builder_get_object(builder, "vertical_scroll_check");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(object),
error ? values[0] == 1 ? TRUE : FALSE : enable);
if (error)
g_clear_error(&error);
- enable = gconf_client_get_bool(ui->gconf, HORIZONTAL_SCROLLING_KEY, &error);
+ enable = gconf_client_get_bool(ui->gconf, GPDS_TOUCHPAD_HORIZONTAL_SCROLLING_KEY, &error);
object = gtk_builder_get_object(builder, "horizontal_scroll_check");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(object),
error ? values[1] == 1 ? TRUE : FALSE : enable);
@@ -598,13 +580,13 @@
return;
}
- distance = gconf_client_get_int(ui->gconf, VERTICAL_SCROLL_DELTA_KEY, &error);
+ distance = gconf_client_get_int(ui->gconf, GPDS_TOUCHPAD_VERTICAL_SCROLL_DELTA_KEY, &error);
object = gtk_builder_get_object(builder, "vertical_scroll_scale");
gtk_range_set_value(GTK_RANGE(object), error ? values[0] : distance);
if (error)
g_clear_error(&error);
- distance = gconf_client_get_int(ui->gconf, HORIZONTAL_SCROLL_DELTA_KEY, &error);
+ distance = gconf_client_get_int(ui->gconf, GPDS_TOUCHPAD_HORIZONTAL_SCROLL_DELTA_KEY, &error);
object = gtk_builder_get_object(builder, "horizontal_scroll_scale");
gtk_range_set_value(GTK_RANGE(object), error ? values[1] : distance);
if (error)
@@ -620,17 +602,17 @@
set_integer_property_from_preference(touchpad_ui,
TAP_TIME,
- MAX_TAP_TIME_KEY,
+ GPDS_TOUCHPAD_MAX_TAP_TIME_KEY,
builder,
"tapping_time_scale");
set_boolean_property_from_preference(touchpad_ui,
TAP_FAST_TAP,
- FASTTAPS_KEY,
+ GPDS_TOUCHPAD_FASTTAPS_KEY,
builder,
"faster_tapping_check");
set_boolean_property_from_preference(touchpad_ui,
CIRCULAR_SCROLLING,
- CIRCULAR_SCROLLING_KEY,
+ GPDS_TOUCHPAD_CIRCULAR_SCROLLING_KEY,
builder,
"circular_scroll_check");
set_edge_scroll_property_from_preference(touchpad_ui, builder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]