┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinview.h
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2025-11-02 15:49:47 +0100
committerMéven Car <[email protected]>2025-11-21 13:25:55 +0000
commit60e109632fd63b335ca1cc037c5d5c3e291349f5 (patch)
tree70f824fee05fbad2fc3de6d086900055ead749d4 /src/views/dolphinview.h
parente114f654ed1216aaa64593354ca1306a53fefef0 (diff)
context menu: use selected item as containing folder for New file menu
Use current view url as fallback. Don't update the selection after a directory is created, except if there was no selection. CCBUG: 508196 BUG: 512020
Diffstat (limited to 'src/views/dolphinview.h')
-rw-r--r--src/views/dolphinview.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h
index 4a400ce2a..55b6b5829 100644
--- a/src/views/dolphinview.h
+++ b/src/views/dolphinview.h
@@ -167,6 +167,11 @@ public:
int selectedItemsCount() const;
/**
+ * Returns the selected kfileitem if one is selected and only one
+ */
+ std::optional<KFileItem> firstSelectedItem() const;
+
+ /**
* Marks the items indicated by \p urls to get selected after the
* directory DolphinView::url() has been loaded. Note that nothing
* gets selected if no loading of a directory has been triggered
@@ -854,6 +859,8 @@ private Q_SLOTS:
*/
void observeCreatedItem(const QUrl &url);
+ void observeCreatedDirectory(const QUrl &url);
+
/**
* Selects the next item after prev selection deleted/trashed
*/
@@ -953,6 +960,8 @@ private:
bool tryShowNameToolTip(QHelpEvent *event);
+ void selectFileOnceAvailable(const QUrl &url, std::function<bool()> condition);
+
private:
void updatePalette();
void showLoadingPlaceholder();