[cells-cvs] CVS cells-gtk3/cells-gtk/test-gtk
phildebrandt
phildebrandt at common-lisp.net
Wed Apr 16 14:41:30 UTC 2008
Update of /project/cells/cvsroot/cells-gtk3/cells-gtk/test-gtk
In directory clnet:/tmp/cvs-serv26095/cells-gtk/test-gtk
Modified Files:
test-buttons.lisp test-display.lisp
Log Message:
Testing with-widget.
--- /project/cells/cvsroot/cells-gtk3/cells-gtk/test-gtk/test-buttons.lisp 2008/04/14 16:43:48 1.2
+++ /project/cells/cvsroot/cells-gtk3/cells-gtk/test-gtk/test-buttons.lisp 2008/04/16 14:41:30 1.3
@@ -5,13 +5,16 @@
(:default-initargs
:kids (c? (the-kids
(mk-label :text (c? (format nil "Toggled button active = ~a"
- (widget-value :toggled-button))))
+ (with-widget (w :toggled-button)
+ (trc "calculating toggled button" w (value w))
+ (value w)))))
(mk-hseparator)
(mk-label :text (c? (format nil "Check button checked = ~a"
(widget-value :check-button))))
(mk-hseparator)
(mk-label :text (c? (format nil "Radio button selected = ~a"
- (widget-value :radio-group))))
+ (with-widget (w :radio-group)
+ (value w)))))
(mk-hseparator)
(mk-label :text (c? (format nil "Button clicked ~a times"
(nclics (upper self test-buttons))))
--- /project/cells/cvsroot/cells-gtk3/cells-gtk/test-gtk/test-display.lisp 2008/04/14 16:43:48 1.2
+++ /project/cells/cvsroot/cells-gtk3/cells-gtk/test-gtk/test-display.lisp 2008/04/16 14:41:30 1.3
@@ -6,56 +6,57 @@
(:default-initargs ;; g_timeout_add a function that will move the bar until the "Pulse" toggle is false.
:value (c? (with-widget-value (val :pulse)
(with-widget-value (timeout :timeout)
- (timeout-add timeout
- (lambda ()
- (with-widget (pbar :pbar2)
- (pulse pbar))
- (widget-value :pulse))))))
+ (trc "ADDING TIMEOUT")
+ (timeout-add timeout
+ (lambda ()
+ (with-widget (pbar :pbar2)
+ (pulse pbar))
+ (widget-value :pulse))))))
:expand t :fill t
:kids (kids-list?
(mk-hbox
:kids (loop for icon-size in '(:menu :small-toolbar :large-toolbar :button :dnd :dialog)
- collect (mk-image :stock :harddisk :icon-size icon-size)
- collect (mk-image :stock :my-g :icon-size icon-size)))
+ collect (mk-image :stock :harddisk :icon-size icon-size)
+ collect (mk-image :stock :my-g :icon-size icon-size)))
(mk-hseparator)
(mk-aspect-frame
:ratio 1
:kids (kids-list?
(mk-image :width 200 :height 250
- :filename (namestring *tst-image*))))
+ :filename (namestring *tst-image*))))
(mk-hseparator)
(mk-hbox
:kids (kids-list?
(mk-progress-bar :md-name :pbar
- :fraction (c? (widget-value :fraction-value 1)))
+ :fraction (c? (widget-value :fraction-value 1)))
(mk-hscale :md-name :fraction-value
- :value-type 'single-float
- :min 0 :max 1
- :step 0.01
- :init 0.5)
+ :value-type 'single-float
+ :min 0 :max 1
+ :step 0.01
+ :init 0.5)
(mk-button :label "Show in status bar"
- :on-clicked
- (callback (widget event data)
- (with-widget (w :statusbar)
- (push-message w (format nil "~a" (fraction (fm-other :pbar)))))))))
+ :on-clicked
+ (callback (widget event data)
+ (with-widget (w :statusbar)
+ (push-message w (format nil "~a" (fraction (fm-other :pbar)))))))))
(mk-hbox
:kids (kids-list?
(mk-progress-bar :md-name :pbar2
- :pulse-step (c? (widget-value :step .1))
- :fraction (c-in .1))
+ :pulse-step (c? (widget-value :step .1))
+ :fraction (c-in .1))
(mk-toggle-button :md-name :pulse :label "Pulse")
(mk-label :text "Interval")
(mk-spin-button :md-name :timeout
- :sensitive (c? (not (widget-value :pulse)))
- :min 10 :max 1000
- :init 100)
+ :sensitive (c? (not (widget-value :pulse)))
+ :min 10 :max 1000
+ :init 100)
(mk-label :text "Pulse step")
(mk-spin-button :md-name :step
- :value-type 'single-float
- :min 0.01 :max 1 :step 0.01
- :init 0.1)
+ :value-type 'single-float
+ :min 0.01 :max 1 :step 0.01
+ :init 0.1)
(mk-image :md-name :pulse-image
- :stock (c? (if (widget-value :pulse) :yes :no)))))
+ :stock (c? (if (widget-value :pulse) :yes :no)))))
(mk-alignment
:expand t :fill t
:xalign 0 :yalign 1
More information about the Cells-cvs
mailing list