[gnome-music] Support different keyboard layouts in search on keypress function
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] Support different keyboard layouts in search on keypress function
- Date: Mon, 3 Mar 2014 10:10:03 +0000 (UTC)
commit e3260ff3377e7adff5ad8e9cef98e8529403e3b9
Author: Anton Belka <antonbelka gmail com>
Date: Mon Mar 3 05:19:34 2014 +0300
Support different keyboard layouts in search on keypress function
https://bugzilla.gnome.org/show_bug.cgi?id=723942
gnomemusic/window.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 257fc36..26605c0 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -237,8 +237,9 @@ class Window(Gtk.ApplicationWindow):
self.toolbar.searchbar.show_bar(False)
if self.toolbar._selectionMode:
self.toolbar.set_selection_mode(False)
- elif (event.state & modifiers) == 0 and \
- event.keyval in range(33, 126) and \
+ elif (event.state & modifiers) == 0 | Gdk.ModifierType.SHIFT_MASK and \
+ GLib.unichar_isprint(chr((Gdk.keyval_to_unicode(event.keyval)))) and \
+ not event.keyval == Gdk.KEY_space and \
not self.toolbar.searchbar.get_reveal_child():
self.toolbar.searchbar.show_bar(True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]