After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661029 - submenu doesn't close on menu close
submenu doesn't close on menu close
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: network-indicator
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: Giovanni Campagna
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-10-05 21:47 UTC by William Jon McCann
Modified: 2011-11-03 14:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
popup-menu: Add minimal handling of open/close to Sections (1.92 KB, patch)
2011-10-07 18:22 UTC, Florian Müllner
committed Details | Review

Description William Jon McCann 2011-10-05 21:47:49 UTC
When I went into my network menu just now it already had the More> submenu expanded. That really shouldn't happen.
Comment 1 Florian Müllner 2011-10-07 18:22:47 UTC
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.
Comment 2 Florian Müllner 2011-10-07 18:25:55 UTC
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?
Comment 3 Giovanni Campagna 2011-10-08 15:01:00 UTC
(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().
Comment 4 Cosimo Cecchi 2011-10-24 22:34:32 UTC
Confirming with 3.2.1
Comment 5 Giovanni Campagna 2011-11-03 12:16:24 UTC
Review of attachment 198557 [details] [review]:

Let's get this merged.
Comment 6 Florian Müllner 2011-11-03 14:38:55 UTC
Attachment 198557 [details] pushed as 398489f - popup-menu: Add minimal handling of open/close to Sections