Changeset 8456


Ignore:
Timestamp:
Feb 11, 2008, 6:48:22 AM (12 years ago)
Author:
gb
Message:

Replace #/toggleTypeout: with #/toggleConsole:; validate the menu item.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/cocoa-window.lisp

    r8428 r8456  
    118118  (#/show (#/sharedPanel lisp-preferences-panel)))
    119119
    120 (objc:defmethod (#/toggleTypeout: :void) ((self lisp-application) sender)
    121   (declare (ignore sender))
    122   (#/show (#/sharedPanel typeout-window)))
     120(objc:defmethod (#/toggleConsole: :void) ((self lisp-application) sender)
     121  (let* ((console (console self)))
     122    (unless (%null-ptr-p console)
     123      (if (#/isVisible console)
     124        (#/orderOut: console sender)
     125        (#/orderFront: console sender)))))
     126
     127(objc:defmethod (#/validateMenuItem: :<BOOL>) ((self lisp-application)
     128                                               item)
     129  (let* ((action (#/action item)))
     130    (cond ((eql action (@selector #/toggleConsole:))
     131           (let* ((console (console self)))
     132             (unless (%null-ptr-p console)
     133               (if (#/isVisible console)
     134                 (#/setTitle: item #@"Hide Console")
     135                 (#/setTitle: item #@"Show Console"))
     136               t)))
     137          (t (call-next-method item)))))
    123138
    124139(defmethod ccl::process-exit-application ((process appkit-process) thunk)
     
    136151
    137152(defun event-loop (&optional end-test)
    138   (let ((app *NSApp*))
     153  (let* ((app *NSApp*)
     154         (ccl::*break-on-errors* nil))
    139155    (loop
    140156      (handler-case (let* ((*event-process-reported-conditions* nil))
Note: See TracChangeset for help on using the changeset viewer.