diff options
Diffstat (limited to 'agent')
-rw-r--r-- | agent/ChangeLog | 4 | ||||
-rw-r--r-- | agent/call-pinentry.c | 34 |
2 files changed, 23 insertions, 15 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog index cd526c9d2..360536115 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog @@ -1,3 +1,7 @@ +2007-12-04 Werner Koch <[email protected]> + + * call-pinentry.c (agent_askpin): Use gnupg_get_help_string. + 2007-12-03 Werner Koch <[email protected]> * gpg-agent.c (main): s/standard_socket/use_standard_socket/ for diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index 6be9bfbe9..5c94bb937 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -578,7 +578,7 @@ agent_askpin (ctrl_t ctrl, to the pinentry. */ if (pininfo->with_qualitybar && opt.min_passphrase_len ) { - char *tmpstr; + char *tmpstr, *tmpstr2; const char *tooltip; /* TRANSLATORS: This string is displayed by pinentry as the @@ -595,21 +595,25 @@ agent_askpin (ctrl_t ctrl, else if (rc) return unlock_pinentry (rc); - /* TRANSLATORS: This string is a tooltip, shown by pinentry when - hovering over the quality bar. Please use an appropriate - string to describe what this is about. The length of the - tooltip is limited to about 900 characters. If you do not - translate this entry, a default english text (see source) - will be used. */ - tooltip = _("pinentry.qualitybar.tooltip"); - if (!strcmp ("pinentry.qualitybar.tooltip", tooltip)) - tooltip = ("The quality of the text entered above.\n" - "Please ask your administrator for " - "details about the criteria."); - /* Fixme: As soon as we have the extended error reporting - facility (audit log), we can use a user specified helptext if - that has been configured. */ + tmpstr2 = gnupg_get_help_string ("pinentry.qualitybar.tooltip"); + if (tmpstr2) + tooltip = tmpstr2; + else + { + /* TRANSLATORS: This string is a tooltip, shown by pinentry + when hovering over the quality bar. Please use an + appropriate string to describe what this is about. The + length of the tooltip is limited to about 900 characters. + If you do not translate this entry, a default english + text (see source) will be used. */ + tooltip = _("pinentry.qualitybar.tooltip"); + if (!strcmp ("pinentry.qualitybar.tooltip", tooltip)) + tooltip = ("The quality of the text entered above.\n" + "Please ask your administrator for " + "details about the criteria."); + } tmpstr = try_percent_escape (tooltip, "\t\r\n\f\v"); + xfree (tmpstr2); snprintf (line, DIM(line)-1, "SETQUALITYBAR_TT %s", tmpstr? tmpstr:""); line[DIM(line)-1] = 0; xfree (tmpstr); |