Commit 0af654d9 authored by Magno Lomardo's avatar Magno Lomardo Committed by Tomaz Canabrava
Browse files

Added user feedback with message box when use the plugins shortcut

parent 0d41d6bb
......@@ -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);
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment