Accepting request 25832 from GNOME:Factory
Copy from GNOME:Factory/gnome-settings-daemon based on submit request 25832 from user vuntz OBS-URL: https://build.opensuse.org/request/show/25832 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-settings-daemon?expand=0&rev=42
This commit is contained in:
commit
d3b9033240
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:df3203d804c6522f5c76a0e4d7d900595ac5942308fcd924ffcc8c3af436a4d5
|
||||
size 1175585
|
3
gnome-settings-daemon-2.28.1.tar.bz2
Normal file
3
gnome-settings-daemon-2.28.1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1267ef7d4069189b6bd05b915586b5b323688a136d394e571d29991d59bbadb2
|
||||
size 1174173
|
@ -1,7 +1,7 @@
|
||||
Index: gnome-settings-daemon-2.27.4/plugins/keyboard/gsd-keyboard-xkb.c
|
||||
===================================================================
|
||||
--- gnome-settings-daemon-2.27.4.orig/plugins/keyboard/gsd-keyboard-xkb.c
|
||||
+++ gnome-settings-daemon-2.27.4/plugins/keyboard/gsd-keyboard-xkb.c
|
||||
diff --git a/plugins/keyboard/gsd-keyboard-xkb.c b/plugins/keyboard/gsd-keyboard-xkb.c
|
||||
index cb969e3..3a5ed6c 100644
|
||||
--- a/plugins/keyboard/gsd-keyboard-xkb.c
|
||||
+++ b/plugins/keyboard/gsd-keyboard-xkb.c
|
||||
@@ -137,6 +137,103 @@ apply_desktop_settings (void)
|
||||
gkbd_desktop_config_activate (¤t_config);
|
||||
}
|
||||
@ -28,7 +28,7 @@ Index: gnome-settings-daemon-2.27.4/plugins/keyboard/gsd-keyboard-xkb.c
|
||||
+ options = gconf_client_get_list (conf_client,
|
||||
+ GKBD_KEYBOARD_CONFIG_KEY_OPTIONS,
|
||||
+ GCONF_VALUE_STRING,
|
||||
+ NULL);
|
||||
+ NULL);
|
||||
+
|
||||
+ if (options == NULL) {
|
||||
+ /* nothing in gconf, get the current options from X */
|
||||
@ -84,7 +84,7 @@ Index: gnome-settings-daemon-2.27.4/plugins/keyboard/gsd-keyboard-xkb.c
|
||||
+ GROUP_SWITCHERS_GROUP,
|
||||
+ ci)) {
|
||||
+ const char *id;
|
||||
+
|
||||
+
|
||||
+ id = gkbd_keyboard_config_merge_items
|
||||
+ (GROUP_SWITCHERS_GROUP,
|
||||
+ DEFAULT_GROUP_SWITCH);
|
||||
@ -106,91 +106,12 @@ Index: gnome-settings-daemon-2.27.4/plugins/keyboard/gsd-keyboard-xkb.c
|
||||
static gboolean
|
||||
try_activating_xkb_config_if_new (GkbdKeyboardConfig *current_sys_kbd_config)
|
||||
{
|
||||
@@ -211,6 +308,38 @@ filter_xkb_config (void)
|
||||
return any_change;
|
||||
}
|
||||
@@ -274,6 +371,8 @@ apply_xkb_settings (void)
|
||||
|
||||
+static int
|
||||
+_xkb_layout_strcmp (const char *a,
|
||||
+ const char *b)
|
||||
+{
|
||||
+ char *layout_a;
|
||||
+ char *layout_b;
|
||||
+ char *p;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!a)
|
||||
+ return -(a != b);
|
||||
+ if (!b)
|
||||
+ return (a != b);
|
||||
+
|
||||
+ layout_a = g_strdup (a);
|
||||
+ p = strchr (layout_a, '\t');
|
||||
+ if (p != NULL)
|
||||
+ p[0] = '\0';
|
||||
+
|
||||
+ layout_b = g_strdup (b);
|
||||
+ p = strchr (layout_b, '\t');
|
||||
+ if (p != NULL)
|
||||
+ p[0] = '\0';
|
||||
+
|
||||
+ ret = strcmp (layout_a, layout_b);
|
||||
+
|
||||
+ g_free (layout_a);
|
||||
+ g_free (layout_b);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
apply_xkb_settings (void)
|
||||
{
|
||||
@@ -233,18 +362,44 @@ apply_xkb_settings (void)
|
||||
gdm_keyboard_layout = NULL;
|
||||
if (gdm_layout != NULL) {
|
||||
GSList *layouts;
|
||||
+ GSList *found_node;
|
||||
+
|
||||
layouts = gconf_client_get_list (conf_client,
|
||||
GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
|
||||
GCONF_VALUE_STRING, NULL);
|
||||
- if (layouts == NULL) {
|
||||
- layouts =
|
||||
- g_slist_append (layouts,
|
||||
- g_strdup (gdm_layout));
|
||||
+
|
||||
+ /* Add the layout if it doesn't already exist. XKB limits the
|
||||
+ * total number of layouts to four. If we already have four
|
||||
+ * layouts configured, we replace the last one. This prevents the
|
||||
+ * list from becoming full if the user has a habit of selecting
|
||||
+ * many different keyboard layouts in GDM. */
|
||||
+
|
||||
+ found_node = g_slist_find_custom (layouts, gdm_layout, _xkb_layout_strcmp);
|
||||
+
|
||||
+ if (found_node) {
|
||||
+ if (g_slist_position (layouts, found_node) > 3) {
|
||||
+ /* If the layout we found appears after the
|
||||
+ * fourth entry, we move it up to fourth place.
|
||||
+ * Otherwise, XKB will not activate it. */
|
||||
+ g_free (found_node->data);
|
||||
+ layouts = g_slist_delete_link (layouts, found_node);
|
||||
+ found_node = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!found_node) {
|
||||
+ /* Insert in fourth slot or at the end of list,
|
||||
+ * whichever comes first */
|
||||
+ layouts = g_slist_insert (layouts, g_strdup (gdm_layout), 3);
|
||||
+
|
||||
+ _maybe_add_layout_switcher (layouts, conf_client);
|
||||
g_slist_foreach (free_layouts, (GFunc) g_free, NULL);
|
||||
g_slist_free (free_layouts);
|
||||
+
|
||||
+ _maybe_add_layout_switcher (layouts, conf_client);
|
||||
}
|
||||
|
||||
gconf_client_set_list (conf_client,
|
||||
GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
|
||||
GCONF_VALUE_STRING, layouts,
|
||||
NULL);
|
||||
}
|
||||
+
|
||||
g_slist_foreach (layouts, (GFunc) g_free, NULL);
|
||||
g_slist_free (layouts);
|
||||
}
|
55
gnome-settings-daemon-gdm-layout-variant.patch
Normal file
55
gnome-settings-daemon-gdm-layout-variant.patch
Normal file
@ -0,0 +1,55 @@
|
||||
commit 3d5189d3984980ec97d794f7bde6159bc97e1379
|
||||
Author: Martin Pitt <martin.pitt@ubuntu.com>
|
||||
Date: Mon Oct 19 18:59:07 2009 +0200
|
||||
|
||||
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
|
||||
|
||||
Index: gnome-settings-daemon-2.28.1/plugins/keyboard/gsd-keyboard-xkb.c
|
||||
===================================================================
|
||||
--- gnome-settings-daemon-2.28.1.orig/plugins/keyboard/gsd-keyboard-xkb.c
|
||||
+++ gnome-settings-daemon-2.28.1/plugins/keyboard/gsd-keyboard-xkb.c
|
||||
@@ -314,7 +314,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;
|
||||
@@ -326,8 +327,18 @@ 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;
|
||||
GSList *found_node;
|
||||
@@ -383,6 +394,8 @@ apply_xkb_settings (void)
|
||||
gkbd_keyboard_config_load_from_x_current (¤t_sys_kbd_config,
|
||||
NULL);
|
||||
|
||||
+ g_free (gdm_layout);
|
||||
+
|
||||
if (!try_activating_xkb_config_if_new (¤t_sys_kbd_config)) {
|
||||
if (filter_xkb_config ()) {
|
||||
if (!try_activating_xkb_config_if_new (¤t_sys_kbd_config)) {
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 2 16:44:02 CET 2009 - vuntz@opensuse.org
|
||||
|
||||
- Update to version 2.28.1:
|
||||
+ Try harder to use the keyboard layout passed by gdm.
|
||||
+ Updated translations.
|
||||
- Drop gnome-settings-daemon-try-harder-gdm-layout.patch: part of
|
||||
it is upstream, the other part is in a new patch.
|
||||
- Add gnome-settings-daemon-add-layout-switcher.patch, which is the
|
||||
part that was in the old patch.
|
||||
- Add gnome-settings-daemon-gdm-layout-variant.patch to fix some
|
||||
bug in the GDM keyboard layout handling.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 22 09:54:35 CEST 2009 - mxwu@novell.com
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package gnome-settings-daemon (Version 2.28.0)
|
||||
# spec file for package gnome-settings-daemon (Version 2.28.1)
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
@ -19,9 +19,9 @@
|
||||
|
||||
Name: gnome-settings-daemon
|
||||
%define _name gnome-settings-daemon
|
||||
Version: 2.28.0
|
||||
Release: 2
|
||||
License: GPL v2 or later
|
||||
Version: 2.28.1
|
||||
Release: 1
|
||||
License: GPLv2+
|
||||
Summary: Settings daemon for the GNOME desktop
|
||||
Url: http://www.gnome.org
|
||||
Group: System/GUI/GNOME
|
||||
@ -38,8 +38,10 @@ Patch10: gnome-settings-daemon-bnc462640-mute-action.patch
|
||||
Patch11: gnome-settings-daemon-bnc461755-randr-rotate-wacom.diff
|
||||
# PATCH-FIX-UPSTREAM gnome-settings-daemon-activate-xkb-with-broken.patch bgo585868 vuntz@novell.com -- Make sure we activate the right layout when broken layouts are in gconf
|
||||
Patch12: gnome-settings-daemon-activate-xkb-with-broken.patch
|
||||
# PATCH-FIX-UPSTREAM # gnome-settings-daemon-try-harder-gdm-layout.patch bgo585290 vuntz@novell.com -- Try harder to use the keyboard layout passed from GDM
|
||||
Patch13: gnome-settings-daemon-try-harder-gdm-layout.patch
|
||||
# PATCH-FIX-UPSTREAM gnome-settings-daemon-add-layout-switcher.patch bgo603806 vuntz@opensuse.org -- Add a layout switching combo if needed; the real fix implies some API change in libgnomekbd (see upstream bug)
|
||||
Patch13: gnome-settings-daemon-add-layout-switcher.patch
|
||||
# PATCH-FIX-UPSTREAM gnome-settings-daemon-gdm-layout-variant.patch vuntz@opensuse.org -- Taken from git
|
||||
Patch14: gnome-settings-daemon-gdm-layout-variant.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gnome-common
|
||||
BuildRequires: gnome-desktop-devel
|
||||
@ -66,7 +68,7 @@ This module was previously part of GNOME Control Center, but has been
|
||||
splitted from it for a more general use.
|
||||
|
||||
%package devel
|
||||
License: GPL v2 or later
|
||||
License: GPLv2+
|
||||
Summary: Development package for the GNOME settings daemon
|
||||
Group: System/GUI/GNOME
|
||||
Requires: %{name} = %{version}
|
||||
@ -98,6 +100,7 @@ gnome-patch-translation-prepare
|
||||
#%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
gnome-patch-translation-update
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user