Changeset 437


Ignore:
Timestamp:
03/05/08 03:49:44 (17 years ago)
Author:
Nicholas Riley
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.