]> cloud.milkyroute.net Git - dolphin.git/commitdiff
allow to browse through ZIP files (thanks to Filip Brcic for the patch!)
authorPeter Penz <peter.penz19@gmail.com>
Sat, 10 Mar 2007 18:52:51 +0000 (18:52 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sat, 10 Mar 2007 18:52:51 +0000 (18:52 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=641276

src/dolphinview.cpp

index 47c98f03fa95e5517ee4e4b54d18fb5fb776703f..6898d059ab1f6f4d3ae5def331f4ab15d0918988 100644 (file)
@@ -652,6 +652,19 @@ void DolphinView::triggerItem(const QModelIndex& index)
             setUrl(KUrl(localPath));
         }
     }
             setUrl(KUrl(localPath));
         }
     }
+    else if (item->isFile() && item->mimeTypePtr()->is("application/x-zip")) {
+        // allow to browse through ZIP files
+        const QString localPath(item->localPath());
+        KUrl url;
+        if (localPath.isEmpty()) {
+            url = item->url();
+        }
+        else {
+            url = localPath;
+        }
+        url.setProtocol("zip");
+        setUrl(url);
+    }
     else {
         item->run();
     }
     else {
         item->run();
     }