]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Update status of paste action once directory has finished loading.
authorDavid Faure <faure@kde.org>
Sun, 2 Nov 2014 14:34:30 +0000 (15:34 +0100)
committerDavid Faure <faure@kde.org>
Sun, 2 Nov 2014 14:34:30 +0000 (15:34 +0100)
Since 6a6cf1ab328e7600f0c2b375e43a1e3bd236a5a7, it depends on rootItem()
which is not available until the dirlister emits it.

src/dolphinmainwindow.cpp
src/dolphinmainwindow.h

index 49c234606d86e82fb72bc9a70def53239006ec72..c9b559439770b516b25c6d5db9f5024c5d6fe113 100644 (file)
@@ -497,6 +497,11 @@ void DolphinMainWindow::updatePasteAction()
     pasteAction->setText(pasteInfo.second);
 }
 
+void DolphinMainWindow::slotDirectoryLoadingCompleted()
+{
+    updatePasteAction();
+}
+
 void DolphinMainWindow::selectAll()
 {
     clearStatusBar();
@@ -1427,6 +1432,8 @@ void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container)
             this, &DolphinMainWindow::enableStopAction);
     connect(view, &DolphinView::directoryLoadingCompleted,
             this, &DolphinMainWindow::disableStopAction);
+    connect(view, &DolphinView::directoryLoadingCompleted,
+            this, &DolphinMainWindow::slotDirectoryLoadingCompleted);
     connect(view, &DolphinView::goBackRequested,
             this, static_cast<void(DolphinMainWindow::*)()>(&DolphinMainWindow::goBack));
     connect(view, &DolphinView::goForwardRequested,
index 36a16e518d511caf5ac55f286a77ce5a82a44fe1..12933f9ce4ae39191788d2ddf0c8fdb2214184a9 100644 (file)
@@ -432,6 +432,11 @@ private slots:
      */
     void setUrlAsCaption(const QUrl& url);
 
+    /**
+     * Is called when the view has finished loading the directory.
+     */
+    void slotDirectoryLoadingCompleted();
+
 private:
     void setupActions();
     void setupDockWidgets();