1. Open some folder
2. Choose to some way to filter/find messages, e.g. "From/To/Cc/Subject/Tag"
3. Type some text, e.g. ABC
4. Select the typed text
5. Ctrl+C to copy
6. Ctrl+V to paste
Ctrl+V should paste ABC
Ctrl+V pastes the text of the currently selected message body (which implies that Ctrl+C has copied actually that text and not what was selected in the typing field)
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:
++ ChangeLog 2018-03-29 17:37:04.011563057 +0200
Merge: 8f0ab2e 7fafe08
Author: Colin Leroy <firstname.lastname@example.org>
Date: Thu Mar 29 17:37:03 2018 +0200
Merge branch 'master' of file:///home/git/claws
Author: Andrej Kacian <email@example.com>
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
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
Save the patch file, and use:
patch -p1 < /path/to/the/patch.file
I see this was commited to git. I could try it out. Your fix seems to work fine. Thanks!
In commit https://git.claws-mail.org/?p=claws.git;a=commit;h=029c9c58d48e7784950e252e9b4f2e30dc9c9aef.