/[mcclim]/mcclim/menu.lisp
ViewVC logotype

Diff of /mcclim/menu.lisp

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

revision 1.29 by moore, Sat Feb 7 14:05:50 2004 UTC revision 1.30 by moore, Tue May 18 10:47:46 2004 UTC
# Line 172  Line 172 
172    
173  ;; for now, accept only types :command and :menu, and only  ;; for now, accept only types :command and :menu, and only
174  ;; command names as values of :command  ;; command names as values of :command
175    
176    (defparameter *disabled-text-style* (make-text-style :fix :italic :normal))
177    
178  (defun make-menu-button-from-menu-item (item client  (defun make-menu-button-from-menu-item (item client
179                                          &key (bottomp nil)                                          &key (bottomp nil)
180                                          command-table                                          command-table
# Line 183  Line 186 
186          (frame *application-frame*)          (frame *application-frame*)
187          (manager (frame-manager *application-frame*)))          (manager (frame-manager *application-frame*)))
188      (if (eq type :command)      (if (eq type :command)
189          (make-pane-1 manager frame 'menu-button-leaf-pane          (if (command-enabled (car value) frame)
190                       :label name              (make-pane-1 manager frame 'menu-button-leaf-pane
191                       :client client                           :label name
192                       :value-changed-callback                           :client client
193                       #'(lambda (gadget val)                           :value-changed-callback
194                           (declare (ignore gadget val))                           #'(lambda (gadget val)
195                           (throw-object-ptype item presentation-type)))                               (declare (ignore gadget val))
196                                 (throw-object-ptype item presentation-type)))
197                (make-pane-1 manager frame 'menu-button-leaf-pane
198                             :label name
199                             :text-style *disabled-text-style*
200                             :client client
201                             :value-changed-callback
202                             #'(lambda (gadget val)
203                                 (declare (ignore gadget val))
204                                 nil)))
205          (make-pane-1 manager frame 'menu-button-submenu-pane          (make-pane-1 manager frame 'menu-button-submenu-pane
206                       :label name                       :label name
207                       :client client                       :client client

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

  ViewVC Help
Powered by ViewVC 1.1.5