Closed Bug 293257 Opened 20 years ago Closed 18 years ago

Enable drag and drop from address book sidebar to addressing widget in compose window.

Categories

(SeaMonkey :: MailNews: Message Display, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: standard8)

Details

(Keywords: fixed-seamonkey1.1.2)

Attachments

(2 files, 1 obsolete file)

Now we have the sidebar back in the compose window, we should also enable drag
and drop to the addressing widget. Should be fairly simple as the addressing
widget already accepts the drop.
This patch enables dnd from the sidebar to the compose addressing widget (I found out how tb did it). It sometimes doesn't separate multiple items onto different lines automatically - I think that's something to do with focus, but I've got no idea how to fix that. TB does it better, but its not perfect. Anyway, the user can always enter the line and press "enter".
Attachment #256084 - Flags: superreview?(neil)
Attachment #256084 - Flags: review?(neil)
Attached patch Fix some warnings/assertions (obsolete) — Splinter Review
This fixes a warning about an undefined variable and fixes some possible assertions when users try to do things like dragging random text to address books and expecting something to happen ;-)
Attachment #256086 - Flags: superreview?(bienvenu)
Attachment #256086 - Flags: review?(neil)
Comment on attachment 256086 [details] [diff] [review]
Fix some warnings/assertions

>+      try {
>+        trans.getAnyTransferData(flavor, dataObj, len);
>+      }
>+      catch (ex) {}
>+      if (!dataObj.value)
>+      {
>+        dragSession.canDrop = false;
>+        return false;
>+      }
Shouldn't this be
catch (ex) {
  dragSession.canDrop = false;
  return false;
}

>-      if (dataObj)
>+      if (dataObj.value)
I would be surprised if this failed - prefer try/catch if you want to be sure.

>+  var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
>+  trans.addDataFlavor("text/x-moz-address");
I've got no objection to you removing the try/catch but you could wrap the .createInstance while you're at it.
Comment on attachment 256084 [details] [diff] [review]
Fix v1 (checked in)

D'oh!
Attachment #256084 - Flags: superreview?(neil)
Attachment #256084 - Flags: superreview+
Attachment #256084 - Flags: review?(neil)
Attachment #256084 - Flags: review+
Comment on attachment 256084 [details] [diff] [review]
Fix v1 (checked in)

I checked this into trunk. Neil implied on irc he thought it may be suiteable for 1.1.2 so I'm requesting approval.
Attachment #256084 - Attachment description: Fix v1 → Fix v1 (checked in)
Attachment #256084 - Flags: approval-seamonkey1.1.2?
v2 -> Fixes Neil's comments.
Attachment #256086 - Attachment is obsolete: true
Attachment #256302 - Flags: superreview?(bienvenu)
Attachment #256302 - Flags: review?(neil)
Attachment #256086 - Flags: superreview?(bienvenu)
Attachment #256086 - Flags: review?(neil)
Attachment #256302 - Flags: superreview?(bienvenu) → superreview+
Attachment #256302 - Flags: review?(neil) → review+
Both patches checked in -> fixed.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment on attachment 256084 [details] [diff] [review]
Fix v1 (checked in)

a=me for 1.1.2
Attachment #256084 - Flags: approval-seamonkey1.1.2? → approval-seamonkey1.1.2+
Checked in on 1.8 branch.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: