[gnome-boxes] searchbar: Ignore 'space' & 'enter' when not focused
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] searchbar: Ignore 'space' & 'enter' when not focused
- Date: Wed, 28 Aug 2013 14:57:48 +0000 (UTC)
commit 7a6aa811f0c8a9d180214cc1706874221a4ac871
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Aug 28 17:41:56 2013 +0300
searchbar: Ignore 'space' & 'enter' when not focused
Doing so allows box selection to be toggled through 'enter' & 'space'
keys in selection mode. This makes use more accessible (as in a11y) and
this behavior is consistent with other GNOME apps (e.g Documents) and is
documented here:
https://help.gnome.org/users/gnome-help/stable/keyboard-nav.html.en
https://bugzilla.gnome.org/show_bug.cgi?id=706623
src/searchbar.vala | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/searchbar.vala b/src/searchbar.vala
index 7f4b15d..4a8015a 100644
--- a/src/searchbar.vala
+++ b/src/searchbar.vala
@@ -99,6 +99,9 @@ private class Boxes.Searchbar: Boxes.UI {
return true;
}
+ if (!entry.has_focus && (event.keyval == Gdk.Key.space || event.keyval == Gdk.Key.Return))
+ return false;
+
var res = false;
// Don't pass on keynav keys, or CTRL/ALT using keys to search
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]