/[gtk-cffi]/gtk-cffi/examples/ex2.lisp
ViewVC logotype

Diff of /gtk-cffi/examples/ex2.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by rklochkov, Mon Aug 8 15:02:01 2011 UTC revision 1.3 by rklochkov, Fri Aug 26 17:16:13 2011 UTC
# Line 23  Line 23 
23    (show (gethash activated-module *apps*) :all t)    (show (gethash activated-module *apps*) :all t)
24    (mapcar (lambda (module)    (mapcar (lambda (module)
25              (unless (string= activated-module (car module))              (unless (string= activated-module (car module))
26                (hide (gethash (car module) *apps*) :all t)))                (hide (gethash (car module) *apps*))))
27            *mods*)            *mods*)
28    (run (gethash activated-module *apps*)))    (run (gethash activated-module *apps*)))
29    
# Line 79  Line 79 
79    
80  (defun setup-app (module)  (defun setup-app (module)
81    (let ((dialog (make-instance 'dialog :title (car module) :flags :modal)))    (let ((dialog (make-instance 'dialog :title (car module) :flags :modal)))
82      (setf (win-position dialog) :center-always)      (setf (window-position dialog) :center-always)
83      (setf (size-request dialog) (second module))      (setf (size-request dialog) (second module))
84      ;(setf (property dialog :content-area-border) 10)      ;(setf (property dialog :content-area-border) 10)
85      (let ((top-area (v-box dialog)))      (let ((top-area (content-area dialog)))
86        (flet ((print-out (str)        (flet ((print-out (str)
87                          (pack top-area (make-instance 'label                          (pack top-area (make-instance 'label
88                                            :text str)                                            :text str)
# Line 98  Line 98 
98        (pack top-area        (pack top-area
99              (make-instance 'label) :fill t :expand t)              (make-instance 'label) :fill t :expand t)
100        (show-buttons top-area (car module)))        (show-buttons top-area (car module)))
101      (setf (has-separator dialog) nil)      ;(setf (has-separator dialog) nil)
102      (setf (gsignal dialog :delete-event      (setf (gsignal dialog :delete-event
103                     :data (cffi:convert-to-foreign (car module) 'gtk-string))                     :data (cffi:convert-to-foreign (car module) 'gtk-string))
104            (cffi:callback on-delete)            (cffi:callback on-delete)

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.5