Changeset 1654

Show
Ignore:
Timestamp:
02/04/05 22:41:44 (4 years ago)
Author:
morris
Message:

Add "Edit Account" to chat context menus, direct access to Account Editor for that user. Fixes #23.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/English.lproj/PrivateChat.nib/classes.nib

    r1616 r1654  
    55        { 
    66            ACTIONS = { 
     7                editAccount = id;  
    78                getInfo = id;  
    89                ignore = id;  
  • WiredClient/trunk/English.lproj/PrivateChat.nib/info.nib

    r1616 r1654  
    44<dict> 
    55        <key>IBDocumentLocation</key> 
    6         <string>514 104 403 412 0 0 1280 1002 </string> 
     6        <string>309 195 403 412 0 0 1280 1002 </string> 
    77        <key>IBEditorPositions</key> 
    88        <dict> 
    99                <key>196</key> 
    10                 <string>861 317 184 99 0 0 1280 1002 </string> 
     10                <string>679 291 184 118 0 0 1280 1002 </string> 
    1111        </dict> 
    1212        <key>IBFramework Version</key> 
     
    1818        <key>IBOpenObjects</key> 
    1919        <array> 
     20                <integer>196</integer> 
    2021                <integer>139</integer> 
    21                 <integer>196</integer> 
    2222        </array> 
    2323        <key>IBSystem Version</key> 
  • WiredClient/trunk/English.lproj/PublicChat.nib/classes.nib

    r1616 r1654  
    1111        { 
    1212            ACTIONS = { 
     13                editAccount = id;  
    1314                getInfo = id;  
    1415                ignore = id;  
  • WiredClient/trunk/English.lproj/PublicChat.nib/info.nib

    r1616 r1654  
    88        <dict> 
    99                <key>105</key> 
    10                 <string>831 131 184 168 0 0 1280 1002 </string> 
     10                <string>736 221 184 168 0 0 1280 1002 </string> 
    1111        </dict> 
    1212        <key>IBFramework Version</key> 
     
    1818        <key>IBOpenObjects</key> 
    1919        <array> 
     20                <integer>105</integer> 
    2021                <integer>10</integer> 
    21                 <integer>105</integer> 
    2222        </array> 
    2323        <key>IBSystem Version</key> 
  • WiredClient/trunk/WCAccounts.h

    r1616 r1654  
    6464- (NSArray *)                                                   users; 
    6565- (NSArray *)                                                   groups; 
     66- (WCAccount *)                                                 userWithName:(NSString *)name; 
     67- (WCAccount *)                                                 groupWithName:(NSString *)name; 
    6668 
    6769- (IBAction)                                                    add:(id)sender; 
  • WiredClient/trunk/WCAccounts.m

    r1616 r1654  
    386386 
    387387 
     388- (WCAccount *)userWithName:(NSString *)name { 
     389        NSEnumerator    *enumerator; 
     390        WCAccount               *account; 
     391 
     392        enumerator = [[self accounts] objectEnumerator]; 
     393 
     394        while((account = [enumerator nextObject])) { 
     395                if([account type] == WCAccountTypeUser && [[account name] isEqualToString:name]) 
     396                        return account; 
     397        } 
     398 
     399        return NULL; 
     400} 
     401 
     402 
     403 
     404- (WCAccount *)groupWithName:(NSString *)name { 
     405        NSEnumerator    *enumerator; 
     406        WCAccount               *account; 
     407 
     408        enumerator = [[self accounts] objectEnumerator]; 
     409 
     410        while((account = [enumerator nextObject])) { 
     411                if([account type] == WCAccountTypeGroup && [[account name] isEqualToString:name]) 
     412                        return account; 
     413        } 
     414 
     415        return NULL; 
     416} 
     417 
     418 
     419 
    388420#pragma mark - 
    389421 
  • WiredClient/trunk/WCChat.h

    r1616 r1654  
    107107- (IBAction)                                                    sendPrivateMessage:(id)sender; 
    108108- (IBAction)                                                    getInfo:(id)sender; 
     109- (IBAction)                                                    editAccount:(id)sender; 
    109110- (IBAction)                                                    ignore:(id)sender; 
    110111- (IBAction)                                                    unignore:(id)sender; 
  • WiredClient/trunk/WCChat.m

    r1653 r1654  
    2727 */ 
    2828 
    29 #import "WCAccount.h" 
     29#import "WCAccount.h"  
     30#import "WCAccountEditor.h"  
     31#import "WCAccounts.h"  
    3032#import "WCChat.h" 
    3133#import "WCMain.h" 
     
    14531455 
    14541456 
     1457- (IBAction)editAccount:(id)sender { 
     1458        WCAccount               *account; 
     1459        WCUser                  *user; 
     1460 
     1461        user = [self selectedUser]; 
     1462        account = [[[self connection] accounts] userWithName:[user login]]; 
     1463 
     1464        [[WCAccountEditor alloc] initWithConnection:[self connection] edit:account]; 
     1465} 
     1466 
     1467 
     1468 
    14551469- (IBAction)ignore:(id)sender { 
    14561470        NSDictionary    *ignore; 
  • WiredClient/trunk/WiredClient.xcode/project.pbxproj

    r1626 r1654  
    239239                                A5C4783E07AACFAE00F87F7A, 
    240240                                A5C4783F07AACFAE00F87F7A, 
     241                                A5DCFA5307B41DE300B32D3A, 
    241242                        ); 
    242243                        isa = PBXGroup; 
     
    30803081                        }; 
    30813082                }; 
     3083                A5DCFA5307B41DE300B32D3A = { 
     3084                        fileType = wrapper.application; 
     3085                        isa = PBXReferenceProxy; 
     3086                        path = "ZANotificationCenter Test.app"; 
     3087                        refType = 3; 
     3088                        remoteRef = A5DCFA5907B41DEA00B32D3A; 
     3089                        sourceTree = BUILT_PRODUCTS_DIR; 
     3090                }; 
     3091                A5DCFA5907B41DEA00B32D3A = { 
     3092                        containerPortal = A544C1B90758E0E9008446CF; 
     3093                        isa = PBXContainerItemProxy; 
     3094                        proxyType = 2; 
     3095                        remoteGlobalIDString = A553B5E007AAF56E005EE3E5; 
     3096                        remoteInfo = "ZANotificationCenter Test"; 
     3097                }; 
    30823098                A5E225A0057AB5290037C7F9 = { 
    30833099                        isa = PBXFileReference;