Ignore:
Timestamp:
02/10/03 06:33:41 (18 years ago)
Author:
Nicholas Riley
Message:

ICeCoffEE 1.3.1

File:
1 edited

Legend:

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

    r74 r89  
    3131- (id)initWithAPE:(NSBundle*)apeBundle andBundle:(NSBundle*)prefPaneBundle
    3232{
    33     [self setBundle:prefPaneBundle];                    // save our bundle for future use
     33    [self setAPEBundle:apeBundle prefPaneBundle:prefPaneBundle];
    3434   
    3535    [NSBundle loadNibNamed:@"APE Manager plugin" owner:self];   // load our nib file; it will call our awakeFromNib method
     
    4747- (void)willUnload
    4848{
    49     // we do nothing here, as well
     49    [prefs release];
     50    prefs = nil;
    5051}
    5152
     
    6566    prefs = [[CFPreferencesWrapper_ICeCoffEE preferencesWithApplication: (NSString *)kICBundleIdentifier] retain];
    6667
     68    CFBundleRef apeBundle = CFBundleCreate(NULL, (CFURLRef)[NSURL fileURLWithPath: [_apeBundle bundlePath]]);
     69    if ([prefs integerForKey: ICP(LastLoadedVersion)] != CFBundleGetVersionNumber(apeBundle)) {
     70        [tabView selectTabViewItemWithIdentifier: @"noPrefs"];
     71        CFRelease(apeBundle);
     72        return;
     73    }
     74    CFRelease(apeBundle);
     75    [tabView selectTabViewItemWithIdentifier: @"prefs"];
     76
    6777    [commandClickEnabled setState: [prefs boolForKey: ICP(CommandClickEnabled)]];
    6878    [self commandClickEnabled: nil];
     
    7888}
    7989
    80 - (void)setBundle:(NSBundle *)aBundle;
     90- (void)setAPEBundle:(NSBundle*)apeBundle prefPaneBundle:(NSBundle *)aBundle;
    8191{
     92    [apeBundle retain];
     93    [_apeBundle release];
     94    _apeBundle = apeBundle;
    8295    [aBundle retain];
    8396    [_bundle release];
Note: See TracChangeset for help on using the changeset viewer.