Changeset 6766


Ignore:
Timestamp:
Jun 20, 2007, 11:26:38 AM (17 years ago)
Author:
Gary Byers
Message:

Change background color of modeline when changing text view background.
(Should do this for font color, too.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ide-1.0/ccl/examples/cocoa-editor.lisp

    r6759 r6766  
    440440    (call-next-method)
    441441    (decf edit-count)
    442     #+debug
    443     (#_NSLog #@"after endEditing on %@, edit-count now = %d" :id self :int edit-count)))
     442    (when (< edit-count 0)
     443      (#_NSLog #@"after endEditing on %@, edit-count now = %d" :id self :int edit-count))))
    444444
    445445;;; Return true iff we're inside a "beginEditing/endEditing" pair
     
    640640  #+debug (#_NSLog #@"Change color to = %@" :id (#/color sender)))
    641641
    642 (def-cocoa-default *layout-text-in-background* :int 1 "When non-zero, do text layout when idle.")
     642(def-cocoa-default *layout-text-in-background* :bool t "When true, do text layout when idle.")
    643643
    644644(objc:defmethod (#/layoutManager:didCompleteLayoutForTextContainer:atEnd: :void)
     
    646646  (declare (ignorable cont flag))
    647647  #+debug (#_NSLog #@"layout complete: container = %@, atend = %d" :id cont :int (if flag 1 0))
    648   (when (zerop *layout-text-in-background*)
     648  (unless *layout-text-in-background*
    649649    (#/setDelegate: layout +null-ptr+)
    650650    (#/setBackgroundLayoutEnabled: layout nil)))
     
    654654(objc:defmethod (#/setBackgroundColor: :void)
    655655    ((self hemlock-textstorage-text-view) color)
    656   (#_NSLog #@"Set background color: %@" :id color)
     656  #+debug (#_NSLog #@"Set background color: %@" :id color)
    657657  (setf (text-view-blink-color self) color)
    658658  (call-next-method color))
     
    801801  (let* ((color (#/color sender)))
    802802    (unless (typep self 'echo-area-view)
    803       (let* ((echo-view (slot-value (#/window self) 'echo-area-view)))
    804         (#/setBackgroundColor: echo-view color)))
    805     (#/setBackgroundColor: self color)
    806     (#_NSLog #@"view = %@, color = %@, background = %@" :id self :id color :id (#/backgroundColor self))
    807     ))
     803      (let* ((window (#/window self))
     804             (echo-view (unless (%null-ptr-p window)
     805                          (slot-value window 'echo-area-view))))
     806        (when echo-view (#/setBackgroundColor: echo-view color))))
     807    (#/setBackgroundColor: self color)))
    808808
    809809(objc:defmethod (#/changeTextColor: :void)
     
    14651465             #|(*debug-io* *typeout-stream*)|#)
    14661466        (stream-clear-output *debug-io*)
    1467         (print-call-history :detailed-p nil)
     1467        (print-call-history :detailed-p t)
    14681468        (#/performSelectorOnMainThread:withObject:waitUntilDone:
    14691469         frame (@selector #/runErrorSheet:) params t)
Note: See TracChangeset for help on using the changeset viewer.