Changeset 14225


Ignore:
Timestamp:
Aug 30, 2010, 3:08:04 PM (9 years ago)
Author:
rme
Message:

When launching the IDE, also don't load home:ccl-init if the shift
key is being held down.

See ticket:726.

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

Legend:

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

    r14210 r14225  
    5959  (declare (ignore notification))
    6060  (initialize-user-interface)
    61   (let* ((event (#_CGEventCreate +null-ptr+))
    62          (flags (#_CGEventGetFlags event)))
    63     (unless (logtest flags #$kCGEventFlagMaskShift)
    64       (load-ide-init-file))
    65     (#_CFRelease event)))
     61  (unless (shift-key-p)
     62    (load-ide-init-file)))
    6663
    6764(objc:defmethod (#/applicationWillTerminate: :void)
  • trunk/source/cocoa-ide/cocoa-utils.lisp

    r13553 r14225  
    411411    (>= (%get-long p) #x1050)))
    412412
    413 
     413;; This works even if an event loop is not running.
     414#-cocotron
     415(defun shift-key-p ()
     416  (let* ((event (#_CGEventCreate +null-ptr+))
     417         (flags (#_CGEventGetFlags event)))
     418    (prog1
     419        (logtest flags #$kCGEventFlagMaskShift)
     420      (#_CFRelease event))))
     421
     422#+cocotron
     423(defun shift-key-p ()
     424  nil)
  • trunk/source/cocoa-ide/start.lisp

    r12830 r14225  
    8282
    8383(defmethod ccl::application-init-file ((a cocoa-application))
    84   '("home:ccl-init" "home:\\.ccl-init"))
     84  (unless (shift-key-p)
     85    '("home:ccl-init" "home:\\.ccl-init")))
    8586
    8687;;; If we're launched via the Finder, the only argument we'll
Note: See TracChangeset for help on using the changeset viewer.