[mcclim-cvs] CVS mcclim/Drei
thenriksen
thenriksen at common-lisp.net
Sat Nov 18 20:59:28 UTC 2006
Update of /project/mcclim/cvsroot/mcclim/Drei
In directory clnet:/tmp/cvs-serv24084/Drei
Modified Files:
input-editor.lisp drei.lisp drei-clim.lisp
Log Message:
Fixed slight redisplay issue with minibuffer and cleared up a bit of
general output code. Also moved the use of `accepting-from-user' macro
so that command arguments will be evaluated within its scope. This
also means that it is the responsibility of the Drei variant to use it
if needed.
--- /project/mcclim/cvsroot/mcclim/Drei/input-editor.lisp 2006/11/17 20:18:56 1.4
+++ /project/mcclim/cvsroot/mcclim/Drei/input-editor.lisp 2006/11/18 20:59:28 1.5
@@ -375,17 +375,18 @@
;; We narrow the buffer to the input position, so the user won't
;; be able to erase the original command (when entering command
;; arguments) or stuff like argument prompts.
- (drei-core:with-narrowed-buffer (drei (input-position stream) t t)
- (handler-case (process-gestures-or-command drei)
- (unbound-gesture-sequence (c)
- (display-message "~A is unbound" (gesture-name (gestures c))))
- (abort-gesture (c)
- (if (member (abort-gesture-event c)
- *abort-gestures*
- :test #'event-matches-gesture-name-p)
- (signal 'abort-gesture :event (abort-gesture-event c))
- (when was-directly-processing
- (display-message "Aborted"))))))
+ (accepting-from-user (drei)
+ (drei-core:with-narrowed-buffer (drei (input-position stream) t t)
+ (handler-case (process-gestures-or-command drei)
+ (unbound-gesture-sequence (c)
+ (display-message "~A is unbound" (gesture-name (gestures c))))
+ (abort-gesture (c)
+ (if (member (abort-gesture-event c)
+ *abort-gestures*
+ :test #'event-matches-gesture-name-p)
+ (signal 'abort-gesture :event (abort-gesture-event c))
+ (when was-directly-processing
+ (display-message "Aborted")))))))
;; Will also take care of redisplaying minibuffer.
(display-drei drei)
(let ((first-mismatch (mismatch before (stream-input-buffer stream))))
--- /project/mcclim/cvsroot/mcclim/Drei/drei.lisp 2006/11/17 20:18:56 1.6
+++ /project/mcclim/cvsroot/mcclim/Drei/drei.lisp 2006/11/18 20:59:28 1.7
@@ -806,6 +806,5 @@
:update-syntax t
:with-undo t)
(handling-drei-conditions
- (accepting-from-user (drei)
- (apply (command-name command) (command-arguments command)))
+ (apply (command-name command) (command-arguments command))
(setf (previous-command drei) command))))))
--- /project/mcclim/cvsroot/mcclim/Drei/drei-clim.lisp 2006/11/17 20:18:56 1.7
+++ /project/mcclim/cvsroot/mcclim/Drei/drei-clim.lisp 2006/11/18 20:59:28 1.8
@@ -257,22 +257,18 @@
;; It is important that the minibuffer of the Drei object is
;; actually the minibuffer that will be used for output, or it
;; will not be properly redisplayed by `display-drei'.
- (letf (((minibuffer drei) (or (minibuffer drei) *minibuffer*)))
- (handler-case (process-gesture drei gesture)
- (unbound-gesture-sequence (c)
- (display-message "~A is unbound" (gesture-name (gestures c))))
- (abort-gesture ()
- (display-message "Aborted"))))))
-
-(defmethod execute-drei-command :around ((drei drei-gadget-pane) command)
- (with-accessors ((buffer buffer)) drei
- (let* ((*minibuffer* (or *minibuffer*
- (unless (eq drei *standard-input*)
- *standard-input*))))
- (call-next-method))
- (redisplay-frame-pane (pane-frame drei) drei)
- (when (modified-p buffer)
- (clear-modify buffer))))
+ (accepting-from-user (drei)
+ (letf (((minibuffer drei) (or (minibuffer drei) *minibuffer*
+ (unless (eq drei *standard-input*)
+ *standard-input*))))
+ (handler-case (process-gesture drei gesture)
+ (unbound-gesture-sequence (c)
+ (display-message "~A is unbound" (gesture-name (gestures c))))
+ (abort-gesture ()
+ (display-message "Aborted")))
+ (display-drei drei)
+ (when (modified-p (buffer drei))
+ (clear-modify (buffer drei)))))))
(defmethod execute-drei-command :after ((drei drei-gadget-pane) command)
(with-accessors ((buffer buffer)) drei
@@ -359,9 +355,10 @@
a minibuffer."))
(defmethod display-drei :after ((drei drei))
- (with-accessors ((minibuffer minibuffer)) drei
- (when (and minibuffer (not (eq minibuffer (editor-pane drei))))
- (redisplay-frame-pane (pane-frame minibuffer) minibuffer))))
+ (when (and *minibuffer* (not (eq *minibuffer* (editor-pane drei))))
+ ;; We need to use :force-p t to remove any existing output from
+ ;; the pane.
+ (redisplay-frame-pane (pane-frame *minibuffer*) *minibuffer* :force-p t)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
More information about the Mcclim-cvs
mailing list