Quality of life changes, "exception" handling
This commit is contained in:
parent
f89bed316c
commit
11eae06995
24
scmvm.scm
24
scmvm.scm
@ -28,7 +28,8 @@ exec guile -L . -e main -s "$0" "$@"
|
||||
"EventControllerKey"
|
||||
"FileDialog"
|
||||
"Frame"
|
||||
"Label")))
|
||||
"Label"
|
||||
"TextView")))
|
||||
|
||||
(define *css* "
|
||||
.mono {
|
||||
@ -86,7 +87,11 @@ exec guile -L . -e main -s "$0" "$@"
|
||||
(define (open-file win cb)
|
||||
(define dialog (make <gtk-file-dialog>))
|
||||
(define (cb-with-port dialog result data)
|
||||
(call-with-input-file (get-path (open-finish dialog result)) cb))
|
||||
(catch #t
|
||||
(lambda ()
|
||||
(let ([path (open-finish dialog result)])
|
||||
(displayln path)))
|
||||
noop))
|
||||
(open dialog win #f cb-with-port #f))
|
||||
|
||||
(define (install-action action-group name callback)
|
||||
@ -140,8 +145,19 @@ exec guile -L . -e main -s "$0" "$@"
|
||||
(grab-focus frame)
|
||||
(update-memory-view!)
|
||||
|
||||
(append box (make <gtk-button>))
|
||||
(append box (make <gtk-button>))
|
||||
;; Program view? (no disassembler atm...)
|
||||
(define program-view (make <gtk-text-view>
|
||||
#:vexpand #t
|
||||
#:editable #f))
|
||||
(append box program-view)
|
||||
|
||||
(define button-box (make <gtk-box>
|
||||
#:orientation 'horizontal))
|
||||
(append button-box (make <gtk-button>
|
||||
#:label "Step"))
|
||||
(append button-box (make <gtk-button>
|
||||
#:label "Finish"))
|
||||
(append box button-box)
|
||||
|
||||
;; Present window
|
||||
(present win))
|
||||
|
Loading…
Reference in New Issue
Block a user