Commit 41b5941f authored by Anton Belka's avatar Anton Belka Committed by Vadim Rutkovsky

Support different keyboard layouts in search on keypress function

https://bugzilla.gnome.org/show_bug.cgi?id=723942
parent 65af00d1
......@@ -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) == Gdk.ModifierType.SHIFT_MASK or (event.state & modifiers) == 0 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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment