[gnome-control-center] user-accounts: Fix warnings with special chars in user name
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Fix warnings with special chars in user name
- Date: Tue, 7 Dec 2010 16:03:39 +0000 (UTC)
commit b644270689a2493a6352af6933603ccd5885ec1e
Author: Bastien Nocera <hadess hadess net>
Date: Tue Dec 7 15:57:04 2010 +0000
user-accounts: Fix warnings with special chars in user name
https://bugzilla.gnome.org/show_bug.cgi?id=626282
panels/user-accounts/um-user-panel.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/panels/user-accounts/um-user-panel.c b/panels/user-accounts/um-user-panel.c
index 84cd5bb..664bcc1 100644
--- a/panels/user-accounts/um-user-panel.c
+++ b/panels/user-accounts/um-user-panel.c
@@ -131,6 +131,7 @@ user_added (UmUserManager *um, UmUser *user, UmUserPanelPrivate *d)
gchar *text;
GtkTreeSelection *selection;
gint sort_key;
+ gchar *escaped_name;
g_debug ("user added: %d %s\n", um_user_get_uid (user), um_user_get_real_name (user));
widget = get_widget (d, "list-treeview");
@@ -139,9 +140,11 @@ user_added (UmUserManager *um, UmUser *user, UmUserPanelPrivate *d)
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
pixbuf = um_user_render_icon (user, TRUE, 48);
+ escaped_name = g_markup_escape_text (um_user_get_display_name (user), -1);
text = g_strdup_printf ("<b>%s</b>\n<i>%s</i>",
- um_user_get_display_name (user),
+ escaped_name,
um_account_type_get_name (um_user_get_account_type (user)));
+ g_free (escaped_name);
if (um_user_get_uid (user) == getuid ()) {
sort_key = 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]