shellEntry: Destroy entry menus when the entry actors are destroyed

This ensures that a menu and manager aren't sticking around.

https://bugzilla.gnome.org/show_bug.cgi?id=697295
This commit is contained in:
Jasper St. Pierre 2013-04-04 11:35:50 -04:00
parent 3dd6113a0a
commit 14189e6827

View File

@ -171,4 +171,10 @@ function addContextMenu(entry, params) {
entry.connect('button-press-event', Lang.bind(null, _onButtonPressEvent, entry)); entry.connect('button-press-event', Lang.bind(null, _onButtonPressEvent, entry));
entry.connect('popup-menu', Lang.bind(null, _onPopup, entry)); entry.connect('popup-menu', Lang.bind(null, _onPopup, entry));
entry.connect('destroy', function() {
entry.menu.destroy();
entry.menu = null;
entry._menuManager = null;
});
} }