Changeset 12124


Ignore:
Timestamp:
May 24, 2009, 7:36:08 AM (10 years ago)
Author:
gb
Message:

Use document name to remember all listener window positions (not
just the first listener to have been created.) Note that this
scheme is not compatible with the scheme used last week; the
initial listener's position will default to the system default
the first time the IDE is run after this update.

When a listener is restored to a saved position, setup cascading
relative to that position.

File:
1 edited

Legend:

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

    r12107 r12124  
    276276    ((self hemlock-listener-window-controller) (edited :<BOOL>))
    277277  (declare (ignorable edited)))
    278  
     278
     279
    279280
    280281(objc:defmethod #/windowTitleForDocumentDisplayName: ((self hemlock-listener-window-controller) name)
     
    384385      (process-kill p)))
    385386  (call-next-method))
     387
     388
    386389
    387390(objc:defmethod (#/makeWindowControllers :void) ((self hemlock-listener-document))
     
    405408                      :with-window window))
    406409         (listener-name (hi::buffer-name (hemlock-buffer self)))
    407          (path (when (eql 1 *cocoa-listener-count*) #@"/")))
    408 
     410         (path (#/windowTitleForDocumentDisplayName: controller (#/displayName self ))))
    409411    (with-slots (styles) textstorage
    410412      ;; We probably should be more disciplined about
     
    428430        (setq path nil)))
    429431    (unless (and path
    430                  (#/setFrameUsingName: window path))
     432                 (when (#/setFrameUsingName: window path)
     433                   (let* ((frame (#/frame window)))
     434                     (ns:with-ns-point (current-point
     435                                        (ns:ns-rect-x frame)
     436                                        (+ (ns:ns-rect-y frame)
     437                                           (ns:ns-rect-height frame)))
     438                        (let* ((next-point (#/cascadeTopLeftFromPoint:
     439                                            window
     440                                            current-point)))
     441                     (setq *next-listener-x-pos*
     442                           (ns:ns-point-x next-point)
     443                           *next-listener-y-pos*
     444                           (ns:ns-point-y next-point)))))
     445                   t))
    431446      (ns:with-ns-point (current-point
    432447                         (or *next-listener-x-pos*
Note: See TracChangeset for help on using the changeset viewer.