X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a8cb992febc277a4deea11178dd808cfa3b8a6b3..d9dbd3398a258d04ec4517fd13e795b437c869d6:/src/dolphinviewcontainer.cpp diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 9809fbaf5..1c15c88a9 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -102,7 +102,8 @@ DolphinViewContainer::DolphinViewContainer(const KUrl& url, QWidget* parent) : 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))); @@ -332,7 +333,7 @@ void DolphinViewContainer::updateStatusBar() } } -void DolphinViewContainer::updateProgress(int percent) +void DolphinViewContainer::updateLoadingProgress(int percent) { if (m_statusBar->progressText().isEmpty()) { m_statusBar->setProgressText(i18nc("@info:progress", "Loading folder...")); @@ -340,6 +341,14 @@ void DolphinViewContainer::updateProgress(int percent) 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())) { @@ -352,7 +361,7 @@ void DolphinViewContainer::slotStartedPathLoading() // 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); } } @@ -430,12 +439,7 @@ void DolphinViewContainer::showItemInfo(const KFileItem& item) 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); } }