connect(m_model, &KFileItemModel::currentDirectoryRemoved, this, &DolphinView::currentDirectoryRemoved);
connect(this, &DolphinView::itemCountChanged, this, &DolphinView::updatePlaceholderLabel);
- connect(this, &DolphinView::itemCountChanged, this, &DolphinView::updateSelectionState);
m_view->installEventFilter(this);
connect(m_view, &DolphinItemListView::sortOrderChanged, this, &DolphinView::slotSortOrderChangedByHeader);
return;
}
- m_statJobForStatusBarText = KIO::statDetails(m_model->rootItem().url(), KIO::StatJob::SourceSide, KIO::StatRecursiveSize, KIO::HideProgressInfo);
+ m_statJobForStatusBarText = KIO::stat(m_model->rootItem().url(), KIO::StatJob::SourceSide, KIO::StatRecursiveSize, KIO::HideProgressInfo);
connect(m_statJobForStatusBarText, &KJob::result, this, &DolphinView::slotStatJobResult);
m_statJobForStatusBarText->start();
}
void DolphinView::copySelectedItems(const KFileItemList &selection, const QUrl &destinationUrl)
{
+ if (selection.isEmpty() || !destinationUrl.isValid()) {
+ return;
+ }
+
+ m_clearSelectionBeforeSelectingNewItems = true;
+ m_markFirstNewlySelectedItemAsCurrent = true;
+ m_selectJobCreatedItems = true;
+
KIO::CopyJob *job = KIO::copy(selection.urlList(), destinationUrl, KIO::DefaultFlags);
KJobWidgets::setWindow(job, this);
void DolphinView::moveSelectedItems(const KFileItemList &selection, const QUrl &destinationUrl)
{
+ if (selection.isEmpty() || !destinationUrl.isValid()) {
+ return;
+ }
+
+ m_clearSelectionBeforeSelectingNewItems = true;
+ m_markFirstNewlySelectedItemAsCurrent = true;
+ m_selectJobCreatedItems = true;
+
KIO::CopyJob *job = KIO::move(selection.urlList(), destinationUrl, KIO::DefaultFlags);
KJobWidgets::setWindow(job, this);
}
}
+bool DolphinView::handleSpaceAsNormalKey() const
+{
+ return !m_container->hasFocus() || m_container->controller()->isSearchAsYouTypeActive();
+}
+
void DolphinView::slotTwoClicksRenamingTimerTimeout()
{
const KItemListSelectionManager *selectionManager = m_container->controller()->selectionManager();