Changeset 4084
- Timestamp:
- 05/07/06 17:18:31 (3 years ago)
- Files:
-
- WiredClient/trunk/English.lproj/InfoPlist.strings (modified) (1 diff)
- WiredClient/trunk/English.lproj/Preferences.nib/classes.nib (modified) (1 diff)
- WiredClient/trunk/English.lproj/Preferences.nib/info.nib (modified) (1 diff)
- WiredClient/trunk/English.lproj/Preferences.nib/keyedobjects.nib (modified) (previous)
- WiredClient/trunk/English.lproj/Preferences.nib/objects.nib (modified) (previous)
- WiredClient/trunk/English.lproj/ReleaseNotes.rtf (modified) (2 diffs)
- WiredClient/trunk/NSAlert-WCAdditions.m (modified) (2 diffs)
- WiredClient/trunk/WCApplicationController.m (modified) (2 diffs)
- WiredClient/trunk/WCMessages.m (modified) (5 diffs)
- WiredClient/trunk/WCPreferences.h (modified) (1 diff)
- WiredClient/trunk/WCPreferences.m (modified) (4 diffs)
- WiredClient/trunk/WCPublicChat.m (modified) (7 diffs)
- WiredClient/trunk/WCServerConnection.m (modified) (2 diffs)
- WiredClient/trunk/WCSettings.h (modified) (1 diff)
- WiredClient/trunk/WCTrackers.m (modified) (2 diffs)
- WiredClient/trunk/WCTransfers.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/English.lproj/InfoPlist.strings
r3420 r4084 1 1 /* Localized versions of Info.plist keys */ 2 2 CFBundleName = "Wired Client"; 3 CFBundleShortVersionString = "1.3 ";4 CFBundleGetInfoString = "Wired Client 1.3 , Copyright 2003-2006 Zanka Software.";3 CFBundleShortVersionString = "1.3.1"; 4 CFBundleGetInfoString = "Wired Client 1.3.1, Copyright 2003-2006 Zanka Software."; 5 5 NSHumanReadableCopyright = "Copyright 2003-2006 Zanka Software."; 6 6 WiredClient/trunk/English.lproj/Preferences.nib/classes.nib
r3984 r4084 102 102 "_removeTransfersButton" = NSButton; 103 103 "_showConnectAtStartupButton" = NSButton; 104 "_showDialogButton" = NSButton; 104 105 "_showDockAtStartupButton" = NSButton; 105 106 "_showTrackersAtStartupButton" = NSButton; WiredClient/trunk/English.lproj/Preferences.nib/info.nib
r3907 r4084 14 14 </array> 15 15 <key>IBSystem Version</key> 16 <string>8 H14</string>16 <string>8I127</string> 17 17 </dict> 18 18 </plist> WiredClient/trunk/English.lproj/ReleaseNotes.rtf
r3871 r4084 4 4 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural 5 5 6 \f0\b\fs36 \cf2 Wired Client 1.3 Read Me\cf0 \6 \f0\b\fs36 \cf2 Wired Client 1.3.1 Read Me\cf0 \ 7 7 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural 8 8 … … 27 27 \f0\b \cf0 \ 28 28 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural 29 \cf2 1.3\ 29 \cf2 1.3.1\ 30 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural 31 32 \f1\b0 \cf0 - Add option to show a dialog for messages and broadcasts\ 33 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural 34 35 \f0\b \cf2 \ 36 1.3\ 30 37 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural 31 38 WiredClient/trunk/NSAlert-WCAdditions.m
r3546 r4084 32 32 33 33 - (void)runNonModal { 34 NSEnumerator *enumerator; 35 NSMutableArray *views; 36 NSView *view; 37 NSButton *button; 38 39 views = [NSMutableArray array]; 40 enumerator = [[[[self window] contentView] subviews] objectEnumerator]; 41 42 while((view = [enumerator nextObject])) { 43 if([view isKindOfClass:[NSButton class]] && ![[self buttons] containsObject:view]) 44 [views addObject:view]; 45 } 46 47 [views makeObjectsPerformSelector:@selector(removeFromSuperviewWithoutNeedingDisplay)]; 48 49 button = [[self buttons] objectAtIndex:0]; 50 [button setTarget:self]; 51 [button setAction:@selector(_closeAlert:)]; 52 53 [[NSNotificationCenter defaultCenter] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsError]; 54 55 [[self window] makeKeyAndOrderFront:self]; 56 57 [self retain]; 58 } 59 60 61 62 - (void)_closeAlert:(id)sender { 63 [self autorelease]; 64 65 [[self window] orderOut:self]; 34 [self beginSheetModalForWindow:NULL]; 66 35 } 67 36 … … 69 38 70 39 - (void)beginSheetModalForWindow:(NSWindow *)window { 71 [[NSNotificationCenter defaultCenter] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsError];72 73 40 [self beginSheetModalForWindow:window modalDelegate:NULL didEndSelector:NULL contextInfo:NULL]; 74 41 } WiredClient/trunk/WCApplicationController.m
r4004 r4084 32 32 #import "WCDock.h" 33 33 #import "WCKeychain.h" 34 #import "WCMessage.h" 34 35 #import "WCMessages.h" 35 36 #import "WCNews.h" … … 250 251 251 252 - (void)messagesDidAddMessage:(NSNotification *)notification { 252 _unread++; 253 254 [self performSelector:@selector(_updateApplicationIcon) withObject:NULL afterDelay:0.0]; 253 if(![[notification object] isRead]) { 254 _unread++; 255 256 [self performSelector:@selector(_updateApplicationIcon) withObject:NULL afterDelay:0.0]; 257 } 255 258 } 256 259 WiredClient/trunk/WCMessages.m
r3996 r4084 27 27 */ 28 28 29 #import "NSAlert-WCAdditions.h" 29 30 #import "WCConversation.h" 30 31 #import "WCMessage.h" … … 54 55 55 56 - (id)_initMessagesWithConnection:(WCServerConnection *)connection; 57 58 - (void)_showDialogForMessage:(WCMessage *)message; 56 59 57 60 - (void)_update; … … 119 122 #pragma mark - 120 123 124 - (void)_showDialogForMessage:(WCMessage *)message { 125 NSAlert *alert; 126 NSString *title, *nick, *server, *time; 127 128 nick = [[message user] nick]; 129 server = [[self connection] name]; 130 time = [[message date] timeStringWithSeconds:NO]; 131 132 if([message type] == WCMessagePrivateMessage) 133 title = [NSSWF:NSLS(@"Private message from %@ on %@ at %@", @"Message dialog title (nick, server, time)"), nick, server, time]; 134 else 135 title = [NSSWF:NSLS(@"Broadcast from %@ on %@ at %@", @"Broadcast dialog title (nick, server, time)"), nick, server, time]; 136 137 alert = [NSAlert alertWithMessageText:title 138 defaultButton:nil 139 alternateButton:nil 140 otherButton:nil 141 informativeTextWithFormat:@"%@", [message message]]; 142 143 [alert setAlertStyle:NSInformationalAlertStyle]; 144 [alert runNonModal]; 145 146 [message setRead:YES]; 147 } 148 149 150 151 #pragma mark - 152 121 153 - (void)_update { 122 154 [_messageTextView setFont:[WCSettings objectForKey:WCMessagesFont]]; … … 566 598 [[_conversationsOutlineView delegate] outlineViewSelectionDidChange:NULL]; 567 599 568 _unread++; 600 if([[WCSettings eventForTag:WCEventsMessageReceived] boolForKey:WCEventsShowDialog]) 601 [self _showDialogForMessage:message]; 602 else 603 _unread++; 569 604 570 605 [[WCStats stats] addUnsignedInt:1 forKey:WCStatsMessagesReceived]; 571 606 572 [[self connection] postNotificationName:WCMessagesDidAddMessage object: [self connection]];607 [[self connection] postNotificationName:WCMessagesDidAddMessage object:message]; 573 608 574 609 [[self connection] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsMessageReceived]; … … 602 637 [[_conversationsOutlineView delegate] outlineViewSelectionDidChange:NULL]; 603 638 604 _unread++; 605 606 [[self connection] postNotificationName:WCMessagesDidAddMessage object:[self connection]]; 639 if([[WCSettings eventForTag:WCEventsBroadcastReceived] boolForKey:WCEventsShowDialog]) 640 [self _showDialogForMessage:message]; 641 else 642 _unread++; 643 644 [[self connection] postNotificationName:WCMessagesDidAddMessage object:message]; 607 645 608 646 [[self connection] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsBroadcastReceived]; WiredClient/trunk/WCPreferences.h
r3984 r4084 117 117 IBOutlet NSButton *_bounceInDockButton; 118 118 IBOutlet NSButton *_postInChatButton; 119 IBOutlet NSButton *_showDialogButton; 119 120 120 121 IBOutlet NSTextField *_downloadFolderTextField; WiredClient/trunk/WCPreferences.m
r3984 r4084 260 260 } 261 261 262 if([event boolForKey:WCEventsPlaySound] || [event boolForKey:WCEventsBounceInDock] || [event boolForKey:WCEventsPostInChat]) 262 if([event boolForKey:WCEventsPlaySound] || [event boolForKey:WCEventsBounceInDock] || 263 [event boolForKey:WCEventsPostInChat] || [event boolForKey:WCEventsShowDialog]) 263 264 [item setImage:[NSImage imageNamed:@"EventOn"]]; 264 265 else … … 601 602 [newEvent setBool:[_bounceInDockButton state] forKey:WCEventsBounceInDock]; 602 603 [newEvent setBool:[_postInChatButton state] forKey:WCEventsPostInChat]; 604 [newEvent setBool:[_showDialogButton state] forKey:WCEventsShowDialog]; 603 605 [WCSettings setEvent:newEvent forTag:_selectedEvent]; 604 606 [newEvent release]; … … 614 616 [_bounceInDockButton setState:[event boolForKey:WCEventsBounceInDock]]; 615 617 [_postInChatButton setState:[event boolForKey:WCEventsPostInChat]]; 618 [_showDialogButton setState:[event boolForKey:WCEventsShowDialog]]; 616 619 617 620 on = (tag == WCEventsUserJoined || tag == WCEventsUserChangedNick || tag == WCEventsUserLeft || tag == WCEventsUserChangedStatus); 618 621 [_postInChatButton setEnabled:on]; 619 622 623 on = (tag == WCEventsMessageReceived || tag == WCEventsBroadcastReceived); 624 [_showDialogButton setEnabled:on]; 625 620 626 [self _touchEvents]; 621 627 … … 628 634 BOOL on; 629 635 630 on = [_playSoundButton state] || [_bounceInDockButton state] || [_postInChatButton state];636 on = ([_playSoundButton state] || [_bounceInDockButton state] || [_postInChatButton state] || [_showDialogButton state]); 631 637 [[_eventsPopUpButton selectedItem] setImage:[NSImage imageNamed:on ? @"EventOn" : @"EventOff"]]; 632 638 WiredClient/trunk/WCPublicChat.m
r3996 r4084 180 180 181 181 item = [_toolbarItems objectForKey:@"Messages"]; 182 [item setImage:[[NSImage imageNamed:@"Messages"] badgedImageWithInt: _unreadMessages]];182 [item setImage:[[NSImage imageNamed:@"Messages"] badgedImageWithInt:[[[self connection] messages] numberOfUnreadMessages]]]; 183 183 } 184 184 … … 189 189 190 190 item = [_toolbarItems objectForKey:@"News"]; 191 [item setImage:[[NSImage imageNamed:@"News"] badgedImageWithInt: _unreadPosts]];191 [item setImage:[[NSImage imageNamed:@"News"] badgedImageWithInt:[[[self connection] news] numberOfUnreadPosts]]]; 192 192 } 193 193 … … 313 313 [self showWindow:self]; 314 314 315 if([[self window] isVisible]) 315 if([[self window] isVisible]) { 316 [[NSNotificationCenter defaultCenter] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsError]; 316 317 [[error alert] beginSheetModalForWindow:[self window]]; 318 } 317 319 } 318 320 … … 433 435 434 436 - (void)messagesDidAddMessage:(NSNotification *)notification { 435 _unreadMessages++;436 437 437 [self performSelector:@selector(_updateMessagesIcon) withObject:NULL afterDelay:0.0]; 438 438 } … … 441 441 442 442 - (void)messagesDidReadMessage:(NSNotification *)notification { 443 _unreadMessages--;444 445 443 [self performSelector:@selector(_updateMessagesIcon) withObject:NULL afterDelay:0.0]; 446 444 } … … 449 447 450 448 - (void)newsDidAddPost:(NSNotification *)notification { 451 _unreadPosts++;452 453 449 [self performSelector:@selector(_updateNewsIcon) withObject:NULL afterDelay:0.0]; 454 450 } … … 457 453 458 454 - (void)newsDidReadPost:(NSNotification *)notification { 459 _unreadPosts--;460 461 455 [self performSelector:@selector(_updateNewsIcon) withObject:NULL afterDelay:0.0]; 462 456 } WiredClient/trunk/WCServerConnection.m
r3977 r4084 397 397 [self showWindow:self]; 398 398 399 if([[self window] isVisible]) 399 if([[self window] isVisible]) { 400 [[NSNotificationCenter defaultCenter] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsError]; 400 401 [[error alert] beginSheetModalForWindow:[self window]]; 402 } 401 403 } 402 404 … … 416 418 [self showWindow:self]; 417 419 420 [[NSNotificationCenter defaultCenter] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsError]; 421 418 422 if([[self window] isVisible]) 419 423 [[error alert] beginSheetModalForWindow:[self window]]; WiredClient/trunk/WCSettings.h
r3984 r4084 128 128 #define WCEventsBounceInDock @"WCEventsBounceInDock" 129 129 #define WCEventsPostInChat @"WCEventsPostInChat" 130 #define WCEventsShowDialog @"WCEventsShowDialog" 130 131 131 132 #define WCDownloadFolder @"WCDownloadFolder" WiredClient/trunk/WCTrackers.m
r3996 r4084 349 349 error = [WCError errorWithDomain:WCWiredClientErrorDomain code:WCWiredClientServerDisconnected]; 350 350 351 [[NSNotificationCenter defaultCenter] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsError]; 352 351 353 [[error alert] beginSheetModalForWindow:[self window]]; 352 354 … … 373 375 error = [[notification userInfo] objectForKey:WCErrorKey]; 374 376 375 [[error alert] beginSheetModalForWindow:[self window] modalDelegate:NULL didEndSelector:NULL contextInfo:NULL]; 377 [[NSNotificationCenter defaultCenter] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsError]; 378 379 [[error alert] beginSheetModalForWindow:[self window]]; 376 380 377 381 [connection terminate]; WiredClient/trunk/WCTransfers.m
r3996 r4084 203 203 [self showWindow:self]; 204 204 205 [[NSNotificationCenter defaultCenter] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsError]; 206 205 207 [[error alert] beginSheetModalForWindow:[self window]]; 206 208 }
