Changeset 4974
- Timestamp:
- 10/18/07 21:34:14 (1 year ago)
- Files:
-
- WiredClient/trunk/WCAccounts.m (modified) (2 diffs)
- WiredClient/trunk/WCDock.m (modified) (3 diffs)
- WiredClient/trunk/WCFilesController.m (modified) (2 diffs)
- WiredClient/trunk/WCMessages.m (modified) (7 diffs)
- WiredClient/trunk/WCTrackers.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/WCAccounts.m
r4799 r4974 525 525 526 526 if(tableColumn == _nameTableColumn) { 527 NSImage *icon = NULL; 528 529 switch([account type]) { 530 case WCAccountUser: 531 icon = _userImage; 532 break; 533 534 case WCAccountGroup: 535 icon = _groupImage; 536 break; 537 } 538 539 return [NSDictionary dictionaryWithObjectsAndKeys: 540 [account name], WIIconCellTitleKey, 541 icon, WIIconCellIconKey, 542 NULL]; 527 return [account name]; 543 528 } 544 529 else if(tableColumn == _typeTableColumn) { … … 559 544 560 545 546 - (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { 547 if(tableColumn == _nameTableColumn) { 548 if([[self _accountAtIndex:row] type] == WCAccountUser) 549 [cell setImage:_userImage]; 550 else 551 [cell setImage:_groupImage]; 552 } 553 } 554 555 561 556 - (NSString *)tableView:(NSTableView *)tableView stringValueForRow:(NSInteger)row { 562 557 return [[self _accountAtIndex:row] name]; WiredClient/trunk/WCDock.m
r4799 r4974 223 223 224 224 iconCell = [[WIIconCell alloc] init]; 225 [iconCell setImageWidth:14.0];225 // [iconCell setImageWidth:14.0]; 226 226 [_nameTableColumn setDataCell:iconCell]; 227 227 [iconCell release]; … … 602 602 image = [image tintedImageWithColor:[NSColor colorWithDeviceWhite:1.0 alpha:0.5]]; 603 603 604 return [NSDictionary dictionaryWithObjectsAndKeys: 605 [connection name], WIIconCellTitleKey, 606 image, WIIconCellIconKey, 607 NULL]; 604 return [connection name]; 608 605 } 609 606 else if(tableColumn == _usersTableColumn) { … … 644 641 645 642 - (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { 643 WCServerConnection *connection; 644 NSImage *image; 645 646 connection = [self _connectionAtIndex:row]; 647 648 if(tableColumn == _nameTableColumn) { 649 image = [connection isConnected] ? _connectedImage : _disconnectedImage; 650 651 if([connection isHidden]) 652 image = [image tintedImageWithColor:[NSColor colorWithDeviceWhite:1.0 alpha:0.5]]; 653 654 [cell setImage:image]; 655 } 656 646 657 if([cell respondsToSelector:@selector(setTextColor:)]) { 647 [cell setTextColor:[ [self _connectionAtIndex:row]isHidden]658 [cell setTextColor:[connection isHidden] 648 659 ? [NSColor grayColor] 649 660 : [NSColor blackColor]]; WiredClient/trunk/WCFilesController.m
r4965 r4974 293 293 file = [self fileAtIndex:row]; 294 294 295 if(tableColumn == _nameTableColumn) { 296 return [NSDictionary dictionaryWithObjectsAndKeys: 297 [file name], WIIconCellTitleKey, 298 [file iconWithWidth:16.0], WIIconCellIconKey, 299 NULL]; 300 } 295 if(tableColumn == _nameTableColumn) 296 return [file name]; 301 297 else if(tableColumn == _kindTableColumn) 302 298 return [file kind]; … … 322 318 323 319 320 - (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { 321 if(tableColumn == _nameTableColumn) 322 [cell setImage:[[self fileAtIndex:row] iconWithWidth:16.0]]; 323 } 324 325 324 326 - (NSString *)tableView:(NSTableView *)tableView stringValueForRow:(NSInteger)row { 325 327 return [[self fileAtIndex:row] name]; WiredClient/trunk/WCMessages.m
r4965 r4974 1016 1016 1017 1017 - (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item { 1018 NSString *name = NULL; 1019 NSImage *image = NULL; 1018 NSString *name; 1020 1019 WCConversation *conversation; 1021 1020 NSUInteger count = 0; … … 1023 1022 if([item isKindOfClass:[NSString class]]) { 1024 1023 name = item; 1025 image = _conversationIcon;1026 1024 1027 1025 if([_titles indexOfObject:item] == 0) … … 1033 1031 conversation = item; 1034 1032 name = [conversation userNick]; 1035 image = NULL;1036 1033 count = [[self _messagesForConversation:conversation unreadOnly:YES] count]; 1037 1034 } … … 1040 1037 name = [name stringByAppendingFormat:@" (%lu)", count]; 1041 1038 1042 return [NSDictionary dictionaryWithObjectsAndKeys: 1043 [[NSAttributedString attributedStringWithString:name] attributedStringByApplyingFilter:_userFilter], 1044 WIIconCellAttributedTitleKey, 1045 image, 1046 WIIconCellIconKey, 1047 NULL]; 1039 return [[NSAttributedString attributedStringWithString:name] attributedStringByApplyingFilter:_userFilter]; 1048 1040 } 1049 1041 … … 1051 1043 1052 1044 - (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item { 1045 NSImage *image; 1053 1046 NSUInteger count = 0; 1054 1047 1055 1048 if([item isKindOfClass:[NSString class]]) { 1049 image = _conversationIcon; 1050 1056 1051 if([_titles indexOfObject:item] == 0) 1057 1052 count = [[self _unreadMessagesForType:WCMessagePrivateMessage] count]; … … 1061 1056 else if([item isKindOfClass:[WCConversation class]]) { 1062 1057 count = [[self _messagesForConversation:item unreadOnly:YES] count]; 1058 image = NULL; 1063 1059 } 1064 1060 … … 1067 1063 else 1068 1064 [cell setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; 1065 1066 [cell setImage:image]; 1069 1067 } 1070 1068 WiredClient/trunk/WCTrackers.m
r4963 r4974 558 558 tracker = item; 559 559 560 if(tableColumn == _nameTableColumn) { 561 return [NSDictionary dictionaryWithObjectsAndKeys: 562 [tracker nameWithNumberOfServersMatchingFilter:_filter], 563 WIIconCellTitleKey, 564 [tracker icon], 565 WIIconCellIconKey, 566 NULL]; 567 } 560 if(tableColumn == _nameTableColumn) 561 return [tracker nameWithNumberOfServersMatchingFilter:_filter]; 568 562 569 563 if([tracker type] == WCTrackerServer && ![tracker netService]) { … … 589 583 590 584 585 - (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item { 586 WCTracker *tracker; 587 588 tracker = item; 589 590 if(tableColumn == _nameTableColumn) 591 [cell setImage:[tracker icon]]; 592 } 593 594 595 591 596 - (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item { 592 597 if([(WCTracker *) item type] != WCTrackerServer)
