After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 337787 - Copying in the Contact Preview Pane Copies the Whole vCard
Copying in the Contact Preview Pane Copies the Whole vCard
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Contacts
2.12.x
Other Linux
: Normal major
: Future
Assigned To: evolution-addressbook-maintainers
Evolution QA team
: 352506 377746 452490 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-04-09 11:04 UTC by Sebastien Bacher
Modified: 2013-09-13 00:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (14.50 KB, patch)
2006-05-23 05:10 UTC, Hiroyuki Ikezoe
none Details | Review
revised patch (13.92 KB, patch)
2006-06-08 01:32 UTC, Hiroyuki Ikezoe
none Details | Review
update patch (14.01 KB, patch)
2006-07-20 23:12 UTC, Hiroyuki Ikezoe
needs-work Details | Review
patch with debug print (13.39 KB, patch)
2006-07-27 01:24 UTC, Hiroyuki Ikezoe
none Details | Review
A new patch (1.70 KB, patch)
2007-07-04 03:32 UTC, Hiroyuki Ikezoe
committed Details | Review

Description Sebastien Bacher 2006-04-09 11:04:31 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"
Comment 1 André Klapper 2006-04-09 11:57:23 UTC
dup, cannot find it currently though
Comment 2 Hiroyuki Ikezoe 2006-05-20 14:51:53 UTC
(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.

Comment 3 André Klapper 2006-05-22 13:50:05 UTC
unable to find the dup, grr... hiroyuki, feel free to also try to fix this without having the original report... ;-)
Comment 4 Hiroyuki Ikezoe 2006-05-23 05:10:34 UTC
Created attachment 66029 [details] [review]
proposed patch
Comment 5 Hiroyuki Ikezoe 2006-05-23 05:11:53 UTC
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>".
 
Comment 6 André Klapper 2006-05-23 11:51:16 UTC
great stuff, gonna test it out
Comment 7 Hiroyuki Ikezoe 2006-06-07 10:30:14 UTC
Aargh! My patch uses function which is in GTK+ since GTK+-2.6.
It should be fixed.
Comment 8 Hiroyuki Ikezoe 2006-06-08 01:32:57 UTC
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.
Comment 9 Devashish Sharma 2006-07-20 10:38:08 UTC
hey Hiroyuki, the patch looks good by looking at the code.
can you send me an updated patch which applies to the current head.
Comment 10 Hiroyuki Ikezoe 2006-07-20 23:12:13 UTC
Created attachment 69292 [details] [review]
update patch

Devashish, thank you for your review.
Here is update patch.
Comment 11 André Klapper 2006-07-26 08:45:54 UTC
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.
Comment 12 Hiroyuki Ikezoe 2006-07-27 01:24:59 UTC
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?
Comment 13 André Klapper 2006-07-29 11:01:40 UTC
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)
Comment 14 Hiroyuki Ikezoe 2006-07-30 10:04:05 UTC
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.
Comment 15 Devashish Sharma 2006-07-31 09:34:35 UTC
I am also seeing the same behaviour andre reported.
Comment 16 André Klapper 2006-08-01 11:45:26 UTC
damn, i should have already realized by comment #5 that you're trying to fix something else... :-)
Comment 17 André Klapper 2006-08-10 21:48:36 UTC
also see bug 350725 which is about something similar in the calendar day view.
Comment 18 André Klapper 2006-08-23 11:58:10 UTC
*** Bug 352506 has been marked as a duplicate of this bug. ***
Comment 19 André Klapper 2006-08-23 12:00:12 UTC
updating target milestone
Comment 20 André Klapper 2007-06-28 12:55:00 UTC
*** Bug 377746 has been marked as a duplicate of this bug. ***
Comment 21 André Klapper 2007-07-01 19:35:17 UTC
hiroyuki, did you find time to take another look at this? :-)
Comment 22 André Klapper 2007-07-01 19:35:20 UTC
*** Bug 452490 has been marked as a duplicate of this bug. ***
Comment 23 Hiroyuki Ikezoe 2007-07-04 03:32:21 UTC
Created attachment 91157 [details] [review]
A new patch

Copy string in preview widget if the widget has focus and selection.
Comment 24 Hiroyuki Ikezoe 2007-07-04 03:33:43 UTC
If I understand this bug clearly, the patch fixes the bug.
Comment 25 André Klapper 2007-07-04 08:19:42 UTC
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...
Comment 26 Srinivasa Ragavan 2007-07-05 11:40:20 UTC
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.

Comment 27 Hiroyuki Ikezoe 2007-07-06 06:45:09 UTC
Thanks, commited now. 

Should I commit it to stable branch?
Comment 28 Srinivasa Ragavan 2007-07-06 07:02:55 UTC
There are not any stable releases beyond 2.18.3. I dont see a reason to commit otherwise.
Comment 29 André Klapper 2007-07-06 10:52:14 UTC
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...)