Quality of life changes, "exception" handling
This commit is contained in:
parent
f89bed316c
commit
11eae06995
26
scmvm.scm
26
scmvm.scm
@ -28,7 +28,8 @@ exec guile -L . -e main -s "$0" "$@"
|
|||||||
"EventControllerKey"
|
"EventControllerKey"
|
||||||
"FileDialog"
|
"FileDialog"
|
||||||
"Frame"
|
"Frame"
|
||||||
"Label")))
|
"Label"
|
||||||
|
"TextView")))
|
||||||
|
|
||||||
(define *css* "
|
(define *css* "
|
||||||
.mono {
|
.mono {
|
||||||
@ -86,7 +87,11 @@ exec guile -L . -e main -s "$0" "$@"
|
|||||||
(define (open-file win cb)
|
(define (open-file win cb)
|
||||||
(define dialog (make <gtk-file-dialog>))
|
(define dialog (make <gtk-file-dialog>))
|
||||||
(define (cb-with-port dialog result data)
|
(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))
|
(open dialog win #f cb-with-port #f))
|
||||||
|
|
||||||
(define (install-action action-group name callback)
|
(define (install-action action-group name callback)
|
||||||
@ -139,9 +144,20 @@ exec guile -L . -e main -s "$0" "$@"
|
|||||||
(append box frame)
|
(append box frame)
|
||||||
(grab-focus frame)
|
(grab-focus frame)
|
||||||
(update-memory-view!)
|
(update-memory-view!)
|
||||||
|
|
||||||
(append box (make <gtk-button>))
|
;; Program view? (no disassembler atm...)
|
||||||
(append box (make <gtk-button>))
|
(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 window
|
||||||
(present win))
|
(present win))
|
||||||
|
Loading…
Reference in New Issue
Block a user