Merge lp:~attente/gnome-settings-daemon/accountsservice-input-sources into lp:~ubuntu-desktop/gnome-settings-daemon/ubuntu

Proposed by William Hua
Status: Merged
Merged at revision: 410
Proposed branch: lp:~attente/gnome-settings-daemon/accountsservice-input-sources
Merge into: lp:~ubuntu-desktop/gnome-settings-daemon/ubuntu
Diff against target: 170 lines (+107/-4)
5 files modified
debian/changelog (+4/-0)
debian/control (+4/-2)
debian/control.in (+4/-2)
debian/patches/series (+1/-0)
debian/patches/sync_input_sources_to_accountsservice.patch (+94/-0)
To merge this branch: bzr merge lp:~attente/gnome-settings-daemon/accountsservice-input-sources
Reviewer Review Type Date Requested Status
Ubuntu Desktop Pending
Review via email: mp+178963@code.launchpad.net

Commit message

Sync the user's input sources up to accountsservice.

Description of the change

Sync the user's input sources up to accountsservice.

This depends on the debdiff from https://bugs.launchpad.net/ubuntu/+source/accountsservice/+bug/1209227.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-07-16 03:58:04 +0000
3+++ debian/changelog 2013-08-07 12:59:36 +0000
4@@ -18,6 +18,10 @@
5 - Set switch-input-source keyboard shortcut to Super+Space to match ibus,
6 GNOME 3.8 and Windows 8 default
7
8+ [ William Hua ]
9+ * debian/patches/sync_input_sources_to_accountsservice.patch:
10+ - Update user's accountsservice input sources whenever they change.
11+
12 -- William Hua <william.hua@canonical.com> Mon, 15 Jul 2013 17:20:35 -0400
13
14 gnome-settings-daemon (3.6.4-0ubuntu15) saucy; urgency=low
15
16=== modified file 'debian/control'
17--- debian/control 2013-07-08 15:46:29 +0000
18+++ debian/control 2013-08-07 12:59:36 +0000
19@@ -43,7 +43,8 @@
20 xserver-xorg-input-wacom,
21 libgnomekbd-dev (>= 3.5.1),
22 libxklavier-dev,
23- libibus-1.0-dev (>= 1.5.0)
24+ libibus-1.0-dev (>= 1.5.0),
25+ libaccountsservice-dev (>= 0.6.34)
26 Standards-Version: 3.9.3
27 Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/gnome-settings-daemon/ubuntu
28
29@@ -53,7 +54,8 @@
30 ${misc:Depends},
31 gsettings-desktop-schemas (>= 3.3.90-0ubuntu2),
32 nautilus-data (>= 2.91.3-1),
33- ibus (>= 1.5.0)
34+ ibus (>= 1.5.0),
35+ accountsservice (>= 0.6.34)
36 Recommends: pulseaudio,
37 systemd-services,
38 Pre-Depends: ${misc:Pre-Depends}
39
40=== modified file 'debian/control.in'
41--- debian/control.in 2013-06-13 20:04:58 +0000
42+++ debian/control.in 2013-08-07 12:59:36 +0000
43@@ -39,7 +39,8 @@
44 xserver-xorg-input-wacom,
45 libgnomekbd-dev (>= 3.5.1),
46 libxklavier-dev,
47- libibus-1.0-dev (>= 1.5.0)
48+ libibus-1.0-dev (>= 1.5.0),
49+ libaccountsservice-dev (>= 0.6.34)
50 Standards-Version: 3.9.3
51 Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/gnome-settings-daemon/ubuntu
52
53@@ -49,7 +50,8 @@
54 ${misc:Depends},
55 gsettings-desktop-schemas (>= 3.3.90-0ubuntu2),
56 nautilus-data (>= 2.91.3-1),
57- ibus (>= 1.5.0)
58+ ibus (>= 1.5.0),
59+ accountsservice (>= 0.6.34)
60 Recommends: pulseaudio,
61 systemd-services,
62 Pre-Depends: ${misc:Pre-Depends}
63
64=== modified file 'debian/patches/series'
65--- debian/patches/series 2013-07-09 14:43:45 +0000
66+++ debian/patches/series 2013-08-07 12:59:36 +0000
67@@ -29,3 +29,4 @@
68 ibus-ubuntu-session.patch
69 git_keyboard_Adapt_to_gnome_xkb_info_API_change.patch
70 git_keyboard_Adapt_to_gnome_xkb_info_API_change_2.patch
71+sync_input_sources_to_accountsservice.patch
72
73=== added file 'debian/patches/sync_input_sources_to_accountsservice.patch'
74--- debian/patches/sync_input_sources_to_accountsservice.patch 1970-01-01 00:00:00 +0000
75+++ debian/patches/sync_input_sources_to_accountsservice.patch 2013-08-07 12:59:36 +0000
76@@ -0,0 +1,94 @@
77+--- a/plugins/keyboard/gsd-keyboard-manager.c
78++++ b/plugins/keyboard/gsd-keyboard-manager.c
79+@@ -50,6 +50,8 @@
80+ #include <ibus.h>
81+ #endif
82+
83++#include <act/act.h>
84++
85+ #include "gnome-settings-profile.h"
86+ #include "gsd-keyboard-manager.h"
87+ #include "gsd-input-helper.h"
88+@@ -1059,6 +1061,50 @@
89+ g_free (current_module);
90+ }
91+
92++static void
93++user_notify_is_loaded_cb (GObject *object,
94++ GParamSpec *pspec,
95++ gpointer user_data)
96++{
97++ ActUser *user = ACT_USER (object);
98++ GSettings *settings = user_data;
99++
100++ if (act_user_is_loaded (user)) {
101++ GVariant *sources;
102++
103++ g_signal_handlers_disconnect_by_data (user, user_data);
104++
105++ sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
106++ act_user_set_input_sources (user, sources);
107++ g_variant_unref (sources);
108++ }
109++}
110++
111++static void
112++manager_notify_is_loaded_cb (GObject *object,
113++ GParamSpec *pspec,
114++ gpointer user_data)
115++{
116++ ActUserManager *manager = ACT_USER_MANAGER (object);
117++
118++ gboolean loaded;
119++ g_object_get (manager, "is-loaded", &loaded, NULL);
120++
121++ if (loaded) {
122++ ActUser *user;
123++
124++ g_signal_handlers_disconnect_by_data (manager, user_data);
125++
126++ user = act_user_manager_get_user (manager, g_get_user_name ());
127++
128++ if (act_user_is_loaded (user))
129++ user_notify_is_loaded_cb (G_OBJECT (user), NULL, user_data);
130++ else
131++ g_signal_connect (user, "notify::is-loaded",
132++ user_notify_is_loaded_cb, user_data);
133++ }
134++}
135++
136+ static gboolean
137+ apply_input_sources_settings (GSettings *settings,
138+ gpointer keys,
139+@@ -1074,11 +1120,20 @@
140+ gchar *layout = NULL;
141+ gchar *variant = NULL;
142+ gchar **options = NULL;
143++ ActUserManager *user_manager;
144++ gboolean user_manager_loaded;
145+
146+ sources = g_settings_get_value (priv->input_sources_settings, KEY_INPUT_SOURCES);
147+ current = g_settings_get_uint (priv->input_sources_settings, KEY_CURRENT_INPUT_SOURCE);
148+ n_sources = g_variant_n_children (sources);
149+
150++ user_manager = act_user_manager_get_default ();
151++ g_object_get (user_manager, "is-loaded", &user_manager_loaded, NULL);
152++ if (user_manager_loaded)
153++ manager_notify_is_loaded_cb (G_OBJECT (user_manager), NULL, settings);
154++ else
155++ g_signal_connect (user_manager, "notify::is-loaded", G_CALLBACK (manager_notify_is_loaded_cb), settings);
156++
157+ if (n_sources < 1)
158+ goto exit;
159+
160+--- a/configure.ac
161++++ b/configure.ac
162+@@ -218,7 +218,7 @@
163+ fi
164+ AM_CONDITIONAL(HAVE_IBUS, test "x$enable_ibus" == "xyes")
165+
166+-PKG_CHECK_MODULES(KEYBOARD, xkbfile $IBUS_MODULE gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
167++PKG_CHECK_MODULES(KEYBOARD, accountsservice xkbfile $IBUS_MODULE gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
168+
169+ dnl ---------------------------------------------------------------------------
170+ dnl - Housekeeping plugin stuff

Subscribers

People subscribed via source and target branches

to all changes: