summaryrefslogtreecommitdiffstats
path: root/x11/gdm/files/patch-gui_simple-greeter_gdm-user.c
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2009-07-07 05:18:03 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2009-07-07 05:18:03 +0800
commit15da4534fd71827b7d22503babaee9a812aa3fbd (patch)
tree812429234634e2cdfadb09465b852a53b9d4edf8 /x11/gdm/files/patch-gui_simple-greeter_gdm-user.c
parent59672dbe4342e56794beea8468926a892357c2ff (diff)
downloadmarcuscom-ports-15da4534fd71827b7d22503babaee9a812aa3fbd.tar.gz
marcuscom-ports-15da4534fd71827b7d22503babaee9a812aa3fbd.tar.zst
marcuscom-ports-15da4534fd71827b7d22503babaee9a812aa3fbd.zip
Add a hack to fix the build with libxklavier 4.0.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@12425 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'x11/gdm/files/patch-gui_simple-greeter_gdm-user.c')
-rw-r--r--x11/gdm/files/patch-gui_simple-greeter_gdm-user.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/x11/gdm/files/patch-gui_simple-greeter_gdm-user.c b/x11/gdm/files/patch-gui_simple-greeter_gdm-user.c
new file mode 100644
index 000000000..049b75b42
--- /dev/null
+++ b/x11/gdm/files/patch-gui_simple-greeter_gdm-user.c
@@ -0,0 +1,34 @@
+--- gui/simple-greeter/gdm-user.c.orig 2009-05-16 17:52:57.000000000 -0400
++++ gui/simple-greeter/gdm-user.c 2009-05-16 18:08:08.000000000 -0400
+@@ -412,6 +412,7 @@ _gdm_user_update (GdmUser *u
+ /* Display Name */
+ if (pwent->pw_gecos && pwent->pw_gecos[0] != '\0') {
+ gchar *first_comma;
++ gchar *ampersand;
+
+ first_comma = strchr (pwent->pw_gecos, ',');
+ if (first_comma) {
+@@ -425,6 +426,23 @@ _gdm_user_update (GdmUser *u
+ g_free (real_name);
+ real_name = NULL;
+ }
++
++ while (real_name != NULL && (ampersand = strchr (real_name, '&')) != NULL) {
++ gchar *temp_real_name1;
++ gchar *temp_real_name2;
++ gchar *temp_name;
++
++ temp_real_name1 = g_strndup (real_name,
++ (ampersand - real_name));
++ temp_real_name2 = g_strdup (ampersand + 1);
++ temp_name = g_strdup (pwent->pw_name);
++ temp_name[0] = toupper (temp_name[0]);
++ g_free (real_name);
++ real_name = g_strdup_printf ("%s%s%s", temp_real_name1, temp_name, temp_real_name2);
++ g_free (temp_real_name1);
++ g_free (temp_real_name2);
++ g_free (temp_name);
++ }
+ } else {
+ real_name = NULL;
+ }