Changeset 41 for trunk/PrefController.m

Show
Ignore:
Timestamp:
06/20/06 23:26:29 (3 years ago)
Author:
ngerakines
Message:

* Put into place the real icons that Wiley sent over
* Fixed the prefs on login
* Removed the TypePadSuper class
* General code cleanup

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/PrefController.m

    r40 r41  
    2222         
    2323        NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; 
    24         [self setService:[userDefaults objectForKey:@"service type"]]; 
     24        // [self setService:[userDefaults objectForKey:@"service type"]]; 
     25        [self setService:@"None"]; 
    2526 
    2627        // Set the general pref view control values 
     
    2829        [save_login setObjectValue:[userDefaults objectForKey:@"save_login"]]; 
    2930         
    30         if ([self service]) { 
     31        TypePad *tp = [[[TypePad alloc] init] autorelease]; 
     32        Vox *vx = [[[Vox alloc] init] autorelease]; 
     33        if ([[tp accounts] count] > 0) { 
     34                [self setService:@"TypePad"]; 
     35        } 
     36        if ([[vx accounts] count] > 0) { 
     37                [self setService:@"Vox"]; 
     38        } 
     39         
     40         
     41        if ([[self service] isEqualToString:@"None"]) { 
     42                [self init_generic]; 
     43        } else { 
    3144                if ([[self service] isEqualToString:@"TypePad"]) { 
    3245                        [self init_typepad]; 
     
    3548                        [self init_vox]; 
    3649                } 
    37         } else { 
    38                 [self init_generic]; 
    3950        } 
    4051 
     
    231242// NSLog(@"Window closed\n"); 
    232243        [self save_generic]; 
    233         if ([self service]) { 
    234                 if ([[self service] isEqualToString:@"TypePad"]) { 
    235                         [self save_typepad]; 
    236                 } 
    237                 if ([[self service] isEqualToString:@"Vox"]) { 
    238                         [self save_vox]; 
    239                 } 
     244        if ([[self service] isEqualToString:@"TypePad"]) { 
     245                [self save_typepad]; 
     246        } 
     247        if ([[self service] isEqualToString:@"Vox"]) { 
     248                [self save_vox]; 
    240249        } 
    241250}