[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: installer: Handle case when a page has no menu in mouse event han
From: |
Danny Milosavljevic |
Subject: |
01/01: installer: Handle case when a page has no menu in mouse event handler. |
Date: |
Fri, 7 Jul 2017 10:14:40 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit 0a4280197d2386c8f0f9ab6d2f0100d5f0f60612
Author: Danny Milosavljevic <address@hidden>
Date: Fri Jul 7 16:13:44 2017 +0200
installer: Handle case when a page has no menu in mouse event handler.
* gnu/system/installer/page.scm (page-default-mouse-handler): Handle case
when menu is #f.
---
gnu/system/installer/page.scm | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/gnu/system/installer/page.scm b/gnu/system/installer/page.scm
index 5a612b7..2572591 100644
--- a/gnu/system/installer/page.scm
+++ b/gnu/system/installer/page.scm
@@ -63,19 +63,20 @@
(define (page-default-mouse-handler page device-id x y z button-state)
(let* ((menu (page-datum page 'menu))
(buttons (page-datum page 'navigation))
- (status (or (let ((status (std-menu-mouse-handler menu device-id x y
z button-state)))
- (match status
- (('menu-item-activated x)
- (list 'menu-item-activated x))
- (_ #f)))
+ (status (or (let ((status (and menu (std-menu-mouse-handler menu
device-id x y z button-state))))
+ (match status
+ (('menu-item-activated x)
+ (list 'menu-item-activated x))
+ (_ #f)))
(if buttons
- (match
(buttons-mouse-handler buttons device-id x y z button-state)
- (#f #f)
- ('ignored #f)
- (x
- ;(if menu
- ; (menu-set-active!
menu #f))
- x))))))
+ (match (buttons-mouse-handler buttons device-id x y z
button-state)
+ (#f #f)
+ ('ignored #f)
+ (x
+ (display x)
+ ;(if menu
+ ; (menu-set-active! menu #f))
+ x))))))
(if status
(begin
(page-activate-item page status)