Changeset 9772


Ignore:
Timestamp:
Jun 17, 2008, 5:24:31 AM (11 years ago)
Author:
gz
Message:

Ticket #301: make the console window be hidden by default. Show a
diamond in its menu item if there is anything new to see since it was
last shown. Rename the menu item Show/Hide? System Console
(added "System").

Location:
trunk/source/cocoa-ide
Files:
4 edited

Legend:

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

    r8491 r9772  
    121121  (let* ((console (console self)))
    122122    (unless (%null-ptr-p console)
     123      (mark-console-output-available console nil)
    123124      (if (setf (console-window-hidden-by-user console) (#/isVisible console))
    124125        (#/orderOut: console sender)
     
    132133             (unless (%null-ptr-p console)
    133134               (if (#/isVisible console)
    134                  (#/setTitle: item #@"Hide Console")
    135                  (#/setTitle: item #@"Show Console"))
     135                 (#/setTitle: item #@"Hide System Console")
     136                 (#/setTitle: item #@"Show System Console"))
    136137               t)))
    137138          (t (call-next-method item)))))
  • trunk/source/cocoa-ide/console-window.lisp

    r8491 r9772  
    1212   (translatebuf :foreign-type :address)
    1313   (bufsize :foreign-type :int)
    14    (hidden-by-user :initform nil :accessor console-window-hidden-by-user))
     14   (hidden-by-user :initform t :accessor console-window-hidden-by-user))
    1515  (:metaclass ns:+ns-object))
     16
     17(defconstant $system-console-menu-item-tag 1)
    1618
    1719
     
    2123(objc:defmethod (#/insertString: :void) ((self console-window) string)
    2224  (with-slots ((tv typeout-view)) self
    23     (unless (console-window-hidden-by-user self)
     25    (if (console-window-hidden-by-user self)
     26      (mark-console-output-available self t)
    2427      (#/makeKeyAndOrderFront: self +null-ptr+))
    25     (#/insertString: (typeout-view-text-view tv) string)))   
     28    (#/insertString: (typeout-view-text-view tv) string)))
    2629
     30(defmethod mark-console-output-available ((self console-window) available-p)
     31  (let* ((menu (#/windowsMenu *nsapp*))
     32         (menu-ref (ccl::external-call "__NSGetCarbonMenu" :address menu :address))
     33         (index (#/indexOfItemWithTag: menu $system-console-menu-item-tag)))
     34    (when (< index 0)
     35      (setq index (#/indexOfItemWithTitle: menu #@"Show System Console")))
     36    (when (> index 0)
     37      (ccl::external-call "_SetItemMark" :id menu-ref :integer (1+ index)
     38                          :integer (if available-p #$diamondMark 0)))))
    2739
    2840;;; Process a chunkful of data
  • trunk/source/cocoa-ide/ide-contents/Resources/English.lproj/MainMenu.nib/info.nib

    r9685 r9772  
    44<dict>
    55        <key>IBFramework Version</key>
    6         <string>667</string>
     6        <string>629</string>
    77        <key>IBOldestOS</key>
    88        <integer>5</integer>
    99        <key>IBOpenObjects</key>
    1010        <array>
    11                 <integer>448</integer>
     11                <integer>24</integer>
    1212        </array>
    1313        <key>IBSystem Version</key>
Note: See TracChangeset for help on using the changeset viewer.