summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2012-11-23 15:01:08 +0100
committerRui Matos <tiagomatos@gmail.com>2012-11-26 11:18:47 +0100
commit134f3c399961d2dd5e38d17d22ed92f5c65c103a (patch)
treeaeb95a502b6ac0cd12d7ff4b098d754f44332309
parentaac59640e793752d1ae815ffea4d9113f77679e0 (diff)
downloadcaribou-134f3c399961d2dd5e38d17d22ed92f5c65c103a.tar.gz
key-model: Use key-released instead of key-clicked to hide subkeys
This allows users to insert subkeys with a single button press/release pair by pressing on the main key, then moving and releasing while hovering the subkey. Also, emit key-released instead of key-clicked on the main key since that is a better model of what is really happening. https://bugzilla.gnome.org/show_bug.cgi?id=688656
-rw-r--r--libcaribou/key-model.vala6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcaribou/key-model.vala b/libcaribou/key-model.vala
index 017e046..f4f4c17 100644
--- a/libcaribou/key-model.vala
+++ b/libcaribou/key-model.vala
@@ -121,12 +121,12 @@ namespace Caribou {
}
internal void add_subkey (KeyModel key) {
- key.key_clicked.connect(on_subkey_clicked);
+ key.key_released.connect(on_subkey_released);
extended_keys.add (key);
}
- private void on_subkey_clicked (KeyModel key) {
- key_clicked (key);
+ private void on_subkey_released (KeyModel key) {
+ key_released (key);
show_subkeys = false;
}