void DolphinMainWindow::stopLoading()
{
+ m_activeViewContainer->view()->stopLoading();
+}
+
+void DolphinMainWindow::enableStopAction()
+{
+ actionCollection()->action("stop")->setEnabled(true);
+}
+
+void DolphinMainWindow::disableStopAction()
+{
+ actionCollection()->action("stop")->setEnabled(false);
}
void DolphinMainWindow::toggleFilterBarVisibility(bool show)
this, SLOT(openNewTab(const KUrl&)));
connect(view, SIGNAL(requestContextMenu(KFileItem, const KUrl&, const QList<QAction*>&)),
this, SLOT(openContextMenu(KFileItem, const KUrl&, const QList<QAction*>&)));
+ connect(view, SIGNAL(startedPathLoading(KUrl)),
+ this, SLOT(enableStopAction()));
+ connect(view, SIGNAL(finishedPathLoading(KUrl)),
+ this, SLOT(disableStopAction()));
const KUrlNavigator* navigator = container->urlNavigator();
connect(navigator, SIGNAL(urlChanged(const KUrl&)),
/** Stops the loading process for the current active view. */
void stopLoading();
+ void enableStopAction();
+ void disableStopAction();
+
/**
* Toggles between showing and hiding of the filter bar
*/
restoreState(restoreStream);
}
+void DolphinView::stopLoading()
+{
+ m_viewAccessor.dirLister()->stop();
+}
+
void DolphinView::refresh()
{
const bool oldActivationState = m_active;
// Restore the contents position. This has to be done using a Qt::QueuedConnection
// because the view might not be in its final state yet.
QMetaObject::invokeMethod(this, "restoreContentsPosition", Qt::QueuedConnection);
+
+ emit finishedPathLoading(url());
}
void DolphinView::slotRefreshItems()
/** Reloads the current directory. */
void reload();
+ void stopLoading();
+
/**
* Refreshes the view to get synchronized with the (updated) Dolphin settings.
* This method only needs to get invoked if the view settings for the Icons View,
*/
void startedPathLoading(const KUrl& url);
+ /**
+ * Is emitted after the path triggered by DolphinView::setUrl()
+ * has been loaded.
+ */
+ void finishedPathLoading(const KUrl& url);
+
/**
* Emitted when KDirLister emits redirection.
* Testcase: fish://localhost