Merge lp:~nicovdw/unity/fix-for-733743 into lp:unity

Proposed by Nico van der Walt on 2011-03-14
Status: Rejected
Rejected by: Gord Allott on 2011-03-23
Proposed branch: lp:~nicovdw/unity/fix-for-733743
Merge into: lp:unity
Diff against target: 15 lines (+5/-1) 1 file modified
To merge this branch: bzr merge lp:~nicovdw/unity/fix-for-733743
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Disapprove on 2011-03-17
Gord Allott 2011-03-14 Pending
Review via email: mp+53336@code.launchpad.net

Description of the Change

Fixes bug (LP #733743) where items in the Quicklist is not displayed when the text contains an ampersand e.g. 'Science & Engineering'.

To post a comment you must log in.
Neil J. Patel (njpatel) wrote :

Sorry nico but I fixed this earlier in the week, but I didn't see this bug so I couldnt' assign it to myself to save you the trouble. Fwiw, the way to do it is to use g_markup_escape_text before sending the string to the quicklist label.

review: Disapprove

Unmerged revisions

950. By Nico van der Walt on 2011-03-14

Fixes LP: #733743 - Quicklist menus did not display entries that contained an ampersand.

Preview Diff

1=== modified file 'src/QuicklistMenuItemLabel.cpp'
2--- src/QuicklistMenuItemLabel.cpp 2011-02-19 14:21:02 +0000
3+++ src/QuicklistMenuItemLabel.cpp 2011-03-14 22:03:58 +0000
4@@ -50,7 +50,11 @@
5 _item_type = MENUITEM_TYPE_LABEL;
6
7 if (item)
8- _text = g_strdup (dbusmenu_menuitem_property_get (item, DBUSMENU_MENUITEM_PROP_LABEL));
9+ {
10+ gchar **textArray = g_strsplit (g_strdup (dbusmenu_menuitem_property_get (item, DBUSMENU_MENUITEM_PROP_LABEL)),"&",0);
11+ _text = g_strjoinv ("&",textArray);
12+ g_strfreev (textArray);
13+ }
14 else
15 _text = g_strdup ("Label");
16