Mailing List Archive

[PINENTRY PATCH] tty button-related fixes and refinements
Hello,

I attach some fixes I've come up with when playing with non-ASCII
texts in buttons.

The first one simplifies key checking code a little bit; the second
one fixes a few bugs in underscore processing; the third one lets
the user see the localized message even if the pinentry doesn't
support its accelerators (by the way, I think that pinentry
should localize the messages that aren't customized from the agent,
like "Press any key to continue."); the last one adds a default
message to a call of button() so that pinentry won't skip a button
when its text is localized.

Thank you!
Re: [PINENTRY PATCH] tty button-related fixes and refinements [ In reply to ]
Hello,

On Fri, Apr 08, 2016 at 01:47:38PM -0400, Ineiev wrote:
>
> I attach some fixes I've come up with when playing with non-ASCII
> texts in buttons.
>
> The first one simplifies key checking code a little bit; the second
> one fixes a few bugs in underscore processing; the third one lets
> the user see the localized message even if the pinentry doesn't
> support its accelerators (by the way, I think that pinentry
> should localize the messages that aren't customized from the agent,
> like "Press any key to continue."); the last one adds a default
> message to a call of button() so that pinentry won't skip a button
> when its text is localized.

I've fixed a few typos in comments and log messages.

Thank you!
Re: [PINENTRY PATCH] tty button-related fixes and refinements [ In reply to ]
On 09/27/2016 01:02 PM, Ineiev wrote:
> On Fri, Apr 08, 2016 at 01:47:38PM -0400, Ineiev wrote:
>>
>> I attach some fixes I've come up with when playing with non-ASCII
>> texts in buttons.
>>
>> The first one simplifies key checking code a little bit; the second
>> one fixes a few bugs in underscore processing; the third one lets
>> the user see the localized message even if the pinentry doesn't
>> support its accelerators (by the way, I think that pinentry
>> should localize the messages that aren't customized from the agent,
>> like "Press any key to continue."); the last one adds a default
>> message to a call of button() so that pinentry won't skip a button
>> when its text is localized.
>
> I've fixed a few typos in comments and log messages.

Thank you for your fixes.

I applied three bug fixes, with commit message edit by me.

0001-tty-Refactor-usage-of-tolower.patch
0002-tty-Fix-underscore-processing-in-accelerators.patch
0004-tty-Avoid-using-button-with-NULL-default-text.patch

For 0001, I modified your change a bit to keep the output for input
key is as same as before.

The patch:

0003-tty-Show-supplied-message-when-using-default.patch

is introducing a new feature. Let me have (more) time to review this
closely.
--
Re: [PINENTRY PATCH] tty button-related fixes and refinements [ In reply to ]
On Mon, Oct 03, 2016 at 04:06:29PM +0900, NIIBE Yutaka wrote:
>
> I applied three bug fixes, with commit message edit by me.
>
> 0001-tty-Refactor-usage-of-tolower.patch
> 0002-tty-Fix-underscore-processing-in-accelerators.patch
> 0004-tty-Avoid-using-button-with-NULL-default-text.patch

Thank you!

> For 0001, I modified your change a bit to keep the output for input
> key is as same as before.

Indeed, I could have written that part more carefully.

> The patch:
>
> 0003-tty-Show-supplied-message-when-using-default.patch
>
> is introducing a new feature. Let me have (more) time to review this
> closely.

It may be thought of as a new feature, but I think it's essential
for making pinentry work reliably, especially when the translator
doesn't care of pinentry-tty.
Re: [PINENTRY PATCH] tty button-related fixes and refinements [ In reply to ]
On Mon, Oct 03, 2016 at 11:49:52AM -0400, Ineiev wrote:
>
> > The patch:
> >
> > 0003-tty-Show-supplied-message-when-using-default.patch
> >
> > is introducing a new feature. Let me have (more) time to review this
> > closely.
>
> It may be thought of as a new feature, but I think it's essential
> for making pinentry work reliably, especially when the translator
> doesn't care of pinentry-tty.

Rebased against current HEAD.
Re: [PINENTRY PATCH] tty button-related fixes and refinements [ In reply to ]
On Fri, May 19, 2017 at 04:57:21AM -0400, Ineiev wrote:
> On Mon, Oct 03, 2016 at 11:49:52AM -0400, Ineiev wrote:
> >
> > > The patch:
> > >
> > > 0003-tty-Show-supplied-message-when-using-default.patch
> > >
> > > is introducing a new feature. Let me have (more) time to review this
> > > closely.
> >
> > It may be thought of as a new feature, but I think it's essential
> > for making pinentry work reliably, especially when the translator
> > doesn't care of pinentry-tty.
>
> Rebased against current HEAD.

Rebased against current HEAD.

Perhaps it's inconsistent to support non-ASCII characters
in prompts and messages, but not in button labels.
Re: [PINENTRY PATCH] tty button-related fixes and refinements [ In reply to ]
Ineiev <ineiev@gnu.org> wrote:
> From 96b9bd217dcfd2f9e655944aa68b99727ae7838c Mon Sep 17 00:00:00 2001
> From: Ineiev <ineiev@gnu.org>
> Date: Fri, 8 Apr 2016 15:29:08 +0300
> Subject: [PATCH] tty: Show supplied message when using default
>
> tty/pinentry-tty.c (fputs_highlighted): New function.
> tty/pinentry-tty.c (button): Display the supplied text when
> falling back to default; the default text is shown in braces
> and provides the accelerator.
>
> --
> This allows using button texts written with non-ASCII characters.
>
> Signed-off-by: Ineiev <ineiev@gnu.org>

Thanks. Applied and pushed.
--

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel