Merge lp:~themuso/indicator-appmenu/accessible-desc into lp:indicator-appmenu/0.3

Proposed by Luke Yelavich
Status: Merged
Merged at revision: 105
Proposed branch: lp:~themuso/indicator-appmenu/accessible-desc
Merge into: lp:indicator-appmenu/0.3
Diff against target: 31 lines (+7/-0)
1 file modified
src/window-menus.c (+7/-0)
To merge this branch: bzr merge lp:~themuso/indicator-appmenu/accessible-desc
Reviewer Review Type Date Requested Status
Ted Gould (community) Needs Fixing
Review via email: mp+49748@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

There also needs to be code in menu_prop_changed() so that when the
label changes the accessible label also gets updated.

  review needsfixing

review: Needs Fixing
106. By Luke Yelavich

Also update the accessible description in menu_prop_changed, although I am
not sure how we can signal a change from here.

Revision history for this message
Luke Yelavich (themuso) wrote :

On Thu, Feb 17, 2011 at 09:26:16AM EST, Ted Gould wrote:
> Review: Needs Fixing
> There also needs to be code in menu_prop_changed() so that when the
> label changes the accessible label also gets updated.

Ok, I updated the accessible_desc in that function, however I am not sure how I can signal a change from there, given I need a pointer to the indicator object for that indicator.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/window-menus.c'
2--- src/window-menus.c 2011-02-09 19:32:08 +0000
3+++ src/window-menus.c 2011-02-16 23:22:02 +0000
4@@ -162,6 +162,9 @@
5 g_object_unref(entry->label);
6 entry->label = NULL;
7 }
8+ if (entry->accessible_desc != NULL) {
9+ entry->accessible_desc = NULL;
10+ }
11 if (entry->image != NULL) {
12 g_object_unref(entry->image);
13 entry->image = NULL;
14@@ -607,6 +610,8 @@
15 wmentry->disabled = !g_variant_get_boolean(value);
16 } else if (!g_strcmp0(property, DBUSMENU_MENUITEM_PROP_LABEL)) {
17 gtk_label_set_text_with_mnemonic(entry->label, g_variant_get_string(value, NULL));
18+ entry->accessible_desc = g_variant_get_string(value, NULL);
19+ /* FIXME: Need to signal a change in the accessible description. */
20 }
21
22 return;
23@@ -634,6 +639,8 @@
24 g_object_ref(entry->label);
25 }
26
27+ entry->accessible_desc = dbusmenu_menuitem_property_get(newentry, DBUSMENU_MENUITEM_PROP_LABEL);
28+
29 entry->menu = dbusmenu_gtkclient_menuitem_get_submenu(priv->client, newentry);
30
31 if (entry->menu == NULL) {

Subscribers

People subscribed via source and target branches