]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
Don't request any meta data, if the requested URL is equal to the currently shown...
[dolphin.git] / src / dolphinmainwindow.cpp
index 48f085e336bf872d6e13d30fe810fc3e26acb9bf..20d130ed3d08c652f9612b6ed9617aeb27d8eb14 100644 (file)
@@ -58,6 +58,7 @@
 #include <kio/netaccess.h>
 #include <kinputdialog.h>
 #include <klocale.h>
+#include <kprotocolmanager.h>
 #include <kmenu.h>
 #include <kmenubar.h>
 #include <kmessagebox.h>
@@ -182,9 +183,12 @@ void DolphinMainWindow::refreshViews()
     // the secondary view
     DolphinViewContainer* activeViewContainer = m_activeViewContainer;
 
-    m_viewTab[m_tabIndex].primaryView->view()->refresh();
-    if (m_viewTab[m_tabIndex].secondaryView != 0) {
-        m_viewTab[m_tabIndex].secondaryView->view()->refresh();
+    const int tabCount = m_viewTab.count();
+    for (int i = 0; i < tabCount; ++i) {
+        m_viewTab[i].primaryView->refresh();
+        if (m_viewTab[i].secondaryView != 0) {
+            m_viewTab[i].secondaryView->refresh();
+        }
     }
 
     setActiveViewContainer(activeViewContainer);
@@ -197,6 +201,13 @@ void DolphinMainWindow::pasteIntoFolder()
 
 void DolphinMainWindow::changeUrl(const KUrl& url)
 {
+    if (!KProtocolManager::supportsListing(url)) {
+        // The URL navigator only checks for validity, not
+        // if the URL can be listed. An error message is
+        // shown due to DolphinViewContainer::restoreView().
+        return;
+    }
+    
     DolphinViewContainer* view = activeViewContainer();
     if (view != 0) {
         view->setUrl(url);