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

Allow specifying placeholder texts for name and email entry fields

The placeholder texts can be specified in the configuration file via
CN_placeholder, NAME_placeholder, and EMAIL_placeholder similar to the
*_label and *_regex settings.

Because the config entries keys are calculated dynamically, KConfig is
used directly for reading the settings. The definition via KConfigXT
currently only serves as documentation.

GnuPG-bug-id: 5690
parent 663f5f9b
......@@ -4,6 +4,23 @@
xsi:schemaLocation="" >
<kcfgfile name="kleopatrarc" />
<group name="CertificateCreationWizard">
<entry key="CN_placeholder" name="cnPlaceholder" type="String">
<label>Placeholder for CN</label>
<whatsthis>This text will be used as placeholder text for the common name (CN) field of S/MIME certificates.</whatsthis>
<entry key="EMAIL_placeholder" name="emailPlaceholder" type="String">
<label>Placeholder for EMAIL</label>
<whatsthis>This text will be used as placeholder text for the email address field of OpenPGP and S/MIME certificates.</whatsthis>
<entry key="NAME_placeholder" name="namePlaceholder" type="String">
<label>Placeholder for NAME</label>
<whatsthis>This text will be used as placeholder text for the name field of OpenPGP certificates.</whatsthis>
<group name="ConfigurationDialog">
<entry name="ShowAppearanceConfiguration" type="Bool">
<label>Show appearance configuration</label>
......@@ -1437,6 +1437,7 @@ void EnterDetailsPage::updateForm()
const QString label = config.readEntry(attr + QLatin1String("_label"),
attributeLabel(attr, pgp()));
const QString regex = config.readEntry(attr + QLatin1String("_regex"));
const QString placeholder = config.readEntry(attr + QLatin1String{"_placeholder"});
int row;
bool known = true;
......@@ -1461,6 +1462,7 @@ void EnterDetailsPage::updateForm()
QLineEdit *le = adjust_row(ui.gridLayout, row, label, preset, validator, readonly, required);
const Line line = { key, label, regex, le };
lines[row] = line;
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