NetworkMenu: destroy More... submenu when empty
Add a .length property to PopupMenuBase, and use it from the network menu to destroy the menu when removing a network without rebuilding. https://bugzilla.gnome.org/show_bug.cgi?id=645981
This commit is contained in:

committed by
Dan Winship

parent
3c3ea2f575
commit
625a4c0766
@ -1198,6 +1198,11 @@ NMDeviceWireless.prototype = {
|
||||
if (apObj.item)
|
||||
apObj.item.destroy();
|
||||
this._networks.splice(pos, 1);
|
||||
if (this._overflowItem &&
|
||||
this._overflowItem.menu.length == 0) {
|
||||
this._overflowItem.destroy();
|
||||
this._overflowItem = null;
|
||||
}
|
||||
} else if (apObj.item)
|
||||
apObj.item.updateAccessPoints(apObj.accessPoints);
|
||||
},
|
||||
|
Reference in New Issue
Block a user