Changeset 12180


Ignore:
Timestamp:
Jun 1, 2009, 8:06:37 AM (10 years ago)
Author:
gb
Message:

Drop the shift modifer from graphic chars, not just alpha.
In code called from IDE-specific application delegate method, change
references to "Clozure CL" in Application menu items to use bundle name.

File:
1 edited

Legend:

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

    r12169 r12180  
    986986                                       (hi:key-event-modifier-mask (cdr map)))))))
    987987              (let* ((char (code-char c)))
    988                 (when (and char (standard-char-p char))
     988                (when (and char (graphic-char-p char))
    989989                  (setq bits (logandc2 bits +shift-event-mask+)))
    990990                (when (logtest #$NSAlphaShiftKeyMask modifiers)
     
    29192919   self (@selector #/saveDocumentTo:) +null-ptr+ t))
    29202920
     2921
     2922(defun maybe-fixup-application-menu ()
     2923  ;; If the CFBundleName isn't #@"Clozure CL", then set the
     2924  ;; title of any menu item on the application menu that ends
     2925  ;; in #@"Clozure CL" to the CFBundleName.
     2926  (let* ((bundle (#/mainBundle ns:ns-bundle))
     2927         (dict (#/infoDictionary bundle))
     2928         (cfbundlename (#/objectForKey: dict #@"CFBundleName"))
     2929         (targetname #@"Clozure CL"))
     2930    (unless (#/isEqualToString: cfbundlename targetname)
     2931      (let* ((appmenu (#/submenu (#/itemAtIndex: (#/mainMenu *nsapp*)  0)))
     2932             (numitems (#/numberOfItems appmenu)))
     2933        (dotimes (i numitems)
     2934          (let* ((item (#/itemAtIndex: appmenu i))
     2935                 (title (#/title item)))
     2936            (when (#/hasSuffix: title targetname)
     2937              (#/setTitle: item (#/stringByReplacingOccurrencesOfString:withString: title targetname cfbundlename)))))))))
     2938             
    29212939(defun initialize-user-interface ()
    29222940  ;; The first created instance of an NSDocumentController (or
     
    29242942  ;; may look like we're dropping this instance on the floor, but
    29252943  ;; we're really not.
     2944  (maybe-fixup-application-menu)
    29262945  (make-instance 'hemlock-document-controller)
    29272946  ;(#/sharedPanel lisp-preferences-panel)
Note: See TracChangeset for help on using the changeset viewer.