rpms/gdm/devel gdm-system-keyboard.patch, NONE, 1.1 gdm.spec, 1.431, 1.432
Matthias Clasen
mclasen at fedoraproject.org
Mon Oct 20 16:16:54 UTC 2008
- Previous message: rpms/libgsf/devel .cvsignore, 1.22, 1.23 libgsf.spec, 1.60, 1.61 sources, 1.22, 1.23
- Next message: rpms/cheese/devel .cvsignore, 1.18, 1.19 cheese.spec, 1.37, 1.38 sources, 1.18, 1.19
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mclasen
Update of /cvs/extras/rpms/gdm/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19774
Modified Files:
gdm.spec
Added Files:
gdm-system-keyboard.patch
Log Message:
respect system keyboard setting
gdm-system-keyboard.patch:
--- NEW FILE gdm-system-keyboard.patch ---
--- gdm-2.24.0/daemon/gdm-session-direct.c 2008-08-21 00:31:47.000000000 -0400
+++ hacked/daemon/gdm-session-direct.c 2008-10-20 00:20:05.000000000 -0400
@@ -595,14 +595,41 @@
return setlocale (LC_MESSAGES, NULL);
}
+static char *
+get_system_default_layout (void)
+{
+ gchar *text, *p, *q;
+ gsize *length;
+ char *result;
+
+ result = NULL;
+ if (g_file_get_contents ("/etc/sysconfig/keyboard", &text, &length, NULL)) {
+ p = strstr (text, "KEYTABLE=\"");
+ if (p) {
+ p += strlen ("KEYTABLE=\"");
+ q = strchr (p, '"');
+ if (q) {
+ result = g_strndup (p, q - p);
+ }
+ }
+ g_free (text);
+ }
+
+ if (!result) {
+ result = g_strdup ("us");
+ }
+
+ return result;
+}
+
static const char *
get_default_layout_name (GdmSessionDirect *session)
{
- if (session->priv->saved_layout != NULL) {
- return session->priv->saved_layout;
+ if (!session->priv->saved_layout) {
+ session->priv->saved_layout = get_system_default_layout ();
}
- return "us";
+ return session->priv->saved_layout;
}
static char *
@@ -1971,9 +1998,10 @@
"GDM_LANG",
get_language_name (session));
- gdm_session_direct_set_environment_variable (session,
- "GDM_KEYBOARD_LAYOUT",
- get_layout_name (session));
+ if (g_strcmp0 (get_layout_name (session), get_system_default_layout ()) != 0)
+ gdm_session_direct_set_environment_variable (session,
+ "GDM_KEYBOARD_LAYOUT",
+ get_layout_name (session));
gdm_session_direct_set_environment_variable (session,
"DISPLAY",
--- gdm-2.24.0/daemon/gdm-session-settings.c 2008-07-10 11:07:42.000000000 -0400
+++ hacked/daemon/gdm-session-settings.c 2008-10-19 23:55:02.000000000 -0400
@@ -149,8 +149,7 @@
{
g_return_if_fail (GDM_IS_SESSION_SETTINGS (settings));
- if (settings->priv->layout_name == NULL ||
- strcmp (settings->priv->layout_name, layout_name) != 0) {
+ if (g_strcmp0 (settings->priv->layout_name, layout_name) != 0) {
settings->priv->layout_name = g_strdup (layout_name);
g_object_notify (G_OBJECT (settings), "layout-name");
}
Index: gdm.spec
===================================================================
RCS file: /cvs/extras/rpms/gdm/devel/gdm.spec,v
retrieving revision 1.431
retrieving revision 1.432
diff -u -r1.431 -r1.432
--- gdm.spec 15 Oct 2008 21:42:34 -0000 1.431
+++ gdm.spec 20 Oct 2008 16:16:24 -0000 1.432
@@ -16,7 +16,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.24.0
-Release: 10%{?dist}
+Release: 11%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
@@ -100,6 +100,10 @@
# https://bugzilla.redhat.com/show_bug.cgi?id=465121
Patch12: gdm-user-switcher-no-help.patch
+# uses /etc/sysconfig/keyboard and is thus not directly upstreamable
+# should probably be changed to get the system layout from the X server
+Patch13: gdm-system-keyboard.patch
+
# Fedora-specific
Patch99: gdm-2.23.1-fedora-logo.patch
@@ -132,6 +136,7 @@
%patch10 -p1 -b .fix-icon-scale
%patch11 -p1 -b .add-panel-slide
%patch12 -p1 -b .no-help
+%patch13 -p1 -b .system-keyboard
%patch99 -p1 -b .fedora-logo
@@ -347,6 +352,9 @@
%{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml
%changelog
+* Mon Oct 20 2008 Matthias Clasen <mclasen at redhat.com> - 1:2.24.0-11
+- Respect system keyboard setting
+
* Wed Oct 15 2008 Ray Strode <rstrode at redhat.com> - 1:2.24.0-10
- Rework "force X on vt1" code to work after the user logs out
- Previous message: rpms/libgsf/devel .cvsignore, 1.22, 1.23 libgsf.spec, 1.60, 1.61 sources, 1.22, 1.23
- Next message: rpms/cheese/devel .cvsignore, 1.18, 1.19 cheese.spec, 1.37, 1.38 sources, 1.18, 1.19
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list