[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14/18: gurses: Cache the windows of buttons.
From: |
John Darrington |
Subject: |
14/18: gurses: Cache the windows of buttons. |
Date: |
Thu, 2 Feb 2017 18:13:05 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 89148e7694e8542a0d11e67f2fe4bcb96437e8a5
Author: John Darrington <address@hidden>
Date: Wed Feb 1 16:20:48 2017 +0100
gurses: Cache the windows of buttons.
* gurses/buttons.scm (<buttons>): New field: bwindows.
---
gurses/buttons.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gurses/buttons.scm b/gurses/buttons.scm
index 5afef38..a91b01f 100644
--- a/gurses/buttons.scm
+++ b/gurses/buttons.scm
@@ -35,15 +35,16 @@
#:use-module (srfi srfi-9))
(define-record-type <buttons>
- (make-buttons' items selected active-color)
+ (make-buttons' items bwindows selected active-color)
buttons?
(items buttons-items buttons-set-items!) ;; FIXME this need not be
here
+ (bwindows buttons-bwindows buttons-set-bwindows!)
(selected buttons-selected buttons-set-selected!)
(array buttons-array buttons-set-array!)
(active-color buttons-active-color))
(define (make-buttons items color)
- (make-buttons' items -1 color))
+ (make-buttons' items '() -1 color))
(define (buttons-n-buttons buttons)
(array-length (buttons-array buttons)))
@@ -147,6 +148,7 @@
(w (derwin win 3 width 0
(round (- (* (1+ i) (/ (getmaxx win) (1+ n)))
(/ width 2))) #:panel #f)))
+ (buttons-set-bwindows! buttons (cons w (buttons-bwindows
buttons)))
(box w 0 0)
(addchstr w label #:y 1 #:x 1)
(loop (cdr bl) (1+ i) (acons mark (list w key) alist)))))))))
- branch wip-installer updated (9ff399e -> 688f4f7), John Darrington, 2017/02/02
- 04/18: installer: Add optional arguments to addstr*., John Darrington, 2017/02/02
- 02/18: installer: New gettext keyword M_., John Darrington, 2017/02/02
- 01/18: installer: Avoid wpa_supplicant's output causing screen damage., John Darrington, 2017/02/02
- 05/18: installer: Main page: Redisplay translatable strings upon refresh., John Darrington, 2017/02/02
- 09/18: installer: Correct placement of gettext call., John Darrington, 2017/02/02
- 08/18: installer: Replace 'file-browser' with 'key-map'., John Darrington, 2017/02/02
- 06/18: installer: Use _ instead of M_ for host-name-refresh., John Darrington, 2017/02/02
- 14/18: gurses: Cache the windows of buttons.,
John Darrington <=
- 16/18: installer: New procedure key-value-slurp., John Darrington, 2017/02/02
- 18/18: installer: Fix bug when changing languages., John Darrington, 2017/02/02
- 07/18: installer: New page to select language., John Darrington, 2017/02/02
- 10/18: installer: Fix i18n in dialogs., John Darrington, 2017/02/02
- 17/18: installer: Provide verbose description of locale., John Darrington, 2017/02/02
- 03/18: installer: New file i18n.scm., John Darrington, 2017/02/02
- 11/18: installer: New convenience procedures., John Darrington, 2017/02/02
- 13/18: gurses: Avoid one use of car/cdr., John Darrington, 2017/02/02
- 15/18: gurses: Use match instead of car., John Darrington, 2017/02/02
- 12/18: installer: Improve i18n in ping page., John Darrington, 2017/02/02