connect(m_view, SIGNAL(startedPathLoading(KUrl)), this, SLOT(slotStartedPathLoading()));
connect(m_view, SIGNAL(finishedPathLoading(KUrl)), this, SLOT(slotFinishedPathLoading()));
connect(m_view, SIGNAL(itemCountChanged()), this, SLOT(delayedStatusBarUpdate()));
- connect(m_view, SIGNAL(pathLoadingProgress(int)), this, SLOT(updateProgress(int)));
+ connect(m_view, SIGNAL(pathLoadingProgress(int)), this, SLOT(updateLoadingProgress(int)));
+ connect(m_view, SIGNAL(sortProgress(int)), this, SLOT(updateSortProgress(int)));
connect(m_view, SIGNAL(infoMessage(QString)), this, SLOT(showInfoMessage(QString)));
connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(showErrorMessage(QString)));
connect(m_view, SIGNAL(urlIsFileError(KUrl)), this, SLOT(openFile(KUrl)));
return m_searchBox;
}
-void DolphinViewContainer::refresh()
+void DolphinViewContainer::readSettings()
{
if (GeneralSettings::modifiedStartupSettings()) {
// The startup settings should only get applied if they have been
// settings of the URL navigator and the filterbar.
m_urlNavigator->setUrlEditable(GeneralSettings::editableUrl());
m_urlNavigator->setShowFullPath(GeneralSettings::showFullPath());
+ m_urlNavigator->setHomeUrl(KUrl(GeneralSettings::homeUrl()));
setFilterBarVisible(GeneralSettings::filterBar());
}
- m_view->refresh();
- m_statusBar->refresh();
+ m_view->readSettings();
+ m_statusBar->readSettings();
}
bool DolphinViewContainer::isFilterBarVisible() const
}
}
-void DolphinViewContainer::updateProgress(int percent)
+void DolphinViewContainer::updateLoadingProgress(int percent)
{
if (m_statusBar->progressText().isEmpty()) {
m_statusBar->setProgressText(i18nc("@info:progress", "Loading folder..."));
m_statusBar->setProgress(percent);
}
+void DolphinViewContainer::updateSortProgress(int percent)
+{
+ if (m_statusBar->progressText().isEmpty()) {
+ m_statusBar->setProgressText(i18nc("@info:progress", "Sorting..."));
+ }
+ m_statusBar->setProgress(percent);
+}
+
void DolphinViewContainer::slotStartedPathLoading()
{
if (isSearchUrl(url())) {
// Trigger an undetermined progress indication. The progress
// information in percent will be triggered by the percent() signal
// of the directory lister later.
- updateProgress(-1);
+ updateLoadingProgress(-1);
}
}
m_statusBar->clear();
}
} else {
- QString message;
- if (item.isDir()) {
- message = item.text();
- } else {
- message = i18nc("@info:status filename (type)", "%1 (%2)", item.text(), item.mimeComment());
- }
+ const QString message = item.isDir() ? item.text() : item.getStatusBarInfo();
m_statusBar->setMessage(message, DolphinStatusBar::Default);
}
}
void DolphinViewContainer::dropUrls(const KUrl& destination, QDropEvent* event)
{
- const KFileItem destItem(KFileItem::Unknown, KFileItem::Unknown, destination);
- DragAndDropHelper::dropUrls(destItem, event);
+ DragAndDropHelper::dropUrls(KFileItem(), destination, event);
}
void DolphinViewContainer::redirect(const KUrl& oldUrl, const KUrl& newUrl)