Closed Bug 243733 Opened 21 years ago Closed 21 years ago

Internally register to handle vCard attachment URLs

Categories

(Thunderbird :: Address Book, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird0.7

People

(Reporter: mscott, Assigned: mscott)

Details

(Whiteboard: fixed-aviary1.0)

Attachments

(2 files)

Today if you double click on a vCard attachment in the message pane, we open up the Windows vCard application. We should internally register the AB for handling urls of this content type so we can show them in our ab card UI.
Status: NEW → ASSIGNED
Target Milestone: --- → Thunderbird0.7
Comment on attachment 149241 [details] [diff] [review] the fix...create a vcard stream listener which can turn a stream into vCard UI Now when you double click on a vCard attachment we bring up our own address book card UI instead of calling out to Microsoft's address book. When the address book content handler detects text/x-vcard, it creates a vcard stream listener. the vcard stream listener takes the vcard stream, turns it into a buffer then shows an address book card representing the data.
Attachment #149241 - Flags: superreview?(bienvenu)
Comment on attachment 149241 [details] [diff] [review] the fix...create a vcard stream listener which can turn a stream into vCard UI one nit: +nsMsgVCardStreamListener::~nsMsgVCardStreamListener() +{ + PR_FREEIF(m_dataBuffer); +} this can just be PR_Free, since we're in the desstructor, and don't care about nulling out m_dataBuffer (and PR_Free checks for null anyway...). sr=bienvenu...
Attachment #149241 - Flags: superreview?(bienvenu) → superreview+
fixed on the trunk
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Whiteboard: fixed-aviary1.0
Comment on attachment 149241 [details] [diff] [review] the fix...create a vcard stream listener which can turn a stream into vCard UI >+ // create a stream listener to handle the v-card data You might have been able to save your self some work using a stream loader, it collects up the data into a buffer for you. Then the work you were doing in OnStopRequest you move to OnStreamComplete. >+ nsCOMPtr<nsISupportsInterfacePointer> ifptr = do_CreateInstance(NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID, &rv); That's a nice trick to pass an nsIAbCard to abNewCardDialog.xul - which promptly calls QueryInterface on its parameter, thus defeating the object...
Is it possible the fix for this bug broke something? I am now having a problem with "Add to Address Book" (right-click on address in message header). In Thunderbird version 0.6+ (20040601) win2k it is working. ... 2 days later .... In Thunderbird version 0.6+ (20040603) win2k is is broken: - email address not filled in.
Attached patch cleanupSplinter Review
Comment on attachment 150131 [details] [diff] [review] cleanup Most of this patch is cleanup although there are one or two tweaks to get the feature to work on my build, I don't know if they're strictly necessary.
Attachment #150131 - Flags: superreview?(sspitzer)
Attachment #150131 - Flags: review?(bienvenu)
Comment on attachment 150131 [details] [diff] [review] cleanup Thanks for cleaning this up Neil. One comment. You enabled this feature for seamonkey which is fine. I had it Thunderbird only. But you've now removed the registration from Thunderbird so it won't work there. Please fix that. Also the nsISupportsInterfacePointer stuff that you removed was copied from somewhere else (I don't remember where). You might want to clean up that caller too while you are at it.
Attachment #150131 - Flags: superreview?(sspitzer) → superreview?(mscott)
Comment on attachment 150131 [details] [diff] [review] cleanup I misunderstood the thunderbird factory change. I see now that this still works for thunderbird. thanks Neil.
Attachment #150131 - Flags: superreview?(mscott)
Attachment #150131 - Flags: superreview+
Attachment #150131 - Flags: review?(bienvenu)
Attachment #150131 - Flags: review+
I've checked attachment 150131 [details] [diff] [review] into the trunk.
Has this landed on the branch? None of the recent builds I've tried register TB as the vCard handler. Further, if I manually set the association and double click a vCard, TB opens but nothing happens (doesn't display the address book or the card).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: