]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewcontainer.cpp
as the detailsview and columnview can also have icon sizes up to 256 x 256 pixels...
[dolphin.git] / src / dolphinviewcontainer.cpp
index 6795aca9bd7e836335318f3d3a1443a2e005e45b..6e5385f5e4dd748bd9a890c79e0fa49b87ea4c8a 100644 (file)
@@ -355,12 +355,24 @@ void DolphinViewContainer::restoreView(const KUrl& url)
 {
     if (KProtocolManager::supportsListing(url)) {
         m_view->updateView(url, m_urlNavigator->savedRootUrl());
+    } else if (KProtocolManager::isSourceProtocol(url)) {
+        QString app = "konqueror";
+        if (url.protocol().startsWith(QLatin1String("http"))) {
+            showErrorMessage(i18nc("@info:status",
+                                   "Dolphin does not support web pages, the web browser has been launched"));
+            const KConfigGroup config(KSharedConfig::openConfig("kdeglobals"), "General");
+            const QString browser = config.readEntry("BrowserApplication");
+            if (!browser.isEmpty()) {
+                app = browser;
+            }
+        } else {
+            showErrorMessage(i18nc("@info:status",
+                                   "Protocol not supported by Dolphin, Konqueror has been launched"));        
+        }
+        const QString command = app + ' ' + url.pathOrUrl();
+        KRun::runCommand(command, app, app, this);
     } else {
-        // The URL navigator only checks for validity, not
-        // if the URL can be listed. 
-        showErrorMessage(i18nc("@info:status", "Protocol not supported by Dolphin, Konqueror has been launched"));        
-        QString command = "konqueror " + url.pathOrUrl();
-        KRun::runCommand(command, "konqueror", "konqueror", this);
+        showErrorMessage(i18nc("@info:status", "Invalid protocol"));
     }
 }