popupMenu: bypass changeSignal callback if action is already handled

https://bugzilla.gnome.org/show_bug.cgi?id=676447
This commit is contained in:
Alban Browaeys 2012-05-20 23:37:22 +02:00 committed by Guillaume Desmottes
parent 7e73a52505
commit 66fa24c340

View File

@ -1958,8 +1958,9 @@ const RemoteMenu = new Lang.Class({
k++;
}
} else if (changeSignal) {
let signalId = this.actionGroup.connect(changeSignal, Lang.bind(this, function() {
this.actionGroup.disconnect(signalId);
let signalId = this.actionGroup.connect(changeSignal, Lang.bind(this, function(actionGroup, actionName) {
actionGroup.disconnect(signalId);
if (this._actions[actionName]) return;
// force a full update
this._modelChanged(model, 0, -1, model.get_n_items(), target);