m_dirLister,
m_dirModel,
m_proxyModel,
- mode,
- showHiddenFiles);
+ mode);
connect(m_view, SIGNAL(urlChanged(const KUrl&)),
m_urlNavigator, SLOT(setUrl(const KUrl&)));
connect(m_view, SIGNAL(requestContextMenu(KFileItem*, const KUrl&)),
this, SLOT(openContextMenu(KFileItem*, const KUrl&)));
connect(m_view, SIGNAL(urlsDropped(const KUrl::List&, const KUrl&)),
m_mainWindow, SLOT(dropUrls(const KUrl::List&, const KUrl&)));
+ connect(m_view, SIGNAL(requestItemInfo(const KUrl&)),
+ this, SLOT(showItemInfo(const KUrl&)));
+ connect(m_view, SIGNAL(errorMessage(const QString&)),
+ this, SLOT(showErrorMessage(const QString&)));
+ connect(m_view, SIGNAL(infoMessage(const QString&)),
+ this, SLOT(showInfoMessage(const QString&)));
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
m_view, SLOT(setUrl(const KUrl&)));
void DolphinViewContainer::updateProgress(int percent)
{
+ if (!m_showProgress) {
+ // Only show the directory loading progress if the status bar does
+ // not contain another progress information. This means that
+ // the directory loading progress information has the lowest priority.
+ const QString progressText(m_statusBar->progressText());
+ m_showProgress = progressText.isEmpty() ||
+ (progressText == i18n("Loading folder..."));
+ if (m_showProgress) {
+ m_statusBar->setProgressText(i18n("Loading folder..."));
+ m_statusBar->setProgress(0);
+ }
+ }
+
if (m_showProgress) {
m_statusBar->setProgress(percent);
}
QTimer::singleShot(0, this, SLOT(restoreContentsPos()));
}
+void DolphinViewContainer::showItemInfo(const KUrl& url)
+{
+ if (url.isEmpty()) {
+ m_statusBar->clear();
+ return;
+ }
+
+ const QModelIndex index = m_dirModel->indexForUrl(url);
+ const KFileItem* item = m_dirModel->itemForIndex(index);
+ if (item != 0) {
+ m_statusBar->setMessage(item->getStatusBarInfo(), DolphinStatusBar::Default);
+ }
+}
+
void DolphinViewContainer::showInfoMessage(const QString& msg)
{
m_statusBar->setMessage(msg, DolphinStatusBar::Information);