Closed Bug 358657 Opened 18 years ago Closed 18 years ago

Drag attachment to Desktop fails

Categories

(Thunderbird :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird 3

People

(Reporter: mcow, Assigned: Bienvenu)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

With trunk builds, at least as far back as 3a1-1004, seen with 3a1-1018, dragging an attachment to the Windows desktop generates a Windows error: An error occurred while moving the file. No corresponding error in TB's Error Console. Probably OT, but: The sequencing is odd: immediately after this error appears, a 'Moving' status window shows up -- but the Error box (which is Always On Top) is modally blocking that window; if the error gets the focus, the Moving box moves to the top of the window stack. This problem is not seen in TB 2b1-1026.
caused by Bug 203307 perhaps?
(In reply to comment #1) > caused by Bug 203307 perhaps? Possibly. I've also noticed that trying to drag an attachment into an application window is consistently giving a DoNotDrop cursor, also on the trunk.
Probably true? I can take a look at it if I'd knew where to look. Can someone point me to the right source file? I mean the code that deals with dragging attachments.
Probably true. I can take a look at it if I'd knew where to look. Can someone point me to the right source file? I mean the code that deals with dragging attachments.
Yes, it is caused by 203307. Actually, it does not work because nsIChannel::Open(nsIInputStream **_retval) is not implemented for nsMsgProtocol. I need a synchronous version, since it returns nsIInputStream, and windows shell handles it correctly then, I mean it can create a new thread for the extraction it needs to. UI would not hang anyway. So to fix this have to implement Open for nsMsgProtocol. Who do I ask for r/sr when it's done?
I could fix this with the following change to mailnews/base/util/nsMsgProtocol.cpp around line 560: NS_IMETHODIMP nsMsgProtocol::Open(nsIInputStream **_retval) { //NS_NOTREACHED("Open"); //return NS_ERROR_NOT_IMPLEMENTED; return NS_ImplementChannelOpen(this, _retval); } I simply used stock sync nsIChannel::Open implementation, can anyone tell me if this is the right way to do it? It worked with this change, but the file name was always Inbox for the created file. Could be fixed but I need more time to figure out how dragging of attachments works.
(In reply to comment #6) > It worked with this change, but the file name was always Inbox for the > created file. That same symptom seen at bug 332137.
(In reply to comment #7) > That same symptom seen at bug 332137. The drag code gets the name from the url, however I've added a possibility to specify alternative name in the drag flavor. So I do not think this will be a problem, I mean this can be fixed)
This will fix drag and drop, please review.
Attachment #245888 - Flags: superreview?
Attachment #245888 - Flags: review?
Comment on attachment 245888 [details] [diff] [review] this should fix drag and drop of attachments you need to request review from someone - (bugzilla really shouldn't allow you to request review from no-one, or should assign review to the bug owner, at the very least...)
Attachment #245888 - Flags: superreview?(bienvenu)
Attachment #245888 - Flags: superreview?
Attachment #245888 - Flags: review?(mscott)
Attachment #245888 - Flags: review?
is the message in a local folder, imap folder, or newsgroup?
Local folders is where I saw this, but I just reproduced in IMAP.
Right now the drag should be broken for all cases. This is because sync nsIChannel::Open method in nsMsgProtocol was not implemented. This is waht I'm using in the new drag code on windows. The patch should fix this, at least it did for local folders, I do not have an IMAP mailbox to test it. Can anybody suggest a place where those things are being given away for free? :)
I tried this patch - as you indicated, the new file name isn't correct, and that definitely needs to be fixed...
this fixes it for local, imap, and news. I had to encode the filename in the url, since that's the only chance we get with the drag drop code, as near as I can tell.
Assignee: mscott → bienvenu
Status: NEW → ASSIGNED
Attachment #246096 - Flags: superreview?(mscott)
Comment on attachment 245888 [details] [diff] [review] this should fix drag and drop of attachments thx for the initial work!
Attachment #245888 - Attachment is obsolete: true
Attachment #245888 - Flags: superreview?(bienvenu)
Attachment #245888 - Flags: review?(mscott)
Comment on attachment 246096 [details] [diff] [review] more complete fix Should we put it on the branch too even though Bug 358657 got minused for the branch? Or just do the trunk only.
Attachment #246096 - Flags: superreview?(mscott) → superreview+
I don't think there's any reason to land this on the branch, as long as Bug 203307 doesn't land on the branch. It's probably harmless, but I don't know of any upside either...
fixed on trunk, thx again, Yuri, for the initial work.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
V with TB 3a1-1128, Win2K. This also seems to have fixed bug 332137.
Status: RESOLVED → VERIFIED
Depends on: 362396
*** Bug 351274 has been marked as a duplicate of this bug. ***
Thanks, everyone. The version I downloaded a few weeks ago seems to work OK.
OS: Windows 2000 → All
Hardware: PC → All
Target Milestone: --- → Thunderbird 3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: