GNOME Bugzilla – Bug 661029
submenu doesn't close on menu close
Last modified: 2011-11-03 14:38:59 UTC
When I went into my network menu just now it already had the More> submenu expanded. That really shouldn't happen.
Created attachment 198557 [details] [review] popup-menu: Add minimal handling of open/close to Sections SubMenuMenuItems close automatically with their parent, however closing fails when the parent item is a MenuSection, as those currently ignore any open()/close() requests. At some minimal handling by emitting the 'open-state-changed' signal, so children like SubMenuMenuItems work as expected.
There's a big fat comment about open()/close() being ignored deliberately, but without given any reasoning - Giovanni, is it likely that the patch breaks something?
(In reply to comment #2) > There's a big fat comment about open()/close() being ignored deliberately, but > without given any reasoning - Giovanni, is it likely that the patch breaks > something? AFAIR, in the original PopupMenuSection implementation, open()/close() were used as show()/hide(). I then modified that to remove any side-effect of open()/close(), because PopupMenuSections are meant to be completely transparent and just offer grouping of items. I think the patch is fine, even if a bit dirty, given that open()/close() are still part of the "public API". Maybe we could get away by just propagating 'open-state-changed', without going through open()/close().
Confirming with 3.2.1
Review of attachment 198557 [details] [review]: Let's get this merged.
Attachment 198557 [details] pushed as 398489f - popup-menu: Add minimal handling of open/close to Sections