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

Improve accessibility of the filename requesters

Set accessible names of the filename requesters and make the tool tips
more verbose.

GnuPG-bug-id: 5845
parent f9dd662a
Pipeline #141510 passed with stage
in 4 minutes and 28 seconds
......@@ -32,7 +32,7 @@ option(DISABLE_KWATCHGNUPG "Don't build the kwatchgnupg tool [default=OFF]" OFF)
# Standalone build. Find / include everything necessary.
set(KF5_MIN_VERSION "5.91.0")
set(KMIME_VERSION "5.19.40")
set(LIBKLEO_VERSION "5.19.51")
set(LIBKLEO_VERSION "5.19.52")
set(QT_REQUIRED_VERSION "5.15.2")
set(GPGME_REQUIRED_VERSION "1.15.0")
set(BOOST_REQUIRED_VERSION "1.58")
......
......@@ -103,6 +103,11 @@ public:
return mRequester->nameFilter();
}
FileNameRequester *requester()
{
return mRequester;
}
Q_SIGNALS:
void fileNameChanged(const QString &filename);
......@@ -333,12 +338,20 @@ private:
{ SignEncryptFilesWizard::Directory, QStringLiteral("folder") }
};
static const QMap<int, QString> toolTips = {
{ SignEncryptFilesWizard::SignatureCMS, i18n("The S/MIME signature.") },
{ SignEncryptFilesWizard::SignaturePGP, i18n("The signature.") },
{ SignEncryptFilesWizard::CombinedPGP, i18n("The signed and encrypted file.") },
{ SignEncryptFilesWizard::EncryptedPGP, i18n("The encrypted file.") },
{ SignEncryptFilesWizard::EncryptedCMS, i18n("The S/MIME encrypted file.") },
{ SignEncryptFilesWizard::Directory, i18n("Output directory.") }
{ SignEncryptFilesWizard::SignatureCMS, i18n("This is the filename of the S/MIME signature.") },
{ SignEncryptFilesWizard::SignaturePGP, i18n("This is the filename of the detached OpenPGP signature.") },
{ SignEncryptFilesWizard::CombinedPGP, i18n("This is the filename of the OpenPGP-signed and encrypted file.") },
{ SignEncryptFilesWizard::EncryptedPGP, i18n("This is the filename of the OpenPGP encrypted file.") },
{ SignEncryptFilesWizard::EncryptedCMS, i18n("This is the filename of the S/MIME encrypted file.") },
{ SignEncryptFilesWizard::Directory, i18n("The resulting files are written to this directory.") }
};
static const QMap<int, QString> accessibleNames = {
{ SignEncryptFilesWizard::SignatureCMS, i18n("S/MIME signature file") },
{ SignEncryptFilesWizard::SignaturePGP, i18n("OpenPGP signature file") },
{ SignEncryptFilesWizard::CombinedPGP, i18n("OpenPGP signed and encrypted file") },
{ SignEncryptFilesWizard::EncryptedPGP, i18n("OpenPGP encrypted file") },
{ SignEncryptFilesWizard::EncryptedCMS, i18n("S/MIME encrypted file") },
{ SignEncryptFilesWizard::Directory, i18n("Output directory") }
};
static const QMap<int, QString> nameFiltersBinary = {
{ SignEncryptFilesWizard::SignatureCMS, i18n("S/MIME Signatures (*.p7s)") },
......@@ -366,6 +379,7 @@ private:
kind == SignEncryptFilesWizard::Directory ? QDir::Dirs : QDir::Files, this};
requesterWithIcon->setIcon(QIcon::fromTheme(icons[kind]));
requesterWithIcon->setToolTip(toolTips[kind]);
requesterWithIcon->requester()->setAccessibleNameOfLineEdit(accessibleNames[kind]);
requesterWithIcon->setNameFilter(nameFilters[kind]);
lay->addWidget(requesterWithIcon);
......
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