[mcclim-cvs] CVS mcclim/Backends/gtkairo

dlichteblau dlichteblau at common-lisp.net
Mon Dec 25 19:41:46 UTC 2006


Update of /project/mcclim/cvsroot/mcclim/Backends/gtkairo
In directory clnet:/tmp/cvs-serv1435

Modified Files:
	gadgets.lisp 
Log Message:
Bugfix:

	* Backends/gtkairo/gadgets.lisp (UPDATE-SCROLL-BAR-ADJUSTMENT):
        Ignore unmirrored scroll bars.


--- /project/mcclim/cvsroot/mcclim/Backends/gtkairo/gadgets.lisp	2006/12/24 11:30:59	1.18
+++ /project/mcclim/cvsroot/mcclim/Backends/gtkairo/gadgets.lisp	2006/12/25 19:41:46	1.19
@@ -630,14 +630,15 @@
 ;; not a ratio but given in value units?  Why is min==max all the time?
 ;; And why doesn't this work! :-(
 (defun update-scrollbar-adjustment (sheet)
-  (with-gtk ()
-    (let* ((min (df (gadget-min-value sheet)))
-	   (value (df (gadget-value sheet)))
-	   (page-size (df (climi::scroll-bar-thumb-size sheet)))
-	   (max (+ (df (gadget-max-value sheet)) page-size)))
-      (gtk_range_set_adjustment
-       (mirror-widget (sheet-direct-mirror sheet))
-       (gtk_adjustment_new value min max 0.0d0 0.0d0 page-size)))))
+  (when (sheet-direct-mirror sheet)
+    (with-gtk ()
+      (let* ((min (df (gadget-min-value sheet)))
+	     (value (df (gadget-value sheet)))
+	     (page-size (df (climi::scroll-bar-thumb-size sheet)))
+	     (max (+ (df (gadget-max-value sheet)) page-size)))
+	(gtk_range_set_adjustment
+	 (mirror-widget (sheet-direct-mirror sheet))
+	 (gtk_adjustment_new value min max 0.0d0 0.0d0 page-size))))))
 
 (defmethod (setf gadget-min-value) :after (new-value (pane native-scrollbar))
   (declare (ignore new-value))




More information about the Mcclim-cvs mailing list