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. https://bugzilla.gnome.org/show_bug.cgi?id=647175
This commit is contained in:
@ -946,6 +946,14 @@ PopupMenuBase.prototype = {
|
||||
});
|
||||
},
|
||||
|
||||
get firstMenuItem() {
|
||||
let items = this._getMenuItems();
|
||||
if (items.length)
|
||||
return items[0];
|
||||
else
|
||||
return null;
|
||||
},
|
||||
|
||||
removeAll: function() {
|
||||
let children = this._getMenuItems();
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
|
Reference in New Issue
Block a user