Connect PopupMenuManager to destroy signal

PopupMenuManager now connects to the destroy signal of PopupMenu, so
that destroying a PopupMenu is now enough for removing it from the
relevant manager. Useful if menu come and go on-the-fly (like in
app views or sidebars).

https://bugzilla.gnome.org/show_bug.cgi?id=630914
This commit is contained in:
Giovanni Campagna 2010-09-29 18:12:38 +02:00 committed by Dan Winship
parent 25fe730d16
commit aebdf79430

View File

@ -678,6 +678,7 @@ PopupMenuManager.prototype = {
menu: menu,
openStateChangeId: menu.connect('open-state-changed', Lang.bind(this, this._onMenuOpenState)),
activateId: menu.connect('activate', Lang.bind(this, this._onMenuActivated)),
destroyId: menu.connect('destroy', Lang.bind(this, this._onMenuDestroy)),
enterId: 0,
buttonPressId: 0
};