<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>65553</bug_id>
          
          <creation_ts>2003-10-05 19:36:29 +0000</creation_ts>
          <short_desc>funny bug: dragging an attachment icon to desktop copies icon!</short_desc>
          <delta_ts>2004-04-23 19:08:49 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konqueror</product>
          <component>khtml event</component>
          <version>SVN</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>grave</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Wilbert Berendsen">wbsoft</reporter>
          <assigned_to name="Konqueror Bugs">konqueror-bugs-null</assigned_to>
          <cc>d_baron</cc>
    
    <cc>gerard</cc>
    
    <cc>mi+kde</cc>
    
    <cc>oded</cc>
    
    <cc>siegmund</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>10</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>164078</commentid>
    <comment_count>0</comment_count>
    <who name="Wilbert Berendsen">wbsoft</who>
    <bug_when>2003-10-05 19:36:29 +0000</bug_when>
    <thetext>Version:           1.5.9 (using KDE 3.1.92 (alpha2, CVS &gt;= 20030921), compiled sources)
Compiler:          gcc version 3.2.1
OS:          Linux (i686) release 2.4.22-ck2

I dragged a .po attachment to the desktop from KMail and selected Copy Here. It created a png file with the name gettext.png!
I must drag the attachment file_name_, not the icon, to get the attachment copied to the desktop.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>176377</commentid>
    <comment_count>1</comment_count>
    <who name="Ingo Klöcker">kloecker</who>
    <bug_when>2003-11-14 10:09:49 +0000</bug_when>
    <thetext>*** Bug 68185 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>176401</commentid>
    <comment_count>2</comment_count>
    <who name="Ingo Klöcker">kloecker</who>
    <bug_when>2003-11-14 11:15:07 +0000</bug_when>
    <thetext>That&apos;s a great new feature of KHTML. I don&apos;t think we (the KMail developers) can do anything about it. Reassigning to the guys who implemented this new feature without thinking about the consequences (or maybe they did but just forgot to tell us what we have to change).

BTW, this isn&apos;t specific to .po files but applies to all attachments which are shown as icon in KMail.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181127</commentid>
    <comment_count>3</comment_count>
    <who name="Waldo Bastian">bastian</who>
    <bug_when>2003-11-28 14:46:56 +0000</bug_when>
    <thetext>Raising severity, blocking bug for 3.2, regression.

Selecting the icon of KMail attachments drags the icon (the image that is shown) but not the attachment itself (the URL associated with the icon).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181128</commentid>
    <comment_count>4</comment_count>
    <who name="George Staikos">staikos</who>
    <bug_when>2003-11-28 14:51:20 +0000</bug_when>
    <thetext>Subject: Re:  funny bug: dragging an attachment icon to desktop copies icon!

On Friday 28 November 2003 08:46, Waldo Bastian wrote:
&gt; Raising severity, blocking bug for 3.2, regression.
&gt;
&gt; Selecting the icon of KMail attachments drags the icon (the image that is
&gt; shown) but not the attachment itself (the URL associated with the icon).

  I&apos;ve seen this too, and I think my report about it was closed.  Are you 
using load-on-demand imap?

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181139</commentid>
    <comment_count>5</comment_count>
    <who name="Wilbert Berendsen">wbsoft</who>
    <bug_when>2003-11-28 15:42:09 +0000</bug_when>
    <thetext>I didn&apos;t use IMAP (when I reported the bug), just local mail folders.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181927</commentid>
    <comment_count>6</comment_count>
    <who name="Ingo Klöcker">kloecker</who>
    <bug_when>2003-12-01 14:44:56 +0000</bug_when>
    <thetext>*** Bug 69419 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>182490</commentid>
    <comment_count>7</comment_count>
    <who name="Ingo Klöcker">kloecker</who>
    <bug_when>2003-12-03 10:22:52 +0000</bug_when>
    <thetext>*** Bug 69540 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>182777</commentid>
    <comment_count>8</comment_count>
    <who name="J E Drews">j.e.drews</who>
    <bug_when>2003-12-04 06:01:34 +0000</bug_when>
    <thetext>Hello Ingo: 
 
 No it happens no matter where I click on the attachment. I tried clicking on the text and clicking on the mime symbol. In both cases the result of the drag and drop is still &quot;unknown.png&quot;. 
 
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>183706</commentid>
    <comment_count>9</comment_count>
    <who name="Till Adam">adam</who>
    <bug_when>2003-12-07 19:46:08 +0000</bug_when>
    <thetext>*** Bug 69540 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>202265</commentid>
    <comment_count>10</comment_count>
    <who name="Wilbert Berendsen">wbsoft</who>
    <bug_when>2004-02-06 11:22:27 +0000</bug_when>
    <thetext>Still there in KDE 3.2.0

When I drag the icon from KMail, I get a PNG image.
When I drag the filename, I get the attachment.

I think this is a very severe bug.

Think of a user who drags an attachment to his/her desktop, thinks it&apos;s OK, and then deletes the message and closes KMail, only to discover that the nice looking icon (which looks the same if previews are turned on!) is only a little PNG file, and that the original attachment is lost!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>202606</commentid>
    <comment_count>11</comment_count>
    <who name="J E Drews">j.e.drews</who>
    <bug_when>2004-02-07 01:37:19 +0000</bug_when>
    <thetext>&gt; That&apos;s a great new feature of KHTML. I don&apos;t think we (the KMail developers) can &gt; do anything about it.

The KHTML changes  are a great new feature but they break things?  THEN WHY THE HELL DID YOU SHIP IT!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>214323</commentid>
    <comment_count>12</comment_count>
    <who name="Maksim Orlovich">maksim</who>
    <bug_when>2004-03-11 16:51:13 +0000</bug_when>
    <thetext>*** Bug 77275 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>215419</commentid>
    <comment_count>13</comment_count>
    <who name="Michael Brug">Michael.Brug</who>
    <bug_when>2004-03-14 18:10:12 +0000</bug_when>
    <thetext>In KDE 3.2.1 I can drag the icon and get an (unwanted) png image on the desktop. I cannot drag the filename anymore to the desktop (worked in 3.2). 

The behavior is the same, when I try to drag an attachment to a new message.

So unless I missed something the functionality is completely broken now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>215469</commentid>
    <comment_count>14</comment_count>
    <who name="Wilbert Berendsen">wbsoft</who>
    <bug_when>2004-03-14 20:47:24 +0000</bug_when>
    <thetext>This is caused by this KHTML bug #71162, which really needs fixing, because the behaviour of dragging the image, while the link the image links to should be dragged/pasted.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>216392</commentid>
    <comment_count>15</comment_count>
    <who name="Dawit Alemayehu">adawit</who>
    <bug_when>2004-03-16 23:36:26 +0000</bug_when>
    <thetext>Hi,

The attached patch is intended to address the regression with dragging links 
and images as described in these reports. Please test...



Created an attachment (id=5247)
patch-71162.diff</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>216437</commentid>
    <comment_count>16</comment_count>
    <who name="David Baron">d_baron</who>
    <bug_when>2004-03-17 08:14:40 +0000</bug_when>
    <thetext>I am not working from source but installed from SID.

On Tuesday 16 March 2004 23:36, Dawit Alemayehu wrote:
&gt; ------- You are receiving this mail because: -------
&gt; You are on the CC list for the bug, or are watching someone who is.
&gt;
&gt; http://bugs.kde.org/show_bug.cgi?id=65553
&gt;
&gt;
&gt;
&gt;
&gt; ------- Additional Comments From adawit kde org  2004-03-16 23:36 -------
&gt; Hi,
&gt;
&gt; The attached patch is intended to address the regression with dragging
&gt; links and images as described in these reports. Please test...
&gt;
&gt;
&gt;
&gt; Created an attachment (id=5247)
&gt;  --&gt; (http://bugs.kde.org/attachment.cgi?id=5247&amp;action=view)
&gt; patch-71162.diff

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>216494</commentid>
    <comment_count>17</comment_count>
    <who name="Dawit Alemayehu">adawit</who>
    <bug_when>2004-03-17 14:17:35 +0000</bug_when>
    <thetext>CVS commit by adawit: 

Backport:
- Regression fix for BR# 71162 &amp; BR# 65553.
- Set the suggested filename if available when prompting user to save files.

CCMAIL: 71162-done@bugs.kde.org
CCMAIL: 65553-done@bugs.kde.org


  M +19 -17    khtml_part.cpp   1.959.2.9


--- kdelibs/khtml/khtml_part.cpp  #1.959.2.8:1.959.2.9
@@ -3777,9 +3777,13 @@ bool KHTMLPart::processObjectRequest( kh
     if ( child-&gt;m_type != khtml::ChildFrame::Object )
     {
+      QString suggestedFilename;
+      if ( child-&gt;m_run )
+        suggestedFilename = child-&gt;m_run-&gt;suggestedFilename();
+
       KParts::BrowserRun::AskSaveResult res = KParts::BrowserRun::askEmbedOrSave(
-        url, mimetype/*, suggestedFilename */ );
+        url, mimetype, suggestedFilename  );
       switch( res ) {
       case KParts::BrowserRun::Save:
-        KHTMLPopupGUIClient::saveURL( widget(), i18n( &quot;Save As&quot; ), url, child-&gt;m_args.metaData(), QString::null, 0 /*, suggestedFilename */ );
+        KHTMLPopupGUIClient::saveURL( widget(), i18n( &quot;Save As&quot; ), url, child-&gt;m_args.metaData(), QString::null, 0, suggestedFilename);
         // fall-through
       case KParts::BrowserRun::Cancel:
@@ -5364,4 +5368,9 @@ void KHTMLPart::khtmlMouseMoveEvent( kht
     d-&gt;m_bRightMousePressed = false;
   }
+
+  DOM::DOMString url = event-&gt;url();
+  DOM::DOMString target = event-&gt;target();
+  DOM::Node innerNode = event-&gt;innerNode();
+
 #ifndef QT_NO_DRAGANDDROP
   if( d-&gt;m_bDnd &amp;&amp; d-&gt;m_bMousePressed &amp;&amp;
@@ -5375,21 +5384,18 @@ void KHTMLPart::khtmlMouseMoveEvent( kht
     QDragObject *drag = 0;
     KURL u;
-    if ( d-&gt;m_mousePressNode.handle() &amp;&amp; d-&gt;m_mousePressNode.handle()-&gt;id() == ID_IMG )
+
+    // qDebug(&quot;****************** Event URL: %s&quot;, url.string().latin1());
+    // qDebug(&quot;****************** Event Target: %s&quot;, target.string().latin1());
+
+    // Normal image...
+    if ( url.length() == 0 &amp;&amp; innerNode.handle() &amp;&amp; innerNode.handle()-&gt;id() == ID_IMG )
     {
-      // Normal image
-      img = static_cast&lt;HTMLImageElementImpl *&gt;(d-&gt;m_mousePressNode.handle());
+      img = static_cast&lt;HTMLImageElementImpl *&gt;(innerNode.handle());
       u = KURL( completeURL( khtml::parseURL(img-&gt;getAttribute(ATTR_SRC)).string() ) );
       pix = KMimeType::mimeType(&quot;image/png&quot;)-&gt;pixmap(KIcon::Desktop);
     }
-    else if ( event-&gt;innerNode().handle() &amp;&amp; event-&gt;innerNode().handle()-&gt;id() == ID_IMG )
-    {
-      // Image inside a link?
-      img = static_cast&lt;HTMLImageElementImpl *&gt;(event-&gt;innerNode().handle());
-      u = completeURL( d-&gt;m_strSelectedURL );
-      pix = KMimeType::mimeType(&quot;image/png&quot;)-&gt;pixmap(KIcon::Desktop);
-    }
     else
     {
-      // Text link
+      // Text or image link...
       u = completeURL( d-&gt;m_strSelectedURL );
       pix = KMimeType::pixmapForURL(u, 0, KIcon::Desktop, KIcon::SizeMedium);
@@ -5423,8 +5429,4 @@ void KHTMLPart::khtmlMouseMoveEvent( kht
 #endif
 
-  DOM::DOMString url = event-&gt;url();
-  DOM::DOMString target = event-&gt;target();
-  DOM::Node innerNode = event-&gt;innerNode();
-
   // Not clicked -&gt; mouse over stuff
   if ( !d-&gt;m_bMousePressed )


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>226102</commentid>
    <comment_count>18</comment_count>
    <who name="Maksim Orlovich">maksim</who>
    <bug_when>2004-04-23 19:08:49 +0000</bug_when>
    <thetext>*** Bug 80216 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>5247</attachid>
            <date>2004-03-16 23:36:26 +0000</date>
            <delta_ts>2004-03-16 23:36:26 +0000</delta_ts>
            <desc>patch-71162.diff</desc>
            <filename>patch-71162.diff</filename>
            <type>text/x-diff</type>
            <size>2430</size>
            <attacher name="Dawit Alemayehu">adawit</attacher>
            
              <data encoding="base64">SW5kZXg6IGtodG1sX3BhcnQuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9ob21lL2tkZS9rZGVs
aWJzL2todG1sL2todG1sX3BhcnQuY3BwLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjk3OApkaWZm
IC11IC0zIC1wIC1yMS45Nzgga2h0bWxfcGFydC5jcHAKLS0tIGtodG1sX3BhcnQuY3BwCTggTWFy
IDIwMDQgMTQ6NDI6MTcgLTAwMDAJMS45NzgKKysrIGtodG1sX3BhcnQuY3BwCTE2IE1hciAyMDA0
IDIyOjIxOjU2IC0wMDAwCkBAIC01MzYzLDYgKzUzNjcsMTEgQEAgdm9pZCBLSFRNTFBhcnQ6Omto
dG1sTW91c2VNb3ZlRXZlbnQoIGtodAogICAgIGQtPm1fc3RyU2VsZWN0ZWRVUkwgPSBkLT5tX3N0
clNlbGVjdGVkVVJMVGFyZ2V0ID0gUVN0cmluZzo6bnVsbDsKICAgICBkLT5tX2JSaWdodE1vdXNl
UHJlc3NlZCA9IGZhbHNlOwogICB9CisKKyAgRE9NOjpET01TdHJpbmcgdXJsID0gZXZlbnQtPnVy
bCgpOworICBET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KICAgICB9CkBAIC01NDIyLDEwICs1NDI4
LDYgQEAgdm9pZCBLSFRNTFBhcnQ6OmtodG1sTW91c2VNb3ZlRXZlbnQoIGtodAogICB9CiAjZW5k
aWYKIAotICBET006OkRPTVN0cmluZyB1cmwgPSBldmVudC0+dXJsKCk7Ci0gIERPTTo6RE9NU3Ry
aW5nIHRhcmdldCA9IGV2ZW50LT50YXJnZXQoKTsKLSAgRE9NOjpOb2RlIGlubmVyTm9kZSA9IGV2
ZW50LT5pbm5lck5vZGUoKTsKLQogICAvLyBOb3QgY2xpY2tlZCAtPiBtb3VzZSBvdmVyIHN0dWZm
CiAgIGlmICggIWQtPm1fYk1vdXNlUHJlc3NlZCApCiAgIHsK
</data>

          </attachment>
      

    </bug>

</bugzilla>