}
emit modeChanged();
+
updateZoomLevel(oldZoomLevel);
+ if (m_showPreview) {
+ loadDirectory(viewPropsUrl);
+ }
}
DolphinView::Mode DolphinView::mode() const
}
++it;
}
+
+ const QString foldersText = i18ncp("@info:status", "1 Folder selected", "%1 Folders selected", folderCount);
+ const QString filesText = i18ncp("@info:status", "1 File selected", "%1 Files selected", fileCount);
+ if ((folderCount > 0) && (fileCount > 0)) {
+ text = i18nc("@info:status folders, files (size)", "%1, %2 (%3)",
+ foldersText, filesText, KIO::convertSize(totalFileSize));
+ } else if (fileCount > 0) {
+ text = i18nc("@info:status files (size)", "%1 (%2)", filesText, KIO::convertSize(totalFileSize));
+ } else {
+ Q_ASSERT(folderCount > 0);
+ text = foldersText;
+ }
} else {
calculateItemCount(fileCount, folderCount, totalFileSize);
- }
-
- if (folderCount > 0) {
- text = hasSelection() ?
- i18ncp("@info:status", "1 Folder selected", "%1 Folders selected", folderCount) :
- i18ncp("@info:status", "1 Folder", "%1 Folders", folderCount);
- if (fileCount > 0) {
- text += i18nc("@info:status separator between 2 status infos", ", ");
- }
+ text = KIO::itemsSummaryString(fileCount + folderCount,
+ fileCount, folderCount,
+ totalFileSize, true);
}
- if (fileCount > 0) {
- const QString sizeText = KIO::convertSize(totalFileSize);
- text += hasSelection() ?
- i18ncp("@info:status", "1 File selected (%2)", "%1 Files selected (%2)", fileCount, sizeText) :
- i18ncp("@info:status", "1 File (%2)", "%1 Files (%2)", fileCount, sizeText);
- }
-
return text;
}
const KUrl& destPath,
QDropEvent* event)
{
- DragAndDropHelper::dropUrls(destItem, destPath, event, this);
+ DragAndDropHelper::instance().dropUrls(destItem, destPath, event, this);
}
void DolphinView::updateSorting(DolphinView::Sorting sorting)
m_topLayout->removeWidget(view);
view->close();
+ disconnect(view);
+ m_controller->disconnect(view);
+ view->disconnect();
+
bool deleteView = true;
foreach (const QAbstractItemView* expandedView, m_expandedViews) {
if (view == expandedView) {