[mcclim-cvs] CVS mcclim/Drei

thenriksen thenriksen at common-lisp.net
Fri Nov 10 18:39:46 UTC 2006


Update of /project/mcclim/cvsroot/mcclim/Drei
In directory clnet:/tmp/cvs-serv21845/Drei

Modified Files:
	drei-clim.lisp 
Log Message:
:editable-p handling was moved to the `drei' class. We need to disable
read-only status in `(setf gadget-value)'.


--- /project/mcclim/cvsroot/mcclim/Drei/drei-clim.lisp	2006/11/10 16:46:51	1.3
+++ /project/mcclim/cvsroot/mcclim/Drei/drei-clim.lisp	2006/11/10 18:39:45	1.4
@@ -297,9 +297,12 @@
 
 (defmethod (setf gadget-value) (new-value (gadget drei-gadget-pane)
                                 &key (invoke-callback t))
-  (performing-drei-operations (gadget :with-undo nil :redisplay nil)
-    (delete-buffer-range (buffer gadget) 0 (size (buffer gadget)))
-    (insert-buffer-sequence (buffer gadget) 0 new-value))
+  ;; I think we're supposed to permit this, even if the buffer is
+  ;; non-editable.
+  (letf (((read-only-p (buffer gadget)) nil))
+    (performing-drei-operations (gadget :with-undo nil :redisplay nil)
+      (delete-buffer-range (buffer gadget) 0 (size (buffer gadget)))
+      (insert-buffer-sequence (buffer gadget) 0 new-value)))
   (when invoke-callback
     (value-changed-callback gadget
                             (gadget-client gadget)
@@ -446,7 +449,7 @@
                                    &rest args &key
                                    (syntax nil) (initial-contents "")
                                    (minibuffer t) (border-width 1)
-                                   (scroll-bars :horizontal) (editable-p t)
+                                   (scroll-bars :horizontal)
                                    (drei-class 'drei-gadget-pane))
   (check-type initial-contents array)
   (check-type border-width integer)
@@ -464,8 +467,8 @@
            (drei-pane (apply #'make-pane-1 fm frame drei-class
                              :minibuffer minibuffer-pane args))
            (pane drei-pane))
-      (insert-sequence (point drei-pane) initial-contents)
-      (setf (read-only-p (buffer drei-pane)) (not editable-p))
+      (letf (((read-only-p (buffer drei-pane)) nil))
+        (insert-sequence (point drei-pane) initial-contents))
       (if syntax
           (setf (syntax (buffer drei-pane))
                 (make-instance (or (when (syntaxp syntax)




More information about the Mcclim-cvs mailing list