Changeset 1279
- Timestamp:
- 05/20/04 08:10:53 (5 years ago)
- Files:
-
- WiredClient/trunk/WCAccounts.m (modified) (2 diffs)
- WiredClient/trunk/WCChat.m (modified) (19 diffs)
- WiredClient/trunk/WCClient.m (modified) (2 diffs)
- WiredClient/trunk/WCConsole.m (modified) (2 diffs)
- WiredClient/trunk/WCFiles.m (modified) (2 diffs)
- WiredClient/trunk/WCMain.m (modified) (4 diffs)
- WiredClient/trunk/WCMessages.m (modified) (4 diffs)
- WiredClient/trunk/WCNews.m (modified) (2 diffs)
- WiredClient/trunk/WCPreferences.m (modified) (6 diffs)
- WiredClient/trunk/WCPublicChat.m (modified) (3 diffs)
- WiredClient/trunk/WCSecureSocket.m (modified) (2 diffs)
- WiredClient/trunk/WCToolbar.m (modified) (2 diffs)
- WiredClient/trunk/WCTransfers.m (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/WCAccounts.m
r1247 r1279 1 /* $Id: WCAccounts.m,v 1.1 2 2004/05/18 22:29:31morris Exp $ */1 /* $Id: WCAccounts.m,v 1.13 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 155 155 156 156 // --- show window 157 if([ [WCSettings objectForKey:WCShowAccounts] boolValue])157 if([WCSettings boolForKey:WCShowAccounts]) 158 158 [self showWindow:self]; 159 159 } WiredClient/trunk/WCChat.m
r1244 r1279 1 /* $Id: WCChat.m,v 1. 39 2004/05/18 22:24:28morris Exp $ */1 /* $Id: WCChat.m,v 1.40 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 395 395 396 396 // --- post chat about it 397 if([ [WCSettings objectForKey:WCShowJoinLeave] boolValue]) {397 if([WCSettings boolForKey:WCShowJoinLeave]) { 398 398 [self printEvent:[NSString stringWithFormat: 399 399 NSLocalizedString(@"%@ has joined", @"Client has joined message (nick)"), 400 400 nick]]; 401 402 401 } 403 402 … … 440 439 441 440 // --- post chat about it 442 if([ [WCSettings objectForKey:WCShowJoinLeave] boolValue]) {441 if([WCSettings boolForKey:WCShowJoinLeave]) { 443 442 [self printEvent:[NSString stringWithFormat: 444 443 NSLocalizedString(@"%@ has left", @"Client has left message (nick)"), … … 503 502 504 503 // --- post chat about nick changes 505 if(![nick isEqualToString:[user nick]] && [ [WCSettings objectForKey:WCShowJoinLeave] boolValue]) {504 if(![nick isEqualToString:[user nick]] && [WCSettings boolForKey:WCShowJoinLeave]) { 506 505 [self printEvent:[NSString stringWithFormat: 507 506 NSLocalizedString(@"%@ is now known as %@", @"Client rename message (oldnick, newnick)"), … … 564 563 565 564 // --- post chat about it 566 if([ [WCSettings objectForKey:WCShowJoinLeave] boolValue]) {565 if([WCSettings boolForKey:WCShowJoinLeave]) { 567 566 [self printEvent:[NSString stringWithFormat: 568 567 NSLocalizedString(@"%@ was kicked by %@ (%@)", @"Client kicked message (victim, killer, message)"), … … 613 612 614 613 // --- post chat about it 615 if([ [WCSettings objectForKey:WCShowJoinLeave] boolValue]) {614 if([WCSettings boolForKey:WCShowJoinLeave]) { 616 615 [self printEvent:[NSString stringWithFormat: 617 616 NSLocalizedString(@"%@ was banned by %@ (%@)", @"Client banned message (victim, killer, message)"), … … 674 673 675 674 // --- insert a timestamp 676 if([ [WCSettings objectForKey:WCTimestampChat] boolValue]) {675 if([WCSettings boolForKey:WCTimestampChat]) { 677 676 interval = [[WCSettings objectForKey:WCTimestampChatInterval] doubleValue]; 678 677 date = [NSDate dateWithTimeIntervalSinceNow:0 - interval]; … … 688 687 689 688 // --- lower the prepend offset a bit when using timestamps 690 if([ [WCSettings objectForKey:WCTimestampEveryLine] boolValue])689 if([WCSettings boolForKey:WCTimestampEveryLine]) 691 690 offset= WCChatPrepend - 4; 692 691 else … … 699 698 700 699 // --- add timestamp 701 if([ [WCSettings objectForKey:WCTimestampEveryLine] boolValue]) {700 if([WCSettings boolForKey:WCTimestampEveryLine]) { 702 701 format = [[[NSUserDefaults standardUserDefaults] 703 702 objectForKey:NSTimeFormatString] mutableCopy]; … … 720 719 output = [[_chatOutputTextView textStorage] length] > 0 ? @"\n" : @""; 721 720 722 if([ [WCSettings objectForKey:WCChatStyle] intValue] == WCChatStyleWired) {721 if([WCSettings intForKey:WCChatStyle] == WCChatStyleWired) { 723 722 if(length < 0) { 724 723 nick = [nick substringToIndex:offset]; … … 728 727 } 729 728 730 if([ [WCSettings objectForKey:WCTimestampEveryLine] boolValue]) {729 if([WCSettings boolForKey:WCTimestampEveryLine]) { 731 730 output = [output stringByAppendingFormat: 732 731 NSLocalizedString(@"%@ %@%@: %@", @"Chat message, Wired style (time, padding, nick, message)"), … … 738 737 } 739 738 } 740 else if([ [WCSettings objectForKey:WCChatStyle] intValue] == WCChatStyleIRC) {741 if([ [WCSettings objectForKey:WCTimestampEveryLine] boolValue]) {739 else if([WCSettings intForKey:WCChatStyle] == WCChatStyleIRC) { 740 if([WCSettings boolForKey:WCTimestampEveryLine]) { 742 741 output = [output stringByAppendingFormat: 743 742 NSLocalizedString(@"%@ <%@> %@", @"Chat message, IRC style (time, nick, message)"), … … 801 800 802 801 // --- insert a timestamp 803 if([ [WCSettings objectForKey:WCTimestampChat] boolValue]) {802 if([WCSettings boolForKey:WCTimestampChat]) { 804 803 interval = [[WCSettings objectForKey:WCTimestampChatInterval] doubleValue]; 805 804 date = [NSDate dateWithTimeIntervalSinceNow:0 - interval]; … … 818 817 819 818 // --- add timestamp 820 if([ [WCSettings objectForKey:WCTimestampEveryLine] boolValue]) {819 if([WCSettings boolForKey:WCTimestampEveryLine]) { 821 820 format = [[[NSUserDefaults standardUserDefaults] 822 821 objectForKey:NSTimeFormatString] mutableCopy]; … … 840 839 841 840 if([[WCSettings objectForKey:WCChatStyle] intValue] == WCChatStyleWired) { 842 if([ [WCSettings objectForKey:WCTimestampEveryLine] boolValue]) {841 if([WCSettings boolForKey:WCTimestampEveryLine]) { 843 842 output = [output stringByAppendingFormat: 844 843 NSLocalizedString(@"%@ *** %@ %@", @"Action chat message (time, nick, message)"), … … 851 850 } 852 851 else if([[WCSettings objectForKey:WCChatStyle] intValue] == WCChatStyleIRC) { 853 if([ [WCSettings objectForKey:WCTimestampEveryLine] boolValue]) {852 if([WCSettings boolForKey:WCTimestampEveryLine]) { 854 853 output = [output stringByAppendingFormat: 855 854 NSLocalizedString(@"%@ * %@ %@", @"Action chat message (time, nick, message)"), … … 1015 1014 } 1016 1015 // --- user pressed tab key 1017 else if(selector == @selector(insertTab:) && 1018 [[WCSettings objectForKey:WCTabCompleteNicks] boolValue]) { 1016 else if(selector == @selector(insertTab:) && [WCSettings boolForKey:WCTabCompleteNicks]) { 1019 1017 NSMutableArray *users; 1020 1018 NSString *string, *nick, *completed = @""; … … 1090 1088 1091 1089 // --- get required modifier 1092 history = [ [WCSettings objectForKey:WCHistoryScrollback] boolValue];1093 modifier = [ [WCSettings objectForKey:WCHistoryScrollbackModifier] intValue];1090 history = [WCSettings boolForKey:WCHistoryScrollback]; 1091 modifier = [WCSettings intForKey:WCHistoryScrollbackModifier]; 1094 1092 1095 1093 // --- user pressed the arrow up key … … 1271 1269 output = [[_chatOutputTextView textStorage] length] > 0 ? @"\n" : @""; 1272 1270 1273 if([ [WCSettings objectForKey:WCTimestampEveryLine] boolValue]) {1271 if([WCSettings boolForKey:WCTimestampEveryLine]) { 1274 1272 format = [[[NSUserDefaults standardUserDefaults] 1275 1273 objectForKey:NSTimeFormatString] mutableCopy]; WiredClient/trunk/WCClient.m
r1254 r1279 1 /* $Id: WCClient.m,v 1.2 1 2004/05/19 00:31:26morris Exp $ */1 /* $Id: WCClient.m,v 1.22 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 231 231 [self sendCommand:WCWhoCommand withArgument:[NSString stringWithFormat:@"%d", 1]]; 232 232 233 if([ [WCSettings objectForKey:WCLoadNewsOnLogin] boolValue])233 if([WCSettings boolForKey:WCLoadNewsOnLogin]) 234 234 [self sendCommand:WCNewsCommand]; 235 235 WiredClient/trunk/WCConsole.m
r1108 r1279 1 /* $Id: WCConsole.m,v 1. 4 2004/03/28 23:35:07morris Exp $ */1 /* $Id: WCConsole.m,v 1.5 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 91 91 92 92 // --- show window 93 if([ [WCSettings objectForKey:WCShowConsole] boolValue])93 if([WCSettings boolForKey:WCShowConsole]) 94 94 [self showWindow:self]; 95 95 } WiredClient/trunk/WCFiles.m
r1278 r1279 1 /* $Id: WCFiles.m,v 1.2 6 2004/05/20 04:03:32morris Exp $ */1 /* $Id: WCFiles.m,v 1.27 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 684 684 // --- determine settings 685 685 optionKey = (([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) != 0); 686 newWindows = [ [WCSettings objectForKey:WCOpenFoldersInNewWindows] boolValue];686 newWindows = [WCSettings boolForKey:WCOpenFoldersInNewWindows]; 687 687 688 688 if((newWindows && !optionKey) || (!newWindows && optionKey)) { WiredClient/trunk/WCMain.m
r1268 r1279 1 /* $Id: WCMain.m,v 1.2 5 2004/05/19 21:55:48morris Exp $ */1 /* $Id: WCMain.m,v 1.26 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 169 169 170 170 // --- open the connection window 171 if([ [WCSettings objectForKey:WCShowConnectAtStartup] boolValue] == YES)171 if([WCSettings boolForKey:WCShowConnectAtStartup]) 172 172 [self connect:self]; 173 173 174 174 // --- open the tackers window 175 if([ [WCSettings objectForKey:WCShowTrackersAtStartup] boolValue] == YES)175 if([WCSettings boolForKey:WCShowTrackersAtStartup]) 176 176 [_trackers showWindow:self]; 177 177 } … … 233 233 // closing ourselves 234 234 if([[connection client] connected] && 235 [ [WCSettings objectForKey:WCConfirmDisconnect] boolValue] == YES) {235 [WCSettings boolForKey:WCConfirmDisconnect]) { 236 236 if(NSRunAlertPanel(NSLocalizedString(@"Are you sure you want to quit?", @"Quit dialog title"), 237 237 NSLocalizedString(@"All connections will be terminated.", @"Quit dialog description"), … … 306 306 - (void)preferencesDidChange:(NSNotification *)notification { 307 307 // --- add/remove ellipsis depending on if a dialog will be shown or not 308 if([ [WCSettings objectForKey:WCConfirmDisconnect] boolValue]) {308 if([WCSettings boolForKey:WCConfirmDisconnect]) { 309 309 [_disconnectMenuItem setTitle:[NSString stringWithFormat: 310 310 @"%@%C", NSLocalizedString(@"Disconnect", @"Disconnect menu item"), 0x2026]]; WiredClient/trunk/WCMessages.m
r1180 r1279 1 /* $Id: WCMessages.m,v 1.1 7 2004/05/16 05:19:30morris Exp $ */1 /* $Id: WCMessages.m,v 1.18 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 144 144 145 145 // --- show window 146 if([ [WCSettings objectForKey:WCShowMessages] boolValue])146 if([WCSettings boolForKey:WCShowMessages]) 147 147 [self showWindow:self]; 148 148 } … … 202 202 [message setDate:[NSDate date]]; 203 203 204 if([[WCSettings objectForKey:WCShowMessagesInChat] boolValue])205 [message setRead:YES];206 else207 [message setRead:NO];208 209 204 // --- add it to our array of messages 210 205 [self add:message]; … … 219 214 220 215 // --- display an actual receive message window if we should 221 if([ [WCSettings objectForKey:WCShowMessagesInForeground] boolValue])216 if([WCSettings boolForKey:WCShowMessagesInForeground]) 222 217 [(WCReceiveMessage *) [WCReceiveMessage alloc] initWithConnection:_connection message:message]; 223 218 WiredClient/trunk/WCNews.m
r1209 r1279 1 /* $Id: WCNews.m,v 1.1 2 2004/05/17 17:13:12morris Exp $ */1 /* $Id: WCNews.m,v 1.13 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 129 129 130 130 // --- show window 131 if([ [WCSettings objectForKey:WCShowNews] boolValue])131 if([WCSettings boolForKey:WCShowNews]) 132 132 [self showWindow:self]; 133 133 } WiredClient/trunk/WCPreferences.m
r1274 r1279 1 /* $Id: WCPreferences.m,v 1.3 1 2004/05/20 03:52:42morris Exp $ */1 /* $Id: WCPreferences.m,v 1.32 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 28 28 29 29 #import "NSDataAdditions.h" 30 #import "NSPopUpButtonAdditions.h" 30 31 #import "WCIconMatrix.h" 31 32 #import "WCIcons.h" … … 160 161 } 161 162 162 icon = [ [WCSettings objectForKey:WCIcon] intValue];163 icon = [WCSettings intForKey:WCIcon]; 163 164 164 165 if(icon == 0) … … 177 178 [_iconSizeMatrix selectCellWithTag:[WCSettings intForKey:WCIconSize]]; 178 179 [_historyScrollbackButton setState:[WCSettings boolForKey:WCHistoryScrollback]]; 179 [_historyScrollbackModifierPopUpButton selectItemAtIndex: 180 [_historyScrollbackModifierPopUpButton indexOfItemWithTag: 181 [[WCSettings objectForKey:WCHistoryScrollbackModifier] intValue]]]; 180 [_historyScrollbackModifierPopUpButton selectItemWithTag: 181 [WCSettings intForKey:WCHistoryScrollbackModifier]]; 182 182 [_tabCompleteNicksButton setState:[WCSettings boolForKey:WCTabCompleteNicks]]; 183 183 [_tabCompleteNicksTextField setStringValue:[WCSettings objectForKey:WCTabCompleteNicksString]]; … … 187 187 [_timestampChatButton setState:[WCSettings boolForKey:WCTimestampChat]]; 188 188 [_timestampChatIntervalTextField setStringValue:[NSString stringWithFormat:@"%.0f", 189 (double) [ [WCSettings objectForKey:WCTimestampChatInterval] intValue] / (double) 60]];189 (double) [WCSettings intForKey:WCTimestampChatInterval] / (double) 60]]; 190 190 [_timestampEveryLineButton setState:[WCSettings boolForKey:WCTimestampEveryLine]]; 191 191 [_timestampEveryLineColorWell setColor: … … 303 303 } 304 304 305 if([[_iconMatrix selectedCell] tag] != [ [WCSettings objectForKey:WCIcon] intValue]) {305 if([[_iconMatrix selectedCell] tag] != [WCSettings intForKey:WCIcon]) { 306 306 // --- make sure we only change the icon if it's actually changed 307 307 [WCSettings setObject:[NSNumber numberWithInt:[[_iconMatrix selectedCell] tag]] WiredClient/trunk/WCPublicChat.m
r1236 r1279 1 /* $Id: WCPublicChat.m,v 1.2 6 2004/05/18 18:34:00morris Exp $ */1 /* $Id: WCPublicChat.m,v 1.27 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 112 112 - (BOOL)windowShouldClose:(id)sender { 113 113 // --- if we're to confirm, pull down a sheet and handle window closing ourselves 114 if([ [WCSettings objectForKey:WCConfirmDisconnect] boolValue] == YES&&114 if([WCSettings boolForKey:WCConfirmDisconnect] && 115 115 [[_connection client] connected]) { 116 116 NSBeginAlertSheet(NSLocalizedString(@"Are you sure you want to disconnect?", @"Disconnect dialog title"), … … 289 289 return; 290 290 291 if(![ [WCSettings objectForKey:WCShowMessagesInChat] boolValue])291 if(![WCSettings boolForKey:WCShowMessagesInChat) 292 292 return; 293 293 WiredClient/trunk/WCSecureSocket.m
r1250 r1279 1 /* $Id: WCSecureSocket.m,v 1. 6 2004/05/18 23:41:53 morris Exp $ */1 /* $Id: WCSecureSocket.m,v 1.7 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 46 46 ciphers = [WCSettings objectForKey:WCSSLControlCiphers]; 47 47 } else { 48 if([ [WCSettings objectForKey:WCEncryptTransfers] boolValue])48 if([WCSettings boolForKey:WCEncryptTransfers]) 49 49 ciphers = [WCSettings objectForKey:WCSSLTransferCiphers]; 50 50 else WiredClient/trunk/WCToolbar.m
r1213 r1279 1 /* $Id: WCToolbar.m,v 1.1 3 2004/05/17 18:29:34morris Exp $ */1 /* $Id: WCToolbar.m,v 1.14 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 364 364 // --- if clicking disconnect will terminate connection without confirmation 365 365 if([[item itemIdentifier] isEqualToString:@"Disconnect"] && 366 ![ [WCSettings objectForKey:WCConfirmDisconnect] boolValue])366 ![WCSettings boolForKey:WCConfirmDisconnect]) 367 367 return [NSApp isActive]; 368 368 WiredClient/trunk/WCTransfers.m
r1275 r1279 1 /* $Id: WCTransfers.m,v 1.1 5 2004/05/20 03:55:13 morris Exp $ */1 /* $Id: WCTransfers.m,v 1.16 2004/05/20 06:10:53 morris Exp $ */ 2 2 3 3 /* … … 172 172 173 173 // --- show window 174 if([ [WCSettings objectForKey:WCShowTransfers] boolValue])174 if([WCSettings boolForKey:WCShowTransfers]) 175 175 [self showWindow:self]; 176 176 } … … 638 638 639 639 // --- request now or later 640 if([ [WCSettings objectForKey:WCQueueTransfers] boolValue] && count > 1)640 if([WCSettings boolForKey:WCQueueTransfers] && count > 1) 641 641 [transfer setState:WCTransferStateLocallyQueued]; 642 642 else … … 679 679 680 680 // --- request now or later 681 if([ [WCSettings objectForKey:WCQueueTransfers] boolValue] && count > 1)681 if([WCSettings boolForKey:WCQueueTransfers] && count > 1) 682 682 [transfer setState:WCTransferStateLocallyQueued]; 683 683 else
