rpms/gnome-settings-daemon/F-12 fix-variant-handling.patch, NONE, 1.1 gnome-settings-daemon.spec, 1.127, 1.128

Matthias Clasen mclasen at fedoraproject.org
Thu Oct 1 14:17:43 UTC 2009


Author: mclasen

Update of /cvs/pkgs/rpms/gnome-settings-daemon/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14083

Modified Files:
	gnome-settings-daemon.spec 
Added Files:
	fix-variant-handling.patch 
Log Message:
Fix handling of keyboard layout variants


fix-variant-handling.patch:
 gsd-keyboard-xkb.c |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

--- NEW FILE fix-variant-handling.patch ---
>From 19a0f24ad0a819c462595dd59846d0c78a4f75d6 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt at ubuntu.com>
Date: Thu, 1 Oct 2009 10:49:48 +0200
Subject: [PATCH] fix variant handling in $GDM_KEYBOARD_LAYOUT

gdm's configuration and $GDM_KEYBOARD_LAYOUT separates layout and
variant with a space, but GConf uses tabs. Convert spaces to tabs in
$GDM_KEYBOARD_LAYOUT to work with either format, for more robustness.

https://bugzilla.gnome.org/show_bug.cgi?id=596897
---
 plugins/keyboard/gsd-keyboard-xkb.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/plugins/keyboard/gsd-keyboard-xkb.c b/plugins/keyboard/gsd-keyboard-xkb.c
index 60495dc..9aa59c0 100644
--- a/plugins/keyboard/gsd-keyboard-xkb.c
+++ b/plugins/keyboard/gsd-keyboard-xkb.c
@@ -217,7 +217,8 @@ apply_xkb_settings (void)
 	GConfClient *conf_client;
 	GkbdKeyboardConfig current_sys_kbd_config;
 	int group_to_activate = -1;
-	const char *gdm_layout;
+	char *gdm_layout;
+	char *s;
 
 	if (!inited_ok)
 		return;
@@ -229,8 +230,16 @@ apply_xkb_settings (void)
 	 * We clear gdm_keyboard_layout early, so we don't risk
 	 * recursion from gconf notification.
 	 */
-	gdm_layout = gdm_keyboard_layout;
+	gdm_layout = g_strdup (gdm_keyboard_layout);
 	gdm_keyboard_layout = NULL;
+
+	/* gdm's configuration and $GDM_KEYBOARD_LAYOUT separates layout and
+	 * variant with a space, but gconf uses tabs; so convert to be robust
+	 * with both */
+	for (s = gdm_layout; s && *s; ++s)
+	    if (*s == ' ')
+		*s = '\t';
+
 	if (gdm_layout != NULL) {
 		GSList *layouts;
 		layouts = gconf_client_get_list (conf_client,
@@ -276,6 +285,8 @@ apply_xkb_settings (void)
 		}
 	}
 
+	g_free (gdm_layout);
+
 	if (!try_activating_xkb_config_if_new (&current_sys_kbd_config)) {
 		if (filter_xkb_config ()) {
 			if (!try_activating_xkb_config_if_new (&current_sys_kbd_config)) {
-- 
1.6.3.3



Index: gnome-settings-daemon.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-settings-daemon/F-12/gnome-settings-daemon.spec,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -p -r1.127 -r1.128
--- gnome-settings-daemon.spec	25 Sep 2009 17:48:56 -0000	1.127
+++ gnome-settings-daemon.spec	1 Oct 2009 14:17:43 -0000	1.128
@@ -1,6 +1,6 @@
 Name:		gnome-settings-daemon
 Version:	2.28.0
-Release:	3%{?dist}
+Release:	4%{?dist}
 Summary:	The daemon sharing settings from GNOME to GTK+/KDE applications
 
 Group:		System Environment/Daemons
@@ -35,6 +35,8 @@ BuildRequires:	libcanberra-devel
 # https://bugzilla.gnome.org/show_bug.cgi?id=596136
 Patch0: osd-rounded-rectangle.patch
 Patch1: osd-visual-refresh.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=596897
+Patch2: fix-variant-handling.patch
 
 %description
 A daemon to share settings from GNOME to other applications. It also
@@ -55,6 +57,7 @@ developing applications that use %{name}
 %setup -q
 %patch0 -p1 -b .osd-rounded-rectangle
 %patch1 -p1 -b .osd-visual-refresh
+%patch2 -p1 -b .fix-variant-handling
 
 %build
 %configure --enable-static=no --enable-profiling --disable-esd
@@ -166,6 +169,9 @@ fi
 %{_libdir}/pkgconfig/gnome-settings-daemon.pc
 
 %changelog
+* Thu Oct  1 2009 Matthias Clasen <mclasen at redhat.com> - 2.28.0-4
+- Fix keyboard variant handling
+
 * Fri Sep 25 2009 Matthias Clasen <mclasen at redhat.com> - 2.28.0-3
 - Align the OSD visuals with the notification theme
 




More information about the fedora-extras-commits mailing list