RemoteMenu: use detailed action-added signal

This avoid disconnecting all signals if we are waiting for
different actions to be added, leading to incomplete menu.
Previously if we were waiting for 2 different actions in 2
different sections, the first action-added signal would
disconnect the 2nd signal handler as well, so the model of
that section would not be updated when the 2nd action is added.

https://bugzilla.gnome.org/show_bug.cgi?id=694612
This commit is contained in:
Xavier Claessens 2013-06-05 13:51:26 +02:00 committed by Florian Müllner
parent 3ff194247a
commit 1420f62dfa

View File

@ -1873,7 +1873,7 @@ const RemoteMenu = new Lang.Class({
let action_id = model.get_item_attribute_value(index, Gio.MENU_ATTRIBUTE_ACTION, null).deep_unpack();
if (!this.actionGroup.has_action(action_id)) {
// the action may not be there yet, wait for action-added
return [null, false, 'action-added'];
return [null, false, 'action-added::' + action_id];
}
if (!this._actions[action_id])
@ -1910,7 +1910,7 @@ const RemoteMenu = new Lang.Class({
break;
default:
log('Action "%s" has state of type %s, which is not supported'.format(action_id, action.state.get_type_string()));
return [null, false, 'action-state-changed'];
return [null, false, 'action-state-changed::' + action_id];
}
} else {
target = model.get_item_attribute_value(index, Gio.MENU_ATTRIBUTE_TARGET, null);