]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinpart.cpp
SVN_SILENT Added newline at EOF.
[dolphin.git] / src / dolphinpart.cpp
index 7fd51f76a4b6eb24d83274bf139b2fac9c4ae26f..41930221d5499f5499d11e3bae61818ddd07ce34 100644 (file)
@@ -62,7 +62,9 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL
 
     m_dirLister = new KDirLister;
     m_dirLister->setAutoUpdate(true);
-    m_dirLister->setMainWindow(parentWidget->window());
+    if (parentWidget) {
+        m_dirLister->setMainWindow(parentWidget->window());
+    }
     m_dirLister->setDelayedMimeTypes(true);
 
     //connect(m_dirLister, SIGNAL(started(KUrl)), this, SLOT(slotStarted()));
@@ -102,8 +104,6 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL
             this, SLOT(slotSelectionChanged(KFileItemList)));
     connect(m_view, SIGNAL(requestItemInfo(KFileItem)),
             this, SLOT(slotRequestItemInfo(KFileItem)));
-    connect(m_view, SIGNAL(urlChanged(KUrl)),
-            this, SLOT(slotUrlChanged(KUrl)));
     connect(m_view, SIGNAL(requestUrlChange(KUrl)),
             this, SLOT(slotRequestUrlChange(KUrl)));
     connect(m_view, SIGNAL(modeChanged()),
@@ -117,7 +117,8 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL
             this, SLOT(updateStatusBar()));
     connect(m_dirLister, SIGNAL(clear()),
             this, SLOT(updateStatusBar()));
-
+    connect(m_view,  SIGNAL(selectionChanged(const KFileItemList)),
+            this, SLOT(updateStatusBar()));
 
     m_actionHandler = new DolphinViewActionHandler(actionCollection(), this);
     m_actionHandler->setCurrentView(m_view);
@@ -417,12 +418,6 @@ void DolphinPart::slotOpenContextMenu(const KFileItem& _item, const KUrl&)
                                 actionGroups);
 }
 
-// ########### not sure this is still called... seems not.
-void DolphinPart::slotUrlChanged(const KUrl& newUrl)
-{
-    slotRedirection(url(), newUrl);
-}
-
 void DolphinPart::slotRedirection(const KUrl& oldUrl, const KUrl& newUrl)
 {
     //kDebug() << oldUrl << newUrl << "currentUrl=" << url();