From patchwork Wed Nov 9 21:56:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 44414 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B1E7127BBEA; Wed, 9 Nov 2022 21:58:25 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2812427BBE9 for ; Wed, 9 Nov 2022 21:58:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ost5B-0006AB-Ef; Wed, 09 Nov 2022 16:58:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ost5A-00069Q-1a for guix-patches@gnu.org; Wed, 09 Nov 2022 16:58:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ost59-0004Tl-PD for guix-patches@gnu.org; Wed, 09 Nov 2022 16:58:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ost59-0003jT-LJ for guix-patches@gnu.org; Wed, 09 Nov 2022 16:58:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59003] [PATCH v2 5/6] installer: Error page width is parameterized. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 09 Nov 2022 21:58:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59003 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59003@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 59003-submit@debbugs.gnu.org id=B59003.166803103414240 (code B ref 59003); Wed, 09 Nov 2022 21:58:03 +0000 Received: (at 59003) by debbugs.gnu.org; 9 Nov 2022 21:57:14 +0000 Received: from localhost ([127.0.0.1]:41196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ost4L-0003hV-El for submit@debbugs.gnu.org; Wed, 09 Nov 2022 16:57:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ost4F-0003gJ-Qt for 59003@debbugs.gnu.org; Wed, 09 Nov 2022 16:57:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ost49-00018i-87; Wed, 09 Nov 2022 16:57:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=rkLskT/IaHJ17csRUttX0XBeudbtAZHJtaiN0Rl1SVw=; b=VXjOwNILlMGVWsdhB+Rk c8AqYZsPXAHg/8NMDuRfqfH2hRn5+sG6pDbZANX7EC2v8T7EoXXcw7lyRr8BZVy9IngvNeHqfh3s4 u5vsHvJCPaOZBFcyxEHPdfD1az0K32BgRomlM78eMZUVEi08/k4hzbI1xpFeXWgPkD/cczWm0CBoo 4P8mVHHh0+3aA99tSHxdlkFW9XMWsdI8vZoofPYNvHPmOGhEStv/VAjcxVriS5VxwEWCEW6KbhdMG ew5fLhNdyBfQHFInCceYMKC/9BPRvRGHQSVk0epeBxrGHZl6YUaKfu4KFG9nGQ9GeNDK8/Q51z0BD QheP4SXI4FsXTw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ost48-0000ES-RP; Wed, 09 Nov 2022 16:57:01 -0500 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 9 Nov 2022 22:56:36 +0100 Message-Id: <20221109215637.22445-6-ludo@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221109215637.22445-1-ludo@gnu.org> References: <20221103191756.16265-1-ludo@gnu.org> <20221109215637.22445-1-ludo@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/installer/newt/page.scm (run-error-page): Add #:width and honor it. --- gnu/installer/newt/page.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/installer/newt/page.scm b/gnu/installer/newt/page.scm index 0f508a31c0..e1623a51fd 100644 --- a/gnu/installer/newt/page.scm +++ b/gnu/installer/newt/page.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Mathieu Othacehe -;;; Copyright © 2019, 2020 Ludovic Courtès +;;; Copyright © 2019, 2020, 2022 Ludovic Courtès ;;; Copyright © 2019 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. @@ -278,12 +278,12 @@ (define* (run-input-page text title (destroy-form-and-pop form) input)))))))) -(define (run-error-page text title) - "Run a page to inform the user of an error. The page contains the given TEXT -to explain the error and an \"OK\" button to acknowledge the error. The title -of the page is set to TITLE." +(define* (run-error-page text title #:key (width 40)) + "Run a page to inform the user of an error. The page is WIDTH column wide +and contains the given TEXT to explain the error and an \"OK\" button to +acknowledge the error. The title of the page is set to TITLE." (let* ((text-box - (make-reflowed-textbox -1 -1 text 40 + (make-reflowed-textbox -1 -1 text width #:flags FLAG-BORDER)) (grid (make-grid 1 2)) (ok-button (make-button -1 -1 "OK"))