GNOME Bugzilla – Bug 647175
need to promote a wifi network out of More if a non-More one goes away
Last modified: 2011-07-12 23:34:17 UTC
If one of your "top 5" wifi networks disappears, its menuitem will be removed, and then you'll only have 4 networks and a More item
Is this urgent? Because I'd like to avoid stacking fixes-over-fixes-over-fixes, when half of them are not yet in master.
(In reply to comment #1) > Is this urgent? no, i just noticed it and so filed the bug > Because I'd like to avoid stacking fixes-over-fixes-over-fixes, when half of > them are not yet in master. yeah, I poked Owen twice on Friday. I'll poke him again this morning.
Created attachment 190765 [details] [review] NetworkMenu: take out an item from More... when another is destroyed When one of the networks in the main menu is removed and we have a More... submenu, we can take the first out from the submenu and show it in the main menu. They say late is better than never...
Comment on attachment 190765 [details] [review] NetworkMenu: take out an item from More... when another is destroyed >+ let apObj = this._overflowItem.menu._getMenuItems()[0]._apObj; gah. there's no nicer way to get that? >+ if (apObj.item) { >+ apObj.item.destroy(); apObj might be the last item in the overflow menu, in which case you'd have to destroy that, right? >+ apObj.isMore = true; you could also just check apObj.item.get_parent()
(In reply to comment #4) > (From update of attachment 190765 [details] [review]) > >+ let apObj = this._overflowItem.menu._getMenuItems()[0]._apObj; > > gah. there's no nicer way to get that? I could have a firstMenuItem property in PopupMenuBase, but then you would end replicating the whole item list to accomodate item destruction. Maybe an accessor property? > >+ if (apObj.item) { > >+ apObj.item.destroy(); > > apObj might be the last item in the overflow menu, in which case you'd have to > destroy that, right? Right. > >+ apObj.isMore = true; > > you could also just check apObj.item.get_parent() Except that the parent of a menu item is (or should be) an implementation detail of the various PopupMenuBase subclasses.
Created attachment 191577 [details] [review] NetworkMenu: take out an item from More... when another is destroyed When one of the networks in the main menu is removed and we have a More... submenu, we can take the first out from the submenu and show it in the main menu.
Attachment 191577 [details] pushed as 5819dd3 - NetworkMenu: take out an item from More... when another is destroyed