[gsharp-cvs] CVS update: gsharp/esa.lisp gsharp/gui.lisp gsharp/packages.lisp
Christophe Rhodes
crhodes at common-lisp.net
Mon Nov 14 14:27:33 UTC 2005
Update of /project/gsharp/cvsroot/gsharp
In directory common-lisp.net:/tmp/cvs-serv22545
Modified Files:
esa.lisp gui.lisp packages.lisp
Log Message:
Sync esa with climacs.
Implement FIND-APPLICABLE-COMMAND-TABLE.
Date: Mon Nov 14 15:27:32 2005
Author: crhodes
Index: gsharp/esa.lisp
diff -u gsharp/esa.lisp:1.9 gsharp/esa.lisp:1.10
--- gsharp/esa.lisp:1.9 Thu Nov 3 15:59:23 2005
+++ gsharp/esa.lisp Mon Nov 14 15:27:32 2005
@@ -215,7 +215,7 @@
('menu-item)
(object)
(with-input-context
- (`(command :command-table ,(command-table (car (windows frame)))))
+ (`(command :command-table ,command-table))
(object)
(let ((gestures '()))
(multiple-value-bind (numarg numargp)
@@ -263,6 +263,11 @@
(car command)
command)))
+(defgeneric find-applicable-command-table (frame))
+
+(defmethod find-applicable-command-table ((frame esa-frame-mixin))
+ (command-table (car (windows frame))))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Top level
@@ -281,12 +286,12 @@
do (restart-case
(progn
(handler-case
- (progn
+ (let ((command-table (find-applicable-command-table frame)))
;; for presentation-to-command-translators,
;; which are searched for in
;; (frame-command-table *application-frame*)
- (setf (frame-command-table frame) (command-table (car (windows frame))))
- (process-gestures-or-command frame (command-table (car (windows frame)))))
+ (setf (frame-command-table frame) command-table)
+ (process-gestures-or-command frame command-table))
(abort-gesture () (display-message "Quit")))
(redisplay-frame-panes frame))
(return-to-esa () nil))))))
Index: gsharp/gui.lisp
diff -u gsharp/gui.lisp:1.41 gsharp/gui.lisp:1.42
--- gsharp/gui.lisp:1.41 Thu Nov 10 18:37:16 2005
+++ gsharp/gui.lisp Mon Nov 14 15:27:32 2005
@@ -423,12 +423,12 @@
(declare (ignore string))
(if success layer (error 'no-such-layer))))
-(defmethod select-layer :after (cursor (layer layer))
- (typecase layer
- (lyrics-layer (setf (command-table (first (windows *application-frame*)))
- (find-command-table 'total-lyrics-table)))
- (melody-layer (setf (command-table (first (windows *application-frame*)))
- (find-command-table 'total-melody-table)))))
+(defmethod find-applicable-command-table ((frame gsharp))
+ (let* ((layer (layer (cursor *application-frame*))))
+ ;; F-A-C-T-WITH-LAYER?
+ (typecase layer
+ (lyrics-layer (find-command-table 'total-lyrics-table))
+ (melody-layer (find-command-table 'total-melody-table)))))
(define-gsharp-command (com-select-layer :name t) ()
(let ((selected-layer (accept 'layer :prompt "Select layer")))
Index: gsharp/packages.lisp
diff -u gsharp/packages.lisp:1.26 gsharp/packages.lisp:1.27
--- gsharp/packages.lisp:1.26 Mon Nov 7 21:00:52 2005
+++ gsharp/packages.lisp Mon Nov 14 15:27:32 2005
@@ -138,7 +138,8 @@
#:esa-top-level #:simple-command-loop
#:global-esa-table #:keyboard-macro-table
#:help-table
- #:set-key))
+ #:set-key
+ #:find-applicable-command-table))
(defpackage :score-pane
(:use :clim :clim-extensions :clim-lisp :sdl :esa)
More information about the Gsharp-cvs
mailing list