Add gtk:show-message function
authorDmitry Kalyanov <Kalyanov.Dmitry@gmail.com>
Mon, 15 Jun 2009 08:31:29 +0000 (12:31 +0400)
committerDmitry Kalyanov <Kalyanov.Dmitry@gmail.com>
Mon, 15 Jun 2009 08:31:29 +0000 (12:31 +0400)
gtk/gtk.high-level.lisp

index 4d427e4..1e84c6f 100644 (file)
             (with-progress-bar ("Texts" 10)
               (loop
                  repeat 10
-                 do (with-progress-bar-action (sleep 1))))))))
\ No newline at end of file
+                 do (with-progress-bar-action (sleep 1))))))))
+
+(defun show-message (message &key (buttons :ok) (message-type :info) (use-markup nil))
+  (let ((dialog (make-instance 'message-dialog
+                               :text message
+                               :buttons buttons
+                               :message-type message-type
+                               :use-markup use-markup)))
+    (prog1
+        (dialog-run dialog)
+      (object-destroy dialog))))
+
+(export 'show-message)