Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
System
Dolphin
Commits
08a4edad
Commit
08a4edad
authored
Apr 29, 2021
by
Alexander Lohnau
💬
Browse files
DolphinContextMenu: Allow disabling "Open Terminal" action
BUG: 436323 FIXED-IN: 21.08
parent
996e430b
Pipeline
#61459
passed with stage
in 5 minutes and 23 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/dolphincontextmenu.cpp
View file @
08a4edad
...
...
@@ -508,7 +508,7 @@ void DolphinContextMenu::addAdditionalActions(KFileItemActions &fileItemActions,
addSeparator
();
QList
<
QAction
*>
additionalActions
;
if
(
props
.
isDirectory
()
&&
props
.
isLocal
())
{
if
(
props
.
isDirectory
()
&&
props
.
isLocal
()
&&
ContextMenuSettings
::
showOpenTerminal
()
)
{
additionalActions
<<
m_mainWindow
->
actionCollection
()
->
action
(
QStringLiteral
(
"open_terminal"
));
}
fileItemActions
.
addActionsTo
(
this
,
KFileItemActions
::
MenuActionSource
::
All
,
additionalActions
);
...
...
src/settings/contextmenu/contextmenusettingspage.cpp
View file @
08a4edad
...
...
@@ -122,6 +122,8 @@ bool ContextMenuSettingsPage::entryVisible(const QString& id)
return
ContextMenuSettings
::
showCopyLocation
();
}
else
if
(
id
==
"duplicate"
)
{
return
ContextMenuSettings
::
showDuplicateHere
();
}
else
if
(
id
==
"open_terminal"
)
{
return
ContextMenuSettings
::
showOpenTerminal
();
}
return
false
;
}
...
...
@@ -142,6 +144,8 @@ void ContextMenuSettingsPage::setEntryVisible(const QString& id, bool visible)
ContextMenuSettings
::
setShowCopyLocation
(
visible
);
}
else
if
(
id
==
"duplicate"
)
{
ContextMenuSettings
::
setShowDuplicateHere
(
visible
);
}
else
if
(
id
==
"open_terminal"
)
{
ContextMenuSettings
::
setShowOpenTerminal
(
visible
);
}
}
...
...
src/settings/dolphin_contextmenusettings.kcfg
View file @
08a4edad
...
...
@@ -38,5 +38,9 @@
<label>
Show 'Duplicate Here' in context menu.
</label>
<default>
true
</default>
</entry>
<entry
name=
"ShowOpenTerminal"
type=
"Bool"
>
<label>
Show 'Open Terminal' in context menu.
</label>
<default>
true
</default>
</entry>
</group>
</kcfg>
src/settings/dolphinsettingsdialog.cpp
View file @
08a4edad
...
...
@@ -85,7 +85,8 @@ DolphinSettingsDialog::DolphinSettingsDialog(const QUrl& url, QWidget* parent, K
QStringLiteral
(
"open_in_new_tab"
),
QStringLiteral
(
"open_in_new_window"
),
QStringLiteral
(
"copy_location"
),
QStringLiteral
(
"duplicate"
)
QStringLiteral
(
"duplicate"
),
QStringLiteral
(
"open_terminal"
),
});
KPageWidgetItem
*
contextMenuSettingsFrame
=
addPage
(
contextMenuSettingsPage
,
i18nc
(
"@title:group"
,
"Context Menu"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment