From c34cf40e28eed1842ee691603fe6940f04302e10 Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 19 Feb 2015 11:23:59 -0500 Subject: Don't handle activate signal when the default behaviour will do. --- lib/ibus-menu.vala | 8 -------- lib/main.vala | 1 - 2 files changed, 9 deletions(-) diff --git a/lib/ibus-menu.vala b/lib/ibus-menu.vala index a74782ed..a240f00b 100644 --- a/lib/ibus-menu.vala +++ b/lib/ibus-menu.vala @@ -128,10 +128,6 @@ public class Indicator.Keyboard.IBusMenu : MenuModel { var state = new Variant.boolean (property.state == IBus.PropState.CHECKED); var action = new SimpleAction.stateful (name, null, state); - action.activate.connect ((parameter) => { - action.change_state (new Variant.boolean (!action.get_state ().get_boolean ())); - }); - action.change_state.connect ((value) => { if (value != null) { action.set_state ((!) value); @@ -158,10 +154,6 @@ public class Indicator.Keyboard.IBusMenu : MenuModel { var name = @"-private-radio-$radio_counter"; var action = new SimpleAction.stateful (name, VariantType.STRING, new Variant.string ("")); - action.activate.connect ((parameter) => { - action.change_state (parameter); - }); - action.change_state.connect ((value) => { if (value != null) { var key = ((!) value).get_string (); diff --git a/lib/main.vala b/lib/main.vala index b589a3c4..170e0335 100644 --- a/lib/main.vala +++ b/lib/main.vala @@ -860,7 +860,6 @@ public class Indicator.Keyboard.Service : Object { private Action get_active_action () { if (active_action == null) { var action = new SimpleAction.stateful ("active", VariantType.UINT32, new Variant.uint32 (get_current ())); - action.activate.connect ((parameter) => { action.change_state (parameter); }); action.change_state.connect (handle_changed_active); active_action = action; } -- cgit v1.2.3