appDisplay: Fix leaking signal connections

The overview has a longer life-time than dash items, so we are leaking a
signal connection each time an item is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=745570
This commit is contained in:
Michele 2015-03-04 00:51:19 +00:00 committed by Adel Gadllah
parent 6ecaf0e0fc
commit eab8ea9a1e

View File

@ -1658,7 +1658,10 @@ const AppIcon = new Lang.Class({
if (!isPoppedUp) if (!isPoppedUp)
this._onMenuPoppedDown(); this._onMenuPoppedDown();
})); }));
Main.overview.connect('hiding', Lang.bind(this, function () { this._menu.close(); })); let id = Main.overview.connect('hiding', Lang.bind(this, function () { this._menu.close(); }));
this.actor.connect('destroy', function() {
Main.overview.disconnect(id);
});
this._menuManager.addMenu(this._menu); this._menuManager.addMenu(this._menu);
} }