Merge lp:~seb128/unity-settings-daemon/touchpad-key-new-gsettings into lp:unity-settings-daemon

Proposed by Sebastien Bacher on 2015-09-30
Status: Merged
Approved by: Iain Lane on 2015-09-30
Approved revision: 4096
Merged at revision: 4096
Proposed branch: lp:~seb128/unity-settings-daemon/touchpad-key-new-gsettings
Merge into: lp:unity-settings-daemon
Diff against target: 40 lines (+10/-4)
1 file modified
plugins/media-keys/gsd-media-keys-manager.c (+10/-4)
To merge this branch: bzr merge lp:~seb128/unity-settings-daemon/touchpad-key-new-gsettings
Reviewer Review Type Date Requested Status
Iain Lane 2015-09-30 Approve on 2015-09-30
Unity Settings Daemon Development Team 2015-09-30 Pending
Review via email: mp+272918@code.launchpad.net

Commit message

Backport upstream commit

media-keys: Port touchpad toggle code to new settings schema
We forgot to update this on commit
ca754de5039fed6cb96b883dd8e41d8b22ebeea6 .

https://bugzilla.gnome.org/show_bug.cgi?id=747739

Description of the change

Backport upstream commit

media-keys: Port touchpad toggle code to new settings schema
We forgot to update this on commit
ca754de5039fed6cb96b883dd8e41d8b22ebeea6 .

https://bugzilla.gnome.org/show_bug.cgi?id=747739

To post a comment you must log in.
Iain Lane (laney) wrote :

Yeah, this is a good one to get, thanks!

review: Approve
Iain Lane (laney) wrote :

feel free to silo & upload

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/media-keys/gsd-media-keys-manager.c'
2--- plugins/media-keys/gsd-media-keys-manager.c 2015-03-18 16:31:59 +0000
3+++ plugins/media-keys/gsd-media-keys-manager.c 2015-09-30 14:09:16 +0000
4@@ -41,6 +41,8 @@
5 #include <gio/gdesktopappinfo.h>
6 #include <gio/gunixfdlist.h>
7
8+#include <gdesktop-enums.h>
9+
10 #ifdef HAVE_GUDEV
11 #include <gudev/gudev.h>
12 #endif
13@@ -114,8 +116,8 @@
14 #define SETTINGS_INTERFACE_DIR "org.gnome.desktop.interface"
15 #define SETTINGS_POWER_DIR "org.gnome.settings-daemon.plugins.power"
16 #define SETTINGS_XSETTINGS_DIR "org.gnome.settings-daemon.plugins.xsettings"
17-#define SETTINGS_TOUCHPAD_DIR "org.gnome.settings-daemon.peripherals.touchpad"
18-#define TOUCHPAD_ENABLED_KEY "touchpad-enabled"
19+#define SETTINGS_TOUCHPAD_DIR "org.gnome.desktop.peripherals.touchpad"
20+#define TOUCHPAD_ENABLED_KEY "send-events"
21 #define HIGH_CONTRAST "HighContrast"
22
23 #define VOLUME_STEP 6 /* percents for one volume button press */
24@@ -1324,11 +1326,15 @@
25 }
26
27 settings = g_settings_new (SETTINGS_TOUCHPAD_DIR);
28- state = g_settings_get_boolean (settings, TOUCHPAD_ENABLED_KEY);
29+ state = (g_settings_get_enum (settings, TOUCHPAD_ENABLED_KEY) ==
30+ G_DESKTOP_DEVICE_SEND_EVENTS_ENABLED);
31
32 do_touchpad_osd_action (manager, !state);
33
34- g_settings_set_boolean (settings, TOUCHPAD_ENABLED_KEY, !state);
35+ g_settings_set_enum (settings, TOUCHPAD_ENABLED_KEY,
36+ !state ?
37+ G_DESKTOP_DEVICE_SEND_EVENTS_ENABLED :
38+ G_DESKTOP_DEVICE_SEND_EVENTS_DISABLED);
39 g_object_unref (settings);
40 }
41

Subscribers

People subscribed via source and target branches