patches/gdm-06-system-locale.diff
author bc99092
Tue, 06 Jun 2006 05:39:37 +0000
changeset 7374 edc7afcc65ec
parent 7233 patches/gdm-07-system-locale.diff@47108f2f55d1
child 8628 c3b3c1d14139
permissions -rw-r--r--
2006-06-06 Brian Cameron <[email protected]> * gdm.spec, patches/gdm-01-branding-defaults-solaris.diff, gdm-12-fixflexiserver.diff, ext-sources/gdm.xml: Added patch gdm-12-fixflexiserver.diff to fix a core dumping problem. Modified gdm-01-branding-defaults-solaris.diff to better integrate with ctrun and updated the gdm.xml SVC manifest so that core dumps do not cause GDM to restart. * gdm-05-fix-a11y-crash.diff: Removed and renumbered patches.

--- gdm-2.6.0.3/daemon/gdm.c	2005-03-10 16:34:02.000000000 -0800
+++ gdm-2.6.0.3-patch/daemon/gdm.c	2005-03-10 16:54:33.579783768 -0800
@@ -122,6 +122,7 @@
 unsigned char *gdm_global_bcookie = NULL;
 
 gchar *gdm_charset = NULL;
+char *gdm_system_locale = NULL; /* CR Id: 5032088 */
 
 int gdm_normal_runlevel = -1; /* runlevel on linux that gdm was started in */
 
@@ -2026,6 +2027,11 @@
 	    gdm_charset = g_strdup (charset);
     }
 
+    /* CR Id: 5032088 */
+    if (setlocale (LC_CTYPE, NULL) != NULL) {
+	gdm_system_locale = g_strdup (setlocale (LC_CTYPE, NULL));
+    }
+
     /* initial TERM/INT handler */
     sig.sa_handler = initial_term_int;
     sig.sa_flags = SA_RESTART;
--- gdm-2.6.0.3/daemon/slave.c	2005-03-10 16:34:02.000000000 -0800
+++ gdm-2.6.0.3-patch/daemon/slave.c	2005-03-10 16:57:58.936564792 -0800
@@ -137,6 +137,9 @@
 /* wait for a GO in the SOP protocol */
 extern gboolean gdm_wait_for_go;
 
+/* CR Id: 5032088 */
+extern char *gdm_system_locale;
+
 /* Local prototypes */
 static gint     gdm_slave_xerror_handler (Display *disp, XErrorEvent *evt);
 static gint     gdm_slave_xioerror_handler (Display *disp);
@@ -4160,7 +4163,10 @@
 			   home_dir_ok,
 			   session,
 			   save_session,
-			   language,
+			   ((gdm_system_locale != (char *) NULL) &&
+			    ( (language == NULL) ||
+			     ((language != NULL) && (strcmp (language, "") == 0) )) == TRUE ?
+			    gdm_system_locale : language),
 			   gnome_session,
 			   usrcfgok,
 			   savesess,