Merge lp:~themuso/libdbusmenu/remove-underscores into lp:libdbusmenu/0.6

Proposed by Luke Yelavich
Status: Merged
Merged at revision: 385
Proposed branch: lp:~themuso/libdbusmenu/remove-underscores
Merge into: lp:libdbusmenu/0.6
Diff against target: 25 lines (+7/-1)
1 file modified
libdbusmenu-gtk/client.c (+7/-1)
To merge this branch: bzr merge lp:~themuso/libdbusmenu/remove-underscores
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+96689@code.launchpad.net

Description of the change

Remove the underscores used for mnewmonics, as orca speaks them, which is not
what we want.

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

There was a slight memory leak with setname in the regex case. But I
fixed it on merge.

  review approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libdbusmenu-gtk/client.c'
--- libdbusmenu-gtk/client.c 2012-03-08 05:15:06 +0000
+++ libdbusmenu-gtk/client.c 2012-03-09 00:36:16 +0000
@@ -736,6 +736,7 @@
736 }736 }
737737
738 const gchar * setname = NULL;738 const gchar * setname = NULL;
739 const gchar * label = NULL;
739740
740 if (variant != NULL) {741 if (variant != NULL) {
741 setname = g_variant_get_string(variant, NULL);742 setname = g_variant_get_string(variant, NULL);
@@ -746,7 +747,12 @@
746 * causes tests to fail.747 * causes tests to fail.
747 */748 */
748 if (setname == NULL) {749 if (setname == NULL) {
749 setname = dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_LABEL);750 /* We don't want the underscore for mnewmonics */
751 label = dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_LABEL);
752
753 GRegex * regex = g_regex_new ("_", 0, 0, NULL);
754 setname = g_regex_replace_literal (regex, label, -1, 0, "", 0, NULL);
755 g_regex_unref(regex);
750 }756 }
751757
752 atk_object_set_name(aobj, setname);758 atk_object_set_name(aobj, setname);

Subscribers

People subscribed via source and target branches

to all changes: