[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: [PATCH] kioslaves in konqueror
From: Raul Fernandes <rgfernandes () correioweb ! com ! br>
Date: 2004-11-08 22:08:37
Message-ID: 200411082208.37433.rgfernandes () correioweb ! com ! br
[Download RAW message or body]
Em Dom 07 Nov 2004 09:44, David Faure escreveu:
> Thanks a lot for the testing and polishing - patch applied (as well as the
> mimetype changes).
David,
Is it ok to backport the patch to KDE_3_3_BRANCH??? We have to change the
mimetypes too.
If this patch won't be applied, I would like to publish in kde-apps.
Raul Fernandes
rgfernandes@correioweb.com.br
["kdebase-3.3.1-kioslaves.patch" (text/x-diff)]
Index: kdebase/konqueror/konq_mainwindow.cc
===================================================================
RCS file: /home/kde/kdebase/konqueror/konq_mainwindow.cc,v
retrieving revision 1.1342.2.11
diff -u -3 -p -u -r1.1342.2.11 konq_mainwindow.cc
--- kdebase/konqueror/konq_mainwindow.cc 30 Sep 2004 15:14:34 -0000 1.1342.2.11
+++ kdebase/konqueror/konq_mainwindow.cc 6 Nov 2004 00:11:55 -0000
@@ -666,29 +666,23 @@ bool KonqMainWindow::openView( QString s
if ( url.isLocalFile()) // kio_tar/kio_zip only support local files
{
- if ( serviceType == QString::fromLatin1("application/x-tar") ||
- serviceType == QString::fromLatin1("application/x-tgz") ||
- serviceType == QString::fromLatin1("application/x-tbz") )
+ KServiceType::Ptr ptr = KServiceType::serviceType( serviceType );
+ if ( ptr )
{
- url.setProtocol( QString::fromLatin1("tar") );
- url.setPath( url.path() + '/' );
- serviceType = "inode/directory";
- // kdDebug(1202) << "TAR FILE. Now trying with " << url.url() << endl;
-
- }
- else if (serviceType == QString::fromLatin1("application/x-webarchive") )
- {
- url.setProtocol( QString::fromLatin1("tar") );
- url.setPath( url.path() + "/index.html");
-
- serviceType = "text/html";
- }
- else if (serviceType == QString::fromLatin1("application/x-zip"))
- {
- url.setProtocol( QString::fromLatin1("zip") );
- url.setPath( url.path() + '/' );
-
- serviceType = "inode/directory";
+ const QString protocol = ptr->property("X-KDE-LocalProtocol").toString();
+ if ( !protocol.isEmpty() )
+ {
+ url.setProtocol( protocol );
+ if (serviceType == QString::fromLatin1("application/x-webarchive") )
+ {
+ url.setPath( url.path() + "/index.html" );
+ serviceType = "text/html";
+ }else
+ {
+ url.setPath( url.path() + '/' );
+ serviceType = "inode/directory";
+ }
+ }
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic