Merge lp://qastaging/~mterry/appmenu-gtk/fix-alt-shortcuts into lp://qastaging/appmenu-gtk/0.4

Proposed by Michael Terry
Status: Merged
Approved by: Ted Gould
Approved revision: 129
Merged at revision: 127
Proposed branch: lp://qastaging/~mterry/appmenu-gtk/fix-alt-shortcuts
Merge into: lp://qastaging/appmenu-gtk/0.4
Diff against target: 110 lines (+16/-42)
1 file modified
src/bridge.c (+16/-42)
To merge this branch: bzr merge lp://qastaging/~mterry/appmenu-gtk/fix-alt-shortcuts
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+52755@code.qastaging.launchpad.net

Description of the change

When we moved the parser to dbusmenu, we forgot about the lookup table for widgets to menu items in appmenu-gtk. This lookup table is used to support key presses like Alt+F for the menus.

To fix this, I used the sorta-secret gobject data "dbusmenu-gtk-parser-cached-item" saved on GtkMenuItems by the parser to map to Dbusmenuitems. This may be considered bad?

If it is considered bad to use that string directly, we should either expose the string in a header or introduce a convenience function to dbusmenu to grab the data.

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

On Wed, 2011-03-09 at 20:12 +0000, Michael Terry wrote:
> To fix this, I used the sorta-secret gobject data "dbusmenu-gtk-parser-cached-item" saved on GtkMenuItems by the parser to map to Dbusmenuitems. This may be considered bad?
>
> If it is considered bad to use that string directly, we should either expose the string in a header or introduce a convenience function to dbusmenu to grab the data.

I think it's better to expose via API. What do you think about:

  lp:~ted/dbusmenu/get-cached-menuitem

I think that works and is API we could support for a while.

Revision history for this message
Michael Terry (mterry) wrote :

Looks fine. I updated this branch to use the new function.

128. By Michael Terry

update to use new get_cached_item function

129. By Michael Terry

whoops, remove some debugging code I accidentally committed

Revision history for this message
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches