summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2006-12-05 20:20:42 +0000
committerBrian Cameron <bcameron@src.gnome.org>2006-12-05 20:20:42 +0000
commitbcd8dabbf514e5cf3f66aa6b307e154943a08bae (patch)
tree366c0d8b4a9f0e0e150bd7bf78dfe986bc80b005
parent80f2b4e143888acf38f89093a699e38e5816e1f8 (diff)
downloadgdm-bcd8dabbf514e5cf3f66aa6b307e154943a08bae.tar.gz
Fix so that if the "%" key is entered in the input field in gdmchooser,
2006-12-04 Brian Cameron <brian.cameron@sun.com> * vicious-extensions/ve-miscui.c, gui/gdmchooser.c: Fix so that if the "%" key is entered in the input field in gdmchooser, the secondary message in the error dialog displays properly. Also fix ve-miscui.c so that if "%" exists in the secondary message, to not display it. Message must have "%%" to display the "%" character.
-rw-r--r--ChangeLog9
-rw-r--r--gui/gdmchooser.c16
2 files changed, 23 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 86c4c6b2..11192856 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-12-04 Brian Cameron <brian.cameron@sun.com>
+
+ * vicious-extensions/ve-miscui.c, gui/gdmchooser.c: Fix so
+ that if the "%" key is entered in the input field in
+ gdmchooser, the secondary message in the error dialog
+ displays properly. Also fix ve-miscui.c so that if "%"
+ exists in the secondary message, to not display it.
+ Message must have "%%" to display the "%" character.
+
2006-11-28 Brian Cameron <brian.cameron@sun.com>
* gui/gdmsession.c: Fix for TryExec check in gdmsession.c so
diff --git a/gui/gdmchooser.c b/gui/gdmchooser.c
index 8f40aa52..99f2ec34 100644
--- a/gui/gdmchooser.c
+++ b/gui/gdmchooser.c
@@ -1388,11 +1388,23 @@ gdm_chooser_add_host (void)
memmove (&qa->sin_addr, hostent->h_addr, 4);
} else {
GtkWidget *dialog;
+ gchar **namesplit;
gchar *msg;
-
+ gchar *newname;
+
+ /*
+ * If user enters "%" replace it with "%%" so output shows
+ * properly in the dialog.
+ */
+ namesplit = g_strsplit (name, "%", -1);
+ newname = g_strjoinv ("%%", namesplit);
+
msg = g_strdup_printf (_("Cannot find the host \"%s\". "
"Perhaps you have mistyped it."),
- name);
+ newname);
+
+ g_strfreev (namesplit);
+ g_free (newname);
dialog = ve_hig_dialog_new
(GTK_WINDOW (chooser) /* parent */,