Closed Bug 484667 Opened 15 years ago Closed 15 years ago

drag attachment to 'other' app doesn't work.


(Core :: Widget: Win32, defect)

Windows XP
Not set



Tracking Status
status1.9.2 --- ?
status1.9.1 --- ?


(Reporter: philbaseless-firefox, Assigned: philbaseless-firefox)



(Keywords: regression)


(1 file, 3 obsolete files)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090312 Shredder/3.0b3pre

Nothing happens when dragging attachment file to app.  e.g. open message with a .cpp file attachment and drag to VS.

Should open up file from a temporary location.

Outlook Express will copy dragged file to 'temporary internet files' and let outside app open from there.
works in Thunderbird 2
"drag to VS", what is VS?
dragging a c++ file to visual studio is suppose to open it for editing. 

But to make my comment more generic, drag a *.txt file to a text editor like word, that can handle dropped files, and it should open the file from the temporary location.
Keywords: regression
Summary: drag file to 'other' app doesn't work. → drag attachement to 'other' app doesn't work.
Assignee: nobody → philbaseless-firefox
this stems from widget/drag and drop in windows.  It need temp file support. TB2 only used temp files but the newer version of windows widget incorporated the stream type transfer but did not pick up the temp file support needed for this bug
Component: Attachments → Widget: Win32
Product: MailNews Core → Core
QA Contact: attachments → win32
Depends on: 494989
This enables dragging an attachment or email to text editor similar to depending bug does for images to image editor
Attachment #382661 - Flags: review?(emaijala)
most of this code is the original image code only moved and shifted around and bracketed by conditionals (tab-formatted) to catch inserted new code. The new code covering the x-moz-file-promise flavor.
Blocks: 497797
Summary: drag attachement to 'other' app doesn't work. → drag attachment to 'other' app doesn't work.
Flags: blocking1.9.1?
Flags: blocking1.9.1? → wanted1.9.1.x?
Comment on attachment 382661 [details] [diff] [review]
utilizes CF_HDROP expected by external apps

Sorry, I was too slow and the patch doesn't apply to trunk anymore.
Attachment #382661 - Flags: review?(emaijala)
(In reply to comment #7)
> (From update of attachment 382661 [details] [diff] [review])
> Sorry, I was too slow and the patch doesn't apply to trunk anymore.

it depends on bug 494989.  You can test this with that patch installed.

However, although other apps call GetData creating one temp file, windows shell has a nasty habit of calling GetData asking for CF_HDROP many times (~6) even though it uses the stream version.  so many temp files get created needlessly and that needs a module scope copy of the temp file for the many calls to GetData for this format.
I'll get that incorporated here but this will still work as is on top of 494989 patch
status1.9.1: --- → ?
Flags: wanted1.9.1.x?
this updates due to changes to bugs upstream that aren't landing... yet
Attachment #382661 - Attachment is obsolete: true
Attached patch patched to trunk (obsolete) — Splinter Review
Attachment #402998 - Attachment is obsolete: true
Attached patch patch to trunkSplinter Review
In summary, kFilePromiseMime ("application/x-moz-file-promise") registers CF_HDROP with windows and when windows asks for CF_HDROP there is no data. We know this can cause a freeze as it did with firefox. This patch returns data in the form of a temp file.

According to nsITransferable.idl the kFilePromiseMime is suppose to supply data through nsIFlavorDataProvider, implementing creation of the temp file, but it doesn't.

The other option for front end wanting to create temp files for passing in data would be to create a new flavor called kFileTempMime "application/x-moz-tempfile". I can do that here pretty easy if wanted but it will need a change to the idl and associated docs.

This patch will give back Thunderbird's ability to drag attachments to an application and most likely will be needed for xulrunner apps.
Attachment #412358 - Attachment is obsolete: true
Attachment #418504 - Flags: review?(roc)
Keywords: checkin-needed
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
This is a regression for Thunderbird all the way to TB2.  Anyway we can get this into 1.9.2 for TB3.1. Users are asking me when they can get the feature back.
status1.9.2: --- → ?
You need to log in before you can comment on or make changes to this bug.