[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
163/197: gurses: Cache the windows of buttons.
From: |
Danny Milosavljevic |
Subject: |
163/197: gurses: Cache the windows of buttons. |
Date: |
Mon, 3 Jul 2017 20:37:18 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit da97a2341f837bdf4f5bdac6ddd42ade408880be
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)))))))))
- 131/197: gurses: Use inverse instead of underline for field value area., (continued)
- 131/197: gurses: Use inverse instead of underline for field value area., Danny Milosavljevic, 2017/07/03
- 133/197: installer: Change livery., Danny Milosavljevic, 2017/07/03
- 146/197: gurses: Use match instead of car/cdr in line-split., Danny Milosavljevic, 2017/07/03
- 147/197: gurses: In paragraph-format avoid use of car and cdr., Danny Milosavljevic, 2017/07/03
- 144/197: gurses: Avoid one more use of car and cdr., Danny Milosavljevic, 2017/07/03
- 143/197: gurses: Add predicate to test if a complex char is blank., Danny Milosavljevic, 2017/07/03
- 149/197: gurses: Add new procedure "word-endings"., Danny Milosavljevic, 2017/07/03
- 155/197: installer: Use _ instead of M_ for host-name-refresh., Danny Milosavljevic, 2017/07/03
- 160/197: installer: New convenience procedures., Danny Milosavljevic, 2017/07/03
- 158/197: installer: Correct placement of gettext call., Danny Milosavljevic, 2017/07/03
- 163/197: gurses: Cache the windows of buttons.,
Danny Milosavljevic <=
- 172/197: gurses: Update the cursor position when posting the form., Danny Milosavljevic, 2017/07/03
- 165/197: installer: New procedure key-value-slurp., Danny Milosavljevic, 2017/07/03
- 175/197: gurses: Don't crash if asked for an item by an invalid index., Danny Milosavljevic, 2017/07/03
- 171/197: installer: New page to edit user accounts., Danny Milosavljevic, 2017/07/03
- 187/197: installer: Add procudure for starting a wireless interface., Danny Milosavljevic, 2017/07/03
- 192/197: installer: Only build if guile-ncurses is available., Danny Milosavljevic, 2017/07/03
- 68/197: installer: Add new page to set the system role., Danny Milosavljevic, 2017/07/03
- 117/197: installer: Remove unnecessary "begin"., Danny Milosavljevic, 2017/07/03
- 113/197: installer: Explicitly set the #:panel parameter for window creation procedures., Danny Milosavljevic, 2017/07/03
- 122/197: gurses: Populate the choices box in forms., Danny Milosavljevic, 2017/07/03