Changeset 3900

Show
Ignore:
Timestamp:
03/15/06 21:30:51 (2 years ago)
Author:
morris
Message:

Send a reload after changing accounts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredServer/trunk/WCAccountsController.h

    r3675 r3900  
    7979 
    8080 
     81#define WCAccountsDidChange                     @"WCAccountsDidChange" 
     82 
     83 
    8184+ (WCAccountsController *)accountsController; 
    8285 
  • WiredServer/trunk/WCAccountsController.m

    r3859 r3900  
    381381                if(status) 
    382382                        status = [self _writeGroupsToFile:WCExpandWiredPath(@"groups")]; 
     383                 
     384                if(status) { 
     385                        [[NSNotificationCenter defaultCenter] 
     386                                postNotificationName:WCAccountsDidChange 
     387                                object:NULL]; 
     388                } 
    383389        } 
    384390         
  • WiredServer/trunk/WCDashboardController.m

    r3857 r3900  
    2727 */ 
    2828 
     29#import "WCAccountsController.h" 
    2930#import "WCAuthorization.h" 
    3031#import "WCConfigController.h" 
     
    103104                           name:WCConfigDidChange 
    104105                         object:NULL]; 
     106 
     107        [[NSNotificationCenter defaultCenter] 
     108                addObserver:self 
     109                   selector:@selector(accountsDidChange:) 
     110                           name:WCAccountsDidChange 
     111                         object:NULL]; 
    105112} 
    106113 
     
    130137 
    131138- (void)configDidChange:(NSNotification *)notification { 
     139        if([_statusController isAvailable] && [_statusController isRunning]) 
     140                [self reload:self]; 
     141} 
     142 
     143 
     144 
     145- (void)accountsDidChange:(NSNotification *)notification { 
    132146        if([_statusController isAvailable] && [_statusController isRunning]) 
    133147                [self reload:self];