Changeset 437

Show
Ignore:
Timestamp:
03/ 5/08 3:49:44 AM (9 months ago)
Author:
nicholas
Message:

Use editability rather than color to hide insertion point; draws better

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ICeCoffEE/ICeCoffEE/ICeCoffEE.m

    r436 r437  
    206206 
    207207void ICCF_LaunchURLFromTextView(NSTextView *self, NSEvent *triggeringEvent) { 
    208     NSColor *insertionPointColor = [self insertionPointColor]; 
     208    BOOL isEditable = [self isEditable]; 
    209209 
    210210    @try { 
     
    243243 
    244244        if (ICCF_LaunchURL(url, ICCF_KeyboardAction(triggeringEvent)) && ICCF_prefs.textBlinkEnabled) { 
     245            if (isEditable) 
     246                [self setEditable: NO]; 
     247 
    245248            for (unsigned i = 0 ; i < ICCF_prefs.textBlinkCount ; i++) { 
    246249                NSRange emptyRange = {range.location, 0}; 
     
    248251                [self display]; 
    249252                usleep(kICBlinkDelayUsecs); 
    250                 [self setInsertionPointColor: [self backgroundColor]]; 
    251253                [self setSelectedRange: range affinity: NSSelectionAffinityDownstream stillSelecting: YES]; 
    252254                [self display]; 
     
    259261 
    260262    ICCF_StopIC(); 
    261     [self setInsertionPointColor: insertionPointColor]; 
     263    if (isEditable) 
     264        [self setEditable: YES]; 
    262265} 
    263266