Closed Bug 499878 Opened 16 years ago Closed 15 years ago

drag & drop an .eml file into a mailbox folder

Categories

(SeaMonkey :: MailNews: Message Display, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.0b2

People

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

References

Details

Attachments

(1 file, 3 obsolete files)

+++ This bug was initially created as a clone of Bug #171907 +++ Once I saved an email as eml-file and deleted it from my mail folders, I cannot get it into a mail folder again. This could be useful e.g. to create a reply, or to "edit message as new". Workaround: drag & drop it to Outlook Express, then Tools->Import... from there. I am using 1.1 on Windows 2000. Does this work on Linux?
Seamonkey is a little different. this worked for my quick install of seamonkey but I'm not that familiar with it. It works with copying local store and didn't break multiple messages dnd. But not tested to see if it broke rss feeds dnd and dnd to imap or dnd of folders.
Attachment #384570 - Flags: review?(mkmelin+mozilla)
Comment on attachment 384570 [details] [diff] [review] drag and drop external files to a folder in mail part of seamonkey Passing this to Karsten (i'm not a mailnews/ reviewer)
Attachment #384570 - Flags: review?(mkmelin+mozilla) → review?(mnyromyr)
Comment on attachment 384570 [details] [diff] [review] drag and drop external files to a folder in mail part of seamonkey Works even under Linux. ;-) Just some nits: >diff --git a/mailnews/base/resources/content/messengerdnd.js b/mailnews/base/resources/content/messengerdnd.js > trans.addDataFlavor("text/x-moz-newsfolder"); >+ trans.addDataFlavor("application/x-moz-file"); This MIME type looks odd. It does neither an official one nor does it follow the internal Mozilla scheme of text/x-moz-*, so where do you get it? You should use the official "message/rfc822" type. >@@ -83,16 +84,28 @@ function CanDropOnFolderTree(index, orie >+ dataObj = dataObj.value.QueryInterface(Components.interfaces.nsILocalFile); >+ if (!dataObj) >+ return false; >+ return dataObj.isFile(); You can just use if (dataObj && dataObj.value instanceof Components.interfaces.nsILocalFile) return dataObj.isFile(); return false; here. >+ var dropFile = false; What's the use of this variable? It's only set twice and never used. >+ // shortcircuit external files and get out >+ if (flavor.value == "application/x-moz-file") { You should put the { (here and below) on their own lines for consistency reasons. >+ dropFile = true; >+ if (dataObj) >+ dataObj = dataObj.value.QueryInterface(Components.interfaces.nsILocalFile); >+ if (!dataObj) >+ return false; // don't know how this would ever happen >+ if (dataObj.isFile()) { >+ let len = dataObj.leafName.length; >+ if (len > 4 && dataObj.leafName.substr(len-4).toLowerCase() == ".eml") Need spaces around the subtraction operator. >+ } Wrong indent. > } >- >+ Don't add superfluous whitespace.
Attachment #384570 - Flags: review?(mnyromyr) → review-
http://mxr.mozilla.org/comm-central/source/mozilla/widget/public/nsITransferable.idl#57 the lost var dropFile was holdover from different approach. above link shows our transfer flavor for files. Although it's a local file the transferable indicates nsIFile so I changed to that interface.
Attachment #384570 - Attachment is obsolete: true
Attachment #387371 - Flags: review?(mnyromyr)
Attachment #387371 - Flags: review?(mnyromyr) → review+
Comment on attachment 387371 [details] [diff] [review] per review comments + changed to more appropriate, nsIFile > above link shows our transfer flavor for files. Yeah, sorry, I only realized after commenting. :-|
Keywords: checkin-needed
Comment on attachment 387371 [details] [diff] [review] per review comments + changed to more appropriate, nsIFile You need SR on shared code in /mailnews.
Attachment #387371 - Flags: superreview?(bienvenu)
Keywords: checkin-needed
Attached patch forbid drop on rss feed folders (obsolete) (deleted) — Splinter Review
added a 'no drop' if on rss feed folder. Also, var cs was moved but I copied it to its new location instead of moving.
Attachment #387371 - Attachment is obsolete: true
Attachment #389419 - Flags: review?(mnyromyr)
Attachment #387371 - Flags: superreview?(bienvenu)
Attachment #389419 - Flags: review?(mnyromyr) → review+
Attachment #389419 - Flags: superreview?(bienvenu)
Status: NEW → ASSIGNED
Why would we disable drop on rss feed folders? They're just local folders, and they can have messages added to them if the user wants...or does drag drop not work onto them?
bug 505116 Thunderbird, Magnus was thinking the same thing. This patch needs to have file drop to rss reenabled.
Comment on attachment 389419 [details] [diff] [review] forbid drop on rss feed folders I'll revise it to allow drop in rss folders
Attachment #389419 - Flags: superreview?(bienvenu)
Attached patch drop on rss folder is ok (deleted) — Splinter Review
Attachment #389419 - Attachment is obsolete: true
Attachment #393111 - Flags: superreview?(bienvenu)
Depends on: 500917
Blocks: 500917
No longer depends on: 500917
Attachment #393111 - Flags: superreview?(bienvenu) → superreview+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.0b2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: