From 058960744aa47f3fa708eebef69c4a9039e7d529 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 14 Oct 2008 13:31:31 +0000 Subject: [PATCH] drop a no longer needed patch --- fix-gdm-layout-even-more.patch | 33 ------------------- fix-gdm-layout.patch | 21 ++++++------ ...daemon-2.21.91-ignore-model-if-evdev.patch | 16 --------- gnome-settings-daemon.spec | 8 +++-- keyboard-layout-variants.patch | 13 -------- 5 files changed, 16 insertions(+), 75 deletions(-) delete mode 100644 fix-gdm-layout-even-more.patch delete mode 100644 gnome-settings-daemon-2.21.91-ignore-model-if-evdev.patch delete mode 100644 keyboard-layout-variants.patch diff --git a/fix-gdm-layout-even-more.patch b/fix-gdm-layout-even-more.patch deleted file mode 100644 index 179108b..0000000 --- a/fix-gdm-layout-even-more.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c.fix-gdm-layout-even-more gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c ---- gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c.fix-gdm-layout-even-more 2008-10-10 21:52:55.000000000 -0400 -+++ gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c 2008-10-10 22:25:28.000000000 -0400 -@@ -162,14 +162,27 @@ apply_xkb_settings (void) - /* With GDM the user can already set a layout from the login - * screen. Try to keep that setting */ - if (gdm_keyboard_layout != NULL) { -+ /* if there is just a single layout, -+ * just override it (it is probably the X server default) -+ */ -+ if (current_kbd_config.layouts_variants && -+ current_kbd_config.layouts_variants->next == NULL) { -+ g_free (current_kbd_config.layouts_variants->data); -+ g_slist_free (current_kbd_config.layouts_variants); -+ current_kbd_config.layouts_variants = NULL; -+ } - if (current_kbd_config.layouts_variants == NULL) { -- current_kbd_config.layouts_variants = g_slist_append (NULL, (char *) gdm_keyboard_layout); -+ current_kbd_config.layouts_variants = g_slist_append (NULL, g_strdup (gdm_keyboard_layout)); - gconf_client_set_list (conf_client, - GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS, - GCONF_VALUE_STRING, - current_kbd_config.layouts_variants, - NULL); -- } else { -+ } -+ else { -+ /* if there are multiple layouts, -+ * try to find the one closest to the gdm layout -+ */ - GSList *l; - int i; - size_t len = strlen (gdm_keyboard_layout); diff --git a/fix-gdm-layout.patch b/fix-gdm-layout.patch index 59201b2..43adc34 100644 --- a/fix-gdm-layout.patch +++ b/fix-gdm-layout.patch @@ -1,12 +1,12 @@ diff -up gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c.fix-gdm-layout gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c ---- gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c.fix-gdm-layout 2008-10-12 14:45:57.000000000 -0400 -+++ gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c 2008-10-12 15:11:51.000000000 -0400 -@@ -142,12 +142,38 @@ apply_xkb_settings (void) +--- gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c.fix-gdm-layout 2008-10-14 09:26:57.000000000 -0400 ++++ gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c 2008-10-14 09:27:09.000000000 -0400 +@@ -142,12 +142,39 @@ apply_xkb_settings (void) { GConfClient *conf_client; GkbdKeyboardConfig current_sys_kbd_config; + int group_to_activate = -1; -+ const char *gdm_layout; ++ const char *gdm_layout; if (!inited_ok) return; @@ -22,10 +22,9 @@ diff -up gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c.fix-gd + gdm_keyboard_layout = NULL; + if (gdm_layout != NULL) { + GSList *layouts; -+ + layouts = gconf_client_get_list (conf_client, + GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS, -+ GCONF_VALUE_STRING, ++ GCONF_VALUE_STRING, + NULL); + if (layouts == NULL) { + layouts = g_slist_append (layouts, g_strdup (gdm_layout)); @@ -35,12 +34,14 @@ diff -up gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c.fix-gd + layouts, + NULL); + } ++ g_slist_foreach (layouts, (GFunc)g_free, NULL); ++ g_slist_free (layouts); + } + gkbd_keyboard_config_init (¤t_sys_kbd_config, conf_client, xkl_engine); -@@ -158,29 +184,20 @@ apply_xkb_settings (void) +@@ -158,29 +185,20 @@ apply_xkb_settings (void) gkbd_keyboard_config_load_from_x_current (¤t_sys_kbd_config, NULL); @@ -74,7 +75,7 @@ diff -up gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c.fix-gd + size_t len = strlen (gdm_layout); + for (i = 0, l = current_kbd_config.layouts_variants; l; i++, l = l->next) { + char *lv = l->data; -+ if (strncmp (lv, gdm_layout, len) == 0 && (lv[len] == '\0' || lv[len] == '\t')) { +++ if (strncmp (lv, gdm_layout, len) == 0 && (lv[len] == '\0' || lv[len] == '\t')) { + group_to_activate = i; + break; + } @@ -82,8 +83,8 @@ diff -up gnome-settings-daemon-2.24.0/plugins/keyboard/gsd-keyboard-xkb.c.fix-gd - gdm_keyboard_layout = NULL; } - /* Ignore model if using evdev, since evdev needs its own model -@@ -206,6 +223,8 @@ apply_xkb_settings (void) + /* Activate - only if different! */ +@@ -199,6 +217,8 @@ apply_xkb_settings (void) xkl_debug (100, "Actual KBD configuration was not changed: redundant notification\n"); diff --git a/gnome-settings-daemon-2.21.91-ignore-model-if-evdev.patch b/gnome-settings-daemon-2.21.91-ignore-model-if-evdev.patch deleted file mode 100644 index 4d4aee5..0000000 --- a/gnome-settings-daemon-2.21.91-ignore-model-if-evdev.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- gnome-settings-daemon-2.23.2/plugins/keyboard/gsd-keyboard-xkb.c.ignore-layout-if-using-evdev 2008-05-14 00:42:44.000000000 -0400 -+++ gnome-settings-daemon-2.23.2/plugins/keyboard/gsd-keyboard-xkb.c 2008-05-14 19:25:17.000000000 -0400 -@@ -181,6 +181,13 @@ apply_xkb_settings (void) - gdm_keyboard_layout = NULL; - } - -+ /* Ignore model if using evdev, since evdev needs its own model -+ */ -+ if (strcmp (initial_sys_kbd_config.model, "evdev") == 0) { -+ g_free (current_kbd_config.model); -+ current_kbd_config.model = g_strdup ("evdev"); -+ } -+ - /* Activate - only if different! */ - if (!gkbd_keyboard_config_equals - (¤t_kbd_config, ¤t_sys_kbd_config)) { diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index caffbea..567abf8 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 2.24.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -31,7 +31,6 @@ BuildRequires: gettext BuildRequires: perl(XML::Parser) BuildRequires: autoconf, automake, libtool, intltool -Patch2: gnome-settings-daemon-2.21.91-ignore-model-if-evdev.patch Patch6: gnome-settings-daemon-2.23.4-drop-sample-cache.patch Patch7: gnome-settings-daemon-2.23.91-fnf7-cycle.patch @@ -59,7 +58,6 @@ developing applications that use %{name}. %prep %setup -q -%patch2 -p1 -b .ignore-layout-if-using-evdev %patch6 -p1 -b .drop-sample-cache %patch7 -p1 -b .fnf7-cycle %patch8 -p1 -b .fade @@ -163,6 +161,10 @@ fi %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Tue Oct 14 2008 Matthias Clasen - 2.24.0-8 +- Drop a patch that is no longer needed with the evdev ruleset + in xkeyboard-config + * Sun Oct 12 2008 Matthias Clasen - 2.24.0-7 - Try harder not to override peoples configured keyboard layouts diff --git a/keyboard-layout-variants.patch b/keyboard-layout-variants.patch deleted file mode 100644 index fa088b6..0000000 --- a/keyboard-layout-variants.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- gnome-settings-daemon-2.23.91/plugins/keyboard/gsd-keyboard-xkb.c 2008-09-05 18:49:58.000000000 -0400 -+++ hacked/plugins/keyboard/gsd-keyboard-xkb.c 2008-09-05 18:48:11.000000000 -0400 -@@ -172,7 +172,9 @@ - GSList *l; - int i; - for (i = 0, l = current_kbd_config.layouts_variants; l; i++, l = l->next) { -- if (strcmp (gdm_keyboard_layout, l->data) == 0) { -+ char *lv = l->data; -+ size_t len = strlen (gdm_keyboard_layout); -+ if (strncmp (lv, gdm_keyboard_layout, len) == 0 && (lv[len] == '\0' || lv[len] == '\t')) { - xkl_engine_lock_group (current_config.engine, i); - break; - }