popupMenu: Introduce PopupDummyMenu
This is designed for things like the activities button that sort of need a menu to make navigation work, but not really have it do anything. https://bugzilla.gnome.org/show_bug.cgi?id=689109
This commit is contained in:
@ -1274,6 +1274,27 @@ const PopupMenu = new Lang.Class({
|
||||
}
|
||||
});
|
||||
|
||||
const PopupDummyMenu = new Lang.Class({
|
||||
Name: 'PopupDummyMenu',
|
||||
|
||||
_init: function(sourceActor) {
|
||||
this.sourceActor = sourceActor;
|
||||
this.actor = sourceActor;
|
||||
this.actor._delegate = this;
|
||||
},
|
||||
|
||||
isChildMenu: function() {
|
||||
return false;
|
||||
},
|
||||
|
||||
open: function() { this.emit('open-state-changed', true); },
|
||||
close: function() { this.emit('open-state-changed', false); },
|
||||
destroy: function() {
|
||||
this.emit('destroy');
|
||||
},
|
||||
});
|
||||
Signals.addSignalMethods(PopupDummyMenu.prototype);
|
||||
|
||||
const PopupSubMenu = new Lang.Class({
|
||||
Name: 'PopupSubMenu',
|
||||
Extends: PopupMenuBase,
|
||||
|
Reference in New Issue
Block a user