GNOME Bugzilla – Bug 258374
Clipboard cleared on mail close
Last modified: 2009-11-27 04:11:33 UTC
Description of Problem: 1) No right click menu on mail body text (although if I click in the backgroun d of the text I get the mail context menu) 2) If I <ctrl> C on a block of text in an open mail and then close the mail, the clipboard copy is lost. This is the major annoyance Expected Results: 1) A right click menu as appears when right clicking in highlighted content of 'to:' field 2) Leave content in clipboard on mail item close How often does this happen? all the time,
1st one is a dup of bug 255803 and already fixed, therefore changing the subject...
I see number 2 too but can't change the bug status to CONFIRMED. I tested with Evolution 2.5.2. To reproduce this: 1. Start Evolution. 2. Click on the New Mail Message toolbar button. 3. Type "Test" into the message body. 4. Select the word Test with the mouse, right-click and select "Copy" from the pop-up menu. 5. Close the message window (e.g. from the top-left "X" icon) and choose "Discard Changes" when prompted. 6. Click on the New Mail Message toolbar button again. 7. Right left-click into the message body (to move focus), then right-click and select "Paste". Nothing happens.
*** Bug 317001 has been marked as a duplicate of this bug. ***
Ubuntu bug about that: https://launchpad.net/malone/bugs/39513
This bug will annoy the hell out of users who switch from Windows and are used to this Just Working. As a result, I'm marking it up to Normal Severity. Is there any chance of this being fixed soon?
This bug is caused by GtkHTML, not Evolution.
Created attachment 66118 [details] [review] workaround patch Cpoying "copied text" to clipboard explicitly when widget is destroyed.
It's just copied plain text. Not HTML text.
*** Bug 343971 has been marked as a duplicate of this bug. ***
I'm sorry, my patch was wrong. In some cases, the clipboard text composed by other application is overwritten by GTKHtml's copying text. Step reproduce it: 1. Copy text in Evolution mail composer 2. Cope text in some other application 3. Close Evolution mail composer 4. Do paste command in some application 5. Ugh! Pasting Evo's text I reworked a new patch with GtkClipboard, I attach it.
Created attachment 69783 [details] [review] new patch Use GtkClipboard instead of selection_get or selection_received signals.
moving to gtkhtml. should be reviewed in the 2.8 or 2.9 cycle - srini?
Hiroyuki, Your patch works only in composer. Even if you close, and open composer, it preserves. If you close evolution every thing is lost. Definitly this patch seems OK to commit, but that also should be addressed IMO.
Srini, Thank you point it out. And I noticed I did not handle primary selection too. I revised my patch and attach it here.
Created attachment 72485 [details] [review] revised patch
Created attachment 72529 [details] [review] revised patch My previous patch has two problems: * Crash when DnD from OpenOffice.org. * Cannot copy from GtkHTML itself when the first paste action. (i.e. Ctrl+V does not happen after Ctrl+C in GTKHTML, but then Ctrl+V works fine.) The first one is solved in this patch. The second one is caused by the code which I added for reserving copied string after closing evolution (i.e. to solve the situation in comment #13). So I removed the code. I have to work to solve the issue in comment #13.
Is this patch 2.8.x material?
Daniel, Hiroyuki is yet to close on the second one.
Any progress on this? Can we please get the patches marked with some form of status?
How likely is this to be fixed before the next release? it would be great if this could be fixed and we have 'expected' copy and paste. kk
Setting patch status on to needs-work based on comment #18. I would love to get this bug fixed completely for this release.
Sniri, I have not found the solution for the issue that text data has gone when evo is closed (you mentioned in comment #13). I guess GTK+ does store handle raw text and other format data in clipboard when application has closed. Anyway, I think that keeping the clipboard data only while application is running is useful. I attach a new patch.
Created attachment 94407 [details] [review] A new patch A new patch to latest trunk.
> I have not found the solution for the issue that text data has gone when evo is closed Your patch already uses gtk_clipboard_set_can_store(): http://library.gnome.org/devel/gtk/stable/gtk-Clipboards.html#gtk-clipboard-set-can-store so I would expect this to work.
Murray, unfortunately it doesn't work. If you close Evolution, all the clipboard contents are reset. But it works at least if the message window is closed. I'm fine to push this and leave the bug open with the summary adjusted. Hiroyuki, Im sure that you can debug the reset later-on.
That sounds sensible. It will make it easier for someone to figure out how to fix it completely.
Committed. 2007-10-14 Hiroyuki Ikezoe <poincare@ikezoe.net> ** Fixes part of bug #258374 * gtkhtml.c: Rewrite copy-and-paste handling with GtkClipboard instead of selection_XX event.
I made a simple test program without bonobo. The issue of clipboard text disappearance does not happen on the test program only if the program exits harmlessly. I think the issue is caused by bonobo or related codes.
Created attachment 97195 [details] simple test program
Looks like the changes break the ABI, 3.17.1 dropped the gtk_html_request_paste without changing the soname
Hiroyuki, can you re patch this in a way we don't break it? I would like to see this function still there implemented. The last thing we should do is break it if no way it is possible.
*** Bug 463066 has been marked as a duplicate of this bug. ***
A lot of programs does have this bug which is most of time related to a recent change in FreeDesktop Clipboard Manager specification. Perhaps that this is what you need to fix this bug : http://www.freedesktop.org/wiki/ClipboardManager
Bumping version to a stable release.
Scenario works fine in current stable 2.22.3. It saves text after closing window and i can paste at other place also.
Yes, the scenario works in Evolution 2.22.3.1. The clipboard contents is still lost after quiting Evolution, however.
*** Bug 410059 has been marked as a duplicate of this bug. ***
This is fixed now in 2.29. Closing as OBSOLETE.
Thanks for your update!