Bug 98879

Summary: problems with drag 'n drop from media:/ to konsole
Product: [Applications] konsole Reporter: Mart <m4rt>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed In:

Description Mart 2005-02-08 21:33:18 UTC
Version:            (using KDE KDE 3.3.91)
Installed from:    Slackware Packages

I use a lot the drag'n drop between konqueror and konsole, especially the "cd" option
but with the new media:/ io-slave the path dropped on konsole of course is not a valid unix pathname, but that media:/ url correspond to a real pathname
so it wouldn't be possible to convert the url into the corresponding pathname when dropped on apps that doesn't know about kio?
Comment 1 Kurt Hindenburg 2005-05-25 21:16:01 UTC
SVN commit 418162 by hindenburg:

Use mostLocalURL on dropped URLs, helpful for media:/.

BUG: 98879


 M  +2 -1      TEWidget.cpp  


--- trunk/KDE/kdebase/konsole/konsole/TEWidget.cpp #418161:418162
@@ -73,6 +73,7 @@
 #include <kglobalsettings.h>
 #include <kshortcut.h>
 #include <kurldrag.h>
+#include <kio/netaccess.h>
 #include <qlabel.h>
 #include <qtimer.h>
 
@@ -2148,7 +2149,7 @@
           dropText += " ";
 	  m_drop->setItemEnabled(cd,false);
         }
-        KURL url = *it;
+        KURL url = KIO::NetAccess::mostLocalURL( *it, 0 );
         QString tmp;
         if (url.isLocalFile()) {
           tmp = url.path(); // local URL : remove protocol. This helps "ln" & "cd" and doesn't harm the others
Comment 2 Adonay Sanz Alsina 2005-07-04 01:55:00 UTC
In kde 3.4.1 debian, it isn't resolved. It fails, and not paste the correct path.
It paste " kfmclient copy 'media:/hdd' . "
and if you use F4 key in konqueror to open a konsole in a media:/ path, it open your HOME directory because it doesn't know media:/ path
Comment 3 Thiago Macieira 2005-07-04 01:59:58 UTC
The fix isn't in KDE 3.4.1.
Comment 4 Kurt Hindenburg 2005-07-04 02:19:34 UTC
KIO::NetAccess::mostLocalURL was added for KDE 3.5.  Hence this can't be back-ported to 3.4.x.
Comment 5 Thiago Macieira 2005-07-04 02:25:47 UTC
Kurt: you can KIO::stat and check if a UDS_LOCAL_PATH (= 72 | UDS_STRING) was returned. You won't have the constant, though, so you'll have to go with the value.