Unverified Commit b06e18eb authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Show group config handout in group config help

This shows a specific help for group management instead
of the generic Kleopatra help when help is selected in
the Group config dialog.
parent 998a19b3
Pipeline #118431 failed with stage
in 1 minute and 45 seconds
......@@ -20,6 +20,8 @@
#include <KSharedConfig>
#include <KStandardGuiItem>
#include <Libkleo/DocAction>
#include <QDialogButtonBox>
#include <QPushButton>
......@@ -77,6 +79,22 @@ GroupsConfigDialog::GroupsConfigDialog(QWidget *parent)
KGuiItem::assign(resetButton, KStandardGuiItem::reset());
resetButton->setEnabled(false);
const auto helpAction = new Kleo::DocAction(QIcon::fromTheme(QStringLiteral("help")),
i18n("Help"),
i18nc("Only available in German and English. Leave to English for other languages.",
"handout_group-feature_gnupg_en.pdf"),
QStringLiteral("../share/doc/gnupg-vsd"));
if (helpAction->isEnabled()) {
auto helpButton = buttonBox()->button(QDialogButtonBox::Help);
if (helpButton) {
disconnect(helpButton, &QAbstractButton::clicked, nullptr, nullptr);
connect(helpButton, &QAbstractButton::clicked, helpAction, &QAction::trigger);
connect(helpButton, &QObject::destroyed, helpAction, &QObject::deleteLater);
}
} else {
delete helpAction;
}
connect(buttonBox()->button(QDialogButtonBox::Reset), &QAbstractButton::clicked,
this, &GroupsConfigDialog::updateWidgets);
......
Markdown is supported
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