if (folderCount + fileCount == 1) {
// if only one item is selected, show the filename
- const QString name = list.first().name();
+ const QString name = list.first().text();
text = (folderCount == 1) ? i18nc("@info:status", "<filename>%1</filename> selected", name) :
i18nc("@info:status", "<filename>%1</filename> selected (%2)",
name, KIO::convertSize(totalFileSize));
}
}
break;
-
+
default:
break;
}
void DolphinView::slotLoadingCompleted()
{
m_expanderActive = false;
- m_loadingDirectory = false;
+ m_loadingDirectory = false;
if (!m_activeItemUrl.isEmpty()) {
// assure that the current item remains visible
m_loadingDirectory = true;
m_expanderActive = false;
- m_viewAccessor.dirLister()->openUrl(url, reload ? KDirLister::Reload : KDirLister::NoFlags);
+ KDirLister* dirLister = m_viewAccessor.dirLister();
+ dirLister->openUrl(url, reload ? KDirLister::Reload : KDirLister::NoFlags);
+
+ KDirLister* rootDirLister = m_viewAccessor.rootDirLister();
+ if (dirLister != rootDirLister) {
+ // In the case of the column view the root directory lister can be different. Assure
+ // that it gets synchronized (clients from DolphinView are not aware that internally
+ // different directory listers are used).
+ rootDirLister->openUrl(url, reload ? KDirLister::Reload : KDirLister::NoFlags);
+ }
}
void DolphinView::applyViewProperties()
}
if(!m_detailsViewExpander.isNull()) {
- // Stop expanding items in the current folder
+ // stop expanding items in the current folder
m_detailsViewExpander->stop();
}
}
return (m_columnsContainer != 0) ? m_columnsContainer->rootUrl() : KUrl();
}
+KDirLister* DolphinView::ViewAccessor::rootDirLister() const
+{
+ return static_cast<DolphinModel*>(m_proxyModel->sourceModel())->dirLister();
+}
+
bool DolphinView::ViewAccessor::supportsCategorizedSorting() const
{
return m_iconsView != 0;
QSet<KUrl> DolphinView::ViewAccessor::expandedUrls() const
{
- if(m_detailsView != 0) {
+ if (m_detailsView != 0) {
return m_detailsView->expandedUrls();
}
- else {
- return QSet<KUrl>();
- }
+
+ return QSet<KUrl>();
}
const DolphinDetailsViewExpander* DolphinView::ViewAccessor::setExpandedUrls(const QSet<KUrl>& urlsToExpand)
{
- if((m_detailsView != 0) && m_detailsView->itemsExpandable() && !urlsToExpand.isEmpty()) {
+ if ((m_detailsView != 0) && m_detailsView->itemsExpandable() && !urlsToExpand.isEmpty()) {
m_detailsViewExpander = new DolphinDetailsViewExpander(m_detailsView, urlsToExpand);
return m_detailsViewExpander;
}