in Unity, top-level Shotwell menu does not change when user switches views

Bug #649340 reported by Adam Dingle
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
AppMenu GTK+
Fix Released
High
Unassigned
Shotwell
Fix Released
Unknown
appmenu-gtk (Ubuntu)
Fix Released
High
Unassigned
Natty
Fix Released
High
Unassigned

Bug Description

This is ticketed upstream at http://trac.yorba.org/ticket/2607 .

To see the problem:

1. Run Shotwell in Unity on Ubuntu 10.10.  The top-level menu will read "File Edit View Photos Events Tags Help".

2. Click the Events item in the sidebar.  The top-level menu should change to read "File Edit View Events Help".  On Unity, however, the menu will not change.

3. Click the Trash item in the sidebar.  The top-level menu should change to read "File Edit View Help".  On Unity, however, the menu will not change.

This is a serious bug because Shotwell is not showing the correct menu for the current view.  This means that menu item availability will likely be wrong even if we fix the underlying cause of https://bugs.launchpad.net/bugs/637692 .  It could also lead to undefined behavior if the user selects menu items which should not be present in the current view.

Related branches

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

Here's a menu dump of when I've selected the Trash item.

affects: unity → appmenu-gtk
Changed in appmenu-gtk:
importance: Undecided → High
status: New → Confirmed
assignee: nobody → Cody Russell (bratsche)
Changed in shotwell:
status: Unknown → New
Revision history for this message
Jim Nelson (yorba-jim) wrote :

One thing you should be aware of (I have no idea if this is relevant to the ticket): Shotwell uses multiple UI managers. This was done early on because each Page needed its own ActionGroup and I was concerned about generating a unique name for each Page as it was created (to prevent Action merging). There didn't seem to be in the docs any ban against using multiple UI managers and it didn't seem to have a negative performance or memory effect, so that's the direction I went.

Revision history for this message
Cody Russell (bratsche) wrote :

I've been looking at this one today/tonight, but I'm not sure what's going on just yet. I verified that I'm connecting the signals to the toplevel menuitems (e.g., File, Edit..) but I don't seem to be receiving "notify" events when the views should be changing, as I expected I would.

This could be more stuff that is happening inside GtkUIManager which is difficult to introspect. I'll try to get further with it in the morning.

Revision history for this message
Adam Dingle (adam-yorba) wrote :

@Cody: I wouldn't expect "notify" events to arrive on top-level menu items when the views change. Every time the user switches views, Shotwell removes the entire top-level menu from the window, and replaces it with another one specific to the new view. So if this is going to work in Unity, the global menu code will need to react to that appropriately.

David Barth (dbarth)
Changed in appmenu-gtk:
milestone: none → ubuntu-10.10
Cody Russell (bratsche)
Changed in appmenu-gtk:
status: Confirmed → In Progress
Revision history for this message
Michael Terry (mterry) wrote :

Taking a look

Changed in appmenu-gtk:
assignee: Cody Russell (bratsche) → Michael Terry (mterry)
Changed in appmenu-gtk (Ubuntu):
assignee: nobody → Michael Terry (mterry)
importance: Undecided → High
status: New → Triaged
Revision history for this message
Michael Terry (mterry) wrote :

OK, looking into this a bit, we seem to have show the right menus, but after switching between menus a few times, dbusmenu is crashing shotwell. Trying to figure out why.

Changed in appmenu-gtk (Ubuntu Natty):
milestone: none → ubuntu-11.04-beta
Revision history for this message
Michael Terry (mterry) wrote :

Just a status update. The crash should be fixed by https://code.launchpad.net/~mterry/dbusmenu/disconnect-when-done/+merge/48361

Now, I'm getting great behavior on first shotwell launch. Subsequent launches seem to use a cached menu bar instead of the real ones and thus never switches as you navigate between shotwell items. Looking at that.

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

And https://code.launchpad.net/~mterry/indicator-appmenu/less-racy-window-closing/+merge/48381 fixes the issue of stale menus. I'll shortly propose an appmenu-gtk merge that will unblacklist shotwell again.

Revision history for this message
Adam Dingle (adam-yorba) wrote :

Great to hear about this progress!

Changed in shotwell:
status: New → Fix Released
Michael Terry (mterry)
Changed in appmenu-gtk (Ubuntu Natty):
assignee: Michael Terry (mterry) → nobody
status: Triaged → Fix Released
Changed in appmenu-gtk:
status: In Progress → Fix Released
assignee: Michael Terry (mterry) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.