Summary: | Copy-paste in find/filter field works incorrectly | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Claws Mail (GTK 2) | Reporter: | George <removed-gdpr> | ||||||
Component: | UI/Message List | Assignee: | users | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | normal | ||||||||
Priority: | P3 | ||||||||
Version: | 3.16.0 | ||||||||
Hardware: | PC | ||||||||
OS: | Linux | ||||||||
Attachments: |
|
Description
George
2018-03-09 13:21:26 UTC
Created attachment 1853 [details]
Cleaner handling of keypresses for quicksearch
The handling of key presses can a bit awkward in GTK. What happens here is that the main window gets the keypress first, and the /Edit/Copy menu item gets executed, while the GtkEntry in quicksearch box never even receives this keypress event.
This has been sort-of handled for certain keypresses, in a rather messy way (the main_window_accel_activate() and quicksearch_pass_key()) functions. Attached patch changes it to be cleaner - if quicksearch has focus, main window's accelerators are ignored, and instead the signal gets propagated (well, re-emitted) directly to the quicksearch GtkEntry.
Although the behavior seems to be correct with this patch, and there seem to be no side effects, I would still prefer if other people would test it, because this solution seems too easy to be complete. :)
Thanks Andrej! That was quick :) As soon as these changes propagate to the openSUSE's server:mail repository I will be able to test them. Changes related to this bug have been committed. Please check latest Git and update the bug accordingly. You can also get the patch from: http://git.claws-mail.org/ ++ ChangeLog 2018-03-29 17:37:04.011563057 +0200 http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=478d99a13b62c38fc55760bbe97c0db15dfa34a8 Merge: 8f0ab2e 7fafe08 Author: Colin Leroy <colin@colino.net> Date: Thu Mar 29 17:37:03 2018 +0200 Merge branch 'master' of file:///home/git/claws http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=7fafe08ddd93145b93b9f95a423ed2af8d9f9369 Author: Andrej Kacian <ticho@claws-mail.org> Date: Fri Mar 9 19:24:44 2018 +0100 Change how main window's keyboard accelerators are bypassed when quicksearch has focus. Instead of artificially forwarding the keypress to quicksearch (only when Shift is pressed), we emit a new "key-press-event" signal directly to the quicksearch entry, and block the original signal before it reaches the accelerator handling. Closes bug #3984: Copy-paste in find/filter field works incorrectly Hi, This fix fixes GTK's internal accelerators for copy-pasting, but breaks the rest of Claws Mail's own mainwindow accelerators when the quicksearch has focus. Now if I search for a mail and need to reply to it, I can't hit Ctrl-R to do so unless I unfocus the quicksearch. I'm not sure if that's a win. Created attachment 1923 [details]
Fix the fix
This patch keeps the nice code cleanup, and fixes the issue I have with it, without apparently breaking anything.
What do you think ?
> This patch keeps the nice code cleanup
Could you please advise how to use it? I have learned how to compile using git source code but I don't know how to test patches. Need I manually apply the line changes or is there a command which would allow me to do it?
Currently I am running Claws Mail version 3.17.0git59
Hi, Save the patch file, and use: patch -p1 < /path/to/the/patch.file HTH :) Hi Colin, I see this was commited to git. I could try it out. Your fix seems to work fine. Thanks! |