[libgnomekbd] fix error at login screen

Ray Strode rstrode at fedoraproject.org
Thu Feb 3 03:24:35 UTC 2011


commit d07b5001fc9f3e6f2d5e85f3332c7ce825d911eb
Author: Ray Strode <rstrode at redhat.com>
Date:   Wed Feb 2 22:24:18 2011 -0500

    fix error at login screen

 fix-error-at-login-screen.patch |   44 +++++++++++++++++++++++++++++++++++++++
 libgnomekbd.spec                |    8 ++++++-
 2 files changed, 51 insertions(+), 1 deletions(-)
---
diff --git a/fix-error-at-login-screen.patch b/fix-error-at-login-screen.patch
new file mode 100644
index 0000000..868d672
--- /dev/null
+++ b/fix-error-at-login-screen.patch
@@ -0,0 +1,44 @@
+diff --git a/libgnomekbd/gkbd-keyboard-config.c b/libgnomekbd/gkbd-keyboard-config.c
+index bbbc840..fa562f9 100644
+--- a/libgnomekbd/gkbd-keyboard-config.c
++++ b/libgnomekbd/gkbd-keyboard-config.c
+@@ -328,12 +328,13 @@ gkbd_keyboard_config_load_params (GkbdKeyboardConfig * kbd_config,
+ 	gchar *pc;
+ 
+ 	pc = g_settings_get_string (kbd_config->settings, param_names[0]);
+-	if (pc == NULL) {
++
++	if (pc == NULL || pc[0] == '\0') {
+ 		gkbd_keyboard_config_model_set (kbd_config, NULL);
+ 	} else {
+ 		gkbd_keyboard_config_model_set (kbd_config, pc);
+-		g_free (pc);
+ 	}
++	g_free (pc);
+ 	xkl_debug (150, "Loaded Kbd model: [%s]\n",
+ 		   kbd_config->model ? kbd_config->model : "(null)");
+ 
+@@ -342,10 +343,20 @@ gkbd_keyboard_config_load_params (GkbdKeyboardConfig * kbd_config,
+ 	kbd_config->layouts_variants =
+ 	    g_settings_get_strv (kbd_config->settings, param_names[1]);
+ 
++	if (kbd_config->layouts_variants != NULL && kbd_config->layouts_variants[0] == NULL) {
++		g_strfreev (kbd_config->layouts_variants);
++		kbd_config->layouts_variants = NULL;
++	}
++
+ 	g_strfreev (kbd_config->options);
+ 
+ 	kbd_config->options =
+ 	    g_settings_get_strv (kbd_config->settings, param_names[2]);
++
++	if (kbd_config->options != NULL && kbd_config->options[0] == NULL) {
++		g_strfreev (kbd_config->options);
++		kbd_config->options = NULL;
++	}
+ }
+ 
+ static void
+-- 
+1.7.3.5
+
diff --git a/libgnomekbd.spec b/libgnomekbd.spec
index aee393d..7b0a939 100644
--- a/libgnomekbd.spec
+++ b/libgnomekbd.spec
@@ -1,6 +1,6 @@
 Name:           libgnomekbd
 Version:        2.91.5
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        A keyboard configuration library
 
 Group:          System Environment/Libraries
@@ -21,6 +21,8 @@ BuildRequires:  gobject-introspection-devel
 
 Requires(post): GConf2
 
+Patch0: fix-error-at-login-screen.patch
+
 %description
 The libgnomekbd package contains a GNOME library which manages
 keyboard configuration and offers various widgets related to
@@ -51,6 +53,7 @@ of the keyboard indicator applet.
 
 %prep
 %setup -q
+%patch0 -p1 -b .fix-error
 
 %build
 %configure --disable-static --enable-compile-warnings=no --enable-introspection
@@ -114,6 +117,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
 
 
 %changelog
+* Wed Feb 02 2011 Ray Strode <rstrode at redhat.com> 2.91.5-6
+- Fix error at login screen
+
 * Wed Feb  2 2011 Matthias Clasen <mclasen at redhat.com> 2.91.5-5
 - Build with introspection
 


More information about the scm-commits mailing list