From nobody Wed Jul 13 23:53:17 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CF7C71D0C63C for ; Wed, 13 Jul 2022 23:53:21 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LjvZn02F1z3dJJ for ; Wed, 13 Jul 2022 23:53:21 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f51.google.com with SMTP id z12so232380wrq.7 for ; Wed, 13 Jul 2022 16:53:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=jxbZPs38SueyWZ8A/h2pJxFgXQx55OAnPNj9x82Aba0=; b=lrrjiVcpmI61O7Mn+ulL/jT+LP4YQI7yVM6CSyjUF7pqSdeNxV2MfSjMhuu4rbYAbS tiSwr/12bGHRW93Zra9wE1C07lkRylTYP6OEAmXqAIeHZHIEx9ONEw/HHJw3Ufyr2prQ amyT+zrDfoEqgzEluEQn18qRmtUF6ZizOHIfHRKOQcRpd30NUtRnH0x0HZT76DWUAqTe awYZ2WlwWiySlBB5ZBIUD6sz4brPmUE1VQ45u6za0qaZv1y8WAe5chdz+4DDSfnJgpMx GEdx33abCYjK/p/6CEg073YjpM7CHe0LWCV78rnbXgwrRG48QYen3Fua51HM+ho4Gd9g jVyw== X-Gm-Message-State: AJIora8q3lJ8o70nwp8QdXcASvg0+Us2zpcuM6p7mWa9ZAYKKU5pgVi2 Yid5cfj3+HLtWgTTyXJuhvqXSQ== X-Google-Smtp-Source: AGRyM1tOH8d3OVFW/BBXrrR6QxzE14bSJgZAkzoNiFBCfwQi4JTAOX0ZJ+ZekRy0U8ZY0UKx4S4Z2w== X-Received: by 2002:adf:e9d1:0:b0:21d:b0f5:dd5 with SMTP id l17-20020adfe9d1000000b0021db0f50dd5mr5592208wrn.216.1657756399622; Wed, 13 Jul 2022 16:53:19 -0700 (PDT) Received: from smtpclient.apple (global-5-142.n-2.net.cam.ac.uk. [131.111.5.142]) by smtp.gmail.com with ESMTPSA id j23-20020a05600c1c1700b0039c747a1e8fsm3627511wms.7.2022.07.13.16.53.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jul 2022 16:53:18 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: git: 6368dcb29228 - main - bsdinstall hostname: Replace dialog with bsddialog From: Jessica Clarke In-Reply-To: <202205241220.24OCKshJ040104@gitrepo.freebsd.org> Date: Thu, 14 Jul 2022 00:53:17 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <6FF4C58E-A52C-446F-8DB0-C5EE708DBCEB@freebsd.org> References: <202205241220.24OCKshJ040104@gitrepo.freebsd.org> To: "Alfonso S. Siciliano" X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Rspamd-Queue-Id: 4LjvZn02F1z3dJJ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.51 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-2.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_DN_EQ_ADDR_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.51:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-main]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.51:from] X-ThisMailContainsUnwantedMimeParts: N On 24 May 2022, at 13:20, Alfonso S. Siciliano = wrote: >=20 > The branch main has been updated by asiciliano: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D6368dcb29228dd8e18d50c54c3ca1596= 262d4676 >=20 > commit 6368dcb29228dd8e18d50c54c3ca1596262d4676 > Author: Alfonso S. Siciliano > AuthorDate: 2022-05-24 12:04:24 +0000 > Commit: Alfonso S. Siciliano > CommitDate: 2022-05-24 12:20:22 +0000 >=20 > bsdinstall hostname: Replace dialog with bsddialog >=20 > Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog = utility. > Add --hline info because bsddialog requires TAB to switch the focus = on > buttons for an inputbox, dialog differs. This is quite infuriating and bad UI/UX, everyone knows you can just type and press enter at these kinds of dialogues, yet bsddialog = doesn=E2=80=99t support this. Are there any plans to address this shortcoming so bsddialog can work like every other dialogue box out there and how most users would expect? This is an unfortunate regression over (LGPL) dialog and I personally believe bsddialog should have been fixed rather than introducing this clunky experience to document the flaw. Jess > Delete f_dialog_inputbox_size() using libbsddialog autosizing. >=20 > Reviewed by: bapt > Differential Revision: https://reviews.freebsd.org/D35285 > --- > usr.sbin/bsdinstall/scripts/hostname | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) >=20 > diff --git a/usr.sbin/bsdinstall/scripts/hostname = b/usr.sbin/bsdinstall/scripts/hostname > index b151ef15c690..23adbe68ead0 100755 > --- a/usr.sbin/bsdinstall/scripts/hostname > +++ b/usr.sbin/bsdinstall/scripts/hostname > @@ -48,6 +48,8 @@ f_include $BSDCFG_SHARE/dialog.subr >=20 > ############################################################ GLOBALS >=20 > +: ${BSDDIALOG_CANCEL=3D1} > + > # > # Strings that should be moved to an i18n file and loaded with = f_include_lang() > # > @@ -71,21 +73,17 @@ SET_HOSTNAME=3D'hostname -s "%s"' > dialog_hostname() > { > local prompt=3D"$msg_please_choose_a_hostname" > - local hline=3D > + local hline=3D"Use TAB and Enter to select $msg_ok" > local value=3D"$*" >=20 > - local height width > - f_dialog_inputbox_size height width \ > - "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$prompt" "$value" = "$hline" > - > - $DIALOG \ > + bsddialog \ > --title "$DIALOG_TITLE" \ > --backtitle "$DIALOG_BACKTITLE" \ > --hline "$hline" \ > --ok-label "$msg_ok" \ > --no-cancel \ > --inputbox "$prompt" \ > - $height $width "$value" \ > + 0 56 "$value" \ > 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD > } >=20 > @@ -101,7 +99,7 @@ f_dialog_backtitle "$msg_freebsd_installer" > # Get user input > # > HOSTNAME=3D$( dialog_hostname "$HOSTNAME" ) > -[ $? -eq $DIALOG_CANCEL ] && exit 1 > +[ $? -eq $BSDDIALOG_CANCEL ] && exit 1 >=20 > # > # Store the user's choice