Changeset 484


Ignore:
Timestamp:
07/14/08 03:21:55 (16 years ago)
Author:
Nicholas Riley
Message:

APEMain.m: Fix selection failure with Xcode 3.1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ICeCoffEE/ICeCoffEE/APEMain.m

    r469 r484  
    137137        ICapeprintf("loaded in PDFView for PDFKit\n");
    138138        ICCF_loadedInPDFKit = true;
    139     }   
     139    }
    140140}
    141141
     
    151151    if (bundleID != NULL) {
    152152        if (ICCF_CFBundleIDMatches(bundleID, CFSTR("com.apple.xcode"))) {
    153             if (ICCF_PatchMethod("XCTextView", "ICeCoffEE", "ICeCoffEESuper", "mouseDown:")) {
    154                 ICCF_PatchMethod("XCSourceCodeTextView", "ICeCoffEEMenuOnly", "ICeCoffEEMenuSuper", "menuForEvent:");
    155                 ICCF_PatchMethod("XCDiffTextView", "ICeCoffEE", "ICeCoffEESuper", "mouseDown:");
    156                 ICCF_PatchMethod("XCDiffTextView", "ICeCoffEE", "ICeCoffEESuper", "menuForEvent:"); // subclass of PBXTextView; patching both is bad
     153            if (ICCF_PatchMethod("XCSourceCodeTextView", "ICeCoffEEMenuOnly", "ICeCoffEEMenuSuper", "menuForEvent:")) {
     154                // Xcode 3.x: XCSourceCodeTextView < XCTextView < NSTextView for source
     155                //            XCDiffTextView < PBXTextView < NSTextView for rich text
     156                ICCF_PatchMethod("NSTextView", "ICeCoffEE", "ICeCoffEESuper", "mouseDown:");
     157                ICCF_PatchMethod("XCDiffTextView", "ICeCoffEE", "ICeCoffEESuper", "menuForEvent:");
     158                    // subclass of PBXTextView; patching both is bad
    157159                ICCF_PatchMethod("NSTextView", "ICeCoffEE", "ICeCoffEESuper", "clickedOnLink:atIndex:");
    158160            } else {
     161                // Xcode 2.x: both source and rich text views are PBXTextView
    159162                ICCF_PatchMethod("PBXTextView", "ICeCoffEEMenuOnly", "ICeCoffEEMenuSuper", "menuForEvent:");
    160163            }
Note: See TracChangeset for help on using the changeset viewer.