Changeset 4813
- Timestamp:
- 05/31/07 17:46:32 (1 year ago)
- Files:
-
- WiredClient/trunk/English.lproj/Localizable.strings (modified) (11 diffs)
- WiredClient/trunk/French.lproj/Localizable.strings (modified) (2 diffs)
- WiredClient/trunk/German.lproj/Localizable.strings (modified) (2 diffs)
- WiredClient/trunk/Japanese.lproj/Localizable.strings (modified) (2 diffs)
- WiredClient/trunk/WCConnectionController.m (modified) (1 diff)
- WiredClient/trunk/WCPublicChat.m (modified) (4 diffs)
- WiredClient/trunk/WCServerConnection.h (modified) (2 diffs)
- WiredClient/trunk/WCServerConnection.m (modified) (8 diffs)
- WiredClient/trunk/WCSettings.h (modified) (1 diff)
- WiredClient/trunk/WCSettings.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/English.lproj/Localizable.strings
r4799 r4813 70 70 "%@: %@" = "%1$@: %2$@"; 71 71 72 /* Search info (items, 'item(s)', total) */73 "%lu %@, %@ total" = "%1$lu %2$@, %3$@ total";74 75 /* Files info (count, 'item(s)', size, available) */76 "%lu %@, %@ total, %@ available" = "%1$lu %2$@, %3$@ total, %4$@ available";77 78 /* Accounts status (users, 'user(s)', groups, 'group(s)') */79 "%lu %@, %lu %@" = "%1$lu %2$@, %3$lu %4$@";80 81 72 /* File info folder size (count, 'item(s)' 82 73 Files folder size (count, 'item(s)' */ … … 85 76 /* Dock status (connections, 'connection(s)') */ 86 77 "%lu %@" = "%1$lu %2$@"; 78 79 /* Search info (items, 'item(s)', total) */ 80 "%lu %@, %@ total" = "%1$lu %2$@, %3$@ total"; 81 82 /* Files info (count, 'item(s)', size, available) */ 83 "%lu %@, %@ total, %@ available" = "%1$lu %2$@, %3$@ total, %4$@ available"; 84 85 /* Accounts status (users, 'user(s)', groups, 'group(s)') */ 86 "%lu %@, %lu %@" = "%1$lu %2$@, %3$lu %4$@"; 87 87 88 88 /* Transfer status (files, transferred, size, speed, time) */ … … 191 191 "Chat" = "Chat"; 192 192 193 /* Event */194 "Chat Received" = "Chat Received";195 196 193 /* Growl event chat received title */ 197 194 "Chat received" = "Chat received"; 195 196 /* Event */ 197 "Chat Received" = "Chat Received"; 198 198 199 199 /* Error … … 358 358 "General" = "General"; 359 359 360 /* Account type */ 361 "Group" = "Group"; 362 360 363 /* Group singular */ 361 364 "group" = "group"; 362 363 /* Account type */364 "Group" = "Group";365 365 366 366 /* Group plural */ … … 422 422 "message" = "message"; 423 423 424 /* Event */ 425 "Message Received" = "Message Received"; 426 424 427 /* Growl event message received title */ 425 428 "Message received" = "Message received"; 426 427 /* Event */428 "Message Received" = "Message Received";429 429 430 430 /* Message plural */ … … 442 442 "News" = "News"; 443 443 444 /* Event */ 445 "News Posted" = "News Posted"; 446 444 447 /* Growl event news posted title */ 445 448 "News posted" = "News posted"; 446 447 /* Event */448 "News Posted" = "News Posted";449 449 450 450 /* 'No' */ … … 486 486 "Queued at position %lu" = "Queued at position %lu"; 487 487 488 /* Disconnected chat message */489 "Re-established connection to %@" = "Re-established connection to %@";490 491 488 /* Ping received message (interval) */ 492 489 "Received ping reply after %.2fms" = "Received ping reply after %.2fms"; … … 494 491 /* Disconnect toolbar item */ 495 492 "Reconnect" = "Reconnect"; 493 494 /* Reconnected chat message */ 495 "Reconnected to %@" = "Reconnected to %@"; 496 497 /* Auto-reconnecting chat message */ 498 "Reconnecting to %@ in %.1f seconds..." = "Reconnecting to %1$@ in %2$.1f seconds..."; 496 499 497 500 /* Restore all layouts to default dialog title */ … … 637 640 "Transfer Failed" = "Transfer Failed"; 638 641 639 /* Event */640 "Transfer Finished" = "Transfer Finished";641 642 642 /* Growl event transfer started title */ 643 643 "Transfer finished" = "Transfer finished"; 644 645 /* Event */ 646 "Transfer Finished" = "Transfer Finished"; 644 647 645 648 /* Error */ … … 674 677 "Uploads Folder" = "Uploads Folder"; 675 678 679 /* User singular */ 680 "user" = "user"; 681 676 682 /* Account type */ 677 683 "User" = "User"; 678 684 679 /* User singular */680 "user" = "user";681 682 685 /* Growl event user changed nick title */ 683 686 "User changed nick" = "User changed nick"; … … 686 689 "User Changed Nick" = "User Changed Nick"; 687 690 691 /* Event */ 692 "User Changed Status" = "User Changed Status"; 693 688 694 /* Growl event user changed status title */ 689 695 "User changed status" = "User changed status"; 690 696 691 697 /* Event */ 692 "User Changed Status" = "User Changed Status";693 694 /* Event */695 698 "User Joined" = "User Joined"; 696 699 WiredClient/trunk/French.lproj/Localizable.strings
r4799 r4813 461 461 "Queued at position %lu" = "En attente à la position %lu"; 462 462 463 /* Disconnected chat message */464 "Re-established connection to %@" = "Ré-établir la connexion avec %@";465 466 463 /* Ping received message (interval) */ 467 464 "Received ping reply after %.2fms" = "Réception d’une réponse de \"ping\" après %.2fms"; … … 469 466 /* Disconnect toolbar item */ 470 467 "Reconnect" = "Reconnecter"; 468 469 /* Reconnected chat message */ 470 "Reconnected to %@" = "Reconnected to %@"; 471 472 /* Auto-reconnecting chat message */ 473 "Reconnecting to %@ in %.1f seconds..." = "Reconnecting to %1$@ in %2$.1f seconds..."; 471 474 472 475 /* Restore all layouts to default dialog title */ WiredClient/trunk/German.lproj/Localizable.strings
r4799 r4813 486 486 "Queued at position %lu" = "Wartend an Stelle %lu"; 487 487 488 /* Disconnected chat message */489 "Re-established connection to %@" = "Verbindung zu %@ wiederhergestellt";490 491 488 /* Ping received message (interval) */ 492 489 "Received ping reply after %.2fms" = "Ping-Antwort erhalten nach %.2fms"; … … 494 491 /* Disconnect toolbar item */ 495 492 "Reconnect" = "Wieder verbinden"; 493 494 /* Reconnected chat message */ 495 "Reconnected to %@" = "Reconnected to %@"; 496 497 /* Auto-reconnecting chat message */ 498 "Reconnecting to %@ in %.1f seconds..." = "Reconnecting to %1$@ in %2$.1f seconds..."; 496 499 497 500 /* Restore all layouts to default dialog title */ WiredClient/trunk/Japanese.lproj/Localizable.strings
r4799 r4813 489 489 "Queued at position %lu" = "%lu 番目のキューに入っています"; 490 490 491 /* Disconnected chat message */492 "Re-established connection to %@" = "%@ さんとの接続が再開されました";493 494 491 /* Ping received message (interval) */ 495 492 "Received ping reply after %.2fms" = "%.2fms 後に ping 応答を受信しました"; … … 497 494 /* Disconnect toolbar item */ 498 495 "Reconnect" = "接続し直す"; 496 497 /* Reconnected chat message */ 498 "Reconnected to %@" = "Reconnected to %@"; 499 500 /* Auto-reconnecting chat message */ 501 "Reconnecting to %@ in %.1f seconds..." = "Reconnecting to %1$@ in %2$.1f seconds..."; 499 502 500 503 /* Restore all layouts to default dialog title */ WiredClient/trunk/WCConnectionController.m
r4799 r4813 192 192 } 193 193 194 if([self respondsToSelector:@selector(serverConnectionWillAutoReconnect:)]) {195 [[self connection] addObserver:self196 selector:@selector(serverConnectionWillAutoReconnect:)197 name:WCServerConnectionWillAutoReconnect];198 }199 200 194 if([self respondsToSelector:@selector(serverConnectionServerInfoDidChange:)]) { 201 195 [_connection addObserver:self WiredClient/trunk/WCPublicChat.m
r4799 r4813 308 308 error = [WCError errorWithDomain:WCWiredClientErrorDomain code:WCWiredClientServerDisconnected]; 309 309 310 if([[self connection] isAutoReconnecting]) { 311 [self printEvent:[error localizedFailureReason]]; 312 } 313 else if(![[self connection] isReconnecting]) { 310 if(![[self connection] isReconnecting]) { 314 311 if([[self window] isMiniaturized]) 315 312 [self showWindow:self]; 316 313 317 314 if([[self window] isVisible]) { 318 if(! YES) {315 if(![WCSettings boolForKey:WCAutoReconnect]) { 319 316 if(![[self connection] isDisconnecting]) { 320 317 [[self connection] triggerEvent:WCEventsError info1:error]; … … 322 319 } 323 320 } 324 325 [self printEvent:[NSSWF:NSLS(@"Lost connection to %@", @"Disconnected chat message"),326 [[self connection] name]]];327 321 } 328 322 } … … 339 333 340 334 [super connectionWillTerminate:notification]; 341 }342 343 344 345 - (void)serverConnectionWillAutoReconnect:(NSNotification *)notification {346 [self printEvent:[NSSWF:NSLS(@"Automatically reconnecting to %@ in %.1f seconds", @"Auto-reconnecting chat message"),347 [[self connection] name], 5.0]];348 335 } 349 336 … … 375 362 [item setToolTip:[[self connection] name]]; 376 363 377 if([[self connection] isReconnecting]) {364 if([[self connection] isReconnecting]) 378 365 [[_toolbarItems objectForKey:@"Banner"] setImage:[NSImage imageNamed:@"Banner"]]; 379 380 [self printEvent:[NSSWF:NSLS(@"Re-established connection to %@", @"Disconnected chat message"), [[self connection] name]]];381 }382 366 383 367 [super serverConnectionServerInfoDidChange:notification]; WiredClient/trunk/WCServerConnection.h
r4799 r4813 71 71 BOOL _disconnecting; 72 72 BOOL _reconnecting; 73 BOOL _shouldReconnect;74 73 BOOL _autoReconnecting; 75 74 BOOL _hidden; … … 79 78 80 79 #define WCServerConnectionWillReconnect @"WCServerConnectionWillReconnect" 81 #define WCServerConnectionWillAutoReconnect @"WCServerConnectionWillAutoReconnect"82 80 #define WCServerConnectionShouldHide @"WCServerConnectionShouldHide" 83 81 #define WCServerConnectionShouldUnhide @"WCServerConnectionShouldUnhide" WiredClient/trunk/WCServerConnection.m
r4801 r4813 234 234 235 235 - (void)_autoReconnect { 236 #if 0 237 if(_shouldReconnect) { 238 _autoReconnecting = YES; 239 240 [self postNotificationName:WCServerConnectionWillReconnect object:self]; 241 242 [self showWindow:self]; 243 244 [self connect]; 245 } 246 #endif 236 _autoReconnecting = YES; 237 238 [self postNotificationName:WCServerConnectionWillReconnect object:self]; 239 240 [self showWindow:self]; 241 242 [self connect]; 247 243 } 248 244 … … 411 407 412 408 - (void)connectionDidTerminate:(NSNotification *)notification { 409 [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(_autoReconnect) object:NULL]; 410 413 411 [_progressIndicator stopAnimation:self]; 414 412 … … 423 421 - (void)connectionDidClose:(NSNotification *)notification { 424 422 WCError *error; 423 float time; 425 424 426 425 [_progressIndicator stopAnimation:self]; … … 434 433 } else { 435 434 error = [[notification userInfo] objectForKey:WCErrorKey]; 435 436 if(!error) 437 error = [WCError errorWithDomain:WCWiredClientErrorDomain code:WCWiredClientServerDisconnected]; 436 438 437 439 if(error) { … … 445 447 } 446 448 447 if(![[self window] isVisible]) 449 if(![[self window] isVisible]) { 448 450 [self triggerEvent:WCEventsServerDisconnected]; 451 452 [[self chat] printEvent:[NSSWF:NSLS(@"Lost connection to %@", @"Disconnected chat message"), 453 [self name]]]; 454 } 449 455 } 450 456 451 #if 0 452 if(YES && _userID > 0 && !_kicked) {453 _shouldReconnect = YES; 454 455 [self postNotificationName:WCServerConnectionWillAutoReconnect object:self];456 457 [self performSelector:@selector(_autoReconnect) afterDelay: 5.0];457 if([WCSettings boolForKey:WCAutoReconnect] && _userID > 0 && !_kicked && !_disconnecting) { 458 time = [WCSettings floatForKey:WCAutoReconnectTime]; 459 460 [[self chat] printEvent:[NSSWF:NSLS(@"Reconnecting to %@ in %.1f seconds...", @"Auto-reconnecting chat message"), 461 [self name], time]]; 462 463 [self performSelector:@selector(_autoReconnect) afterDelay:time]; 458 464 } 459 #endif460 465 } 461 466 … … 523 528 524 529 [[self window] setTitle:[self name] withSubtitle:NSLS(@"Connect", @"Connect window title")]; 530 531 if(_reconnecting) { 532 533 [[self chat] printEvent:[NSSWF:NSLS(@"Reconnected to %@", @"Reconnected chat message"), 534 [self name]]]; 535 } 525 536 526 537 [self postNotificationName:WCServerConnectionServerInfoDidChange object:self]; … … 542 553 543 554 _reconnecting = NO; 555 _autoReconnecting = NO; 544 556 545 557 [self triggerEvent:WCEventsServerConnected]; … … 956 968 957 969 - (void)reconnect { 958 _shouldReconnect = NO; 970 _autoReconnecting = NO; 971 972 [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(_autoReconnect) object:NULL]; 959 973 960 974 [self postNotificationName:WCServerConnectionWillReconnect object:self]; WiredClient/trunk/WCSettings.h
r4799 r4813 40 40 #define WCPreventMultipleConnections @"WCPreventMultipleConnections" 41 41 #define WCConfirmDisconnect @"WCConfirmDisconnect" 42 #define WCAutoReconnect @"WCAutoReconnect" 43 #define WCAutoReconnectTime @"WCAutoReconnectTime" 42 44 43 45 #define WCChatTextColor @"WCChatTextColor" WiredClient/trunk/WCSettings.m
r4799 r4813 184 184 @"Vy/xW31D+jfvNtPdS+ASBQAAAABJRU5ErkJggg==", 185 185 WCCustomIcon, 186 186 187 [NSNumber numberWithBool:YES], 187 188 WCShowConnectAtStartup, … … 190 191 [NSNumber numberWithBool:NO], 191 192 WCShowTrackersAtStartup, 193 192 194 [NSNumber numberWithBool:NO], 193 195 WCAutoHideOnSwitch, … … 196 198 [NSNumber numberWithBool:YES], 197 199 WCConfirmDisconnect, 200 [NSNumber numberWithBool:NO], 201 WCAutoReconnect, 202 [NSNumber numberWithFloat:30.0], 203 WCAutoReconnectTime, 198 204 199 205 // --- interface/chat
