GNOME Bugzilla – Bug 723942
Search on keypress function opens search bar even when pressing any key (patch)
Last modified: 2014-03-03 10:30:43 UTC
Hi. This is a patch in order to fix a bug generated by the resolution of bug 721595 [1], it also fixes the encapsulation problem mentioned in there. Still, this should be thought of as a temporary fix, since the current way of handling key presses does not make use of Gtk's methods (GtkAccelGroup, etcetera), which might not be a very good idea, considering the code will probably become long and tedious unless the approach is corrected. I have also changed the names of the functions on_configure_event and on_window_state_event in order to correspond to the (apparent) convention that signal callbacks have a underscore prefixed to their names. [1] https://bugzilla.gnome.org/show_bug.cgi?id=721595
Created attachment 268550 [details] [review] Fixes the bug.
Review of attachment 268550 [details] [review]: Pushed the fix as https://git.gnome.org/browse/gnome-music/commit/?id=7bd33a3
The bug is still not fixed complete however - non-ASCII symbols are skipped, the code uses 'magic' numbers and, as Julian has stated - a temporary solution. Julian, please use 'git format-patch' further on - it would be a bit more convenient for us to accept your patches
As far as I have checked, no other music application manages to receive non-ASCII symbols successfully, probably because of this: When pressing "a", event.keyval has value 97. When trying to type "á", one presses "'" first, which receives 65105, and then one presses "a", which has value 97. This is displayed in the entry as "á". I'm thinking about how to approach the problem. If you happen to know whether there is any way to verify whether a character is mapped in unicode, that could come in useful. Oh, and about the patches thing, sure, I though 'git patch' was the most convenient. Thanks, Julián.
Created attachment 270743 [details] [review] [PATCH] Support different keyboard layouts in search on keypress Hi, Vadim. I fixed two problems, which you described and right now: - code don't use magic numbers - non-ASCII symbols handled Please review my patch. Thanks a lot. :)
Review of attachment 270743 [details] [review]: This breaks search by numbers (e.g. 100) also non-ASCII (I tried Russian Cyrillics) don't work for me
Created attachment 270765 [details] [review] [PATCH] Support different keyboard layouts in search on keypress Sorry, fixed. :)
Review of attachment 270765 [details] [review]: Thanks, pushed as https://git.gnome.org/browse/gnome-music/commit/?id=41b5941