#:test-pixbuf
#:test-image
#:test-progress-bar
- #:test-status-bar
+ #:test-statusbar
#:test-scale-button
#:test-text-view
#:demo-code-editor
(coerce (read-from-string (entry-text entry)) 'real))))
(widget-show window))))
-(defun test-status-bar ()
+(defun test-statusbar ()
(within-main-loop
(let* ((window (make-instance 'gtk-window :title "Text status bar"))
(v-box (make-instance 'v-box))
(h-box (make-instance 'h-box))
(label (make-instance 'label :label "Test of status bar" :xalign 0.5 :yalign 0.5))
- (status-bar (make-instance 'statusbar :has-resize-grip t))
+ (statusbar (make-instance 'statusbar :has-resize-grip t))
(button-push (make-instance 'button :label "Push"))
(button-pop (make-instance 'button :label "Pop"))
(entry (make-instance 'entry))
(leave-gtk-main)))
(g-signal-connect button-push "clicked" (lambda (b)
(declare (ignore b))
- (status-bar-push status-bar "lisp-prog" (entry-text entry))))
+ (statusbar-push statusbar "lisp-prog" (entry-text entry))))
(g-signal-connect button-pop "clicked" (lambda (b)
(declare (ignore b))
- (status-bar-pop status-bar "lisp-prog")))
+ (statusbar-pop statusbar "lisp-prog")))
(g-signal-connect icon "activate" (lambda (i)
(declare (ignore i))
(let ((message-dialog (make-instance 'message-dialog
(box-pack-start h-box button-push :expand nil)
(box-pack-start h-box button-pop :expand nil)
(box-pack-start v-box label)
- (box-pack-start v-box status-bar :expand nil)
+ (box-pack-start v-box statusbar :expand nil)
(widget-show window)
(setf (status-icon-screen icon) (gtk-window-screen window)))))
(in-package :gtk)
-(defcfun gtk-statusbar-get-context-id :uint
- (status-bar (g-object statusbar))
+(defcfun (statusbar-get-context-id "gtk_statusbar_get_context_id") :uint
+ (statusbar (g-object statusbar))
(context-description :string))
(defcfun gtk-statusbar-push :uint
- (status-bar (g-object statusbar))
+ (statusbar (g-object statusbar))
(context-id :uint)
(text :string))
(defcfun gtk-statusbar-pop :void
- (status-bar (g-object statusbar))
+ (statusbar (g-object statusbar))
(context-id :uint))
(defcfun gtk-statusbar-remove :void
- (status-bar (g-object statusbar))
+ (statusbar (g-object statusbar))
(context-id :uint)
(message-id :uint))
-(defun status-bar-push (status-bar context text)
- (gtk-statusbar-push status-bar (gtk-statusbar-get-context-id status-bar context) text))
+(defun statusbar-context-id (statusbar context)
+ (etypecase context
+ (integer context)
+ (string (statusbar-get-context-id statusbar context))))
-(defun status-bar-pop (status-bar context)
- (gtk-statusbar-pop status-bar (gtk-statusbar-get-context-id status-bar context)))
+(defun statusbar-push (statusbar context text)
+ (gtk-statusbar-push statusbar (statusbar-context-id statusbar context) text))
-(defun status-bar-remove (status-bar context message-id)
- (gtk-statusbar-remove status-bar (gtk-statusbar-get-context-id status-bar context) message-id))
+(defun statusbar-pop (statusbar context)
+ (gtk-statusbar-pop statusbar (statusbar-context-id statusbar context)))
-(export 'status-bar-push)
-(export 'status-bar-pop)
-(export 'status-bar-remove)
\ No newline at end of file
+(defun statusbar-remove (statusbar context message-id)
+ (gtk-statusbar-remove statusbar (statusbar-context-id statusbar context) message-id))
+
+(export 'statusbar-push)
+(export 'statusbar-pop)
+(export 'statusbar-remove)
+(export 'statusbar-context-id)
\ No newline at end of file