Changeset 1435

Show
Ignore:
Timestamp:
08/06/04 21:54:21 (4 years ago)
Author:
morris
Message:

update window titles on WCConnectionServerInfoDidChange

Files:

Legend:

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

    r1423 r1435  
    1 /* $Id: WCAccountEditor.m,v 1.14 2004/08/05 20:21:14 morris Exp $ */ 
     1/* $Id: WCAccountEditor.m,v 1.15 2004/08/06 19:54:21 morris Exp $ */ 
    22 
    33/* 
     
    5757        [[NSNotificationCenter defaultCenter] 
    5858                addObserver:self 
    59                 selector:@selector(connectionShouldTerminate:) 
    60                 name:WCConnectionShouldTerminat
    61                 object:NULL]; 
    62  
     59                   selector:@selector(connectionServerInfoDidChange:) 
     60                          name:WCConnectionServerInfoDidChang
     61                        object:NULL]; 
     62         
    6363        [[NSNotificationCenter defaultCenter] 
    6464                addObserver:self 
    65                 selector:@selector(accountEditorShouldShowUser:) 
    66                 name:WCAccountEditorShouldShowUser 
    67                 object:NULL]; 
    68  
     65                   selector:@selector(connectionShouldTerminate:) 
     66                          name:WCConnectionShouldTerminate 
     67                        object:NULL]; 
     68         
    6969        [[NSNotificationCenter defaultCenter] 
    7070                addObserver:self 
    71                 selector:@selector(accountEditorShouldShowGroup:) 
    72                 name:WCAccountEditorShouldShowGroup 
    73                 object:NULL]; 
    74  
     71                   selector:@selector(accountEditorShouldShowUser:) 
     72                          name:WCAccountEditorShouldShowUser 
     73                        object:NULL]; 
     74         
    7575        [[NSNotificationCenter defaultCenter] 
    7676                addObserver:self 
    77                 selector:@selector(accountsShouldAddGroup:) 
    78                 name:WCAccountsShouldAddGroup 
    79                 object:NULL]; 
    80  
     77                   selector:@selector(accountEditorShouldShowGroup:) 
     78                          name:WCAccountEditorShouldShowGroup 
     79                        object:NULL]; 
     80         
    8181        [[NSNotificationCenter defaultCenter] 
    8282                addObserver:self 
    83                 selector:@selector(accountsShouldCompleteGroups:) 
    84                 name:WCAccountsShouldCompleteGroups 
    85                 object:NULL]; 
     83                   selector:@selector(accountsShouldAddGroup:) 
     84                           name:WCAccountsShouldAddGroup 
     85                         object:NULL]; 
     86         
     87        [[NSNotificationCenter defaultCenter] 
     88                addObserver:self 
     89                   selector:@selector(accountsShouldCompleteGroups:) 
     90                           name:WCAccountsShouldCompleteGroups 
     91                         object:NULL]; 
    8692 
    8793        // --- send groups command 
     
    190196        [self release]; 
    191197} 
     198 
     199 
     200 
     201- (void)connectionServerInfoDidChange:(NSNotification *)notification { 
     202        if([notification object] != _connection) 
     203                return; 
     204         
     205        // --- window title 
     206        [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
     207                [_connection name], 0x2014, NSLocalizedString(@"Account Editor", @"Account editor window title")]]; 
     208} 
     209 
    192210 
    193211 
  • WiredClient/trunk/WCAccounts.m

    r1398 r1435  
    1 /* $Id: WCAccounts.m,v 1.16 2004/07/30 12:43:40 morris Exp $ */ 
     1/* $Id: WCAccounts.m,v 1.17 2004/08/06 19:54:21 morris Exp $ */ 
    22 
    33/* 
     
    6666        [[NSNotificationCenter defaultCenter] 
    6767                addObserver:self 
     68                   selector:@selector(connectionServerInfoDidChange:) 
     69                           name:WCConnectionServerInfoDidChange 
     70                         object:NULL]; 
     71         
     72        [[NSNotificationCenter defaultCenter] 
     73                addObserver:self 
    6874                   selector:@selector(connectionShouldTerminate:) 
    6975                           name:WCConnectionShouldTerminate 
     
    149155                return; 
    150156                 
     157        // --- show window 
     158        if([WCSettings boolForKey:WCShowAccounts]) 
     159                [self showWindow:self]; 
     160} 
     161 
     162 
     163 
     164- (void)connectionServerInfoDidChange:(NSNotification *)notification { 
     165        if([notification object] != _connection) 
     166                return; 
     167         
    151168        // --- window title 
    152169        [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
    153170                [_connection name], 0x2014, NSLocalizedString(@"Accounts", @"Accounts window title")]]; 
    154  
    155         // --- show window 
    156         if([WCSettings boolForKey:WCShowAccounts]) 
    157                 [self showWindow:self]; 
    158171} 
    159172 
  • WiredClient/trunk/WCConsole.m

    r1298 r1435  
    1 /* $Id: WCConsole.m,v 1.6 2004/05/22 02:18:09 morris Exp $ */ 
     1/* $Id: WCConsole.m,v 1.7 2004/08/06 19:54:21 morris Exp $ */ 
    22 
    33/* 
     
    4646        [[NSNotificationCenter defaultCenter] 
    4747                addObserver:self 
    48                 selector:@selector(connectionHasAttached:) 
    49                 name:WCConnectionHasAttached 
    50                 object:NULL]; 
    51  
     48                   selector:@selector(connectionHasAttached:) 
     49                          name:WCConnectionHasAttached 
     50                        object:NULL]; 
     51         
    5252        [[NSNotificationCenter defaultCenter] 
    5353                addObserver:self 
    54                 selector:@selector(connectionShouldTerminate:) 
    55                 name:WCConnectionShouldTerminate 
    56                 object:NULL]; 
    57  
     54                   selector:@selector(connectionServerInfoDidChange:) 
     55                           name:WCConnectionServerInfoDidChange 
     56                         object:NULL]; 
     57         
     58        [[NSNotificationCenter defaultCenter] 
     59                addObserver:self 
     60                   selector:@selector(connectionShouldTerminate:) 
     61                           name:WCConnectionShouldTerminate 
     62                         object:NULL]; 
     63         
    5864        return self; 
    5965} 
     
    8591                return; 
    8692                 
    87         // --- set title when host is resolved 
    88         [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
    89                 [_connection name], 0x2014, NSLocalizedString(@"Console", @"Console window title")]]; 
    90  
    9193        // --- show window 
    9294        if([WCSettings boolForKey:WCShowConsole]) 
    9395                [self showWindow:self]; 
     96} 
     97 
     98 
     99 
     100- (void)connectionServerInfoDidChange:(NSNotification *)notification { 
     101        if([notification object] != _connection) 
     102                return; 
     103         
     104        // --- window title 
     105        [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
     106                [_connection name], 0x2014, NSLocalizedString(@"Console", @"Console window title")]]; 
    94107} 
    95108 
  • WiredClient/trunk/WCFiles.m

    r1418 r1435  
    1 /* $Id: WCFiles.m,v 1.41 2004/08/04 18:52:57 morris Exp $ */ 
     1/* $Id: WCFiles.m,v 1.42 2004/08/06 19:54:21 morris Exp $ */ 
    22 
    33/* 
     
    7979        [[NSNotificationCenter defaultCenter] 
    8080                addObserver:self 
    81                 selector:@selector(connectionShouldTerminate:) 
    82                 name:WCConnectionShouldTerminat
    83                 object:NULL]; 
    84  
     81                   selector:@selector(connectionServerInfoDidChange:) 
     82                          name:WCConnectionServerInfoDidChang
     83                        object:NULL]; 
     84         
    8585        [[NSNotificationCenter defaultCenter] 
    8686                addObserver:self 
    87                 selector:@selector(connectionPrivilegesDidChange:) 
    88                 name:WCConnectionPrivilegesDidChange 
    89                 object:NULL]; 
     87                   selector:@selector(connectionShouldTerminate:) 
     88                           name:WCConnectionShouldTerminate 
     89                         object:NULL]; 
     90         
     91        [[NSNotificationCenter defaultCenter] 
     92                addObserver:self 
     93                   selector:@selector(connectionPrivilegesDidChange:) 
     94                           name:WCConnectionPrivilegesDidChange 
     95                         object:NULL]; 
    9096 
    9197        // --- add path to the history 
     
    154160        // --- window title 
    155161        [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
    156                 [_path path], 
    157                 0x2014, 
    158                 [_connection name]]]; 
     162                [_path path], 0x2014, [_connection name]]]; 
    159163         
    160164        // --- window position 
     
    185189 
    186190        [self release]; 
     191} 
     192 
     193 
     194- (void)connectionServerInfoDidChange:(NSNotification *)notification { 
     195        if([notification object] != _connection) 
     196                return; 
     197         
     198        // --- window title 
     199        [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
     200                [_path path], 0x2014, [_connection name]]]; 
    187201} 
    188202 
  • WiredClient/trunk/WCMessages.m

    r1418 r1435  
    1 /* $Id: WCMessages.m,v 1.23 2004/08/04 18:52:57 morris Exp $ */ 
     1/* $Id: WCMessages.m,v 1.24 2004/08/06 19:54:21 morris Exp $ */ 
    22 
    33/* 
     
    6161        [[NSNotificationCenter defaultCenter] 
    6262                addObserver:self 
    63                 selector:@selector(connectionHasAttached:) 
    64                 name:WCConnectionHasAttached 
    65                 object:NULL]; 
    66  
     63                   selector:@selector(connectionHasAttached:) 
     64                          name:WCConnectionHasAttached 
     65                        object:NULL]; 
     66         
    6767        [[NSNotificationCenter defaultCenter] 
    6868                addObserver:self 
    69                 selector:@selector(connectionShouldTerminate:) 
    70                 name:WCConnectionShouldTerminat
    71                 object:NULL]; 
    72  
     69                   selector:@selector(connectionServerInfoDidChange:) 
     70                          name:WCConnectionServerInfoDidChang
     71                        object:NULL]; 
     72         
    7373        [[NSNotificationCenter defaultCenter] 
    7474                addObserver:self 
    75                 selector:@selector(preferencesDidChange:) 
    76                 name:WCPreferencesDidChange 
     75                   selector:@selector(connectionShouldTerminate:) 
     76                           name:WCConnectionShouldTerminate 
     77                         object:NULL]; 
     78         
     79        [[NSNotificationCenter defaultCenter] 
     80                addObserver:self 
     81                   selector:@selector(preferencesDidChange:) 
     82                           name:WCPreferencesDidChange 
    7783                         object:NULL]; 
    7884         
     
    8288                           name:WCMessagesShouldShowMessage 
    8389                         object:NULL]; 
    84  
     90         
    8591        [[NSNotificationCenter defaultCenter] 
    8692                addObserver:self 
    87                 selector:@selector(messagesShouldShowBroadcast:) 
    88                 name:WCMessagesShouldShowBroadcast 
    89                 object:NULL]; 
    90  
     93                   selector:@selector(messagesShouldShowBroadcast:) 
     94                          name:WCMessagesShouldShowBroadcast 
     95                        object:NULL]; 
     96         
    9197        return self; 
    9298} 
     
    139145                return; 
    140146                 
    141         // --- set titles when host is resolved 
    142         [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
    143                 [_connection name], 0x2014, NSLocalizedString(@"Messages", @"Messages window title")]]; 
    144  
    145147        // --- show window 
    146148        if([WCSettings boolForKey:WCShowMessages]) 
    147149                [self showWindow:self]; 
     150} 
     151 
     152 
     153 
     154- (void)connectionServerInfoDidChange:(NSNotification *)notification { 
     155        if([notification object] != _connection) 
     156                return; 
     157         
     158        // --- window title 
     159        [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
     160                [_connection name], 0x2014, NSLocalizedString(@"Messages", @"Messages window title")]]; 
    148161} 
    149162 
  • WiredClient/trunk/WCNews.m

    r1358 r1435  
    1 /* $Id: WCNews.m,v 1.17 2004/06/08 20:53:42 morris Exp $ */ 
     1/* $Id: WCNews.m,v 1.18 2004/08/06 19:54:21 morris Exp $ */ 
    22 
    33/* 
     
    5555        [[NSNotificationCenter defaultCenter] 
    5656                addObserver:self 
    57                 selector:@selector(connectionHasAttached:) 
    58                 name:WCConnectionHasAttached 
    59                 object:NULL]; 
    60  
    61         [[NSNotificationCenter defaultCenter] 
    62                 addObserver:self 
    63                 selector:@selector(connectionShouldTerminate:) 
    64                 name:WCConnectionShouldTerminate 
    65                 object:NULL]; 
    66                  
    67         [[NSNotificationCenter defaultCenter] 
    68                 addObserver:self 
    69                 selector:@selector(connectionPrivilegesDidChange:) 
    70                 name:WCConnectionPrivilegesDidChange 
    71                 object:NULL]; 
    72  
    73         [[NSNotificationCenter defaultCenter] 
    74                 addObserver:self 
    75                 selector:@selector(newsShouldAddNews:) 
    76                 name:WCNewsShouldAddNews 
    77                 object:NULL]; 
    78  
    79         [[NSNotificationCenter defaultCenter] 
    80                 addObserver:self 
    81                 selector:@selector(newsShouldCompleteNews:) 
    82                 name:WCNewsShouldCompleteNews 
    83                 object:NULL]; 
    84  
    85         [[NSNotificationCenter defaultCenter] 
    86                 addObserver:self 
    87                 selector:@selector(newsShouldAddNewNews:) 
    88                 name:WCNewsShouldAddNewNews 
    89                 object:NULL]; 
    90  
     57                   selector:@selector(connectionHasAttached:) 
     58                           name:WCConnectionHasAttached 
     59                         object:NULL]; 
     60         
     61        [[NSNotificationCenter defaultCenter] 
     62                addObserver:self 
     63                   selector:@selector(connectionServerInfoDidChange:) 
     64                           name:WCConnectionServerInfoDidChange 
     65                         object:NULL]; 
     66         
     67        [[NSNotificationCenter defaultCenter] 
     68                addObserver:self 
     69                   selector:@selector(connectionShouldTerminate:) 
     70                           name:WCConnectionShouldTerminate 
     71                         object:NULL]; 
     72         
     73        [[NSNotificationCenter defaultCenter] 
     74                addObserver:self 
     75                   selector:@selector(connectionPrivilegesDidChange:) 
     76                           name:WCConnectionPrivilegesDidChange 
     77                         object:NULL]; 
     78         
     79        [[NSNotificationCenter defaultCenter] 
     80                addObserver:self 
     81                   selector:@selector(newsShouldAddNews:) 
     82                           name:WCNewsShouldAddNews 
     83                         object:NULL]; 
     84         
     85        [[NSNotificationCenter defaultCenter] 
     86                addObserver:self 
     87                   selector:@selector(newsShouldCompleteNews:) 
     88                           name:WCNewsShouldCompleteNews 
     89                         object:NULL]; 
     90         
     91        [[NSNotificationCenter defaultCenter] 
     92                addObserver:self 
     93                   selector:@selector(newsShouldAddNewNews:) 
     94                           name:WCNewsShouldAddNewNews 
     95                         object:NULL]; 
     96         
    9197        return self; 
    9298} 
     
    123129                return; 
    124130                 
    125         // --- set titles when host is resolved 
    126         [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
    127                 [_connection name], 0x2014, NSLocalizedString(@"News", @"News window title")]]; 
    128  
    129131        // --- show window 
    130132        if([WCSettings boolForKey:WCShowNews]) 
    131133                [self showWindow:self]; 
     134} 
     135 
     136 
     137 
     138- (void)connectionServerInfoDidChange:(NSNotification *)notification { 
     139        if([notification object] != _connection) 
     140                return; 
     141         
     142        // --- window title 
     143        [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
     144                [_connection name], 0x2014, NSLocalizedString(@"News", @"News window title")]]; 
    132145} 
    133146 
  • WiredClient/trunk/WCPrivateChat.m

    r1408 r1435  
    1 /* $Id: WCPrivateChat.m,v 1.21 2004/08/02 17:15:03 morris Exp $ */ 
     1/* $Id: WCPrivateChat.m,v 1.22 2004/08/06 19:54:21 morris Exp $ */ 
    22 
    33/* 
     
    5555        [[NSNotificationCenter defaultCenter] 
    5656                addObserver:self 
    57                 selector:@selector(connectionShouldTerminate:) 
    58                 name:WCConnectionShouldTerminat
    59                 object:NULL]; 
    60  
     57                   selector:@selector(connectionServerInfoDidChange:) 
     58                          name:WCConnectionServerInfoDidChang
     59                        object:NULL]; 
     60         
    6161        [[NSNotificationCenter defaultCenter] 
    6262                addObserver:self 
    63                 selector:@selector(privateChatShouldShowChat:) 
    64                 name:WCPrivateChatShouldShowChat 
    65                 object:NULL]; 
    66  
     63                   selector:@selector(connectionShouldTerminate:) 
     64                          name:WCConnectionShouldTerminate 
     65                        object:NULL]; 
     66         
    6767        [[NSNotificationCenter defaultCenter] 
    6868                addObserver:self 
    69                 selector:@selector(privateChatUserDeclinedInvite:) 
    70                 name:WCPrivateChatUserDeclinedInvite 
    71                 object:NULL]; 
     69                   selector:@selector(privateChatShouldShowChat:) 
     70                           name:WCPrivateChatShouldShowChat 
     71                         object:NULL]; 
     72         
     73        [[NSNotificationCenter defaultCenter] 
     74                addObserver:self 
     75                   selector:@selector(privateChatUserDeclinedInvite:) 
     76                           name:WCPrivateChatUserDeclinedInvite 
     77                         object:NULL]; 
    7278         
    7379        return self; 
     
    100106        // --- window title 
    101107        [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
    102                 [_connection name], 0x2014, NSLocalizedString(@"Private Chat", @"Private chat window title")]]; 
     108                [_connection name], 0x2014, NSLocalizedString(@"Private Chat", @"Chat window title")]]; 
    103109         
    104110        // --- pass it down to WCChat 
     
    119125 
    120126        [self release]; 
     127} 
     128 
     129 
     130 
     131- (void)connectionServerInfoDidChange:(NSNotification *)notification { 
     132        if([notification object] != _connection) 
     133                return; 
     134         
     135        // --- window title 
     136        [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
     137                [_connection name], 0x2014, NSLocalizedString(@"Private Chat", @"Chat window title")]]; 
    121138} 
    122139 
  • WiredClient/trunk/WCPublicChat.m

    r1414 r1435  
    1 /* $Id: WCPublicChat.m,v 1.36 2004/08/03 19:28:53 morris Exp $ */ 
     1/* $Id: WCPublicChat.m,v 1.37 2004/08/06 19:54:21 morris Exp $ */ 
    22 
    33/* 
     
    6060        [[NSNotificationCenter defaultCenter] 
    6161                addObserver:self 
    62                 selector:@selector(connectionHasAttached:) 
    63                 name:WCConnectionHasAttached 
    64                 object:NULL]; 
    65  
     62                   selector:@selector(connectionHasAttached:) 
     63                          name:WCConnectionHasAttached 
     64                        object:NULL]; 
     65         
    6666        [[NSNotificationCenter defaultCenter] 
    6767                addObserver:self 
    68                 selector:@selector(connectionHasClosed:) 
    69                 name:WCConnectionHasClosed 
     68                   selector:@selector(connectionServerInfoDidChange:) 
     69                           name:WCConnectionServerInfoDidChange 
     70                         object:NULL]; 
     71         
     72        [[NSNotificationCenter defaultCenter] 
     73                addObserver:self 
     74                   selector:@selector(connectionHasClosed:) 
     75                           name:WCConnectionHasClosed 
    7076                         object:NULL]; 
    7177         
     
    150156                [[NSSound soundNamed:[WCSettings objectForKey:WCConnectedEventSound]] play]; 
    151157 
    152         // --- set titles when host is resolved 
     158        // --- show window 
     159        [self showWindow:self]; 
     160
     161 
     162 
     163 
     164- (void)connectionServerInfoDidChange:(NSNotification *)notification { 
     165        if([notification object] != _connection) 
     166                return; 
     167 
     168        // --- window title 
    153169        [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
    154170                [_connection name], 0x2014, NSLocalizedString(@"Chat", @"Chat window title")]]; 
    155  
    156         // --- show window 
    157         [self showWindow:self]; 
    158 
    159  
     171
     172         
    160173 
    161174 
  • WiredClient/trunk/WCSearch.m

    r1418 r1435  
    1 /* $Id: WCSearch.m,v 1.29 2004/08/04 18:52:57 morris Exp $ */ 
     1/* $Id: WCSearch.m,v 1.30 2004/08/06 19:54:21 morris Exp $ */ 
    22 
    33/* 
     
    8181        [[NSNotificationCenter defaultCenter] 
    8282                addObserver:self 
    83                 selector:@selector(connectionHasAttached:) 
    84                 name:WCConnectionHasAttached 
    85                 object:NULL]; 
    86  
     83                   selector:@selector(connectionServerInfoDidChange:) 
     84                          name:WCConnectionServerInfoDidChange 
     85                        object:NULL]; 
     86         
    8787        [[NSNotificationCenter defaultCenter] 
    8888                addObserver:self 
    89                 selector:@selector(connectionShouldTerminate:) 
    90                 name:WCConnectionShouldTerminate 
    91                 object:NULL]; 
    92  
     89                   selector:@selector(connectionShouldTerminate:) 
     90                          name:WCConnectionShouldTerminate 
     91                        object:NULL]; 
     92         
    9393        [[NSNotificationCenter defaultCenter] 
    9494                addObserver:self 
    95                 selector:@selector(preferencesDidChange:) 
    96                 name:WCPreferencesDidChange 
    97                 object:NULL]; 
     95                   selector:@selector(preferencesDidChange:) 
     96                          name:WCPreferencesDidChange 
     97                        object:NULL]; 
    9898 
    9999        return self; 
     
    164164 
    165165 
    166 - (void)connectionHasAttached:(NSNotification *)notification { 
    167         if([[notification object] objectAtIndex:0] != _connection) 
    168                 return; 
    169                 
     166- (void)connectionServerInfoDidChange:(NSNotification *)notification { 
     167        if([notification object] != _connection) 
     168                return; 
     169         
    170170        // --- window title 
    171171        [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
  • WiredClient/trunk/WCServerInfo.m

    r1432 r1435  
    1 /* $Id: WCServerInfo.m,v 1.20 2004/08/06 19:19:12 morris Exp $ */ 
     1/* $Id: WCServerInfo.m,v 1.21 2004/08/06 19:54:21 morris Exp $ */ 
    22 
    33/* 
     
    5252        [[NSNotificationCenter defaultCenter] 
    5353                addObserver:self 
    54                    selector:@selector(connectionHasAttached:) 
    55                            name:WCConnectionHasAttached 
    56                          object:NULL]; 
    57          
    58         [[NSNotificationCenter defaultCenter] 
    59                 addObserver:self 
    6054                   selector:@selector(connectionShouldTerminate:) 
    6155                           name:WCConnectionShouldTerminate 
     
    124118 
    125119 
    126 - (void)connectionHasAttached:(NSNotification *)notification { 
    127         if([[notification object] objectAtIndex:0] != _connection) 
     120- (void)connectionShouldTerminate:(NSNotification *)notification { 
     121        if([notification object] != _connection) 
     122                return; 
     123         
     124        [self close]; 
     125        [self release]; 
     126
     127 
     128 
     129 
     130- (void)connectionServerInfoDidChange:(NSNotification *)notification { 
     131        WCServer        *server; 
     132        NSRect          rect; 
     133         
     134        if([notification object] != _connection) 
    128135                return; 
    129136         
     
    131138        [[self window] setTitle:[NSString stringWithFormat:@"%@ %@", 
    132139                [_connection name], NSLocalizedString(@"Info", @"Server info window title")]]; 
    133 
    134  
    135  
    136  
    137 - (void)connectionShouldTerminate:(NSNotification *)notification { 
    138         if([notification object] != _connection) 
    139                 return; 
    140          
    141         [self close]; 
    142         [self release]; 
    143 
    144  
    145  
    146  
    147 - (void)connectionServerInfoDidChange:(NSNotification *)notification { 
    148         WCServer        *server; 
    149         NSRect          rect; 
    150          
    151         if([notification object] != _connection) 
    152                 return; 
    153          
     140 
    154141        // --- get server 
    155142        server = [_connection server]; 
  • WiredClient/trunk/WCTransfers.m

    r1426 r1435  
    1 /* $Id: WCTransfers.m,v 1.46 2004/08/06 19:16:48 morris Exp $ */ 
     1/* $Id: WCTransfers.m,v 1.47 2004/08/06 19:54:21 morris Exp $ */ 
    22 
    33/* 
     
    7676        [[NSNotificationCenter defaultCenter] 
    7777                addObserver:self 
    78                 selector:@selector(connectionHasAttached:) 
    79                 name:WCConnectionHasAttached 
    80                 object:NULL]; 
    81  
     78                   selector:@selector(connectionHasAttached:) 
     79                          name:WCConnectionHasAttached 
     80                        object:NULL]; 
     81         
    8282        [[NSNotificationCenter defaultCenter] 
    8383                addObserver:self 
    84                 selector:@selector(connectionShouldTerminate:) 
    85                 name:WCConnectionShouldTerminat
    86                 object:NULL]; 
    87  
     84                   selector:@selector(connectionServerInfoDidChange:) 
     85                          name:WCConnectionServerInfoDidChang
     86                        object:NULL]; 
     87         
    8888        [[NSNotificationCenter defaultCenter] 
    8989                addObserver:self 
    90                 selector:@selector(preferencesDidChange:) 
    91                 name:WCPreferencesDidChang
    92                 object:NULL]; 
    93  
     90                   selector:@selector(connectionShouldTerminate:) 
     91                          name:WCConnectionShouldTerminat
     92                        object:NULL]; 
     93         
    9494        [[NSNotificationCenter defaultCenter] 
    9595                addObserver:self 
    96                 selector:@selector(transfersShouldStartTransfer:) 
    97                 name:WCTransfersShouldStartTransfer 
    98                 object:NULL]; 
    99  
     96                   selector:@selector(preferencesDidChange:) 
     97                          name:WCPreferencesDidChange 
     98                        object:NULL]; 
     99         
    100100        [[NSNotificationCenter defaultCenter] 
    101101                addObserver:self 
    102                 selector:@selector(transfersShouldUpdateQueue:) 
    103                 name:WCTransfersShouldUpdateQueue 
    104                 object:NULL]; 
    105  
     102                   selector:@selector(transfersShouldStartTransfer:) 
     103                          name:WCTransfersShouldStartTransfer 
     104                        object:NULL]; 
     105         
    106106        [[NSNotificationCenter defaultCenter] 
    107107                addObserver:self 
    108                 selector:@selector(fileInfoShouldShowInfo:) 
    109                 name:WCFileInfoShouldShowInfo 
    110                 object:NULL]; 
    111  
     108                   selector:@selector(transfersShouldUpdateQueue:) 
     109                           name:WCTransfersShouldUpdateQueue 
     110                         object:NULL]; 
     111         
     112        [[NSNotificationCenter defaultCenter] 
     113                addObserver:self 
     114                   selector:@selector(fileInfoShouldShowInfo:) 
     115                           name:WCFileInfoShouldShowInfo 
     116                         object:NULL]; 
     117         
    112118        // --- update table view 
    113119        _timer = [NSTimer scheduledTimerWithTimeInterval:0.33 
     
    182188                return; 
    183189                 
    184         // --- set titles when host is resolved 
    185         [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
    186                 [_connection name], 0x2014, NSLocalizedString(@"Transfers", @"Transfers window title")]]; 
    187  
    188190        // --- show window 
    189191        if([WCSettings boolForKey:WCShowTransfers]) 
    190192                [self showWindow:self]; 
     193} 
     194 
     195 
     196 
     197- (void)connectionServerInfoDidChange:(NSNotification *)notification { 
     198        if([notification object] != _connection) 
     199                return; 
     200         
     201        // --- window title 
     202        [[self window] setTitle:[NSString stringWithFormat:@"%@ %C %@", 
     203                [_connection name], 0x2014, NSLocalizedString(@"Transfers", @"Transfers window title")]]; 
    191204} 
    192205