popupMenu: Fix RemoteMenu items with boolean state action
Stateful actions are expected to pass their state when activated, but we currently only do this for actions with a string state. https://bugzilla.gnome.org/show_bug.cgi?id=674932
This commit is contained in:
parent
f23c118e81
commit
7293ddb22c
@ -1867,7 +1867,7 @@ const RemoteMenu = new Lang.Class({
|
|||||||
item = new PopupSwitchMenuItem(label, action.state.get_boolean());
|
item = new PopupSwitchMenuItem(label, action.state.get_boolean());
|
||||||
action.items.push(item);
|
action.items.push(item);
|
||||||
specificSignalId = item.connect('toggled', Lang.bind(this, function(item) {
|
specificSignalId = item.connect('toggled', Lang.bind(this, function(item) {
|
||||||
this.actionGroup.activate_action(action_id, null);
|
this.actionGroup.activate_action(action_id, GLib.Variant.new_boolean(item.state));
|
||||||
}));
|
}));
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
|
Loading…
Reference in New Issue
Block a user