]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewcontainer.cpp
Install fileviewversioncontrolplugin.desktop as servicetype, so that version control...
[dolphin.git] / src / dolphinviewcontainer.cpp
index 356ff274ee7cfd612ba98e8827d88a8d11b46206..ae6953aad09666886d0aea385ddedcc607ca4c2a 100644 (file)
 #include <kshell.h>
 #include <kurl.h>
 #include <kurlcombobox.h>
+#include <kurlnavigator.h>
 #include <krun.h>
 
 #include "dolphinmodel.h"
 #include "dolphincolumnview.h"
 #include "dolphincontroller.h"
-#include "dolphinstatusbar.h"
 #include "dolphinmainwindow.h"
 #include "dolphindirlister.h"
 #include "dolphinsortfilterproxymodel.h"
@@ -58,7 +58,7 @@
 #include "dolphincontextmenu.h"
 #include "draganddrophelper.h"
 #include "filterbar.h"
-#include "kurlnavigator.h"
+#include "statusbar/dolphinstatusbar.h"
 #include "viewproperties.h"
 #include "settings/dolphinsettings.h"
 #include "dolphin_generalsettings.h"
@@ -128,11 +128,7 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
     connect(m_dirLister, SIGNAL(urlIsFileError(const KUrl&)),
             this, SLOT(openFile(const KUrl&)));
 
-    m_view = new DolphinView(this,
-                             url,
-                             m_dirLister,
-                             m_dolphinModel,
-                             m_proxyModel);
+    m_view = new DolphinView(this, url, m_proxyModel);
     connect(m_view, SIGNAL(urlChanged(const KUrl&)),
             m_urlNavigator, SLOT(setUrl(const KUrl&)));
     connect(m_view, SIGNAL(requestContextMenu(KFileItem, const KUrl&, const QList<QAction*>&)),
@@ -313,7 +309,7 @@ void DolphinViewContainer::slotDirListerCompleted()
         m_showProgress = false;
     }
 
-    delayedStatusBarUpdate();
+    updateStatusBar();
     QMetaObject::invokeMethod(this, "restoreContentsPos", Qt::QueuedConnection);
 
     // Enable the 'File'->'Create New...' menu only if the directory
@@ -335,7 +331,13 @@ void DolphinViewContainer::slotDirListerCompleted()
 void DolphinViewContainer::showItemInfo(const KFileItem& item)
 {
     if (item.isNull()) {
-        m_statusBar->clear();
+        // Only clear the status bar if unimportant messages are shown.
+        // This prevents that information- or error-messages get hidden
+        // by moving the mouse above the viewport or when closing the
+        // context menu.
+        if (m_statusBar->type() == DolphinStatusBar::Default) {
+            m_statusBar->clear();
+        }
     } else {
         m_statusBar->setMessage(item.getStatusBarInfo(), DolphinStatusBar::Default);
     }