Merge lp:~darkxst/unity-settings-daemon/lp1372346 into lp:unity-settings-daemon

Proposed by Tim Lunn
Status: Merged
Approved by: Martin Pitt
Approved revision: 4052
Merged at revision: 4052
Proposed branch: lp:~darkxst/unity-settings-daemon/lp1372346
Merge into: lp:unity-settings-daemon
Diff against target: 286 lines (+157/-10)
8 files modified
configure.ac (+3/-1)
debian/changelog (+18/-0)
debian/control (+5/-5)
plugins/keyboard/Makefile.am (+5/-0)
plugins/keyboard/gsd-keyboard-manager.c (+3/-4)
plugins/keyboard/gsd-xkb-utils.c (+90/-0)
plugins/keyboard/gsd-xkb-utils.h (+32/-0)
plugins/keyboard/test-keyboard-ibus-utils.c (+1/-0)
To merge this branch: bzr merge lp:~darkxst/unity-settings-daemon/lp1372346
Reviewer Review Type Date Requested Status
Robert Ancell Approve
Review via email: mp+236312@code.launchpad.net

Commit message

* Rebuild for gnome-desktop 3.12 (LP: #1372346)
* debian/control: Drop depends gnome-settings-daemon-schemas (<< 3.10),
   gnome-settings-daemon 3.12 reverts all removed keys
* Fix merge of xkb get/free_info_vars

Description of the change

  * Rebuild for gnome-desktop 3.12 (LP: #1372346)
  * debian/control: Drop depends gnome-settings-daemon-schemas (<< 3.10),
    gnome-settings-daemon 3.12 reverts all removed keys
  * Fix renaming of xkb get/free_info_vars

To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Or just not have those changes - the CI system will merge the two branches itself.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Change appears to be a straight copy out of gnome-desktop3, which is exactly what we want. Thanks Tim!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2014-08-29 10:24:00 +0000
3+++ configure.ac 2014-09-29 12:19:40 +0000
4@@ -204,8 +204,10 @@
5 fi
6 AM_CONDITIONAL(HAVE_IBUS, test "x$enable_ibus" == "xyes")
7
8-PKG_CHECK_MODULES(KEYBOARD, accountsservice xkbfile $IBUS_MODULE gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
9+PKG_CHECK_MODULES(KEYBOARD, accountsservice xkbfile xkeyboard-config $IBUS_MODULE gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
10
11+XKB_BASE=$($PKG_CONFIG --variable xkb_base xkeyboard-config)
12+AC_SUBST(XKB_BASE)
13 dnl ---------------------------------------------------------------------------
14 dnl - Housekeeping plugin stuff
15 dnl ---------------------------------------------------------------------------
16
17=== modified file 'debian/changelog'
18--- debian/changelog 2014-09-22 11:29:12 +0000
19+++ debian/changelog 2014-09-29 12:19:40 +0000
20@@ -1,3 +1,21 @@
21+unity-settings-daemon (14.04.0+14.10.20140922-0ubuntu3) utopic; urgency=medium
22+
23+ * Rebuild for gnome-desktop 3.12 (LP: #1372346)
24+ * debian/control: Drop depends gnome-settings-daemon-schemas (<< 3.10),
25+ gnome-settings-daemon 3.12 reverts all removed keys
26+ * Fix merge of git patch for xkb get/free info_vars
27+
28+ -- Tim Lunn <tim@feathertop.org> Mon, 29 Sep 2014 20:05:27 +1000
29+
30+unity-settings-daemon (14.04.0+14.10.20140922-0ubuntu2) utopic; urgency=medium
31+
32+ * debian/control:
33+ - Move -dev dependencies from libunity-settings-daemon1 to
34+ libunity-settings-daemon-dev and add it to the correct section
35+ (LP: #1372728)
36+
37+ -- Robert Ancell <robert.ancell@canonical.com> Wed, 24 Sep 2014 15:38:13 +1200
38+
39 unity-settings-daemon (14.04.0+14.10.20140922-0ubuntu1) utopic; urgency=low
40
41 [ Robert Ancell ]
42
43=== modified file 'debian/control'
44--- debian/control 2014-09-22 11:23:09 +0000
45+++ debian/control 2014-09-29 12:19:40 +0000
46@@ -54,7 +54,6 @@
47 gsettings-desktop-schemas (>= 3.7.2.1),
48 nautilus-data (>= 2.91.3-1),
49 gnome-settings-daemon-schemas (>= 3.8),
50- gnome-settings-daemon-schemas (<< 3.10),
51 gsettings-ubuntu-schemas (>= 0.0.1+14.04.20140224),
52 Recommends: ibus (>= 1.5.0),
53 pulseaudio,
54@@ -102,16 +101,17 @@
55 Package: libunity-settings-daemon1
56 Architecture: any
57 Depends: ${shlibs:Depends},
58- ${misc:Depends},
59- libglib2.0-dev,
60- libgtk-3-dev
61+ ${misc:Depends}
62 Description: Helper library for accessing settings
63 This package contains a helper library for unity-control-center
64
65 Package: libunity-settings-daemon-dev
66+Section: libdevel
67 Architecture: any
68 Depends: ${shlibs:Depends},
69 ${misc:Depends},
70- libunity-settings-daemon1 (= ${binary:Version})
71+ libunity-settings-daemon1 (= ${binary:Version}),
72+ libglib2.0-dev,
73+ libgtk-3-dev
74 Description: Helper library for accessing settings (development files)
75 This package contains a headers for using libunity-settings-daemon
76
77=== modified file 'plugins/keyboard/Makefile.am'
78--- plugins/keyboard/Makefile.am 2013-12-04 23:55:26 +0000
79+++ plugins/keyboard/Makefile.am 2014-09-29 12:19:40 +0000
80@@ -19,6 +19,8 @@
81 gsd-keyboard-plugin.c \
82 gsd-keyboard-manager.h \
83 gsd-keyboard-manager.c \
84+ gsd-xkb-utils.h \
85+ gsd-xkb-utils.c \
86 $(NULL)
87
88 libkeyboard_la_CPPFLAGS = \
89@@ -28,6 +30,7 @@
90 -DDATADIR=\""$(pkgdatadir)"\" \
91 -DLIBEXECDIR=\""$(libexecdir)"\" \
92 -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \
93+ -DXKB_BASE=\""$(XKB_BASE)"\" \
94 $(AM_CPPFLAGS)
95
96 libkeyboard_la_CFLAGS = \
97@@ -52,6 +55,8 @@
98 test-keyboard.c \
99 gsd-keyboard-manager.h \
100 gsd-keyboard-manager.c \
101+ gsd-xkb-utils.h \
102+ gsd-xkb-utils.c \
103 $(NULL)
104
105 usd_test_keyboard_CFLAGS = $(libkeyboard_la_CFLAGS)
106
107=== modified file 'plugins/keyboard/gsd-keyboard-manager.c'
108--- plugins/keyboard/gsd-keyboard-manager.c 2014-04-12 09:30:04 +0000
109+++ plugins/keyboard/gsd-keyboard-manager.c 2014-09-29 12:19:40 +0000
110@@ -38,9 +38,7 @@
111 #include <gdk/gdkx.h>
112 #include <gtk/gtk.h>
113
114-#include <X11/XKBlib.h>
115 #include <X11/keysym.h>
116-#include <X11/extensions/XKBrules.h>
117
118 #define GNOME_DESKTOP_USE_UNSTABLE_API
119 #include <libgnome-desktop/gnome-languages.h>
120@@ -57,6 +55,7 @@
121 #include "gsd-keyboard-manager.h"
122 #include "gsd-input-helper.h"
123 #include "gsd-enums.h"
124+#include "gsd-xkb-utils.h"
125
126 #define GSD_KEYBOARD_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_KEYBOARD_MANAGER, GsdKeyboardManagerPrivate))
127
128@@ -987,7 +986,7 @@
129 XkbRF_VarDefsRec *xkb_var_defs;
130 gchar *rules_file_path;
131
132- gnome_xkb_info_get_var_defs (&rules_file_path, &xkb_var_defs);
133+ gsd_xkb_get_var_defs (&rules_file_path, &xkb_var_defs);
134
135 free (xkb_var_defs->options);
136 xkb_var_defs->options = options;
137@@ -1013,7 +1012,7 @@
138 if (gdk_error_trap_pop ())
139 g_warning ("Error loading XKB rules");
140
141- gnome_xkb_info_free_var_defs (xkb_var_defs);
142+ gsd_xkb_free_var_defs (xkb_var_defs);
143 g_free (rules_file_path);
144
145 XkbLockModifiers (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), XkbUseCoreKbd, LockMask, 0);
146
147=== added file 'plugins/keyboard/gsd-xkb-utils.c'
148--- plugins/keyboard/gsd-xkb-utils.c 1970-01-01 00:00:00 +0000
149+++ plugins/keyboard/gsd-xkb-utils.c 2014-09-29 12:19:40 +0000
150@@ -0,0 +1,90 @@
151+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
152+ *
153+ * Copyright (C) 2012 Red Hat, Inc.
154+ *
155+ * This program is free software; you can redistribute it and/or modify
156+ * it under the terms of the GNU General Public License as published by
157+ * the Free Software Foundation; either version 2 of the License, or
158+ * (at your option) any later version.
159+ *
160+ * This program is distributed in the hope that it will be useful,
161+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
162+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
163+ * GNU General Public License for more details.
164+ *
165+ * You should have received a copy of the GNU General Public License
166+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
167+ *
168+ */
169+
170+#include "config.h"
171+
172+#include <stdio.h>
173+#include <stdlib.h>
174+#include <string.h>
175+
176+#include <glib.h>
177+#include <gdk/gdk.h>
178+#include <gdk/gdkx.h>
179+
180+#include "gsd-xkb-utils.h"
181+
182+#ifndef XKB_RULES_FILE
183+#define XKB_RULES_FILE "evdev"
184+#endif
185+#ifndef XKB_LAYOUT
186+#define XKB_LAYOUT "us"
187+#endif
188+#ifndef XKB_MODEL
189+#define XKB_MODEL "pc105+inet"
190+#endif
191+
192+void
193+gsd_xkb_get_var_defs (char **rules,
194+ XkbRF_VarDefsRec **var_defs)
195+{
196+ Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
197+ char *tmp;
198+
199+ g_return_if_fail (rules != NULL);
200+ g_return_if_fail (var_defs != NULL);
201+
202+ *rules = NULL;
203+ *var_defs = g_new0 (XkbRF_VarDefsRec, 1);
204+
205+ gdk_error_trap_push ();
206+
207+ /* Get it from the X property or fallback on defaults */
208+ if (!XkbRF_GetNamesProp (display, rules, *var_defs) || !*rules) {
209+ *rules = strdup (XKB_RULES_FILE);
210+ (*var_defs)->model = strdup (XKB_MODEL);
211+ (*var_defs)->layout = strdup (XKB_LAYOUT);
212+ (*var_defs)->variant = NULL;
213+ (*var_defs)->options = NULL;
214+ }
215+
216+ gdk_error_trap_pop_ignored ();
217+
218+ tmp = *rules;
219+
220+ if (*rules[0] == '/')
221+ *rules = g_strdup (*rules);
222+ else
223+ *rules = g_build_filename (XKB_BASE, "rules", *rules, NULL);
224+
225+ free (tmp);
226+}
227+
228+void
229+gsd_xkb_free_var_defs (XkbRF_VarDefsRec *var_defs)
230+{
231+ g_return_if_fail (var_defs != NULL);
232+
233+ free (var_defs->model);
234+ free (var_defs->layout);
235+ free (var_defs->variant);
236+ free (var_defs->options);
237+
238+ g_free (var_defs);
239+}
240+
241
242=== added file 'plugins/keyboard/gsd-xkb-utils.h'
243--- plugins/keyboard/gsd-xkb-utils.h 1970-01-01 00:00:00 +0000
244+++ plugins/keyboard/gsd-xkb-utils.h 2014-09-29 12:19:40 +0000
245@@ -0,0 +1,32 @@
246+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
247+ *
248+ * Copyright (C) 2012 Red Hat, Inc.
249+ *
250+ * This program is free software; you can redistribute it and/or modify
251+ * it under the terms of the GNU General Public License as published by
252+ * the Free Software Foundation; either version 2 of the License, or
253+ * (at your option) any later version.
254+ *
255+ * This program is distributed in the hope that it will be useful,
256+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
257+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
258+ * GNU General Public License for more details.
259+ *
260+ * You should have received a copy of the GNU General Public License
261+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
262+ *
263+ */
264+
265+#ifndef __GSD_XKB_UTILS_H
266+#define __GSD_XKB_UTILS_H
267+
268+#include <X11/XKBlib.h>
269+#include <X11/extensions/XKBrules.h>
270+
271+void
272+gsd_xkb_get_var_defs (char **rules,
273+ XkbRF_VarDefsRec **var_defs);
274+void
275+gsd_xkb_free_var_defs (XkbRF_VarDefsRec *var_defs);
276+
277+#endif /* __GSD_XKB_UTILS_H */
278
279=== modified file 'plugins/keyboard/test-keyboard-ibus-utils.c'
280--- plugins/keyboard/test-keyboard-ibus-utils.c 2013-03-19 15:18:34 +0000
281+++ plugins/keyboard/test-keyboard-ibus-utils.c 2014-09-29 12:19:40 +0000
282@@ -1,3 +1,4 @@
283+#include "gsd-xkb-utils.c"
284 #include "gsd-keyboard-manager.c"
285
286 static void

Subscribers

People subscribed via source and target branches