Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pinentry for openSUSE:Factory checked in at 2025-07-31 17:44:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pinentry (Old) and /work/SRC/openSUSE:Factory/.pinentry.new.1944 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pinentry" Thu Jul 31 17:44:59 2025 rev:70 rq:1296419 version:1.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/pinentry/pinentry.changes 2024-09-25 21:52:58.059474173 +0200 +++ /work/SRC/openSUSE:Factory/.pinentry.new.1944/pinentry.changes 2025-07-31 17:45:06.049411597 +0200 @@ -1,0 +2,10 @@ +Tue Jul 29 10:54:13 UTC 2025 - Pedro Monreal <pmonr...@suse.com> + +- Update to 1.3.2: + * qt,qt5: Ensure that input field is large enough for generated + password. [rP86ab46ebe9] + * qt,qt5: Make Show/Hide Password functionality accessible. [T7736] + * qt,qt5: Use light icons in dark mode. [T7230, T7737] + * qt: Make showing/hiding the password accessible. [T7736] + +------------------------------------------------------------------- Old: ---- pinentry-1.3.1.tar.bz2 pinentry-1.3.1.tar.bz2.sig New: ---- pinentry-1.3.2.tar.bz2 pinentry-1.3.2.tar.bz2.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pinentry.spec ++++++ --- /var/tmp/diff_new_pack.bnc9Os/_old 2025-07-31 17:45:07.081454491 +0200 +++ /var/tmp/diff_new_pack.bnc9Os/_new 2025-07-31 17:45:07.085454657 +0200 @@ -1,7 +1,7 @@ # # spec file for package pinentry # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,7 +30,7 @@ %endif Name: pinentry%{?nsuffix} -Version: 1.3.1 +Version: 1.3.2 Release: 0 Summary: Collection of Simple PIN or Passphrase Entry Dialogs License: GPL-2.0-or-later ++++++ pinentry-1.3.1.tar.bz2 -> pinentry-1.3.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/ChangeLog new/pinentry-1.3.2/ChangeLog --- old/pinentry-1.3.1/ChangeLog 2024-07-03 11:29:18.000000000 +0200 +++ new/pinentry-1.3.2/ChangeLog 2025-07-28 09:07:49.000000000 +0200 @@ -1,3 +1,116 @@ +2025-07-28 Werner Koch <w...@gnupg.org> + + Release 1.3.2. + + commit d7660807593067d5cd7150b7d4d987d60957b5cb + + +2025-07-24 Ingo Klöcker <d...@ingo-kloecker.de> + + qt: Replace icons for dark mode with 16x16 icons. + + commit f264aaae107480cdf5227ce7cad07e446221a0b6 + * qt/icons/hint_dark.svg, qt/icons/password-generate_dark.svg, + qt/icons/visibility_dark.svg: Replace with copies of corresponding + normal icons with color changed to #eff0f1. + + qt,qt5: Ensure that input field is large enough for generated password. + + commit 86ab46ebe9eeda0a2021b3c1cd9ccd1a82396b0c + * qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Change + minimum width of password input field. + * qt5/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Ditto. + + qt5: Add dark mode icon variants and detection. + + commit 537d7f87b82883615e5eecb9754f1bfc02f77119 + * qt5/icons/hint_dark.svg, qt5/icons/password-generate_dark.svg, + qt5/icons/visibility_dark.svg: New. + * qt5/icons/Makefile.am (EXTRA_DIST): Add icons. + * qt5/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): + Check if colorScheme is dark. Use Icons accordingly. + * qt5/pinentrydialog.h (PinentryDialog): Add icon suffix member + variable. + * qt5/pinentryrc.qrc: Add new icons. + + qt: Make Show/Hide Password functionality accessible. + + commit ae5f83e76f7756daea1cda9dcfdf2d42e7036ea1 + * qt/pinentrydialog.h (PinEntryDialog): Remove field mVisiActionEdit. + Add field mShowHideButton. + * qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Add + Show/Hide Password button after first password input field. Remove + Show/Hide Password action. Move Generate Password button after the + second password input field. Remove signal-slot connection of removed + Show/Hide action. Add signal-slot connection for Show/Hide button. + (PinEntryDialog::textChanged): Remove code changing visibility of + removed Show/Hide action. Remove code changing the visibility of the + Generate button. + (PinEntryDialog::generatePin): Click new Show/Hide button instead of + triggering removed Show/Hide action. + (PinEntryDialog::toggleVisibility): Update icon and tool tip of + new Show/Hide button instead of removed Show/Hide action. + +2025-07-23 Ingo Klöcker <d...@ingo-kloecker.de> + + qt5: Make Show/Hide Password functionality accessible. + + commit 07723a8e05f3a5c7cf49e4d0364b4241536b6748 + * qt5/pinentrydialog.h (PinEntryDialog): Remove field mVisiActionEdit. + Add field mShowHideButton. + * qt5/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Add + Show/Hide Password button after first password input field. Remove + Show/Hide Password action. Move Generate Password button after the + second password input field. Remove signal-slot connection of removed + Show/Hide action. Add signal-slot connection for Show/Hide button. + (PinEntryDialog::textChanged): Remove code changing visibility of + removed Show/Hide action. Remove code changing the visibility of the + Generate button. + (PinEntryDialog::generatePin): Click new Show/Hide button instead of + triggering removed Show/Hide action. + (PinEntryDialog::toggleVisibility): Update icon and tool tip of + new Show/Hide button instead of removed Show/Hide action. + +2025-03-10 NIIBE Yutaka <gni...@fsij.org> + + m4: Update libassuan.m4. + + commit 72b827b33e95df0dd1c14f193778e236e0bcbae6 + * m4/libassuan.m4: Update from libassuan master. + +2025-01-15 NIIBE Yutaka <gni...@fsij.org> + + build: Remove defining GPG_ERR_ENABLE_ERRNO_MACROS. + + commit c93e640fa8ca8ddb0eaee53fc65b03cf3004eb4b + * configure.ac (GPG_ERR_ENABLE_ERRNO_MACROS): Remove. + +2024-12-30 NIIBE Yutaka <gni...@fsij.org> + + build: Fix warning about obsolete pinentry-emacs. + + commit b415f31089218a1d35f9229ef666164753503c1d + * configure.ac: Fix emitting warning about pinentry-emacs. + +2024-09-09 Jakub Jelen <jje...@redhat.com> + + curses: Factor out dialog release to separate function. + + commit 7f9f6bab93cc70cf480f056372a07900c5cab0ae + * pinentry/pinentry-curses.c (dialog_release): New. + (dialog_run): Use unified cleanup function to avoid code duplication + and memory leaks. + +2024-07-30 Andre Heinecke <aheine...@gnupg.org> + + qt: Add dark mode icon variants and detection. + + commit f4be34f83fd2079fa452525738ef19783c712438 + * qt/icons/hint_dark.svg, qt/icons/password-generate_dark.svg, + qt/icons/visibility_dark.svg: New. + * qt/icons/Makefile.am (EXTRA_DIST): Add icons. + * qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): + Check if colorScheme is dark. Use Icons accordingly. + * qt/pinentrydialog.h (PinentryDialog): Add icon suffix member + variable. + * qt/pinentryrc.qrc: Add new icons. + +2024-07-04 NIIBE Yutaka <gni...@fsij.org> + + m4: Update gpg-error.m4 and libassuan.m4. + + commit 7dc2d243fc50899251ff46ea641da47e49c7164e + * m4/gpg-error.m4: Update from libgpg-error master. + * m4/libassuan.m4: Update from libassuan master. + 2024-07-03 Werner Koch <w...@gnupg.org> Release 1.3.1. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/NEWS new/pinentry-1.3.2/NEWS --- old/pinentry-1.3.1/NEWS 2024-07-03 11:27:09.000000000 +0200 +++ new/pinentry-1.3.2/NEWS 2025-07-28 09:04:21.000000000 +0200 @@ -1,3 +1,16 @@ +Noteworthy changes in version 1.3.2 (2025-07-28) +------------------------------------------------ + + * qt,qt5: Ensure that input field is large enough for generated + password. [rP86ab46ebe9] + + * qt,qt5: Make Show/Hide Password functionality accessible. [T7736] + + * qt,qt5: Use light icons in dark mode. [T7230, T7737] + + * qt: Make showing/hiding the password accessible. [T7736] + + Noteworthy changes in version 1.3.1 (2024-07-03) ------------------------------------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/VERSION new/pinentry-1.3.2/VERSION --- old/pinentry-1.3.1/VERSION 2024-07-03 11:29:09.000000000 +0200 +++ new/pinentry-1.3.2/VERSION 2025-07-28 09:07:41.000000000 +0200 @@ -1 +1 @@ -1.3.1 +1.3.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/config.h.in new/pinentry-1.3.2/config.h.in --- old/pinentry-1.3.1/config.h.in 2024-07-03 11:28:39.000000000 +0200 +++ new/pinentry-1.3.2/config.h.in 2025-07-28 09:04:50.000000000 +0200 @@ -25,9 +25,6 @@ /* version of the libassuan library */ #undef GNUPG_LIBASSUAN_VERSION -/* Under WindowsCE we use the strerror replacement from libgpg-error. */ -#undef GPG_ERR_ENABLE_ERRNO_MACROS - /* Under Windows we use the gettext code from libgpg-error */ #undef GPG_ERR_ENABLE_GETTEXT_MACROS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/configure new/pinentry-1.3.2/configure --- old/pinentry-1.3.1/configure 2024-07-03 11:29:09.000000000 +0200 +++ new/pinentry-1.3.2/configure 2025-07-28 09:07:41.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for pinentry 1.3.1. +# Generated by GNU Autoconf 2.71 for pinentry 1.3.2. # # Report bugs to <https://bugs.gnupg.org>. # @@ -611,8 +611,8 @@ # Identity of this package. PACKAGE_NAME='pinentry' PACKAGE_TARNAME='pinentry' -PACKAGE_VERSION='1.3.1' -PACKAGE_STRING='pinentry 1.3.1' +PACKAGE_VERSION='1.3.2' +PACKAGE_STRING='pinentry 1.3.2' PACKAGE_BUGREPORT='https://bugs.gnupg.org' PACKAGE_URL='' @@ -1494,7 +1494,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures pinentry 1.3.1 to adapt to many kinds of systems. +\`configure' configures pinentry 1.3.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1565,7 +1565,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pinentry 1.3.1:";; + short | recursive ) echo "Configuration of pinentry 1.3.2:";; esac cat <<\_ACEOF @@ -1762,7 +1762,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pinentry configure 1.3.1 +pinentry configure 1.3.2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2218,7 +2218,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by pinentry $as_me 1.3.1, which was +It was created by pinentry $as_me 1.3.2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3710,7 +3710,7 @@ # Define the identity of the package. PACKAGE='pinentry' - VERSION='1.3.1' + VERSION='1.3.2' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -8184,21 +8184,30 @@ fi if test -n "$gpgrt_libdir"; then + # Add the --libdir option to GPGRT_CONFIG GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" - if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Use gpgrt-config with $gpgrt_libdir as gpg-error-config" >&5 -printf "%s\n" "$as_me: Use gpgrt-config with $gpgrt_libdir as gpg-error-config" >&6;} - gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` - else - gpg_error_config_version=`$GPG_ERROR_CONFIG --version` + # Make sure if gpgrt-config really works, by testing config gpg-error + if ! $GPGRT_CONFIG gpg-error --exists; then + # If it doesn't work, clear the GPGRT_CONFIG variable. unset GPGRT_CONFIG fi - elif test "$GPG_ERROR_CONFIG" != "no"; then - gpg_error_config_version=`$GPG_ERROR_CONFIG --version` + else + # GPGRT_CONFIG found but no suitable dir for --libdir found. + # This is a failure. Clear the GPGRT_CONFIG variable. unset GPGRT_CONFIG fi + if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Use gpgrt-config with $gpgrt_libdir as gpg-error-config" >&5 +printf "%s\n" "$as_me: Use gpgrt-config with $gpgrt_libdir as gpg-error-config" >&6;} + gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` + elif test x"$GPG_ERROR_CONFIG" != x -a "$GPG_ERROR_CONFIG" != "no"; then + gpg_error_config_version=`$GPG_ERROR_CONFIG --version` + else + gpg_error_config_version="0.0" + fi + min_gpg_error_version="$NEED_GPG_ERROR_VERSION" ok=no if test "$GPG_ERROR_CONFIG" != "no"; then @@ -8285,10 +8294,6 @@ -printf "%s\n" "#define GPG_ERR_ENABLE_ERRNO_MACROS 1" >>confdefs.h - - - # # libassuan is used for IPC # @@ -8296,7 +8301,6 @@ NEED_LIBASSUAN_VERSION=2.1.0 have_libassuan=no - # Check whether --with-libassuan-prefix was given. if test ${with_libassuan_prefix+y} then : @@ -8422,7 +8426,7 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($libassuan_config_version)" >&5 printf "%s\n" "yes ($libassuan_config_version)" >&6; } -printf "%s\n" "#define LIBASSUAN_API_REQUESTED \$req_libassuan_api" >>confdefs.h +printf "%s\n" "#define LIBASSUAN_API_REQUESTED $req_libassuan_api" >>confdefs.h else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -11112,9 +11116,7 @@ # Check whether --enable-pinentry-emacs was given. if test ${enable_pinentry_emacs+y} then : - enableval=$enable_pinentry_emacs; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: pinentry-emacs is obsolete; Emacs version 26 or later never uses it." >&5 -printf "%s\n" "$as_me: WARNING: pinentry-emacs is obsolete; Emacs version 26 or later never uses it." >&2;} - pinentry_emacs=$enableval + enableval=$enable_pinentry_emacs; pinentry_emacs=$enableval else $as_nop pinentry_emacs=no fi @@ -11205,6 +11207,8 @@ printf "%s\n" "#define PINENTRY_EMACS 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: pinentry-emacs is obsolete; Emacs version 26 or later never uses it." >&5 +printf "%s\n" "$as_me: WARNING: pinentry-emacs is obsolete; Emacs version 26 or later never uses it." >&2;} fi @@ -15245,7 +15249,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by pinentry $as_me 1.3.1, which was +This file was extended by pinentry $as_me 1.3.2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15313,7 +15317,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -pinentry config.status 1.3.1 +pinentry config.status 1.3.2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" @@ -16199,7 +16203,7 @@ Pinentry v${VERSION} has been configured as follows: - Revision: dd8894f (56712) + Revision: d766080 (55142) Platform: $host Curses Pinentry ..: $pinentry_curses @@ -16226,7 +16230,7 @@ Pinentry v${VERSION} has been configured as follows: - Revision: dd8894f (56712) + Revision: d766080 (55142) Platform: $host Curses Pinentry ..: $pinentry_curses diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/configure.ac new/pinentry-1.3.2/configure.ac --- old/pinentry-1.3.1/configure.ac 2024-07-03 11:19:19.000000000 +0200 +++ new/pinentry-1.3.2/configure.ac 2025-07-25 12:08:09.000000000 +0200 @@ -29,7 +29,7 @@ m4_define([mym4_package],[pinentry]) m4_define([mym4_major], [1]) m4_define([mym4_minor], [3]) -m4_define([mym4_micro], [1]) +m4_define([mym4_micro], [2]) # Below is m4 magic to extract and compute the git revision number, # the decimalized short revision number, a beta version string and a @@ -246,9 +246,6 @@ AC_DEFINE_UNQUOTED(GPG_ERR_ENABLE_GETTEXT_MACROS, 1, [Under Windows we use the gettext code from libgpg-error]) -AC_DEFINE_UNQUOTED(GPG_ERR_ENABLE_ERRNO_MACROS, 1, - [Under WindowsCE we use the strerror replacement from libgpg-error.]) - dnl Checks for libassuan. # @@ -353,7 +350,6 @@ dnl AC_ARG_ENABLE(pinentry-emacs, AS_HELP_STRING([--enable-pinentry-emacs],[build emacs pinentry]), - AC_MSG_WARN([pinentry-emacs is obsolete; Emacs version 26 or later never uses it.]) pinentry_emacs=$enableval, pinentry_emacs=no) AC_ARG_ENABLE(inside-emacs, AS_HELP_STRING([--enable-inside-emacs],[include emacs hack]), @@ -395,6 +391,7 @@ if test "$pinentry_emacs" = "yes"; then AC_DEFINE(PINENTRY_EMACS, 1, [The Emacs version of Pinentry is to be build]) + AC_MSG_WARN([pinentry-emacs is obsolete; Emacs version 26 or later never uses it.]) fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/doc/pinentry.info new/pinentry-1.3.2/doc/pinentry.info --- old/pinentry-1.3.1/doc/pinentry.info 2024-07-03 11:29:18.000000000 +0200 +++ new/pinentry-1.3.2/doc/pinentry.info 2025-07-28 09:07:34.000000000 +0200 @@ -8,8 +8,8 @@ This file documents the use and the internals of the PINENTRY. - This is edition 1.3.1, last updated 26 February 2024, of 'The -'PINEntry' Manual', for version 1.3.1. + This is edition 1.3.2, last updated 26 February 2024, of 'The +'PINEntry' Manual', for version 1.3.2. Published by g10 Code GmbH Hüttenstr. 61 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/doc/stamp-vti new/pinentry-1.3.2/doc/stamp-vti --- old/pinentry-1.3.1/doc/stamp-vti 2024-07-03 11:29:18.000000000 +0200 +++ new/pinentry-1.3.2/doc/stamp-vti 2025-07-28 09:07:49.000000000 +0200 @@ -1,4 +1,4 @@ @set UPDATED 26 February 2024 @set UPDATED-MONTH February 2024 -@set EDITION 1.3.1 -@set VERSION 1.3.1 +@set EDITION 1.3.2 +@set VERSION 1.3.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/doc/version.texi new/pinentry-1.3.2/doc/version.texi --- old/pinentry-1.3.1/doc/version.texi 2024-07-03 11:29:18.000000000 +0200 +++ new/pinentry-1.3.2/doc/version.texi 2025-07-28 09:07:34.000000000 +0200 @@ -1,4 +1,4 @@ @set UPDATED 26 February 2024 @set UPDATED-MONTH February 2024 -@set EDITION 1.3.1 -@set VERSION 1.3.1 +@set EDITION 1.3.2 +@set VERSION 1.3.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/m4/gpg-error.m4 new/pinentry-1.3.2/m4/gpg-error.m4 --- old/pinentry-1.3.1/m4/gpg-error.m4 2023-09-08 15:16:28.000000000 +0200 +++ new/pinentry-1.3.2/m4/gpg-error.m4 2024-07-04 09:48:51.000000000 +0200 @@ -1,5 +1,5 @@ # gpg-error.m4 - autoconf macro to detect libgpg-error. -# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018, 2020, 2021, 2022 +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018, 2020, 2021, 2022, 2024 # g10 Code GmbH # # This file is free software; as a special exception the author gives @@ -10,7 +10,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2023-04-01 +# Last-changed: 2024-06-13 dnl dnl Find gpg-error-config, for backward compatibility @@ -125,17 +125,16 @@ fi if test -n "$gpgrt_libdir"; then + # Add the --libdir option to GPGRT_CONFIG GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" - if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" - AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) - gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` - else - gpg_error_config_version=`$GPG_ERROR_CONFIG --version` + # Make sure if gpgrt-config really works, by testing config gpg-error + if ! $GPGRT_CONFIG gpg-error --exists; then + # If it doesn't work, clear the GPGRT_CONFIG variable. unset GPGRT_CONFIG fi - elif test "$GPG_ERROR_CONFIG" != "no"; then - gpg_error_config_version=`$GPG_ERROR_CONFIG --version` + else + # GPGRT_CONFIG found but no suitable dir for --libdir found. + # This is a failure. Clear the GPGRT_CONFIG variable. unset GPGRT_CONFIG fi ]) @@ -145,17 +144,27 @@ dnl dnl Test for libgpg-error and define GPG_ERROR_CFLAGS, GPG_ERROR_LIBS, dnl GPG_ERROR_MT_CFLAGS, and GPG_ERROR_MT_LIBS. The _MT_ variants are -dnl used for programs requireing real multi thread support. +dnl used for programs requiring real multi thread support. dnl dnl If a prefix option is not used, the config script is first dnl searched in $SYSROOT/bin and then along $PATH. If the used dnl config script does not match the host specification the script dnl is added to the gpg_config_script_warn variable. dnl -AC_DEFUN([AM_PATH_GPG_ERROR],[dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([_AM_PATH_POSSIBLE_GPG_ERROR_CONFIG])dnl -AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl +AC_DEFUN([AM_PATH_GPG_ERROR], +[ AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([_AM_PATH_POSSIBLE_GPG_ERROR_CONFIG])dnl + AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl + if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) + gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` + elif test x"$GPG_ERROR_CONFIG" != x -a "$GPG_ERROR_CONFIG" != "no"; then + gpg_error_config_version=`$GPG_ERROR_CONFIG --version` + else + gpg_error_config_version="0.0" + fi + min_gpg_error_version=ifelse([$1], ,1.33,$1) ok=no if test "$GPG_ERROR_CONFIG" != "no"; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/m4/libassuan.m4 new/pinentry-1.3.2/m4/libassuan.m4 --- old/pinentry-1.3.1/m4/libassuan.m4 2023-09-08 15:16:28.000000000 +0200 +++ new/pinentry-1.3.2/m4/libassuan.m4 2025-07-25 12:08:09.000000000 +0200 @@ -9,14 +9,100 @@ dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. dnl SPDX-License-Identifier: FSFULLR -# Last-changed: 2023-07-26 +# Last-changed: 2024-07-11 + +dnl +dnl Find gpgrt-config, which uses .pc file +dnl (minimum pkg-config functionality, supporting cross build) +dnl +dnl _AM_PATH_GPGRT_CONFIG +AC_DEFUN([_AM_PATH_GPGRT_CONFIG],[dnl + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no, [$prefix/bin:$PATH]) + if test "$GPGRT_CONFIG" != "no"; then + # Determine gpgrt_libdir + # + # Get the prefix of gpgrt-config assuming it's something like: + # <PREFIX>/bin/gpgrt-config + gpgrt_prefix=${GPGRT_CONFIG%/*/*} + possible_libdir1=${gpgrt_prefix}/lib + # Determine by using system libdir-format with CC, it's like: + # Normal style: /usr/lib + # GNU cross style: /usr/<triplet>/lib + # Debian style: /usr/lib/<multiarch-name> + # Fedora/openSUSE style: /usr/lib, /usr/lib32 or /usr/lib64 + # It is assumed that CC is specified to the one of host on cross build. + if libdir_candidates=$(${CC:-cc} -print-search-dirs | \ + sed -n -e "/^libraries/{s/libraries: =//;s/:/\\ +/g;p;}"); then + # From the output of -print-search-dirs, select valid pkgconfig dirs. + libdir_candidates=$(for dir in $libdir_candidates; do + if p=$(cd $dir 2>/dev/null && pwd); then + test -d "$p/pkgconfig" && echo $p; + fi + done) + + for possible_libdir0 in $libdir_candidates; do + # possible_libdir0: + # Fallback candidate, the one of system-installed (by $CC) + # (/usr/<triplet>/lib, /usr/lib/<multiarch-name> or /usr/lib32) + # possible_libdir1: + # Another candidate, user-locally-installed + # (<gpgrt_prefix>/lib) + # possible_libdir2 + # Most preferred + # (<gpgrt_prefix>/<triplet>/lib, + # <gpgrt_prefix>/lib/<multiarch-name> or <gpgrt_prefix>/lib32) + if test "${possible_libdir0##*/}" = "lib"; then + possible_prefix0=${possible_libdir0%/lib} + possible_prefix0_triplet=${possible_prefix0##*/} + if test -z "$possible_prefix0_triplet"; then + continue + fi + possible_libdir2=${gpgrt_prefix}/$possible_prefix0_triplet/lib + else + possible_prefix0=${possible_libdir0%%/lib*} + possible_libdir2=${gpgrt_prefix}${possible_libdir0#$possible_prefix0} + fi + if test -f ${possible_libdir2}/pkgconfig/gpg-error.pc; then + gpgrt_libdir=${possible_libdir2} + elif test -f ${possible_libdir1}/pkgconfig/gpg-error.pc; then + gpgrt_libdir=${possible_libdir1} + elif test -f ${possible_libdir0}/pkgconfig/gpg-error.pc; then + gpgrt_libdir=${possible_libdir0} + fi + if test -n "$gpgrt_libdir"; then break; fi + done + fi + if test -z "$gpgrt_libdir"; then + # No valid pkgconfig dir in any of the system directories, fallback + gpgrt_libdir=${possible_libdir1} + fi + else + unset GPGRT_CONFIG + fi + + if test -n "$gpgrt_libdir"; then + # Add the --libdir option to GPGRT_CONFIG + GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" + # Make sure if gpgrt-config really works, by testing config gpg-error + if ! $GPGRT_CONFIG gpg-error --exists; then + # If it doesn't work, clear the GPGRT_CONFIG variable. + unset GPGRT_CONFIG + fi + else + # GPGRT_CONFIG found but no suitable dir for --libdir found. + # This is a failure. Clear the GPGRT_CONFIG variable. + unset GPGRT_CONFIG + fi +]) dnl dnl Common code used for libassuan detection [internal] dnl Returns ok set to yes or no. dnl AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], -[ AC_REQUIRE([AC_CANONICAL_HOST]) +[ AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl AC_ARG_WITH(libassuan-prefix, AS_HELP_STRING([--with-libassuan-prefix=PFX], [prefix where LIBASSUAN is installed (optional)]), @@ -89,7 +175,7 @@ if test $ok = yes; then AC_MSG_RESULT([yes ($libassuan_config_version)]) - AC_DEFINE(LIBASSUAN_API_REQUESTED, $req_libassuan_api, Requested API version for libassuan) + AC_DEFINE_UNQUOTED(LIBASSUAN_API_REQUESTED, $req_libassuan_api, [Requested API version for libassuan]) else AC_MSG_RESULT(no) fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/pinentry/pinentry-curses.c new/pinentry-1.3.2/pinentry/pinentry-curses.c --- old/pinentry-1.3.1/pinentry/pinentry-curses.c 2023-09-08 15:16:28.000000000 +0200 +++ new/pinentry-1.3.2/pinentry/pinentry-curses.c 2025-07-25 12:08:09.000000000 +0200 @@ -1137,6 +1137,24 @@ return 0; } +static void +dialog_release (dialog_t diag) +{ + free (diag->ok); + free (diag->repeat_ok); + free (diag->repeat_error); + if (diag->cancel) + free (diag->cancel); + if (diag->notok) + free (diag->notok); + + if (diag->repeat_pin) + secmem_free (diag->repeat_pin); + + if (diag->error) + free (diag->error); +} + /* XXX Assume that field width is at least > 5. */ static void dialog_input (dialog_t diag, int alt, int chr) @@ -1514,6 +1532,7 @@ fclose (ttyfi); if (ttyfo) fclose (ttyfo); + dialog_release (&diag); return -2; } dialog_switch_pos (&diag, confirm_mode? DIALOG_POS_OK : DIALOG_POS_PIN); @@ -1719,12 +1738,7 @@ fclose (ttyfi); if (ttyfo) fclose (ttyfo); - /* XXX Factor out into dialog_release or something. */ - free (diag.ok); - if (diag.cancel) - free (diag.cancel); - if (diag.notok) - free (diag.notok); + dialog_release (&diag); if (!confirm_mode) { @@ -1740,12 +1754,6 @@ } } - if (diag.repeat_pin) - secmem_free (diag.repeat_pin); - - if (diag.error) - free (diag.error); - if (done == -2) pinentry->canceled = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt/icons/Makefile.am new/pinentry-1.3.2/qt/icons/Makefile.am --- old/pinentry-1.3.1/qt/icons/Makefile.am 2024-07-03 11:19:19.000000000 +0200 +++ new/pinentry-1.3.2/qt/icons/Makefile.am 2025-07-25 12:08:09.000000000 +0200 @@ -23,7 +23,10 @@ pinentry.png \ hint.svg \ password-generate.svg \ - visibility.svg + visibility.svg \ + hint_dark.svg \ + password-generate_dark.svg \ + visibility_dark.svg icons_DATA = pinentry.png iconsdir = $(datadir)/pixmaps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt/icons/Makefile.in new/pinentry-1.3.2/qt/icons/Makefile.in --- old/pinentry-1.3.1/qt/icons/Makefile.in 2024-07-03 11:29:09.000000000 +0200 +++ new/pinentry-1.3.2/qt/icons/Makefile.in 2025-07-28 09:07:41.000000000 +0200 @@ -353,7 +353,10 @@ pinentry.png \ hint.svg \ password-generate.svg \ - visibility.svg + visibility.svg \ + hint_dark.svg \ + password-generate_dark.svg \ + visibility_dark.svg icons_DATA = pinentry.png iconsdir = $(datadir)/pixmaps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt/icons/hint_dark.svg new/pinentry-1.3.2/qt/icons/hint_dark.svg --- old/pinentry-1.3.1/qt/icons/hint_dark.svg 1970-01-01 01:00:00.000000000 +0100 +++ new/pinentry-1.3.2/qt/icons/hint_dark.svg 2025-07-25 12:08:09.000000000 +0200 @@ -0,0 +1,13 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#eff0f1; + } + </style> + </defs> + <path style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 13.314453 2 L 2 13.294922 L 2.7148438 14 L 14 2.6972656 L 13.314453 2 z M 8 3 A 8.9999916 9.000003 0 0 0 0.12304688 7.6679688 C 0.25199187 8.0317035 0.48048562 8.3445563 0.77929688 8.5761719 A 7.9999926 8.0000028 0 0 1 8 4 A 3.9999993 4.0000007 0 0 0 4 8 A 3.9999993 4.0000007 0 0 0 4.1054688 8.8945312 L 5 8 A 2.9999993 3.0000005 0 0 1 8 5 L 8.8925781 4.1074219 A 3.9999993 4.0000007 0 0 0 8.3496094 4.0175781 A 7.9999926 8.0000028 0 0 1 8.9277344 4.0722656 L 9.8066406 3.1933594 A 8.9999916 9.000003 0 0 0 8 3 z M 13.835938 5.1640625 L 13.121094 5.8789062 A 7.9999926 8.0000028 0 0 1 15.220703 8.5761719 C 15.522218 8.3424607 15.752612 8.0261216 15.880859 7.6582031 A 8.9999916 9.000003 0 0 0 13.835938 5.1640625 z M 11.894531 7.1054688 L 11 8 A 2.9999993 3.0000005 0 0 1 8 11 L 7.1074219 11.892578 A 3.9999993 4.0000007 0 0 0 8 12 A 3.9999993 4.0000007 0 0 0 12 8 A 3.9999993 4.0000007 0 0 0 11.894531 7.1054688 z " + class="ColorScheme-Text" + /> +</svg> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt/icons/password-generate_dark.svg new/pinentry-1.3.2/qt/icons/password-generate_dark.svg --- old/pinentry-1.3.1/qt/icons/password-generate_dark.svg 1970-01-01 01:00:00.000000000 +0100 +++ new/pinentry-1.3.2/qt/icons/password-generate_dark.svg 2025-07-25 12:08:09.000000000 +0200 @@ -0,0 +1,13 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#eff0f1; + } + </style> + </defs> + <path style="fill:currentColor;fill-opacity:1;stroke:none" + d="m3.5 2l-.531.969-.969.531.969.531.531.969.531-.969.969-.531-.969-.531zm7.631 0l-9.125 9.125 2.875 2.875 9.125-9.125zm0 1.438l1.438 1.439-2.781 2.779-1.438-1.438z" + class="ColorScheme-Text" + /> +</svg> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt/icons/visibility_dark.svg new/pinentry-1.3.2/qt/icons/visibility_dark.svg --- old/pinentry-1.3.1/qt/icons/visibility_dark.svg 1970-01-01 01:00:00.000000000 +0100 +++ new/pinentry-1.3.2/qt/icons/visibility_dark.svg 2025-07-25 12:08:09.000000000 +0200 @@ -0,0 +1,21 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#eff0f1; + } + </style> + </defs> + <g + transform="translate(-421.71429,-531.79074)"> + <g + transform="matrix(0.75,0,0,0.74999813,421.46429,-241.22897)"> + <path + style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 8 3 A 8.9999925 9.0000023 0 0 0 0.12304688 7.6679688 C 0.2519919 8.0317178 0.48048563 8.3445725 0.77929688 8.5761719 A 7.9999935 8.0000021 0 0 1 8 4 A 3.9999996 4.0000004 0 0 0 4 8 A 3.9999996 4.0000004 0 0 0 8 12 A 3.9999996 4.0000004 0 0 0 12 8 A 3.9999996 4.0000004 0 0 0 8.3496094 4.0175781 A 7.9999935 8.0000021 0 0 1 15.220703 8.5761719 C 15.522218 8.3424725 15.752612 8.0260772 15.880859 7.6582031 A 8.9999925 9.0000023 0 0 0 8 3 z M 8 5 A 2.9999996 3.0000002 0 0 1 11 8 A 2.9999996 3.0000002 0 0 1 8 11 A 2.9999996 3.0000002 0 0 1 5 8 A 2.9999996 3.0000002 0 0 1 8 5 z M 8 6 A 1.9999999 2.0000003 0 0 0 6 8 A 1.9999999 2.0000003 0 0 0 8 10 A 1.9999999 2.0000003 0 0 0 10 8 A 1.9999999 2.0000003 0 0 0 9.9101562 7.4121094 A 0.9999999 1 0 0 1 9 8 A 0.9999999 1 0 0 1 8 7 A 0.9999999 1 0 0 1 8.5898438 6.0898438 A 1.9999999 2.0000003 0 0 0 8 6 z " + transform="matrix(1.3333333,0,0,1.3333367,0.33333333,1030.6955)" + class="ColorScheme-Text" + id="rect4170" /> + </g> + </g> +</svg> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt/pinentrydialog.cpp new/pinentry-1.3.2/qt/pinentrydialog.cpp --- old/pinentry-1.3.1/qt/pinentrydialog.cpp 2024-07-03 11:19:19.000000000 +0200 +++ new/pinentry-1.3.2/qt/pinentrydialog.cpp 2025-07-25 12:08:09.000000000 +0200 @@ -39,6 +39,7 @@ #include <QApplication> #include <QFontMetrics> #include <QStyle> +#include <QStyleHints> #include <QPainter> #include <QPushButton> #include <QDialogButtonBox> @@ -104,8 +105,18 @@ setWindowModality(Qt::ApplicationModal); } + /* Check for dark scheme to determine the icons */ +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) + QStyleHints *styleHints = qApp->styleHints(); + if (styleHints && styleHints->colorScheme() == Qt::ColorScheme::Dark) { + mIconSuffix = QStringLiteral("_dark"); + } +#endif + QPalette redTextPalette; redTextPalette.setColor(QPalette::WindowText, Qt::red); + const QIcon visibilityIcon = QIcon(QLatin1String(":/icons/visibility") + mIconSuffix); + const QIcon hideIcon = QIcon(QLatin1String(":/icons/hint") + mIconSuffix); auto *const mainLayout = new QVBoxLayout{this}; @@ -152,36 +163,24 @@ const auto l = new QHBoxLayout; _edit = new PinLineEdit(this); _edit->setMaxLength(256); - _edit->setMinimumWidth(_edit->fontMetrics().averageCharWidth()*20 + 48); + _edit->setMinimumWidth(_edit->fontMetrics().horizontalAdvance(u'x') * 35); _edit->setEchoMode(QLineEdit::Password); _prompt->setBuddy(_edit); l->addWidget(_edit, 1); - if (!repeatString.isNull()) { - mGenerateButton = new QPushButton{this}; - mGenerateButton->setIcon(QIcon(QLatin1String(":/icons/password-generate"))); - mGenerateButton->setVisible(false); - l->addWidget(mGenerateButton); + if (!visibilityIcon.isNull() && !hideIcon.isNull()) { + mShowHideButton = new QPushButton{this}; + mShowHideButton->setIcon(visibilityIcon); + mShowHideButton->setToolTip(mVisibilityTT); + l->addWidget(mShowHideButton); } grid->addLayout(l, row, 2); } - /* Set up the show password action */ - const QIcon visibilityIcon = QIcon(QLatin1String(":/icons/visibility.svg")); - const QIcon hideIcon = QIcon(QLatin1String(":/icons/hint.svg")); -#if QT_VERSION >= 0x050200 - if (!visibilityIcon.isNull() && !hideIcon.isNull()) { - mVisiActionEdit = _edit->addAction(visibilityIcon, QLineEdit::TrailingPosition); - mVisiActionEdit->setVisible(false); - mVisiActionEdit->setToolTip(mVisibilityTT); - } else -#endif - { - if (!mVisibilityTT.isNull()) { - row++; - mVisiCB = new QCheckBox{mVisibilityTT, this}; - grid->addWidget(mVisiCB, row, 1, 1, 2, Qt::AlignLeft); - } + if (!mShowHideButton && !mVisibilityTT.isNull()) { + row++; + mVisiCB = new QCheckBox{mVisibilityTT, this}; + grid->addWidget(mVisiCB, row, 1, 1, 2, Qt::AlignLeft); } row++; @@ -209,11 +208,20 @@ repeatLabel->setText(repeatString); grid->addWidget(repeatLabel, row, 1); + const auto l = new QHBoxLayout; mRepeat = new PinLineEdit(this); mRepeat->setMaxLength(256); mRepeat->setEchoMode(QLineEdit::Password); repeatLabel->setBuddy(mRepeat); - grid->addWidget(mRepeat, row, 2); + l->addWidget(mRepeat, 1); + + if (!repeatString.isNull()) { + mGenerateButton = new QPushButton{this}; + mGenerateButton->setIcon(QIcon(QLatin1String(":/icons/password-generate") + mIconSuffix)); + mGenerateButton->setVisible(false); + l->addWidget(mGenerateButton); + } + grid->addLayout(l, row, 2); row++; mRepeatError = new QLabel{this}; @@ -288,8 +296,8 @@ connect(mGenerateButton, &QPushButton::clicked, this, &PinEntryDialog::generatePin); } - if (mVisiActionEdit) { - connect(mVisiActionEdit, &QAction::triggered, + if (mShowHideButton) { + connect(mShowHideButton, &QPushButton::clicked, this, &PinEntryDialog::toggleVisibility); } if (mVisiCB) { @@ -590,18 +598,6 @@ Q_UNUSED(text); cancelTimeout(); - - if (mVisiActionEdit && sender() == _edit) { - mVisiActionEdit->setVisible(!_edit->pin().isEmpty()); - } - if (mGenerateButton) { - mGenerateButton->setVisible( - _edit->pin().isEmpty() -#ifndef QT_NO_ACCESSIBILITY - && !mGenerateButton->accessibleName().isEmpty() -#endif - ); - } } void PinEntryDialog::generatePin() @@ -609,8 +605,8 @@ unique_malloced_ptr<char> pin{pinentry_inq_genpin(_pinentry_info)}; if (pin) { if (_edit->echoMode() == QLineEdit::Password) { - if (mVisiActionEdit) { - mVisiActionEdit->trigger(); + if (mShowHideButton) { + mShowHideButton->click(); } if (mVisiCB) { mVisiCB->setChecked(true); @@ -627,20 +623,21 @@ void PinEntryDialog::toggleVisibility() { + qDebug() << __func__; if (sender() != mVisiCB) { if (_edit->echoMode() == QLineEdit::Password) { - if (mVisiActionEdit) { - mVisiActionEdit->setIcon(QIcon(QLatin1String(":/icons/hint.svg"))); - mVisiActionEdit->setToolTip(mHideTT); + if (mShowHideButton) { + mShowHideButton->setIcon(QIcon(QLatin1String(":/icons/hint") + mIconSuffix)); + mShowHideButton->setToolTip(mHideTT); } _edit->setEchoMode(QLineEdit::Normal); if (mRepeat) { mRepeat->setEchoMode(QLineEdit::Normal); } } else { - if (mVisiActionEdit) { - mVisiActionEdit->setIcon(QIcon(QLatin1String(":/icons/visibility.svg"))); - mVisiActionEdit->setToolTip(mVisibilityTT); + if (mShowHideButton) { + mShowHideButton->setIcon(QIcon(QLatin1String(":/icons/visibility") + mIconSuffix)); + mShowHideButton->setToolTip(mVisibilityTT); } _edit->setEchoMode(QLineEdit::Password); if (mRepeat) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt/pinentrydialog.h new/pinentry-1.3.2/qt/pinentrydialog.h --- old/pinentry-1.3.1/qt/pinentrydialog.h 2024-02-26 15:24:12.000000000 +0100 +++ new/pinentry-1.3.2/qt/pinentrydialog.h 2025-07-25 12:08:09.000000000 +0200 @@ -168,7 +168,7 @@ QTimer *_timer = nullptr; QString mVisibilityTT; QString mHideTT; - QAction *mVisiActionEdit = nullptr; + QPushButton *mShowHideButton = nullptr; QPushButton *mGenerateButton = nullptr; QCheckBox *mVisiCB = nullptr; QLabel *mFormattedPassphraseHint = nullptr; @@ -177,6 +177,7 @@ QLabel *mConstraintsHint = nullptr; QString mConstraintsErrorTitle; QCheckBox *mSavePassphraseCB = nullptr; + QString mIconSuffix; }; #endif // __PINENTRYDIALOG_H__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt/pinentryrc.qrc new/pinentry-1.3.2/qt/pinentryrc.qrc --- old/pinentry-1.3.1/qt/pinentryrc.qrc 2024-07-03 11:19:19.000000000 +0200 +++ new/pinentry-1.3.2/qt/pinentryrc.qrc 2025-07-25 12:08:09.000000000 +0200 @@ -6,5 +6,8 @@ <file>icons/hint.svg</file> <file>icons/password-generate.svg</file> <file>icons/visibility.svg</file> + <file>icons/hint_dark.svg</file> + <file>icons/password-generate_dark.svg</file> + <file>icons/visibility_dark.svg</file> </qresource> </RCC> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt5/icons/Makefile.am new/pinentry-1.3.2/qt5/icons/Makefile.am --- old/pinentry-1.3.1/qt5/icons/Makefile.am 2024-07-03 11:19:19.000000000 +0200 +++ new/pinentry-1.3.2/qt5/icons/Makefile.am 2025-07-25 12:08:09.000000000 +0200 @@ -23,7 +23,10 @@ pinentry.png \ hint.svg \ password-generate.svg \ - visibility.svg + visibility.svg \ + hint_dark.svg \ + password-generate_dark.svg \ + visibility_dark.svg icons_DATA = pinentry.png iconsdir = $(datadir)/pixmaps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt5/icons/Makefile.in new/pinentry-1.3.2/qt5/icons/Makefile.in --- old/pinentry-1.3.1/qt5/icons/Makefile.in 2024-07-03 11:29:09.000000000 +0200 +++ new/pinentry-1.3.2/qt5/icons/Makefile.in 2025-07-28 09:07:41.000000000 +0200 @@ -353,7 +353,10 @@ pinentry.png \ hint.svg \ password-generate.svg \ - visibility.svg + visibility.svg \ + hint_dark.svg \ + password-generate_dark.svg \ + visibility_dark.svg icons_DATA = pinentry.png iconsdir = $(datadir)/pixmaps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt5/icons/hint_dark.svg new/pinentry-1.3.2/qt5/icons/hint_dark.svg --- old/pinentry-1.3.1/qt5/icons/hint_dark.svg 1970-01-01 01:00:00.000000000 +0100 +++ new/pinentry-1.3.2/qt5/icons/hint_dark.svg 2025-07-25 12:08:09.000000000 +0200 @@ -0,0 +1,13 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#eff0f1; + } + </style> + </defs> + <path style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 13.314453 2 L 2 13.294922 L 2.7148438 14 L 14 2.6972656 L 13.314453 2 z M 8 3 A 8.9999916 9.000003 0 0 0 0.12304688 7.6679688 C 0.25199187 8.0317035 0.48048562 8.3445563 0.77929688 8.5761719 A 7.9999926 8.0000028 0 0 1 8 4 A 3.9999993 4.0000007 0 0 0 4 8 A 3.9999993 4.0000007 0 0 0 4.1054688 8.8945312 L 5 8 A 2.9999993 3.0000005 0 0 1 8 5 L 8.8925781 4.1074219 A 3.9999993 4.0000007 0 0 0 8.3496094 4.0175781 A 7.9999926 8.0000028 0 0 1 8.9277344 4.0722656 L 9.8066406 3.1933594 A 8.9999916 9.000003 0 0 0 8 3 z M 13.835938 5.1640625 L 13.121094 5.8789062 A 7.9999926 8.0000028 0 0 1 15.220703 8.5761719 C 15.522218 8.3424607 15.752612 8.0261216 15.880859 7.6582031 A 8.9999916 9.000003 0 0 0 13.835938 5.1640625 z M 11.894531 7.1054688 L 11 8 A 2.9999993 3.0000005 0 0 1 8 11 L 7.1074219 11.892578 A 3.9999993 4.0000007 0 0 0 8 12 A 3.9999993 4.0000007 0 0 0 12 8 A 3.9999993 4.0000007 0 0 0 11.894531 7.1054688 z " + class="ColorScheme-Text" + /> +</svg> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt5/icons/password-generate_dark.svg new/pinentry-1.3.2/qt5/icons/password-generate_dark.svg --- old/pinentry-1.3.1/qt5/icons/password-generate_dark.svg 1970-01-01 01:00:00.000000000 +0100 +++ new/pinentry-1.3.2/qt5/icons/password-generate_dark.svg 2025-07-25 12:08:09.000000000 +0200 @@ -0,0 +1,13 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#eff0f1; + } + </style> + </defs> + <path style="fill:currentColor;fill-opacity:1;stroke:none" + d="m3.5 2l-.531.969-.969.531.969.531.531.969.531-.969.969-.531-.969-.531zm7.631 0l-9.125 9.125 2.875 2.875 9.125-9.125zm0 1.438l1.438 1.439-2.781 2.779-1.438-1.438z" + class="ColorScheme-Text" + /> +</svg> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt5/icons/visibility_dark.svg new/pinentry-1.3.2/qt5/icons/visibility_dark.svg --- old/pinentry-1.3.1/qt5/icons/visibility_dark.svg 1970-01-01 01:00:00.000000000 +0100 +++ new/pinentry-1.3.2/qt5/icons/visibility_dark.svg 2025-07-25 12:08:09.000000000 +0200 @@ -0,0 +1,21 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#eff0f1; + } + </style> + </defs> + <g + transform="translate(-421.71429,-531.79074)"> + <g + transform="matrix(0.75,0,0,0.74999813,421.46429,-241.22897)"> + <path + style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 8 3 A 8.9999925 9.0000023 0 0 0 0.12304688 7.6679688 C 0.2519919 8.0317178 0.48048563 8.3445725 0.77929688 8.5761719 A 7.9999935 8.0000021 0 0 1 8 4 A 3.9999996 4.0000004 0 0 0 4 8 A 3.9999996 4.0000004 0 0 0 8 12 A 3.9999996 4.0000004 0 0 0 12 8 A 3.9999996 4.0000004 0 0 0 8.3496094 4.0175781 A 7.9999935 8.0000021 0 0 1 15.220703 8.5761719 C 15.522218 8.3424725 15.752612 8.0260772 15.880859 7.6582031 A 8.9999925 9.0000023 0 0 0 8 3 z M 8 5 A 2.9999996 3.0000002 0 0 1 11 8 A 2.9999996 3.0000002 0 0 1 8 11 A 2.9999996 3.0000002 0 0 1 5 8 A 2.9999996 3.0000002 0 0 1 8 5 z M 8 6 A 1.9999999 2.0000003 0 0 0 6 8 A 1.9999999 2.0000003 0 0 0 8 10 A 1.9999999 2.0000003 0 0 0 10 8 A 1.9999999 2.0000003 0 0 0 9.9101562 7.4121094 A 0.9999999 1 0 0 1 9 8 A 0.9999999 1 0 0 1 8 7 A 0.9999999 1 0 0 1 8.5898438 6.0898438 A 1.9999999 2.0000003 0 0 0 8 6 z " + transform="matrix(1.3333333,0,0,1.3333367,0.33333333,1030.6955)" + class="ColorScheme-Text" + id="rect4170" /> + </g> + </g> +</svg> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt5/pinentrydialog.cpp new/pinentry-1.3.2/qt5/pinentrydialog.cpp --- old/pinentry-1.3.1/qt5/pinentrydialog.cpp 2024-02-26 15:24:12.000000000 +0100 +++ new/pinentry-1.3.2/qt5/pinentrydialog.cpp 2025-07-25 12:08:09.000000000 +0200 @@ -113,8 +113,18 @@ setWindowModality(Qt::ApplicationModal); } + // Check for dark scheme to determine the icons + // use relative luminance defined in Rec. 709 for HDTV as reasonable estimate of the perceived lightness of the background color + const QColor &color = palette().button().color(); + const double luminance709 = (0.2126 * color.red() + 0.7152 * color.green() + 0.0722 * color.blue()) / 255.; + if (luminance709 < 0.5) { + mIconSuffix = QStringLiteral("_dark"); + } + QPalette redTextPalette; redTextPalette.setColor(QPalette::WindowText, Qt::red); + const QIcon visibilityIcon = QIcon(QLatin1String(":/icons/visibility") + mIconSuffix); + const QIcon hideIcon = QIcon(QLatin1String(":/icons/hint") + mIconSuffix); auto *const mainLayout = new QVBoxLayout{this}; @@ -161,36 +171,24 @@ const auto l = new QHBoxLayout; _edit = new PinLineEdit(this); _edit->setMaxLength(256); - _edit->setMinimumWidth(_edit->fontMetrics().averageCharWidth()*20 + 48); + _edit->setMinimumWidth(_edit->fontMetrics().horizontalAdvance(QLatin1Char('x')) * 35); _edit->setEchoMode(QLineEdit::Password); _prompt->setBuddy(_edit); l->addWidget(_edit, 1); - if (!repeatString.isNull()) { - mGenerateButton = new QPushButton{this}; - mGenerateButton->setIcon(QIcon(QLatin1String(":/icons/password-generate"))); - mGenerateButton->setVisible(false); - l->addWidget(mGenerateButton); + if (!visibilityIcon.isNull() && !hideIcon.isNull()) { + mShowHideButton = new QPushButton{this}; + mShowHideButton->setIcon(visibilityIcon); + mShowHideButton->setToolTip(mVisibilityTT); + l->addWidget(mShowHideButton); } grid->addLayout(l, row, 2); } - /* Set up the show password action */ - const QIcon visibilityIcon = QIcon(QLatin1String(":/icons/visibility.svg")); - const QIcon hideIcon = QIcon(QLatin1String(":/icons/hint.svg")); -#if QT_VERSION >= 0x050200 - if (!visibilityIcon.isNull() && !hideIcon.isNull()) { - mVisiActionEdit = _edit->addAction(visibilityIcon, QLineEdit::TrailingPosition); - mVisiActionEdit->setVisible(false); - mVisiActionEdit->setToolTip(mVisibilityTT); - } else -#endif - { - if (!mVisibilityTT.isNull()) { - row++; - mVisiCB = new QCheckBox{mVisibilityTT, this}; - grid->addWidget(mVisiCB, row, 1, 1, 2, Qt::AlignLeft); - } + if (!mShowHideButton && !mVisibilityTT.isNull()) { + row++; + mVisiCB = new QCheckBox{mVisibilityTT, this}; + grid->addWidget(mVisiCB, row, 1, 1, 2, Qt::AlignLeft); } row++; @@ -218,11 +216,20 @@ repeatLabel->setText(repeatString); grid->addWidget(repeatLabel, row, 1); + const auto l = new QHBoxLayout; mRepeat = new PinLineEdit(this); mRepeat->setMaxLength(256); mRepeat->setEchoMode(QLineEdit::Password); repeatLabel->setBuddy(mRepeat); - grid->addWidget(mRepeat, row, 2); + l->addWidget(mRepeat, 1); + + if (!repeatString.isNull()) { + mGenerateButton = new QPushButton{this}; + mGenerateButton->setIcon(QIcon(QLatin1String(":/icons/password-generate") + mIconSuffix)); + mGenerateButton->setVisible(false); + l->addWidget(mGenerateButton); + } + grid->addLayout(l, row, 2); row++; mRepeatError = new QLabel{this}; @@ -297,8 +304,8 @@ connect(mGenerateButton, &QPushButton::clicked, this, &PinEntryDialog::generatePin); } - if (mVisiActionEdit) { - connect(mVisiActionEdit, &QAction::triggered, + if (mShowHideButton) { + connect(mShowHideButton, &QPushButton::clicked, this, &PinEntryDialog::toggleVisibility); } if (mVisiCB) { @@ -599,18 +606,6 @@ Q_UNUSED(text); cancelTimeout(); - - if (mVisiActionEdit && sender() == _edit) { - mVisiActionEdit->setVisible(!_edit->pin().isEmpty()); - } - if (mGenerateButton) { - mGenerateButton->setVisible( - _edit->pin().isEmpty() -#ifndef QT_NO_ACCESSIBILITY - && !mGenerateButton->accessibleName().isEmpty() -#endif - ); - } } void PinEntryDialog::generatePin() @@ -618,8 +613,8 @@ unique_malloced_ptr<char> pin{pinentry_inq_genpin(_pinentry_info)}; if (pin) { if (_edit->echoMode() == QLineEdit::Password) { - if (mVisiActionEdit) { - mVisiActionEdit->trigger(); + if (mShowHideButton) { + mShowHideButton->click(); } if (mVisiCB) { mVisiCB->setChecked(true); @@ -638,18 +633,18 @@ { if (sender() != mVisiCB) { if (_edit->echoMode() == QLineEdit::Password) { - if (mVisiActionEdit) { - mVisiActionEdit->setIcon(QIcon(QLatin1String(":/icons/hint.svg"))); - mVisiActionEdit->setToolTip(mHideTT); + if (mShowHideButton) { + mShowHideButton->setIcon(QIcon(QLatin1String(":/icons/hint") + mIconSuffix)); + mShowHideButton->setToolTip(mHideTT); } _edit->setEchoMode(QLineEdit::Normal); if (mRepeat) { mRepeat->setEchoMode(QLineEdit::Normal); } } else { - if (mVisiActionEdit) { - mVisiActionEdit->setIcon(QIcon(QLatin1String(":/icons/visibility.svg"))); - mVisiActionEdit->setToolTip(mVisibilityTT); + if (mShowHideButton) { + mShowHideButton->setIcon(QIcon(QLatin1String(":/icons/visibility") + mIconSuffix)); + mShowHideButton->setToolTip(mVisibilityTT); } _edit->setEchoMode(QLineEdit::Password); if (mRepeat) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt5/pinentrydialog.h new/pinentry-1.3.2/qt5/pinentrydialog.h --- old/pinentry-1.3.1/qt5/pinentrydialog.h 2024-02-26 15:24:12.000000000 +0100 +++ new/pinentry-1.3.2/qt5/pinentrydialog.h 2025-07-25 12:08:09.000000000 +0200 @@ -168,7 +168,7 @@ QTimer *_timer = nullptr; QString mVisibilityTT; QString mHideTT; - QAction *mVisiActionEdit = nullptr; + QPushButton *mShowHideButton = nullptr; QPushButton *mGenerateButton = nullptr; QCheckBox *mVisiCB = nullptr; QLabel *mFormattedPassphraseHint = nullptr; @@ -177,6 +177,7 @@ QLabel *mConstraintsHint = nullptr; QString mConstraintsErrorTitle; QCheckBox *mSavePassphraseCB = nullptr; + QString mIconSuffix; }; #endif // __PINENTRYDIALOG_H__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pinentry-1.3.1/qt5/pinentryrc.qrc new/pinentry-1.3.2/qt5/pinentryrc.qrc --- old/pinentry-1.3.1/qt5/pinentryrc.qrc 2024-07-03 11:19:19.000000000 +0200 +++ new/pinentry-1.3.2/qt5/pinentryrc.qrc 2025-07-25 12:08:09.000000000 +0200 @@ -6,5 +6,8 @@ <file>icons/hint.svg</file> <file>icons/password-generate.svg</file> <file>icons/visibility.svg</file> + <file>icons/hint_dark.svg</file> + <file>icons/password-generate_dark.svg</file> + <file>icons/visibility_dark.svg</file> </qresource> </RCC>