[mousetweaks] Continue chasing our gsettings keys.
- From: Gerd Kohlberger <gerdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mousetweaks] Continue chasing our gsettings keys.
- Date: Thu, 21 Oct 2010 18:14:26 +0000 (UTC)
commit d9b30f3913ba78e2576b3705cae5a8b3dbca69e6
Author: Gerd Kohlberger <gerdk src gnome org>
Date: Thu Oct 21 19:47:07 2010 +0200
Continue chasing our gsettings keys.
All mousetweaks gsettings keys that are used by universal-access panel
in gnome-control-center have moved to org.gnome.desktop.a11y.mouse
in the gsettings-desktop-schemas module.
This commit adds a dependency on gsettings-desktop-schemas >= 0.0.2.
configure.ac | 2 +
data/mousetweaks.convert | 9 -----
data/org.gnome.mousetweaks.gschema.xml.in | 47 +----------------------------
src/mt-common.h | 6 ++--
src/mt-main.c | 4 +-
src/mt-settings.c | 23 ++++++++++----
src/mt-settings.h | 1 +
7 files changed, 25 insertions(+), 67 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2d1cca0..7cc24b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,12 +47,14 @@ GLIB_REQUIRED=2.25.3
GIO_REQUIRED=2.25.9
GTK_REQUIRED=2.91.0
GSD_REQUIRED=2.91.0
+GDS_REQUIRED=0.0.2
PKG_CHECK_MODULES(DEPENDENCIES,
glib-2.0 >= $GLIB_REQUIRED
gio-2.0 >= $GIO_REQUIRED
gtk+-3.0 >= $GTK_REQUIRED
gnome-settings-daemon >= $GSD_REQUIRED
+ gsettings-desktop-schemas >= $GDS_REQUIRED
x11
xcursor
xfixes
diff --git a/data/mousetweaks.convert b/data/mousetweaks.convert
index c2f6ab1..e7f82a8 100644
--- a/data/mousetweaks.convert
+++ b/data/mousetweaks.convert
@@ -1,12 +1,3 @@
[org.gnome.mousetweaks]
-dwell-time = /desktop/gnome/accessibility/mouse/dwell_time
-dwell-threshold = /desktop/gnome/accessibility/mouse/threshold
-dwell-gesture-single = /desktop/gnome/accessibility/mouse/dwell_gesture_single
-dwell-gesture-double = /desktop/gnome/accessibility/mouse/dwell_gesture_double
-dwell-gesture-drag = /desktop/gnome/accessibility/mouse/dwell_gesture_drag
-dwell-gesture-secondary = /desktop/gnome/accessibility/mouse/dwell_gesture_secondary
-dwell-mode = /desktop/gnome/accessibility/mouse/dwell_mode
-ctw-visible = /desktop/gnome/accessibility/mouse/dwell_show_ctw
ctw-style = /desktop/gnome/accessibility/mouse/button_layout
-ssc-time = /desktop/gnome/accessibility/mouse/delay_time
animate-cursor = /desktop/gnome/accessibility/mouse/animate_cursor
diff --git a/data/org.gnome.mousetweaks.gschema.xml.in b/data/org.gnome.mousetweaks.gschema.xml.in
index b7ac349..371f3cf 100644
--- a/data/org.gnome.mousetweaks.gschema.xml.in
+++ b/data/org.gnome.mousetweaks.gschema.xml.in
@@ -1,55 +1,10 @@
<schemalist>
- <schema id="org.gnome.mousetweaks" path="/desktop/gnome/accessibility/mouse/" gettext-domain="mousetweaks">
- <key name="dwell-time" type="d">
- <default>1.20</default>
- <_summary>Dwell click time</_summary>
- <_description>Time in seconds before a click is triggered.</_description>
- </key>
- <key name="dwell-threshold" type="i">
- <default>10</default>
- <_summary>Movement threshold</_summary>
- <_description>Distance in pixels before movement will be recognized.</_description>
- </key>
- <key name="dwell-gesture-single" type="i">
- <default>0</default>
- <_summary>Gesture single click</_summary>
- <_description>Direction to perform a single click. ("0" = Left, "1" = Right, "2" = Up, "3" = Down)</_description>
- </key>
- <key name="dwell-gesture-double" type="i">
- <default>2</default>
- <_summary>Gesture double click</_summary>
- <_description>Direction to perform a double click. ("0" = Left, "1" = Right, "2" = Up, "3" = Down)</_description>
- </key>
- <key name="dwell-gesture-drag" type="i">
- <default>3</default>
- <_summary>Gesture drag click</_summary>
- <_description>Direction to perform dragging. ("0" = Left, "1" = Right, "2" = Up, "3" = Down)</_description>
- </key>
- <key name="dwell-gesture-secondary" type="i">
- <default>1</default>
- <_summary>Gesture secondary click</_summary>
- <_description>Direction to perform a secondary click. ("0" = Left, "1" = Right, "2" = Up, "3" = Down)</_description>
- </key>
- <key name="dwell-mode" type="i">
- <default>0</default>
- <_summary>Dwell click mode</_summary>
- <_description>The active dwell click mode. ("0" = Window mode, "1" = Gesture mode)</_description>
- </key>
- <key name="ctw-visible" type="b">
- <default>true</default>
- <_summary>Show click type window</_summary>
- <_description>Show click type window.</_description>
- </key>
+ <schema id="org.gnome.mousetweaks" path="/desktop/gnome/a11y/mouse/" gettext-domain="mousetweaks">
<key name="ctw-style" type="i">
<default>2</default>
<_summary>Click type window style</_summary>
<_description>Button style in the click type window. ("0" = Text, "1" = Icon, "2" = Both)</_description>
</key>
- <key name="ssc-time" type="d">
- <default>1.20</default>
- <_summary>Secondary click time</_summary>
- <_description>Time in seconds before a simulated secondary click is triggered.</_description>
- </key>
<key name="animate-cursor" type="b">
<default>true</default>
<_summary>Animate cursor</_summary>
diff --git a/src/mt-common.h b/src/mt-common.h
index 9f2f6b7..baca247 100644
--- a/src/mt-common.h
+++ b/src/mt-common.h
@@ -38,7 +38,10 @@ G_BEGIN_DECLS
/* GSettings */
#define MT_SCHEMA_ID "org.gnome.mousetweaks"
+#define KEY_CTW_STYLE "ctw-style"
+#define KEY_ANIMATE_CURSOR "animate-cursor"
+#define A11Y_MOUSE_SCHEMA_ID "org.gnome.desktop.a11y.mouse"
#define KEY_DWELL_TIME "dwell-time"
#define KEY_DWELL_THRESHOLD "dwell-threshold"
#define KEY_DWELL_MODE "dwell-mode"
@@ -48,11 +51,8 @@ G_BEGIN_DECLS
#define KEY_DWELL_GESTURE_SECONDARY "dwell-gesture-secondary"
#define KEY_SSC_TIME "ssc-time"
#define KEY_CTW_VISIBLE "ctw-visible"
-#define KEY_CTW_STYLE "ctw-style"
-#define KEY_ANIMATE_CURSOR "animate-cursor"
#define GSD_MOUSE_SCHEMA_ID "org.gnome.settings-daemon.peripherals.mouse"
-
#define KEY_DWELL_ENABLED "dwell-click-enabled"
#define KEY_SSC_ENABLED "secondary-click-enabled"
diff --git a/src/mt-main.c b/src/mt-main.c
index 179e6fd..497fd18 100644
--- a/src/mt-main.c
+++ b/src/mt-main.c
@@ -680,11 +680,11 @@ mt_main (int argc, char **argv, MtCliArgs cli_args)
ms = mt_settings_get_default ();
/* bind timers */
- g_settings_bind (ms->mt_settings, KEY_SSC_TIME,
+ g_settings_bind (ms->a11y_settings, KEY_SSC_TIME,
mt->ssc_timer, "target-time",
G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_NO_SENSITIVITY);
- g_settings_bind (ms->mt_settings, KEY_DWELL_TIME,
+ g_settings_bind (ms->a11y_settings, KEY_DWELL_TIME,
mt->dwell_timer, "target-time",
G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_NO_SENSITIVITY);
diff --git a/src/mt-settings.c b/src/mt-settings.c
index d404fbe..f3be0ee 100644
--- a/src/mt-settings.c
+++ b/src/mt-settings.c
@@ -48,16 +48,19 @@ mt_settings_init (MtSettings *ms)
{
ms->mt_settings = g_settings_new (MT_SCHEMA_ID);
- BIND_PROP (ms->mt_settings, "dwell-threshold", KEY_DWELL_THRESHOLD);
- BIND_PROP (ms->mt_settings, "dwell-mode", KEY_DWELL_MODE);
- BIND_PROP (ms->mt_settings, "dwell-gesture-single", KEY_DWELL_GESTURE_SINGLE);
- BIND_PROP (ms->mt_settings, "dwell-gesture-double", KEY_DWELL_GESTURE_DOUBLE);
- BIND_PROP (ms->mt_settings, "dwell-gesture-drag", KEY_DWELL_GESTURE_DRAG);
- BIND_PROP (ms->mt_settings, "dwell-gesture-secondary", KEY_DWELL_GESTURE_SECONDARY);
- BIND_PROP (ms->mt_settings, "ctw-visible", KEY_CTW_VISIBLE);
BIND_PROP (ms->mt_settings, "ctw-style", KEY_CTW_STYLE);
BIND_PROP (ms->mt_settings, "animate-cursor", KEY_ANIMATE_CURSOR);
+ ms->a11y_settings = g_settings_new (A11Y_MOUSE_SCHEMA_ID);
+
+ BIND_PROP (ms->a11y_settings, "dwell-threshold", KEY_DWELL_THRESHOLD);
+ BIND_PROP (ms->a11y_settings, "dwell-mode", KEY_DWELL_MODE);
+ BIND_PROP (ms->a11y_settings, "dwell-gesture-single", KEY_DWELL_GESTURE_SINGLE);
+ BIND_PROP (ms->a11y_settings, "dwell-gesture-double", KEY_DWELL_GESTURE_DOUBLE);
+ BIND_PROP (ms->a11y_settings, "dwell-gesture-drag", KEY_DWELL_GESTURE_DRAG);
+ BIND_PROP (ms->a11y_settings, "dwell-gesture-secondary", KEY_DWELL_GESTURE_SECONDARY);
+ BIND_PROP (ms->a11y_settings, "ctw-visible", KEY_CTW_VISIBLE);
+
ms->gsd_settings = g_settings_new (GSD_MOUSE_SCHEMA_ID);
BIND_PROP (ms->gsd_settings, "dwell-enabled", KEY_DWELL_ENABLED);
@@ -81,6 +84,12 @@ mt_settings_dispose (GObject *object)
ms->gsd_settings = NULL;
}
+ if (ms->a11y_settings)
+ {
+ g_object_unref (ms->a11y_settings);
+ ms->a11y_settings = NULL;
+ }
+
G_OBJECT_CLASS (mt_settings_parent_class)->dispose (object);
}
diff --git a/src/mt-settings.h b/src/mt-settings.h
index 5b485bb..27be476 100644
--- a/src/mt-settings.h
+++ b/src/mt-settings.h
@@ -37,6 +37,7 @@ struct _MtSettings
GSettings *mt_settings;
GSettings *gsd_settings;
+ GSettings *a11y_settings;
gint dwell_threshold;
gint dwell_mode;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]