Commit 892e607f authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Use name as header for the config modules

This restores the behavior of before the removal of the module plugins.
The name is used by default as header if the header is not set explicitly.
parent 6936f79f
...@@ -32,27 +32,22 @@ ConfigureDialog::ConfigureDialog(QWidget *parent) ...@@ -32,27 +32,22 @@ ConfigureDialog::ConfigureDialog(QWidget *parent)
setFaceType(KPageDialog::List); setFaceType(KPageDialog::List);
setWindowTitle(i18nc("@title:window", "Configure")); setWindowTitle(i18nc("@title:window", "Configure"));
addModule(i18n("Directory Services"), addModule(i18n("Directory Services"),
i18n("Configuration of directory services"),
QStringLiteral("kleopatra/configuration.html#configuration-directory-services"), QStringLiteral("kleopatra/configuration.html#configuration-directory-services"),
QStringLiteral("view-certificate-server-configure"), QStringLiteral("view-certificate-server-configure"),
new DirectoryServicesConfigurationPage(this)); new DirectoryServicesConfigurationPage(this));
addModule(i18n("Appearance"), addModule(i18n("Appearance"),
i18n("Colors & Fonts Configuration"),
QStringLiteral("kleopatra/configuration-appearance.html"), QStringLiteral("kleopatra/configuration-appearance.html"),
QStringLiteral("applications-graphics"), QStringLiteral("applications-graphics"),
new Kleo::Config::AppearanceConfigurationPage(this)); new Kleo::Config::AppearanceConfigurationPage(this));
addModule(i18n("Crypto Operations"), addModule(i18n("Crypto Operations"),
i18n("Configuration of Crypto Operations"),
QStringLiteral("kleopatra/configuration-cryptooperations.html"), QStringLiteral("kleopatra/configuration-cryptooperations.html"),
QStringLiteral("document-encrypt"), QStringLiteral("document-encrypt"),
new Kleo::Config::CryptoOperationsConfigurationPage(this)); new Kleo::Config::CryptoOperationsConfigurationPage(this));
addModule(i18n("S/MIME Validation"), addModule(i18n("S/MIME Validation"),
i18n("Configuration of S/MIME certificate validation options"),
QStringLiteral("kleopatra/configuration.html#configuration-smime-validation"), QStringLiteral("kleopatra/configuration.html#configuration-smime-validation"),
QStringLiteral("preferences-system-network"), QStringLiteral("preferences-system-network"),
new Kleo::Config::SMimeValidationConfigurationPage(this)); new Kleo::Config::SMimeValidationConfigurationPage(this));
addModule(i18n("GnuPG System"), addModule(i18n("GnuPG System"),
i18n("Configuration of GnuPG System options"),
QStringLiteral("kleopatra/configuration.html#configuration-gnupgsystem"), QStringLiteral("kleopatra/configuration.html#configuration-gnupgsystem"),
QStringLiteral("document-encrypt"), QStringLiteral("document-encrypt"),
new Kleo::Config::GnuPGSystemConfigurationPage(this)); new Kleo::Config::GnuPGSystemConfigurationPage(this));
......
...@@ -186,13 +186,12 @@ void KleoPageConfigDialog::slotHelpClicked() ...@@ -186,13 +186,12 @@ void KleoPageConfigDialog::slotHelpClicked()
} }
} }
void KleoPageConfigDialog::addModule(const QString &name, const QString &comment, const QString &docPath, const QString &icon, KCModule *module) void KleoPageConfigDialog::addModule(const QString &name, const QString &docPath, const QString &icon, KCModule *module)
{ {
mModules << module; mModules << module;
KPageWidgetItem *item = addPage(module, name); KPageWidgetItem *item = addPage(module, name);
item->setIcon(QIcon::fromTheme(icon)); item->setIcon(QIcon::fromTheme(icon));
item->setHeader(comment);
connect(module, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool))); connect(module, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
......
...@@ -25,7 +25,7 @@ class KleoPageConfigDialog : public KPageDialog ...@@ -25,7 +25,7 @@ class KleoPageConfigDialog : public KPageDialog
public: public:
explicit KleoPageConfigDialog(QWidget *parent = nullptr); explicit KleoPageConfigDialog(QWidget *parent = nullptr);
void addModule(const QString &name, const QString &comment, const QString &docPath, const QString &icon, KCModule *module); void addModule(const QString &name, const QString &docPath, const QString &icon, KCModule *module);
Q_SIGNALS: Q_SIGNALS:
void configCommitted(); void configCommitted();
......
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