summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2008-03-06 02:37:43 +0000
committerBrian Cameron <bcameron@src.gnome.org>2008-03-06 02:37:43 +0000
commitf1973bbd671b685d93f99e10f82767a27a4fe330 (patch)
treebdcb5edfe65251096bb2ef1bd45acd63de68bb77
parenta4874436b4bf98fe746cd500363e6530c8778788 (diff)
downloadgdm-f1973bbd671b685d93f99e10f82767a27a4fe330.tar.gz
If the user uses the default remote welcome string for local displays or
2008-03-05 Brian Cameron <brian.cameron@sun.com> * gui/gdmcommon.c: If the user uses the default remote welcome string for local displays or vice-versa, then translate the string. * gui/gdmflexiserver.c: Need to call gdk_init when running in --command mode or the -a option fails when trying to call the gdk function to get the display. svn path=/branches/gnome-2-20/; revision=5937
-rw-r--r--ChangeLog8
-rw-r--r--gui/gdmcommon.c12
-rw-r--r--gui/gdmflexiserver.c3
3 files changed, 20 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e3d55a3c..a7f10da3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-03-05 Brian Cameron <brian.cameron@sun.com>
+
+ * gui/gdmcommon.c: If the user uses the default remote welcome string
+ for local displays or vice-versa, then translate the string.
+ * gui/gdmflexiserver.c: Need to call gdk_init when running in
+ --command mode or the -a option fails when trying to call the
+ gdk function to get the display.
+
2008-03-01 Brian Cameron <brian.cameron@sun.com>
I got approval from the GNOME release team for these 3 changes.
diff --git a/gui/gdmcommon.c b/gui/gdmcommon.c
index 48e27cc4..b509224e 100644
--- a/gui/gdmcommon.c
+++ b/gui/gdmcommon.c
@@ -618,8 +618,10 @@ gdm_common_get_welcomemsg (void)
gchar *tempstr;
/*
- * Translate the welcome msg in the client program since it is running as the
- * user and therefore has the appropriate language environment set.
+ * Translate the welcome msg in the client program since it is running
+ * as the user and therefore has the appropriate language environment
+ * set. If the user wants to use the default remote welcome msg as the
+ * local welcome msg (or vice versa), then also translate.
*/
if (ve_string_empty (g_getenv ("GDM_IS_LOCAL"))) {
if (gdm_config_get_bool (GDM_KEY_DEFAULT_REMOTE_WELCOME))
@@ -630,6 +632,8 @@ gdm_common_get_welcomemsg (void)
if (tempstr == NULL ||
strcmp (ve_sure_string (tempstr), GDM_DEFAULT_REMOTE_WELCOME_MSG) == 0)
welcomemsg = g_strdup (_(GDM_DEFAULT_REMOTE_WELCOME_MSG));
+ else if (strcmp (ve_sure_string (tempstr), GDM_DEFAULT_WELCOME_MSG) == 0)
+ welcomemsg = g_strdup (_(GDM_DEFAULT_WELCOME_MSG));
else
welcomemsg = g_strdup (tempstr);
}
@@ -642,8 +646,10 @@ gdm_common_get_welcomemsg (void)
if (tempstr == NULL ||
strcmp (ve_sure_string (tempstr), GDM_DEFAULT_WELCOME_MSG) == 0)
welcomemsg = g_strdup (_(GDM_DEFAULT_WELCOME_MSG));
+ else if (strcmp (ve_sure_string (tempstr), GDM_DEFAULT_REMOTE_WELCOME_MSG) == 0)
+ welcomemsg = g_strdup (_(GDM_DEFAULT_REMOTE_WELCOME_MSG));
else
- welcomemsg = g_strdup (tempstr);
+ welcomemsg = g_strdup (tempstr);
}
}
diff --git a/gui/gdmflexiserver.c b/gui/gdmflexiserver.c
index fb84285d..873f56e8 100644
--- a/gui/gdmflexiserver.c
+++ b/gui/gdmflexiserver.c
@@ -796,6 +796,9 @@ main (int argc, char *argv[])
g_type_init ();
if (send_command != NULL) {
+
+ /* gdk_init is needed for cookie code to get display */
+ gdk_init (&argc, &argv);
if (authenticate)
auth_cookie = gdmcomm_get_auth_cookie ();