m_proxyModel->setSourceModel(m_dolphinModel);
m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
- connect(m_dirLister, SIGNAL(started(KUrl)),
- this, SLOT(initializeProgress()));
+ // TODO: In the case of the column view the directory lister changes. Let the DolphinView
+ // inform the container about this information for KDE SC 4.7
connect(m_dirLister, SIGNAL(clear()),
this, SLOT(delayedStatusBarUpdate()));
connect(m_dirLister, SIGNAL(percent(int)),
this, SLOT(delayedStatusBarUpdate()));
connect(m_dirLister, SIGNAL(newItems(KFileItemList)),
this, SLOT(delayedStatusBarUpdate()));
- connect(m_dirLister, SIGNAL(completed()),
- this, SLOT(slotDirListerCompleted()));
connect(m_dirLister, SIGNAL(infoMessage(const QString&)),
this, SLOT(showInfoMessage(const QString&)));
connect(m_dirLister, SIGNAL(errorMessage(const QString&)),
this, SLOT(redirect(KUrl, KUrl)));
connect(m_view, SIGNAL(selectionChanged(const KFileItemList&)),
this, SLOT(delayedStatusBarUpdate()));
+ connect(m_view, SIGNAL(startedPathLoading(KUrl)),
+ this, SLOT(slotStartedPathLoading()));
+ connect(m_view, SIGNAL(finishedPathLoading(KUrl)),
+ this, SLOT(slotFinishedPathLoading()));
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
this, SLOT(slotUrlNavigatorLocationChanged(const KUrl&)));
if (isActive()) {
emit writeStateChanged(false);
}
-
- // Trigger an undetermined progress indication. The progress
- // information in percent will be triggered by the percent() signal
- // of the directory lister later.
- updateProgress(-1);
}
}
}
}
-void DolphinViewContainer::initializeProgress()
+void DolphinViewContainer::updateProgress(int percent)
+{
+ if (m_statusBar->progressText().isEmpty()) {
+ m_statusBar->setProgressText(i18nc("@info:progress", "Loading folder..."));
+ }
+ m_statusBar->setProgress(percent);
+}
+
+void DolphinViewContainer::slotStartedPathLoading()
{
if (isSearchUrl(url())) {
// Search KIO-slaves usually don't provide any progress information. Give
- // an immediate hint to the user that a searching is done:
+ // a hint to the user that a searching is done:
updateStatusBar();
m_statusBar->setProgressText(i18nc("@info", "Searching..."));
m_statusBar->setProgress(-1);
+ } else {
+ // Trigger an undetermined progress indication. The progress
+ // information in percent will be triggered by the percent() signal
+ // of the directory lister later.
+ updateProgress(-1);
}
- }
-
-void DolphinViewContainer::updateProgress(int percent)
-{
- if (m_statusBar->progressText().isEmpty()) {
- m_statusBar->setProgressText(i18nc("@info:progress", "Loading folder..."));
- }
- m_statusBar->setProgress(percent);
}
-void DolphinViewContainer::slotDirListerCompleted()
+void DolphinViewContainer::slotFinishedPathLoading()
{
if (!m_statusBar->progressText().isEmpty()) {
m_statusBar->setProgressText(QString());
m_viewModeController->setUrl(url); // emits urlChanged, which we forward
m_viewAccessor.prepareUrlChange(url);
applyViewProperties();
- loadDirectory(url);
// When changing the URL there is no need to keep the version
// data of the previous URL.
m_viewAccessor.dirModel()->clearVersionData();
- emit startedPathLoading(url);
-
// Reconnect to the (probably) new selection model and directory lister
connectViewAccessor();
+ loadDirectory(url);
if (hadSelection || hasSelection()) {
emitSelectionChangedSignal();
KDirLister* dirLister = m_viewAccessor.dirLister();
connect(dirLister, SIGNAL(redirection(KUrl,KUrl)),
this, SLOT(slotRedirection(KUrl,KUrl)));
+ connect(dirLister, SIGNAL(started(KUrl)),
+ this, SIGNAL(startedPathLoading(KUrl)));
connect(dirLister, SIGNAL(completed()),
this, SLOT(slotDirListerCompleted()));
connect(dirLister, SIGNAL(refreshItems(const QList<QPair<KFileItem,KFileItem>>&)),
KDirLister* dirLister = m_viewAccessor.dirLister();
disconnect(dirLister, SIGNAL(redirection(KUrl,KUrl)),
this, SLOT(slotRedirection(KUrl,KUrl)));
+ disconnect(dirLister, SIGNAL(started(KUrl)),
+ this, SIGNAL(startedPathLoading(KUrl)));
disconnect(dirLister, SIGNAL(completed()),
this, SLOT(slotDirListerCompleted()));
disconnect(dirLister, SIGNAL(refreshItems(const QList<QPair<KFileItem,KFileItem>>&)),