Bug 606992 - Add ability to drag feed URL from header pane. r=Mnyromyr sr=Neil
authorJens Hatlak <jh@junetz.de>
Tue, 09 Nov 2010 00:08:12 +0100
changeset 6664 1634e5c4c0bc16de48d8f70c396cc58b9f4f5f9e
parent 6663 6da511123e92d75c98350f88a404b13ddb4a4b4c
child 6665 5970a061c13568c45a2e998d077a0b4488937449
push id5126
push userjh@junetz.de
push dateMon, 08 Nov 2010 23:11:39 +0000
treeherdercomm-central@1634e5c4c0bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMnyromyr, Neil
bugs606992
Bug 606992 - Add ability to drag feed URL from header pane. r=Mnyromyr sr=Neil
suite/mailnews/mailWidgets.xml
--- a/suite/mailnews/mailWidgets.xml
+++ b/suite/mailnews/mailWidgets.xml
@@ -191,19 +191,33 @@
   </binding>
 
   <binding id="mail-urlfield" extends="chrome://messenger/content/mailWidgets.xml#mail-headerfield">
     <content>
       <xul:hbox class="headerNameBox" align="start">
         <xul:label class="headerName" xbl:inherits="value=label" flex="1"/>
       </xul:hbox>
       <xul:label onclick="if (event.button != 2) openUILink(event.target.value, event);"
+                 ondragstart="this.parentNode.setDataTransfer(event);"
                  class="headerValue plain text-link headerValueUrl"
                  anonid="headerValue" flex="1" readonly="true" context="copyUrlPopup"/>
     </content>
+    
+    <implementation>
+      <method name="setDataTransfer">
+        <parameter name="aEvent"/>
+        <body><![CDATA[
+          var dt = aEvent.dataTransfer;
+          var val = aEvent.target.value;
+          dt.setData('text/x-moz-url', val + "\n" + val);
+          dt.setData('text/uri-list', val);
+          dt.setData('text/plain', val);
+        ]]></body>
+      </method>
+    </implementation>
   </binding>
 
   <binding id="mail-emailheaderfield">
     <content>
       <xul:hbox class="headerNameBox" align="start">
         <xul:label class="headerName" xbl:inherits="value=label" flex="1"/>
       </xul:hbox>
       <xul:mail-emailaddress class="headerValue" anonid="emailAddressNode"/>