mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
agent: Make --pinentry-formatted-passphrase a simple flag
* agent/agent.h (opt): Change type of pinentry_formatted_passphrase to int (as for other flags). * agent/call-pinentry.c (setup_formatted_passphrase): Remove no longer needed translated strings. Write option without value to Assuan connection. * agent/gpg-agent.c (opts): Use ARGPARSE_s_n for oPinentryFormattedPassphrase. (parse_rereadable_options): Set option to 1. -- GnuPG-bug-id: 5553, 5517
This commit is contained in:
parent
0802cbb59b
commit
99601778f4
4 changed files with 8 additions and 39 deletions
|
@ -1029,16 +1029,6 @@ static gpg_error_t
|
|||
setup_formatted_passphrase (ctrl_t ctrl)
|
||||
{
|
||||
static const struct { const char *key, *help_id, *value; } tbl[] = {
|
||||
/* TRANSLATORS: This is the text of an option (usually represented
|
||||
by a checkbox) as used in pinentry. */
|
||||
{ "label", "pinentry.formatted_passphrase.label",
|
||||
N_("Format the passphrase") },
|
||||
/* TRANSLATORS: This is the tooltip shown by pinentry when
|
||||
hovering over the option for formatted passphrase.
|
||||
The length is limited to about 900 characters. */
|
||||
{ "tt", "pinentry.formatted_passphrase.tooltip",
|
||||
N_("Enable this option to make the passphrase easier readable by "
|
||||
"grouping its characters.") },
|
||||
/* TRANSLATORS: This is a text shown by pinentry if the option
|
||||
for formatted passphrase is enabled. The length is
|
||||
limited to about 900 characters. */
|
||||
|
@ -1057,8 +1047,7 @@ setup_formatted_passphrase (ctrl_t ctrl)
|
|||
|
||||
if (opt.pinentry_formatted_passphrase)
|
||||
{
|
||||
snprintf (line, DIM(line), "OPTION formatted-passphrase=%d",
|
||||
opt.pinentry_formatted_passphrase);
|
||||
snprintf (line, DIM(line), "OPTION formatted-passphrase");
|
||||
rc = assuan_transact (entry_ctx, line, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL);
|
||||
if (rc && gpg_err_code (rc) != GPG_ERR_UNKNOWN_OPTION)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue