Update of /project/mcclim/cvsroot/mcclim In directory clnet:/tmp/cvs-serv31942
Modified Files: commands.lisp Log Message: Fixed the addition of menu items to empty menus.
--- /project/mcclim/cvsroot/mcclim/commands.lisp 2008/02/02 00:10:18 1.77 +++ /project/mcclim/cvsroot/mcclim/commands.lisp 2008/04/15 19:52:57 1.78 @@ -415,18 +415,20 @@ (defun %add-menu-item (command-table item after) (with-slots (menu) command-table + (when (null menu) + (setf after :start)) (case after (:start (push item menu)) ((:end nil) (setf menu (nconc menu (list item)))) (:sort (setf menu (sort (cons item menu) - #'string-lessp - :key #'command-menu-item-name))) + #'string-lessp + :key #'command-menu-item-name))) (t (push item - (cdr (member after menu - :key #'command-menu-item-name - :test #'string-equal)))))) + (cdr (member after menu + :key #'command-menu-item-name + :test #'string-equal)))))) (when (and (slot-boundp item 'keystroke) - (slot-value item 'keystroke)) + (slot-value item 'keystroke)) (%add-keystroke-item command-table (slot-value item 'keystroke) item nil)))