Changeset 216 for trunk/ICeCoffEE/ICeCoffEE/APEMain.m
- Timestamp:
- 05/01/06 09:11:28 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ICeCoffEE/ICeCoffEE/APEMain.m
r183 r216 16 16 #import <ApplicationEnhancer/APETools.h> 17 17 #import <objc/objc-runtime.h> 18 #import "SmartCrashReportsAPI.h" 18 19 #import "ICeCoffEE.h" 19 20 #import "ICeCoffEETextEdit.h" … … 67 68 CFBundleRef ICCF_bundle; 68 69 69 // With APE 1.3, if we're in the exclude list, APEBundleMainEarlyLoad doesn't get invoked; don't need to use APETools. But we need to do our own management to avoid loading in non-GUI appl lications.70 // With APE 1.3, if we're in the exclude list, APEBundleMainEarlyLoad doesn't get invoked; don't need to use APETools. But we need to do our own management to avoid loading in non-GUI applications. 70 71 Boolean ICCF_shouldLoad; 71 72 72 73 void APEBundleMainEarlyLoad(CFBundleRef inBundle, CFStringRef inAPEToolsApplicationID) 73 74 { 75 OSStatus err; 76 77 err = UnsanitySCR_RegisterMatchSpecifier(kICBundleIdentifier, CFSTR("Nicholas Riley"), 78 NULL, CFSTR("SCR-5E5C696784"), NULL); 79 if (err != noErr) { 80 apeprintf("ICeCoffEE APE: Can't register with Smart Crash Reports (error %ld)\n", err); 81 } 82 74 83 ICCF_MigratePrefs(); 75 84 … … 83 92 84 93 CPSProcessSerNum psn; 85 OSStatuserr = CPSGetCurrentProcess(&psn);94 err = CPSGetCurrentProcess(&psn); 86 95 if (err != noErr) { 87 96 #if ICCF_DEBUG … … 92 101 #endif 93 102 } 94 103 95 104 CPSProcessInfoRec info; 96 105 err = CPSGetProcessInfo(&psn, &info, NULL, 0, NULL, NULL, 0); … … 128 137 if (ICCF_CFBundleIDMatches(bundleID, CFSTR("com.apple.xcode"))) { 129 138 ICCF_PatchMethod("PBXTextView", "ICeCoffEEMenuOnly", "ICeCoffEEMenuSuper", "menuForEvent:"); 130 ICapeprintf("ICeCoffEE APE: loaded in PBXTextView for PB!\n");139 ICapeprintf("ICeCoffEE APE: loaded in PBXTextView for Xcode\n"); 131 140 shouldLoadInNSTextView = NO; 132 141 } else if (ICCF_CFBundleIDMatches(bundleID, CFSTR("com.apple.terminal"))) { … … 137 146 ICCF_PatchMethod("TermSubview", "ICeCoffEETerminal", "ICECoffEETermSubviewSuper", "mouseUp:") && 138 147 ICCF_PatchMethod("TermSubview", "ICeCoffEETerminal", "ICECoffEETermSubviewSuper", "draggingEntered:") && 139 ICCF_PatchMethod("TermSubview", "ICeCoffEETerminal", "ICECoffEETermSubviewSuper", "_optionClickEvent:::") ,140 ICapeprintf("ICeCoffEE APE: loaded in TermSubview for Terminal !\n");141 } else if (ICCF_CFBundleIDMatches(bundleID, CFSTR("org.mozilla. navigator"))) {148 ICCF_PatchMethod("TermSubview", "ICeCoffEETerminal", "ICECoffEETermSubviewSuper", "_optionClickEvent:::"); 149 ICapeprintf("ICeCoffEE APE: loaded in TermSubview for Terminal\n"); 150 } else if (ICCF_CFBundleIDMatches(bundleID, CFSTR("org.mozilla.camino"))) { 142 151 ICCF_PatchMethod("ChildView", "ICeCoffEEMenuOnly", "ICeCoffEEMenuSuper", "menuForEvent:"); 143 152 ICapeprintf("ICeCoffEE APE: loaded in ChildView for Camino\n"); … … 147 156 ICCF_PatchMethod("WebHTMLView", "ICeCoffEEWebKit", "ICeCoffEEWebKitSuper", "mouseUp:") && 148 157 ICCF_PatchMethod("WebHTMLView", "ICeCoffEEWebKit", "ICeCoffEEWebKitSuper", "mouseDown:") && 149 ICCF_PatchMethod("WebHTMLView", "ICeCoffEEWebKit", "ICeCoffEEWebKitSuper", "menuForEvent:") ,158 ICCF_PatchMethod("WebHTMLView", "ICeCoffEEWebKit", "ICeCoffEEWebKitSuper", "menuForEvent:"); 150 159 ICapeprintf("ICeCoffEE APE: loaded in WebHTMLView for WebKit/Safari\n"); 151 160 152 161 if (shouldLoadInNSTextView) { 153 162 ICCF_PatchMethod("NSTextView", "ICeCoffEE", "ICeCoffEESuper", "mouseDown:") && 154 ICCF_PatchMethod("NSTextView", "ICeCoffEE", "ICeCoffEESuper", "menuForEvent:") ,163 ICCF_PatchMethod("NSTextView", "ICeCoffEE", "ICeCoffEESuper", "menuForEvent:"); 155 164 ICapeprintf("ICeCoffEE APE: loaded generic NSTextView support\n"); 156 165 }
Note:
See TracChangeset
for help on using the changeset viewer.