Changeset 3404

Show
Ignore:
Timestamp:
11/23/06 14:33:28 (2 years ago)
Author:
timothy
Message:

Make Get Info for private chats show the info pane lfor the user. This is better than nothing until we need a custom info panel for chats. #39

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Inspectors/JVChatUserInspector.h

    r3402 r3404  
    11#import "JVChatRoomMember.h" 
     2#import "JVDirectChatPanel.h" 
    23#import "JVInspectorController.h" 
     4 
     5@interface JVDirectChatPanel (JVDirectChatPanelInspection) <JVInspection> 
     6- (id <JVInspector>) inspector; 
     7@end 
    38 
    49@interface JVChatRoomMember (JVChatRoomMemberInspection) <JVInspection> 
  • trunk/Inspectors/JVChatUserInspector.m

    r3403 r3404  
    33#import "JVBuddy.h" 
    44#import "MVFileTransferController.h" 
     5 
     6@implementation JVDirectChatPanel (JVDirectChatPanelInspection) 
     7- (id <JVInspector>) inspector { 
     8        return [[[JVChatUserInspector alloc] initWithChatUser:[self target]] autorelease]; 
     9} 
     10@end 
     11 
     12#pragma mark - 
    513 
    614@implementation JVChatRoomMember (JVChatRoomMemberInspection) 
  • trunk/Panels/JVDirectChatPanel.m

    r3320 r3404  
    2525#import "NSAttributedStringMoreAdditions.h" 
    2626#import "JVSpeechController.h" 
     27#import "JVChatUserInspector.h" 
    2728 
    2829static NSSet *actionVerbs = nil; 
     
    388389        NSMenuItem *item = nil; 
    389390 
    390 /*     item = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString( @"Get Info", "get info contextual menu item title" ) action:NULL keyEquivalent:@""] autorelease]; 
     391       item = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString( @"Get Info", "get info contextual menu item title" ) action:@selector( getInfo: ) keyEquivalent:@""] autorelease]; 
    391392        [item setTarget:self]; 
    392393        [menu addItem:item]; 
    393394 
    394       item = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString( @"Add to Favorites", "add to favorites contextual menu") action:@selector( addToFavorites: ) keyEquivalent:@""] autorelease]; 
     395/*    item = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString( @"Add to Favorites", "add to favorites contextual menu") action:@selector( addToFavorites: ) keyEquivalent:@""] autorelease]; 
    395396        [item setTarget:self]; 
    396397        [menu addItem:item]; */ 
     
    493494 
    494495#pragma mark - 
     496#pragma mark GUI Actions 
     497 
     498- (IBAction) getInfo:(id) sender { 
     499        [[JVInspectorController inspectorOfObject:self] show:sender]; 
     500} 
    495501 
    496502- (IBAction) addToFavorites:(id) sender { 
  • trunk/Panels/MVChatUserAdditions.m

    r3403 r3404  
    7676        } 
    7777 
    78 //     if( ! [self buddy] ) { 
     78       if( ! [[MVBuddyListController sharedBuddyList] buddyForUser:self] ) { 
    7979                item = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString( @"Add To Buddy List", "add to buddy list contextual menu") action:@selector( addBuddy: ) keyEquivalent:@""] autorelease]; 
    8080                [item setTarget:self]; 
    8181                [items addObject:item]; 
    82 //    } 
     82      } 
    8383 
    8484        if( ! [self isLocalUser] ) {