diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-08-26 16:39:31 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-08-26 16:39:31 +0200 |
commit | b777e2f5722c3c4042e527787d6ed3c4d4195b64 (patch) | |
tree | fe6a9e181afeed94be4413a59bddf2d82d07951c /src/gui/triggerSelectButton.vala | |
parent | 897e4c6bee4c75845caa7c2e88850def6d5674f3 (diff) | |
parent | 4b19e75939c5b7122d1429f6f258d4b83cd90dde (diff) |
New upstream release after gdb error
Diffstat (limited to 'src/gui/triggerSelectButton.vala')
-rw-r--r-- | src/gui/triggerSelectButton.vala | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/triggerSelectButton.vala b/src/gui/triggerSelectButton.vala index eb34066..c870f84 100644 --- a/src/gui/triggerSelectButton.vala +++ b/src/gui/triggerSelectButton.vala @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// Copyright (c) 2011-2015 by Simon Schneegans +// Copyright (c) 2011-2016 by Simon Schneegans // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -53,7 +53,7 @@ public class TriggerSelectButton : Gtk.ToggleButton { |Gdk.ModifierType.LOCK_MASK; ///////////////////////////////////////////////////////////////////// - /// C'tor, constructs a new TriggerSelectWindow. + /// C'tor, constructs a new TriggerSelectButton. ///////////////////////////////////////////////////////////////////// public TriggerSelectButton(bool enable_mouse) { @@ -132,31 +132,31 @@ public class TriggerSelectButton : Gtk.ToggleButton { private bool on_button_press(Gdk.EventButton event) { if (this.active) { - Gtk.Allocation rect; - this.get_allocation(out rect); - if (event.x < 0 || event.x > rect.width - || event.y < 0 || event.y > rect.height) { - - this.cancel(); - return true; - } - } - - if (this.active && this.enable_mouse) { - Gdk.ModifierType state = event.state & ~ this.lock_modifiers; - var new_trigger = new Trigger.from_values((int)event.button, state, true, - false, false, false, false, 5); - - if (new_trigger.key_code != 1) this.update_trigger(new_trigger); - else this.cancel(); + Gtk.Allocation rect; + this.get_allocation(out rect); + if (event.x < 0 || event.x > rect.width + || event.y < 0 || event.y > rect.height) { - return true; - } else if (this.active) { this.cancel(); return true; } + } + + if (this.active && this.enable_mouse) { + Gdk.ModifierType state = event.state & ~ this.lock_modifiers; + var new_trigger = new Trigger.from_values((int)event.button, state, true, + false, false, false, false, 5); - return false; + if (new_trigger.key_code != 1) this.update_trigger(new_trigger); + else this.cancel(); + + return true; + } else if (this.active) { + this.cancel(); + return true; + } + + return false; } } |