Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
0af654d9
Commit
0af654d9
authored
Sep 06, 2022
by
Magno Lomardo
Committed by
Tomaz Canabrava
Oct 06, 2022
Browse files
Added user feedback with message box when use the plugins shortcut
parent
0d41d6bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/QuickCommands/quickcommandsplugin.cpp
View file @
0af654d9
...
...
@@ -14,6 +14,7 @@
#include
"MainWindow.h"
#include
<KLocalizedString>
#include
<KMessageBox>
#include
<QDockWidget>
...
...
@@ -98,6 +99,14 @@ void QuickCommandsPlugin::activeViewChanged(Konsole::SessionController *controll
}
}
if
(
actions
.
isEmpty
())
// no quick commands found, must give feedback to the user about that
{
const
QString
feedbackMessage
=
QStringLiteral
(
"Please enable the plugin on Plugins -> Quick Commands"
);
const
QString
feedbackTitle
=
QStringLiteral
(
"Plugins - Quick Commands"
);
KMessageBox
::
sorry
(
terminalDisplay
->
topLevelWidget
(),
feedbackMessage
,
feedbackTitle
);
return
;
}
QVector
<
KCommandBar
::
ActionGroup
>
groups
;
groups
.
push_back
(
KCommandBar
::
ActionGroup
{
i18n
(
"Quick Commands"
),
actions
});
bar
.
setActions
(
groups
);
...
...
src/plugins/SSHManager/sshmanagerplugin.cpp
View file @
0af654d9
...
...
@@ -137,6 +137,14 @@ void SSHManagerPlugin::activeViewChanged(Konsole::SessionController *controller,
}
}
if
(
actions
.
isEmpty
())
// no ssh config found, must give feedback to the user about that
{
const
QString
feedbackMessage
=
QStringLiteral
(
"Please enable the plugin on Plugins -> SSH Manager"
);
const
QString
feedbackTitle
=
QStringLiteral
(
"Plugins - SSH Manager"
);
KMessageBox
::
sorry
(
terminalDisplay
->
topLevelWidget
(),
feedbackMessage
,
feedbackTitle
);
return
;
}
QVector
<
KCommandBar
::
ActionGroup
>
groups
;
groups
.
push_back
(
KCommandBar
::
ActionGroup
{
i18n
(
"SSH Entries"
),
actions
});
bar
.
setActions
(
groups
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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