From nobody Mon Oct 16 12:09:56 2023 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 4S8GBs05k4z4xHlv; Mon, 16 Oct 2023 12:09:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S8GBr6clVz3ZYy; Mon, 16 Oct 2023 12:09:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697458196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JyR63E6fkVw7imjczn+TZAZC3beIqxZalAtlaW3G3Do=; b=KzYLcAPB0imcU5uMn1mz2qSyvZKuY9495naxo+QBc+qUv6YsZZ0XpInocrXtiSHaoY/iv1 QEARTIBb7owm36zQ14pLZONgPAFZs9TPOMna2XMR2jQf2HCoRwtWhC+SyGodsE5ucrKVeo W1sA53Vu3yVTokg91OeiDHNFifywIs9ltlV/k6c1WPvX0dMtZ492/8sVKDzflX0hNzOynh 3UHyh+eV3UlbS3Ne5B+KvZ2BhuPA1XK7YOyLwXSdXJTLTKeMnqWVJDVk261GfGHUYNBjIe J5GBJjQs6CUSCoVCvqR/yuwT/9hb8m7iWNwMQTiVssPOq8djNrnyxwx7uUzIIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697458196; a=rsa-sha256; cv=none; b=dYuF+QQgWhXsoGiasUrPdlp4KHM6fvaEK4wqRJ5Fnx7/9l+L6OfhpKWMDHKpWHFvCbop6z 6O/eCgQ7+K3JHpy/kQ6qwRhndajZEH7SamVm4qriUrRUjNLZsLPGsx0OiybSMuQJysYT9O MTJ5L6U9PWLGnfvDJk3DmTHpVwi72RWEsNFV+xZPbQ80HB79n5RSFY0090QwhyQNK3J3he fKo8VFTFd98RVwDS2/2E+MXNpoMCfFyq+7s/MIxnTjocUuc2XImdhGK7Hx5JpshM0Wohpf aNQEv1ni6em7vlXtIeJefwsjYxbN5rXCMrudjuHFXIQ6USNyDhZ4T3OA8GHo5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697458196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JyR63E6fkVw7imjczn+TZAZC3beIqxZalAtlaW3G3Do=; b=WRlcS6jcnYPXjUtlGeYFWF3JWcAqvFTEdGubtxyQ8VEAP5mV4zbPvF4WUKtSoCT/r93MnE 0uWzBczd8mS5o6d9Q2MXAgh00TX63YfNY8fTu5GftMRpkUv86bD57jg787aUClbFWNyI3j a8lUQ7KTkyCz2TAnO/8hKXFAKYDVE1B9Yo/CoZmvyUfOTeDIvKaVtw9aHAHdxQnSBH1g8R amPN5kAF/bkKHGeWnW0gt8hVuDfNsuCPmySX8lcOv5dkqw17z+BnifAh5amIr73rmDu546 TqAE1I47DK5h2A+tM65G0ShcMYrTSTrXPmuFt5RS7uddqA6HjSNqyUYKqwQ9AQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8GBr5frmzfYP; Mon, 16 Oct 2023 12:09:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39GC9u6X038065; Mon, 16 Oct 2023 12:09:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GC9uSf038062; Mon, 16 Oct 2023 12:09:56 GMT (envelope-from git) Date: Mon, 16 Oct 2023 12:09:56 GMT Message-Id: <202310161209.39GC9uSf038062@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfonso S. Siciliano" Subject: git: 7ef6e99752db - main - sade: Restore UI behavior like dialog(3) 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asiciliano X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ef6e99752db3c0fc7953a039050881c068b43fe Auto-Submitted: auto-generated The branch main has been updated by asiciliano: URL: https://cgit.FreeBSD.org/src/commit/?id=7ef6e99752db3c0fc7953a039050881c068b43fe commit 7ef6e99752db3c0fc7953a039050881c068b43fe Author: Alfonso S. Siciliano AuthorDate: 2023-10-16 12:06:06 +0000 Commit: Alfonso S. Siciliano CommitDate: 2023-10-16 12:06:06 +0000 sade: Restore UI behavior like dialog(3) Restore UI behavior like previous disk menu implementation built on dialog(3): * Buttons of Create and Modify forms always active to close the dialogs just pressing Enter. * Disk menu indentation. --- usr.sbin/bsdinstall/partedit/diskmenu.c | 8 ++++---- usr.sbin/bsdinstall/partedit/gpart_ops.c | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/diskmenu.c b/usr.sbin/bsdinstall/partedit/diskmenu.c index f87c7714e5a7..55ef5a200658 100644 --- a/usr.sbin/bsdinstall/partedit/diskmenu.c +++ b/usr.sbin/bsdinstall/partedit/diskmenu.c @@ -48,14 +48,14 @@ diskmenu_show(const char *title, const char *text, struct partedit_item *items, for (i = 0; i < nitems; i++) { bsditems[i].prefix = ""; bsditems[i].on = false; - bsditems[i].depth = items[i].indentation; + bsditems[i].depth = 2 * items[i].indentation; /* old menu sets max namelen to 10 */ bsditems[i].name = items[i].name; humanize_number(size, 7, items[i].size, "B", HN_AUTOSCALE, HN_DECIMAL); mp = items[i].mountpoint != NULL ? items[i].mountpoint : ""; - asprintf(__DECONST(char**, &bsditems[i].desc), "%s %-15s %-10s", - size, items[i].type, mp); + asprintf(__DECONST(char**, &bsditems[i].desc), + " %-9s %-15s %s", size, items[i].type, mp); bsditems[i].bottomdesc = ""; } @@ -86,5 +86,5 @@ diskmenu_show(const char *title, const char *text, struct partedit_item *items, free((char *)bsditems[i].desc); free(bsditems); - return output; + return (output); } diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c index 92d1a367890c..b1d4d0f23315 100644 --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c @@ -639,8 +639,10 @@ gpart_edit(struct gprovider *pp) items[1].init = sizestr; editpart: + conf.button.always_active = true; conf.title = "Edit Partition"; choice = bsddialog_form(&conf, "", 0, 0, 0, nitems, items, NULL); + conf.button.always_active = false; if (choice == BSDDIALOG_CANCEL) goto endedit; @@ -1128,10 +1130,12 @@ addpartform: if (interactive) { conf.button.with_extra = true; conf.button.extra_label = "Options"; + conf.button.always_active = true; conf.title = "Add Partition"; choice = bsddialog_form(&conf, "", 0, 0, 0, nitems, items, NULL); conf.button.with_extra = false; conf.button.extra_label = NULL; + conf.button.always_active = false; switch (choice) { case BSDDIALOG_OK: break;