GNOME Bugzilla – Bug 337787
Copying in the Contact Preview Pane Copies the Whole vCard
Last modified: 2013-09-13 00:59:29 UTC
That bug has been opened on https://launchpad.net/distros/ubuntu/+source/evolution/+bug/38803 "1. Select a portion of text in the Contact preview pane - Right clicking it does not bring up a menu to let you copy. - ctrl+c puts the whole vCard for that entry into your clipboard (see bottom) This doesn't seem very user friendly at all... the preview is much more useful when you can quickly copy out a phone number or address. ----------------------------------------------------- BEGIN:VCARD VERSION:3.0 URL: TITLE: ROLE: X-EVOLUTION-MANAGER: X-EVOLUTION-ASSISTANT: NICKNAME: X-EVOLUTION-SPOUSE: NOTE: FN:Joe Shmoe N:Shmoe;Joe;;; X-EVOLUTION-FILE-AS:Shmoe\, Joe X-EVOLUTION-BLOG-URL: CALURI: FBURL: X-EVOLUTION-VIDEO-URL: X-MOZILLA-HTML:FALSE EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:joeshmoe@nowhere.co TEL;TYPE=WORK;TYPE=VOICE;X-EVOLUTION-UI-SLOT=1:555-7893 UID:pas-id-4436ECB800000000 REV:2006-04-07T22:50:32Z END:VCARD"
dup, cannot find it currently though
(In reply to comment #1) > dup, cannot find it currently though Have't you found it yet? Though I will try to fix this issue, I can't find original too.
unable to find the dup, grr... hiroyuki, feel free to also try to fix this without having the original report... ;-)
Created attachment 66029 [details] [review] proposed patch
Use GtkClipboard instead of GtkSelection. Copying is not only VCARD type but also text type, so if you paste to text widget like GtkEntry, it's pasted as "Name <foo@bar.com>" If you are copying multiple accounts, these are joind with "," as "Name1 <foo1@bar.com>, Name2 <foo2@bar.com>".
great stuff, gonna test it out
Aargh! My patch uses function which is in GTK+ since GTK+-2.6. It should be fixed.
Created attachment 66946 [details] [review] revised patch As far as I look into gtkclipboard in GTK+-2.4 inplementation, this fix seems to be good.
hey Hiroyuki, the patch looks good by looking at the code. can you send me an updated patch which applies to the current head.
Created attachment 69292 [details] [review] update patch Devashish, thank you for your review. Here is update patch.
hiroyuki: hmm. i copied one line in the contact preview pane and pasted it to gedit - still, the entire vcard is pasted. so this fix does not work for me. :-( evolution 2.7.4cvs on gnome2.12/suse10.1.
Created attachment 69704 [details] [review] patch with debug print Andre, can you test this patch? this patch outputs debug message. Run evo from console, copy one line from contact list, paste it to gedit or something. What do you see on console?
opened evo addressbook (preview pane enabled), clicked on one contact. copied the Fax number by using Control+C. pasted it to gedit, but the result is wrong: i get John Smith <email@example.com> in gedit. i only copied the fax number, namely 0123456789 in the preview pane. shell says: (evolution-2.8:25283): eab-widgets-WARNING **: e-addressbook-view.c: (clipboard_get_contacts_cb: INFO: 2)
Orz... I misunderstood this bug. I thought the preview pane is on the right top of the window. I'm sorry my patch was entirely wrong. I will attach a new patch in a few days.
I am also seeing the same behaviour andre reported.
damn, i should have already realized by comment #5 that you're trying to fix something else... :-)
also see bug 350725 which is about something similar in the calendar day view.
*** Bug 352506 has been marked as a duplicate of this bug. ***
updating target milestone
*** Bug 377746 has been marked as a duplicate of this bug. ***
hiroyuki, did you find time to take another look at this? :-)
*** Bug 452490 has been marked as a duplicate of this bug. ***
Created attachment 91157 [details] [review] A new patch Copy string in preview widget if the widget has focus and selection.
If I understand this bug clearly, the patch fixes the bug.
hmm, the patch does not work for me in 2.11.4, it still copies the whole vcard. :-/ just to avoid more confusion and wasting your time: i go to the contacts view, "view->contact preview" is enabled. i highlight a contact so it gets displayed in the contact preview pane, mark some text with the mouse and copy it. when pasting it into gedit, the entire "raw" vcard gets pasted instead of the text that i highlighted...
It fixes the bug. I tried Control+C as well as Edit->Copy. It worked. Andre did you compile from addressbook/ directory? Please commit to head.
Thanks, commited now. Should I commit it to stable branch?
There are not any stable releases beyond 2.18.3. I dont see a reason to commit otherwise.
good that i'm not the QA. yeah, now it works for me. sorry for the noise, and thanks for a great patch! closing as fixed, finally. cool. (hint, hint, hint!: bug 350725 is the same issue for the calendar day view...)