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

Manually specify shortcuts for all checkboxes

Note: Qt automatically assigns shortcuts if one presses and holds the Alt
key, but for documentation purposes and better accessibility we explicitly
set shortcuts.

GnuPG-bug-id: 5544
parent aa59b873
......@@ -68,6 +68,14 @@ public:
setTitle(i18nc("@title", "Sign / Encrypt Files"));
auto vLay = new QVBoxLayout(this);
vLay->setContentsMargins(0, 0, 0, 0);
mWidget->setSignAsText(i18nc("@option:check on SignEncryptPage",
"&Sign as:"));
mWidget->setEncryptForMeText(i18nc("@option:check on SignEncryptPage",
"Encrypt for &me:"));
mWidget->setEncryptForOthersText(i18nc("@option:check on SignEncryptPage",
"Encrypt for &others:"));
mWidget->setEncryptWithPasswordText(i18nc("@option:check on SignEncryptPage",
"Encrypt with &password. Anyone you share the password with can read the data."));
connect(mWidget, &SignEncryptWidget::operationChanged, this,
......@@ -81,7 +89,8 @@ public:
mPlaceholderWidget = new QLabel(i18n("Please select an action."));
mUseOutputDirChk = new QCheckBox(i18n("Encrypt / Sign each file separately."));
mUseOutputDirChk = new QCheckBox(i18nc("@option:check on SignEncryptPage",
"Encrypt / Sign &each file separately."));
"Keep each file separate instead of creating an archive for all."));
......@@ -221,6 +221,26 @@ SignEncryptWidget::SignEncryptWidget(QWidget *parent, bool sigEncExclusive)
void SignEncryptWidget::setSignAsText(const QString &text)
void SignEncryptWidget::setEncryptForMeText(const QString &text)
void SignEncryptWidget::setEncryptForOthersText(const QString &text)
void SignEncryptWidget::setEncryptWithPasswordText(const QString& text)
CertificateLineEdit *SignEncryptWidget::addRecipientWidget()
auto certSel = new CertificateLineEdit(mModel, this,
......@@ -31,6 +31,13 @@ public:
* done only either as sign or as encrypt */
explicit SignEncryptWidget(QWidget *parent = nullptr, bool cmsSigEncExclusive = false);
/** Overwrite default text with custom text, e.g. with a character marked
* as shortcut key. */
void setSignAsText(const QString &text);
void setEncryptForMeText(const QString &text);
void setEncryptForOthersText(const QString &text);
void setEncryptWithPasswordText(const QString &text);
/** Returns the list of recipients selected in the dialog
* or an empty list if encryption is disabled */
std::vector<GpgME::Key> recipients() const;
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