Merge lp://qastaging/~mterry/appmenu-gtk/misc-fixes into lp://qastaging/appmenu-gtk/0.4

Proposed by Michael Terry
Status: Merged
Merged at revision: 108
Proposed branch: lp://qastaging/~mterry/appmenu-gtk/misc-fixes
Merge into: lp://qastaging/appmenu-gtk/0.4
Diff against target: 338 lines (+98/-117)
1 file modified
src/bridge.c (+98/-117)
To merge this branch: bzr merge lp://qastaging/~mterry/appmenu-gtk/misc-fixes
Reviewer Review Type Date Requested Status
Canonical Desktop Experience Team Pending
Review via email: mp+47114@code.qastaging.launchpad.net

Description of the change

This branch does four things, all observed while working with the monster that is empathy.

1) Empathy changes the first label ("Context", "Contact", or "Group") of it's Edit menu by directly changing the label inside the menu item. So we need to watch for such direct edits as well. (this is the addition of label_notify_cb)

2) Empathy directly hides/shows the first label and first separator in its Edit menu on startup directly. It does not modify the backing GtkAction. So when we startup, we should take such possibilities in mind and prefer the visible/sensitive status of the widget directly over the action -- it is always likely to be more correct (though we should and do continue watching action status).

3) Empathy modifies the first label and separator of its Edit menu upon menu activation (a dynamic menu). We need to listen for about-to-show signals from dbusmenu and activate the menu for empathy, so it can modify the menu. There's a race here, because dbusmenu doesn't yet actually block on our being ready, but it works in practice, and is better than nothing right now.

4) Vastly simplify separator logic. There was existing code to monitor the 'smart' mode and tell when it should be shown. But GtkUIManager handles that for us by setting widget visibility state of the item. So instead, we should treat separators a bit more like normal items. So I attach the same notify callback to separators that were for other widgets before (letting me drop the separate child_notify_cb). This fixes issues in Empathy with showing the first separator in the Edit menu as well as the separators in the Help menu.

We still don't fully get the first label of the Edit menu right -- Empathy is actually setting a submenu. I'm working on another branch that watches the "submenu" property and tries to do intelligent things. But this work was splitable, so here it is.

To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

Oh, whoops, and I forgot, this includes the approved branch https://code.launchpad.net/~mterry/appmenu-gtk/fix-sensitive-actions/+merge/47056

Revision history for this message
Ted Gould (ted) wrote :

Merged fix-sensitive-actions to trunk. Patch should regenerate shortly.

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