diff options
| author | Méven Car <[email protected]> | 2023-04-02 07:22:07 +0000 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2023-04-02 07:22:07 +0000 |
| commit | 9061b22a0d0bc6bd7b9a1c31a5296bd00af60d0b (patch) | |
| tree | 8ff98a07139bb83353313600ffa033008adb68a2 /src/settings | |
| parent | cdf56e761de86caca644c07a52de28163d430127 (diff) | |
Context menu: allow to show copy to/move to inactive split view
Prevent copying/moving to same folder as origin when copying/moving to inactive split view
BUG: 356436
Diffstat (limited to 'src/settings')
| -rw-r--r-- | src/settings/contextmenu/contextmenusettingspage.cpp | 8 | ||||
| -rw-r--r-- | src/settings/dolphin_contextmenusettings.kcfg | 8 | ||||
| -rw-r--r-- | src/settings/dolphinsettingsdialog.cpp | 4 |
3 files changed, 19 insertions, 1 deletions
diff --git a/src/settings/contextmenu/contextmenusettingspage.cpp b/src/settings/contextmenu/contextmenusettingspage.cpp index 2205fadd0..c363914d0 100644 --- a/src/settings/contextmenu/contextmenusettingspage.cpp +++ b/src/settings/contextmenu/contextmenusettingspage.cpp @@ -129,6 +129,10 @@ bool ContextMenuSettingsPage::entryVisible(const QString &id) return ContextMenuSettings::showDuplicateHere(); } else if (id == "open_terminal_here") { return ContextMenuSettings::showOpenTerminal(); + } else if (id == "copy_to_inactive_split_view") { + return ContextMenuSettings::showCopyToOtherSplitView(); + } else if (id == "move_to_inactive_split_view") { + return ContextMenuSettings::showMoveToOtherSplitView(); } return false; } @@ -151,6 +155,10 @@ void ContextMenuSettingsPage::setEntryVisible(const QString &id, bool visible) ContextMenuSettings::setShowDuplicateHere(visible); } else if (id == "open_terminal_here") { ContextMenuSettings::setShowOpenTerminal(visible); + } else if (id == "copy_to_inactive_split_view") { + ContextMenuSettings::setShowCopyToOtherSplitView(visible); + } else if (id == "move_to_inactive_split_view") { + ContextMenuSettings::setShowMoveToOtherSplitView(visible); } } diff --git a/src/settings/dolphin_contextmenusettings.kcfg b/src/settings/dolphin_contextmenusettings.kcfg index 44fd83513..63ca079af 100644 --- a/src/settings/dolphin_contextmenusettings.kcfg +++ b/src/settings/dolphin_contextmenusettings.kcfg @@ -42,5 +42,13 @@ <label>Show 'Open Terminal' in context menu.</label> <default>true</default> </entry> + <entry name="ShowCopyToOtherSplitView" type="Bool"> + <label>Show 'Copy to other split view' in context menu.</label> + <default>true</default> + </entry> + <entry name="ShowMoveToOtherSplitView" type="Bool"> + <label>Show 'Move to other split view' in context menu.</label> + <default>true</default> + </entry> </group> </kcfg> diff --git a/src/settings/dolphinsettingsdialog.cpp b/src/settings/dolphinsettingsdialog.cpp index ec92cb635..af3dbc865 100644 --- a/src/settings/dolphinsettingsdialog.cpp +++ b/src/settings/dolphinsettingsdialog.cpp @@ -84,7 +84,9 @@ DolphinSettingsDialog::DolphinSettingsDialog(const QUrl &url, QWidget *parent, K QStringLiteral("open_in_new_window"), QStringLiteral("copy_location"), QStringLiteral("duplicate"), - QStringLiteral("open_terminal_here")}); + QStringLiteral("open_terminal_here"), + QStringLiteral("copy_to_inactive_split_view"), + QStringLiteral("move_to_inactive_split_view")}); KPageWidgetItem *contextMenuSettingsFrame = addPage(contextMenuSettingsPage, i18nc("@title:group", "Context Menu")); contextMenuSettingsFrame->setIcon(QIcon::fromTheme(QStringLiteral("preferences-desktop-menu-edit"))); connect(contextMenuSettingsPage, &ContextMenuSettingsPage::changed, this, &DolphinSettingsDialog::enableApply); |
