Changeset 3908

Show
Ignore:
Timestamp:
03/17/06 08:29:27 (3 years ago)
Author:
morris
Message:

Reflect bookmark changes in affected connections immediately

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/WCPreferences.m

    r3907 r3908  
    563563                [WCSettings setBookmark:bookmark atIndex:row]; 
    564564 
    565                 [[NSNotificationCenter defaultCenter] postNotificationName:WCBookmarksDidChange object:self]; 
     565                [[NSNotificationCenter defaultCenter] postNotificationName:WCBookmarksDidChange object:self userInfo:bookmark]; 
    566566        } 
    567567         
     
    673673                [WCSettings setTrackerBookmark:trackerBookmark atIndex:row]; 
    674674 
    675                 [[NSNotificationCenter defaultCenter] postNotificationName:WCTrackerBookmarksDidChange object:self]; 
     675                [[NSNotificationCenter defaultCenter] postNotificationName:WCTrackerBookmarksDidChange object:self userInfo:trackerBookmark]; 
    676676        } 
    677677         
     
    873873                [dictionary release]; 
    874874                 
    875                 [[NSNotificationCenter defaultCenter] postNotificationName:WCBookmarksDidChange object:self]; 
     875                [[NSNotificationCenter defaultCenter] postNotificationName:WCBookmarksDidChange object:self userInfo:dictionary]; 
    876876 
    877877                [_bookmarksTableView reloadData]; 
     
    891891                [dictionary release]; 
    892892                 
    893                 [[NSNotificationCenter defaultCenter] postNotificationName:WCTrackerBookmarksDidChange object:self]; 
     893                [[NSNotificationCenter defaultCenter] postNotificationName:WCTrackerBookmarksDidChange object:self userInfo:dictionary]; 
    894894                 
    895895                [_trackerBookmarksTableView reloadData]; 
  • WiredClient/trunk/WCServerConnection.m

    r3673 r3908  
    8787                           name:WCIconDidChange]; 
    8888 
     89        [[NSNotificationCenter defaultCenter] 
     90                addObserver:self 
     91                   selector:@selector(bookmarksDidChange:) 
     92                           name:WCBookmarksDidChange]; 
     93 
    8994        [self addObserver:self 
    9095                         selector:@selector(connectionDidConnect:) 
     
    313318                         withArgument:@"0" 
    314319                         withArgument:[WCSettings objectForKey:WCCustomIcon]]; 
     320        } 
     321} 
     322 
     323 
     324 
     325- (void)bookmarksDidChange:(NSNotification *)notification { 
     326        NSDictionary    *bookmark; 
     327        NSString                *nick, *status; 
     328         
     329        bookmark = [notification userInfo]; 
     330         
     331        if([[bookmark objectForKey:WCBookmarksIdentifier] isEqualToString:[_bookmark objectForKey:WCBookmarksIdentifier]]) { 
     332                nick = [bookmark objectForKey:WCBookmarksNick]; 
     333                 
     334                if([nick length] > 0) 
     335                        [_link sendCommand:WCNickCommand withArgument:nick]; 
     336 
     337                status = [bookmark objectForKey:WCBookmarksStatus]; 
     338                 
     339                if([status length] > 0) 
     340                        [_link sendCommand:WCStatusCommand withArgument:status]; 
    315341        } 
    316342} 
  • WiredClient/trunk/WCServerInfo.h

    r3570 r3908  
    5151        IBOutlet NSTextField                    *_certificateTitleTextField; 
    5252        IBOutlet NSTextField                    *_certificateTextField; 
     53         
     54        NSTimer                                                 *_timer; 
    5355} 
    5456