From: Dmitry Kalyanov Date: Tue, 12 May 2009 13:33:54 +0000 (+0400) Subject: Change gtk-demo:test-notebook X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;ds=inline;h=c7066267e3baedd05b2a394f5b2dbdf2246278c7;p=cl-gtk2.git Change gtk-demo:test-notebook --- diff --git a/gtk/gtk.demo.lisp b/gtk/gtk.demo.lisp index 8c52342..57f38b1 100644 --- a/gtk/gtk.demo.lisp +++ b/gtk/gtk.demo.lisp @@ -456,7 +456,15 @@ (iter (for i from 0 to 5) (for page = (make-instance 'label :label (format nil "Label for page ~A" i))) (for tab-label = (make-instance 'label :label (format nil "Tab ~A" i))) - (for tab-button = (make-instance 'button :use-stock t :label "gtk-close" :relief :none)) + (for tab-button = (make-instance 'button + :image (make-instance 'image :stock "gtk-close" :icon-size 1) + :relief :none)) + (g-signal-connect tab-button "clicked" + (let ((page page)) + (lambda (button) + (declare (ignore button)) + (format t "Removing page ~A~%" page) + (notebook-remove-page notebook page)))) (for tab-hbox = (make-instance 'h-box)) (box-pack-start tab-hbox tab-label) (box-pack-start tab-hbox tab-button)