X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=gtk%2Fgtk.dialog.example.lisp;h=b7bfbd03e2f2a4a94b2c1d4d90cd17f0f6369d29;hb=eadf2b7a4f39e93b50debf05a0925786615564d7;hp=e9647e31af8c3d321caa13d2c07854afe7e30c0c;hpb=0d03b82a77743d2ea5ef69bea08735fa12857d92;p=cl-gtk2.git diff --git a/gtk/gtk.dialog.example.lisp b/gtk/gtk.dialog.example.lisp index e9647e3..b7bfbd0 100644 --- a/gtk/gtk.dialog.example.lisp +++ b/gtk/gtk.dialog.example.lisp @@ -3,9 +3,8 @@ (defun test-dialog () (let ((window (make-instance 'gtk-window :type :toplevel :title "Testing dialogs")) (v-box (make-instance 'v-box))) - (g-signal-connect window "destroy" (lambda (w) (declare (ignore w)) (gtk-main-quit))) + (g-signal-connect window "destroy" (lambda (w) (declare (ignore w)) (leave-gtk-main))) (container-add window v-box) - (let ((button (make-instance 'button :label "Dialog 1"))) (box-pack-start v-box button) (g-signal-connect button "clicked" (lambda (b) (declare (ignore b)) @@ -14,7 +13,7 @@ (dialog-add-button dialog "Yes" :yes) (dialog-add-button dialog "Cancel" :cancel) (setf (dialog-default-response dialog) :cancel) - (setf (dialog-alternative-button-order dialog) (list :yes :cancel :ok)) + (set-dialog-alternative-button-order dialog (list :yes :cancel :ok)) (format t "Response was: ~S~%" (dialog-run dialog)) (object-destroy dialog))))) (let ((button (make-instance 'button :label "About"))) @@ -28,5 +27,5 @@ (format t "Response was: ~S~%" (dialog-run dialog)) (object-destroy dialog))))) - (gtk-widget-show-all window) - (gtk-main))) \ No newline at end of file + (widget-show window) + (ensure-gtk-main))) \ No newline at end of file