[gnome-control-center/wip/lantw/fix-user-panel-problem-on-freebsd: 4/4] user-accounts: Escape the name of the user for markup
- From: Ting-Wei Lan <lantw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/lantw/fix-user-panel-problem-on-freebsd: 4/4] user-accounts: Escape the name of the user for markup
- Date: Thu, 29 Aug 2019 04:13:36 +0000 (UTC)
commit 251c039549a671a8bffa29ae18eb703433c32e27
Author: Ting-Wei Lan <lantw src gnome org>
Date: Thu Aug 29 12:03:44 2019 +0800
user-accounts: Escape the name of the user for markup
On FreeBSD, the default full name of a user is 'User &'. The '&'
character included in the name is expected to be replaced with the login
name when it is displayed on the user interface. However, it seems that
AccountsService doesn't know it. It just returns 'User &' to the caller,
and it causes the markup to be broken in the user panel.
panels/user-accounts/cc-user-panel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/user-accounts/cc-user-panel.c b/panels/user-accounts/cc-user-panel.c
index 086a0f2ce..5a0bab308 100644
--- a/panels/user-accounts/cc-user-panel.c
+++ b/panels/user-accounts/cc-user-panel.c
@@ -201,8 +201,8 @@ create_carousel_entry (CcUserPanel *self, ActUser *user)
cc_user_image_set_user (CC_USER_IMAGE (widget), user);
gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
- label = g_strdup_printf ("<b>%s</b>",
- get_real_or_user_name (user));
+ label = g_markup_printf_escaped ("<b>%s</b>",
+ get_real_or_user_name (user));
widget = gtk_label_new (label);
gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (widget), PANGO_ELLIPSIZE_END);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]