Ignore:
Timestamp:
06/14/03 09:54:54 (19 years ago)
Author:
Nicholas Riley
Message:

ICeCoffEE 1.4a1

File:
1 edited

Legend:

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

    r139 r142  
    130130            ICCF_PatchMethod("TermSubview", "ICeCoffEETerminal", "ICECoffEETermSubviewSuper", "mouseUp:") &&
    131131            ICCF_PatchMethod("TermSubview", "ICeCoffEETerminal", "ICECoffEETermSubviewSuper", "draggingEntered:") &&
    132             ICCF_PatchMethod("TermSubview", "ICeCoffEETerminal", "ICECoffEETermSubviewSuper", "draggingExited:") &&
    133132            ICCF_PatchMethod("TermSubview", "ICeCoffEETerminal", "ICECoffEETermSubviewSuper", "_optionClickEvent:::") ,
    134133            ICapeprintf("ICeCoffEE APE: loaded in TermSubview for Terminal!\n");
     
    190189}
    191190
     191void ICCF_GetCFTypePref(CFStringRef prefKey, CFTypeRef *val, CFTypeID type) {
     192    if (*val != NULL) {
     193        CFRelease(*val);
     194        *val = NULL;
     195    }
     196   
     197    *val = CFPreferencesCopyAppValue(prefKey, kICBundleIdentifier);
     198
     199    if (*val == NULL) return;
     200
     201    if (CFGetTypeID(*val) != type) {
     202        CFRelease(*val);
     203        *val = NULL;
     204        return;
     205    }
     206}
     207
    192208// to test: defaults write net.sabi.ICeCoffEE "Excluded Applications" -array '{CFBundleID = "com.apple.projectbuilder"; }' '{CFBundleID = "net.sabi.Pester"; }' '{CFBundleID = "com.apple.foobar"; }'
    193209static void ICCF_MigratePrefs() {
     
    230246                excludedAppBundle = CFBundleCreate(NULL, excludedAppURL);
    231247                if (excludedAppBundle != NULL) {
    232                     APEToolsAddToExcludeList(kICBundleIdentifier, excludedAppBundle);
     248                    APEToolsAddToExcludeList(kICBundleIdentifier, excludedAppBundle, CFSTR("Migrated from ICeCoffEE 1.0-1.2"), NO);
    233249                } else postponeMigrationForApp = YES; // can't create bundle
    234250            } else postponeMigrationForApp = YES; // can't find app
     
    256272    ICCF_prefs.servicesInContextualMenu = ICCF_GetBooleanPref(kICServicesInContextualMenu, YES);
    257273    ICCF_prefs.servicesInMenuBar = ICCF_GetBooleanPref(kICServicesInMenuBar, NO);
     274    ICCF_GetCFTypePref(kICServiceOptions, (CFTypeRef *)&ICCF_prefs.serviceOptions, CFDictionaryGetTypeID());
     275    ICCF_prefs.terminalRequireOptionForSelfDrag = ICCF_GetBooleanPref(kICTerminalRequireOptionForSelfDrag, NO);
    258276    ICCF_prefs.errorSoundEnabled = ICCF_GetBooleanPref(kICErrorSoundEnabled, NO);
    259277    ICCF_prefs.errorDialogEnabled = ICCF_GetBooleanPref(kICErrorDialogEnabled, YES);
Note: See TracChangeset for help on using the changeset viewer.