Changeset 3603
- Timestamp:
- 03/05/07 11:00:21 (1 year ago)
- Files:
-
- trunk/Controllers/MVConnectionsController.m (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Controllers/MVConnectionsController.m
r3597 r3603 432 432 if( [_joinRooms count] ) [connection joinChatRoomsNamed:_joinRooms]; 433 433 434 if( [self showConsoleOnConnectForConnection:connection] )435 [[JVChatController defaultController] chatConsoleForConnection:connection ifExists:NO];436 437 [connection connectToServer:[newAddress stringValue] onPort:[newPort intValue] asUser:[newNickname stringValue]];438 439 434 [self addConnection:connection keepBookmark:(BOOL)[newRemember state]]; 440 435 [self setJoinRooms:_joinRooms forConnection:connection]; 436 437 [connection connectToServer:[newAddress stringValue] onPort:[newPort intValue] asUser:[newNickname stringValue]]; 441 438 442 439 [[self window] makeKeyAndOrderFront:nil]; … … 763 760 ( ! [[url port] unsignedShortValue] || [connection serverPort] == [[url port] unsignedShortValue] ) ) { 764 761 765 if( ! [connection isConnected] && connect ) {766 if( [self showConsoleOnConnectForConnection:connection] )767 [[JVChatController defaultController] chatConsoleForConnection:connection ifExists:NO];768 [connection connect];769 }770 771 762 if( target ) [connection joinChatRoomNamed:target]; 772 763 else [[self window] orderFront:nil]; 764 765 if( ! [connection isConnected] && connect ) 766 [connection connect]; 773 767 774 768 [connections selectRow:[_bookmarks indexOfObject:info] byExtendingSelection:NO]; … … 795 789 [connection setOutgoingChatFormat:[[NSUserDefaults standardUserDefaults] integerForKey:@"JVChatFormat"]]; 796 790 791 [self addConnection:connection keepBookmark:NO]; 792 797 793 if( connect ) { 798 if( [self showConsoleOnConnectForConnection:connection] )799 [[JVChatController defaultController] chatConsoleForConnection:connection ifExists:NO];800 794 if( target ) [connection joinChatRoomNamed:target]; 801 795 [connection connect]; 802 796 } 803 804 [self addConnection:connection keepBookmark:NO];805 797 806 798 [[self window] orderFront:nil]; … … 1628 1620 NSArray *list = [[NSUserDefaults standardUserDefaults] arrayForKey:@"MVChatBookmarks"]; 1629 1621 NSEnumerator *enumerator = [list objectEnumerator]; 1630 NSMutableArray *bookmarks = [NSMutableArray array];1631 1622 NSMutableDictionary *info = nil; 1632 1623 1633 1624 [self _deregisterNotificationsForConnection:nil]; // deregister all connections 1625 1626 [_bookmarks release]; 1627 _bookmarks = [[NSMutableArray alloc] init]; 1634 1628 1635 1629 while( ( info = [enumerator nextObject] ) ) { … … 1688 1682 [connection setSecure:[[info objectForKey:@"secure"] boolValue]]; 1689 1683 1684 [info setObject:connection forKey:@"connection"]; 1685 1686 [_bookmarks addObject:info]; 1687 1688 [self _registerNotificationsForConnection:connection]; 1689 1690 1690 if( [[info objectForKey:@"automatic"] boolValue] && ! ( [[[NSApplication sharedApplication] currentEvent] modifierFlags] & NSShiftKeyMask ) ) { 1691 if( [[info objectForKey:@"showConsole"] boolValue] )1692 [[JVChatController defaultController] chatConsoleForConnection:connection ifExists:NO];1693 1694 1691 [connection setPassword:[[MVKeyChain defaultKeyChain] internetPasswordForServer:[connection server] securityDomain:[connection server] account:nil path:nil port:[connection serverPort] protocol:MVKeyChainProtocolIRC authenticationType:MVKeyChainAuthenticationTypeDefault]]; 1695 1696 1692 [connection connect]; 1697 1693 } 1698 1699 [info setObject:connection forKey:@"connection"]; 1700 [self _registerNotificationsForConnection:connection]; 1701 1702 [bookmarks addObject:info]; 1703 } 1704 1705 [_bookmarks autorelease]; 1706 _bookmarks = [bookmarks retain]; 1694 } 1707 1695 1708 1696 [connections noteNumberOfRowsChanged]; … … 1850 1838 MVChatConnection *connection = [[_bookmarks objectAtIndex:[connections selectedRow]] objectForKey:@"connection"]; 1851 1839 [connection setPassword:[[MVKeyChain defaultKeyChain] internetPasswordForServer:[connection server] securityDomain:[connection server] account:nil path:nil port:[connection serverPort] protocol:MVKeyChainProtocolIRC authenticationType:MVKeyChainAuthenticationTypeDefault]]; 1852 if( [self showConsoleOnConnectForConnection:connection] )1853 [[JVChatController defaultController] chatConsoleForConnection:connection ifExists:NO];1854 1840 [connection connect]; 1855 1841 }
