[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Problem with media:/
From:       Kévin_Ottens <ervin () ipsquad ! net>
Date:       2004-12-24 10:09:50
Message-ID: 200412241109.51013.ervin () ipsquad ! net
[Download RAW message or body]

Le Jeudi 23 Décembre 2004 21:17, Adam Pigg a écrit :
> I click media:/
> a hd
> browse to an avi
> click it
> instead of it opening in kmplayer, konqueror downloads it to a temp file.

Yes, that's because file:/ is a special ioslave... it's not considered the 
same way than other protocols. Even protocols in the :local class.

> Discussing it on #kde-devel would indicate that the problem lies with the
> way media:/ browses, eg:
> media:/hda/movies/blah.avi

It simply the fact that it browses... redirecting is now browsing after 
all. :-)

> It would be nice to 'have your cake and eat it' but i guess it maybe needs
> discussed.

The situation already improved a lot. At the start you cannot even use 
correctly desktop files. The kio framework has now a new kind of UDSAtom 
called UDS_LOCAL_PATH which indicates if the file is also accessible on the 
local filesystem. We're not so far from the ideal situation...

Could you test the provided patch?
It must apply on kdebase/libkonq, it's the last place I know where something 
can ignore UDS_LOCAL_PATH. For applications using directly KFileItem::run() 
it should work since it's already patched.

If it works well for you and it is approved by a konqi devel, I'll commit it.

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."

["konq_dirpart.cc.diff" (text/x-diff)]

Index: konq_dirpart.cc
===================================================================
RCS file: /home/kde/kdebase/libkonq/konq_dirpart.cc,v
retrieving revision 1.83
diff -u -p -u -r1.83 konq_dirpart.cc
--- konq_dirpart.cc	20 Dec 2004 18:40:10 -0000	1.83
+++ konq_dirpart.cc	24 Dec 2004 10:01:29 -0000
@@ -318,10 +318,6 @@ void KonqDirPart::lmbClicked( KFileItem 
     args.trustedSource = true;
 
     bool is_local = fileItem->isLocalFile();
-    if (fileItem->mimeTypePtr()->is("application/x-desktop"))
-    {
-        url = fileItem->mostLocalURL(is_local);
-    }
     
     if ( fileItem->isLink() && is_local ) // see KFileItem::run
         url = KURL( url, KURL::encode_string( fileItem->linkDest() ) );
@@ -339,6 +335,10 @@ void KonqDirPart::lmbClicked( KFileItem 
     }
     else
     {
+        if (!fileItem->isDir())
+        {
+            url = fileItem->mostLocalURL(is_local);
+        }
         kdDebug() << "emit m_extension->openURLRequest( " << url.url() << "," << \
args.serviceType << ")" << endl;  emit m_extension->openURLRequest( url, args );
     }



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic