From c58a2e8e467cfe8740397b742825bf2add761356 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 6 Aug 2013 10:32:59 -0400 Subject: [PATCH] popupMenu: Don't propagate the 'activate' signal on menu items We used to do this to close the menu when activating, but now we have the itemActivated call which explicitly calls up to the toplevel. --- js/ui/popupMenu.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index fce1d2fd7..261e4c5b6 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -819,9 +819,6 @@ const PopupMenuBase = new Lang.Class({ } if (menuItem instanceof PopupMenuSection) { - let activateId = menuItem.connect('activate', Lang.bind(this, function() { - this.emit('activate'); - })); let activeChangeId = menuItem.connect('active-changed', Lang.bind(this, this._subMenuActiveChanged)); let parentOpenStateChangedId = this.connect('open-state-changed', function(self, open) { @@ -838,7 +835,6 @@ const PopupMenuBase = new Lang.Class({ })); menuItem.connect('destroy', Lang.bind(this, function() { - menuItem.disconnect(activateId); menuItem.disconnect(activeChangeId); this.disconnect(subMenuSensitiveChangedId); this.disconnect(parentOpenStateChangedId); @@ -852,16 +848,12 @@ const PopupMenuBase = new Lang.Class({ this.box.insert_child_below(menuItem.menu.actor, before_item); this._connectItemSignals(menuItem); - let subMenuActivateId = menuItem.connect('activate', Lang.bind(this, function() { - this.emit('activate'); - })); let subMenuActiveChangeId = menuItem.menu.connect('active-changed', Lang.bind(this, this._subMenuActiveChanged)); let closingId = this.connect('menu-closed', function() { menuItem.menu.close(BoxPointer.PopupAnimation.NONE); }); menuItem.connect('destroy', Lang.bind(this, function() { - menuItem.menu.disconnect(subMenuActivateId); menuItem.menu.disconnect(subMenuActiveChangeId); this.disconnect(closingId); }));