Summary: | funny bug: dragging an attachment icon to desktop copies icon! | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Wilbert Berendsen <wbsoft> |
Component: | khtml event | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | grave | CC: | d_baron, gerard, mi+kde, oded, siegmund |
Priority: | NOR | ||
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | patch-71162.diff |
Description
Wilbert Berendsen
2003-10-05 19:36:29 UTC
*** Bug 68185 has been marked as a duplicate of this bug. *** That's a great new feature of KHTML. I don'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't specific to .po files but applies to all attachments which are shown as icon in KMail. 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). Subject: Re: funny bug: dragging an attachment icon to desktop copies icon! On Friday 28 November 2003 08:46, Waldo Bastian wrote: > 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). I've seen this too, and I think my report about it was closed. Are you using load-on-demand imap? I didn't use IMAP (when I reported the bug), just local mail folders. *** Bug 69419 has been marked as a duplicate of this bug. *** *** Bug 69540 has been marked as a duplicate of this bug. *** 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 "unknown.png". *** Bug 69540 has been marked as a duplicate of this bug. *** 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'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! > That's a great new feature of KHTML. I don't think we (the KMail developers) can > do anything about it.
The KHTML changes are a great new feature but they break things? THEN WHY THE HELL DID YOU SHIP IT!
*** Bug 77275 has been marked as a duplicate of this bug. *** 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. 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. 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 I am not working from source but installed from SID. On Tuesday 16 March 2004 23:36, Dawit Alemayehu wrote: > ------- You are receiving this mail because: ------- > You are on the CC list for the bug, or are watching someone who is. > > http://bugs.kde.org/show_bug.cgi?id=65553 > > > > > ------- Additional Comments From adawit kde org 2004-03-16 23:36 ------- > 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) > --> (http://bugs.kde.org/attachment.cgi?id=5247&action=view) > patch-71162.diff CVS commit by adawit: Backport: - Regression fix for BR# 71162 & 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->m_type != khtml::ChildFrame::Object ) { + QString suggestedFilename; + if ( child->m_run ) + suggestedFilename = child->m_run->suggestedFilename(); + KParts::BrowserRun::AskSaveResult res = KParts::BrowserRun::askEmbedOrSave( - url, mimetype/*, suggestedFilename */ ); + url, mimetype, suggestedFilename ); switch( res ) { case KParts::BrowserRun::Save: - KHTMLPopupGUIClient::saveURL( widget(), i18n( "Save As" ), url, child->m_args.metaData(), QString::null, 0 /*, suggestedFilename */ ); + KHTMLPopupGUIClient::saveURL( widget(), i18n( "Save As" ), url, child->m_args.metaData(), QString::null, 0, suggestedFilename); // fall-through case KParts::BrowserRun::Cancel: @@ -5364,4 +5368,9 @@ void KHTMLPart::khtmlMouseMoveEvent( kht d->m_bRightMousePressed = false; } + + DOM::DOMString url = event->url(); + DOM::DOMString target = event->target(); + DOM::Node innerNode = event->innerNode(); + #ifndef QT_NO_DRAGANDDROP if( d->m_bDnd && d->m_bMousePressed && @@ -5375,21 +5384,18 @@ void KHTMLPart::khtmlMouseMoveEvent( kht QDragObject *drag = 0; KURL u; - if ( d->m_mousePressNode.handle() && d->m_mousePressNode.handle()->id() == ID_IMG ) + + // qDebug("****************** Event URL: %s", url.string().latin1()); + // qDebug("****************** Event Target: %s", target.string().latin1()); + + // Normal image... + if ( url.length() == 0 && innerNode.handle() && innerNode.handle()->id() == ID_IMG ) { - // Normal image - img = static_cast<HTMLImageElementImpl *>(d->m_mousePressNode.handle()); + img = static_cast<HTMLImageElementImpl *>(innerNode.handle()); u = KURL( completeURL( khtml::parseURL(img->getAttribute(ATTR_SRC)).string() ) ); pix = KMimeType::mimeType("image/png")->pixmap(KIcon::Desktop); } - else if ( event->innerNode().handle() && event->innerNode().handle()->id() == ID_IMG ) - { - // Image inside a link? - img = static_cast<HTMLImageElementImpl *>(event->innerNode().handle()); - u = completeURL( d->m_strSelectedURL ); - pix = KMimeType::mimeType("image/png")->pixmap(KIcon::Desktop); - } else { - // Text link + // Text or image link... u = completeURL( d->m_strSelectedURL ); pix = KMimeType::pixmapForURL(u, 0, KIcon::Desktop, KIcon::SizeMedium); @@ -5423,8 +5429,4 @@ void KHTMLPart::khtmlMouseMoveEvent( kht #endif - DOM::DOMString url = event->url(); - DOM::DOMString target = event->target(); - DOM::Node innerNode = event->innerNode(); - // Not clicked -> mouse over stuff if ( !d->m_bMousePressed ) *** Bug 80216 has been marked as a duplicate of this bug. *** |