Changeset 1398

Show
Ignore:
Timestamp:
07/30/04 14:43:40 (4 years ago)
Author:
morris
Message:

bring back whitespace functionality

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/WCAccount.m

    r1383 r1398  
    1 /* $Id: WCAccount.m,v 1.5 2004/07/28 08:00:26 morris Exp $ */ 
     1/* $Id: WCAccount.m,v 1.6 2004/07/30 12:43:40 morris Exp $ */ 
    22 
    33/* 
     
    127127 
    128128- (BOOL)getUserInfo { 
    129         return [[_privileges objectAtIndex:0] isEqualToString:@"1"]; 
     129        return [_privileges count] > 0 && [[_privileges objectAtIndex:0] isEqualToString:@"1"]; 
    130130} 
    131131 
     
    133133 
    134134- (BOOL)broadcast { 
    135         return [[_privileges objectAtIndex:1] isEqualToString:@"1"]; 
     135        return [_privileges count] > 1 && [[_privileges objectAtIndex:1] isEqualToString:@"1"]; 
    136136} 
    137137 
     
    139139 
    140140- (BOOL)postNews { 
    141         return [[_privileges objectAtIndex:2] isEqualToString:@"1"]; 
     141        return [_privileges count] > 2 && [[_privileges objectAtIndex:2] isEqualToString:@"1"]; 
    142142} 
    143143 
     
    145145 
    146146- (BOOL)clearNews { 
    147         return [[_privileges objectAtIndex:3] isEqualToString:@"1"]; 
     147        return [_privileges count] > 3 && [[_privileges objectAtIndex:3] isEqualToString:@"1"]; 
    148148} 
    149149 
     
    151151 
    152152- (BOOL)download { 
    153         return [[_privileges objectAtIndex:4] isEqualToString:@"1"]; 
     153        return [_privileges count] > 4 && [[_privileges objectAtIndex:4] isEqualToString:@"1"]; 
    154154} 
    155155 
     
    157157 
    158158- (BOOL)upload { 
    159         return [[_privileges objectAtIndex:5] isEqualToString:@"1"]; 
     159        return [_privileges count] > 5 && [[_privileges objectAtIndex:5] isEqualToString:@"1"]; 
    160160} 
    161161 
     
    163163 
    164164- (BOOL)uploadAnywhere { 
    165         return [[_privileges objectAtIndex:6] isEqualToString:@"1"]; 
     165        return [_privileges count] > 6 && [[_privileges objectAtIndex:6] isEqualToString:@"1"]; 
    166166} 
    167167 
     
    169169 
    170170- (BOOL)createFolders { 
    171         return [[_privileges objectAtIndex:7] isEqualToString:@"1"]; 
     171        return [_privileges count] > 7 && [[_privileges objectAtIndex:7] isEqualToString:@"1"]; 
    172172} 
    173173 
     
    175175 
    176176- (BOOL)alterFiles { 
    177         return [[_privileges objectAtIndex:8] isEqualToString:@"1"]; 
     177        return [_privileges count] > 8 && [[_privileges objectAtIndex:8] isEqualToString:@"1"]; 
    178178} 
    179179 
     
    181181 
    182182- (BOOL)deleteFiles { 
    183         return [[_privileges objectAtIndex:9] isEqualToString:@"1"]; 
     183        return [_privileges count] > 9 && [[_privileges objectAtIndex:9] isEqualToString:@"1"]; 
    184184} 
    185185 
     
    187187 
    188188- (BOOL)viewDropBoxes { 
    189         return [[_privileges objectAtIndex:10] isEqualToString:@"1"]; 
     189        return [_privileges count] > 10 && [[_privileges objectAtIndex:10] isEqualToString:@"1"]; 
    190190} 
    191191 
     
    193193 
    194194- (BOOL)createAccounts { 
    195         return [[_privileges objectAtIndex:11] isEqualToString:@"1"]; 
     195        return [_privileges count] > 11 && [[_privileges objectAtIndex:11] isEqualToString:@"1"]; 
    196196} 
    197197 
     
    199199 
    200200- (BOOL)editAccounts { 
    201         return [[_privileges objectAtIndex:12] isEqualToString:@"1"]; 
     201        return [_privileges count] > 12 && [[_privileges objectAtIndex:12] isEqualToString:@"1"]; 
    202202} 
    203203 
     
    205205 
    206206- (BOOL)deleteAccounts { 
    207         return [[_privileges objectAtIndex:13] isEqualToString:@"1"]; 
     207        return [_privileges count] > 13 && [[_privileges objectAtIndex:13] isEqualToString:@"1"]; 
    208208} 
    209209 
     
    211211 
    212212- (BOOL)elevatePrivileges { 
    213         return [[_privileges objectAtIndex:14] isEqualToString:@"1"]; 
     213        return [_privileges count] > 14 && [[_privileges objectAtIndex:14] isEqualToString:@"1"]; 
    214214} 
    215215 
     
    217217 
    218218- (BOOL)kickUsers { 
    219         return [[_privileges objectAtIndex:15] isEqualToString:@"1"]; 
     219        return [_privileges count] > 15 && [[_privileges objectAtIndex:15] isEqualToString:@"1"]; 
    220220} 
    221221 
     
    223223 
    224224- (BOOL)banUsers { 
    225         return [[_privileges objectAtIndex:16] isEqualToString:@"1"]; 
     225        return [_privileges count] > 16 && [[_privileges objectAtIndex:16] isEqualToString:@"1"]; 
    226226} 
    227227 
     
    229229 
    230230- (BOOL)cannotBeKicked { 
    231         return [[_privileges objectAtIndex:17] isEqualToString:@"1"]; 
     231        return [_privileges count] > 17 && [[_privileges objectAtIndex:17] isEqualToString:@"1"]; 
    232232} 
    233233 
     
    235235 
    236236- (BOOL)setTopic { 
    237         return [[_privileges objectAtIndex:20] isEqualToString:@"1"]; 
     237        return [_privileges count] > 20 && [[_privileges objectAtIndex:20] isEqualToString:@"1"]; 
    238238} 
    239239 
  • WiredClient/trunk/WCAccounts.m

    r1317 r1398  
    1 /* $Id: WCAccounts.m,v 1.15 2004/05/23 07:24:21 morris Exp $ */ 
     1/* $Id: WCAccounts.m,v 1.16 2004/07/30 12:43:40 morris Exp $ */ 
    22 
    33/* 
     
    114114 
    115115        // --- set up our custom cell type 
    116         iconCell = [[WCIconCell alloc] initWithImageWidth:16]; 
     116        iconCell = [[WCIconCell alloc] initWithImageWidth:16 whitespace:NO]; 
    117117        [iconCell setControlSize:NSSmallControlSize]; 
    118118        [[_accountsTableView tableColumnWithIdentifier:@"Name"] setDataCell:iconCell]; 
  • WiredClient/trunk/WCChat.m

    r1384 r1398  
    1 /* $Id: WCChat.m,v 1.54 2004/07/28 09:12:58 morris Exp $ */ 
     1/* $Id: WCChat.m,v 1.55 2004/07/30 12:43:40 morris Exp $ */ 
    22 
    33/* 
     
    189189         
    190190        // --- set up our custom cell type 
    191         iconCell = [[WCIconCell alloc] initWithImageWidth:32]; 
     191        iconCell = [[WCIconCell alloc] initWithImageWidth:32 whitespace:YES]; 
    192192        [_nickTableColumn setDataCell:iconCell]; 
    193193        [iconCell release]; 
  • WiredClient/trunk/WCFiles.m

    r1396 r1398  
    1 /* $Id: WCFiles.m,v 1.39 2004/07/30 09:36:17 morris Exp $ */ 
     1/* $Id: WCFiles.m,v 1.40 2004/07/30 12:43:40 morris Exp $ */ 
    22 
    33/* 
     
    132132 
    133133        // --- set up our custom cell types 
    134         iconCell = [[WCIconCell alloc] initWithImageWidth:16]; 
     134        iconCell = [[WCIconCell alloc] initWithImageWidth:16 whitespace:NO]; 
    135135        [iconCell setControlSize:NSSmallControlSize]; 
    136136        [[_filesTableView tableColumnWithIdentifier:@"Name"] setDataCell:iconCell]; 
  • WiredClient/trunk/WCIconCell.h

    r1235 r1398  
    1 /* $Id: WCIconCell.h,v 1.6 2004/05/18 18:33:11 morris Exp $ */ 
     1/* $Id: WCIconCell.h,v 1.7 2004/07/30 12:43:40 morris Exp $ */ 
    22 
    33/* 
     
    3131        NSTextFieldCell                 *_statusTextFieldCell; 
    3232        NSImageCell                             *_imageCell; 
    33         int                                             _imageWidth; 
     33 
     34        unsigned int                    _imageWidth; 
     35        BOOL                                    _whitespace; 
    3436         
    3537        NSString                                *_name; 
     
    4547 
    4648 
    47 - (id)                                          initWithImageWidth:(unsigned int)imageWidth
     49- (id)                                          initWithImageWidth:(unsigned int)imageWidth whitespace:(BOOL)whitespace
    4850 
    4951- (void)                                        setName:(NSString *)string; 
  • WiredClient/trunk/WCIconCell.m

    r1235 r1398  
    1 /* $Id: WCIconCell.m,v 1.5 2004/05/18 18:33:11 morris Exp $ */ 
     1/* $Id: WCIconCell.m,v 1.6 2004/07/30 12:43:40 morris Exp $ */ 
    22 
    33/* 
     
    3232@implementation WCIconCell 
    3333 
    34 - (id)initWithImageWidth:(unsigned int)imageWidth
     34- (id)initWithImageWidth:(unsigned int)imageWidth whitespace:(BOOL)whitespace
    3535        self = [super init]; 
    3636         
    3737        _nameTextFieldCell = [[NSTextFieldCell alloc] initTextCell:@""]; 
    3838        [_nameTextFieldCell setFont:[NSFont systemFontOfSize:12.0]]; 
    39 //      [_nameTextFieldCell setBackgroundColor:[NSColor blueColor]]; 
    40 //      [_nameTextFieldCell setDrawsBackground:YES]; 
    4139         
    4240        _statusTextFieldCell = [[NSTextFieldCell alloc] initTextCell:@""]; 
    4341        [_statusTextFieldCell setFont:[NSFont systemFontOfSize:10.0]]; 
    4442        [_statusTextFieldCell setTextColor:[NSColor grayColor]]; 
    45 //      [_statusTextFieldCell setBackgroundColor:[NSColor greenColor]]; 
    46 //      [_statusTextFieldCell setDrawsBackground:YES]; 
    4743 
    4844        _imageCell = [[NSImageCell alloc] initImageCell:NULL]; 
    4945        _imageWidth = imageWidth; 
     46        _whitespace = whitespace; 
    5047         
    5148        return self; 
     
    140137        // --- set sizes 
    141138        if([self controlSize] == NSRegularControlSize) { 
    142                 if(_image) { 
     139                if(_image || _whitespace) { 
    143140                        nameFrame = NSMakeRect(frame.origin.x + _imageWidth + 4, frame.origin.y + 1, 
    144141                                                                   frame.size.width - _imageWidth - 4, 17); 
     
    153150        } 
    154151        else if([self controlSize] == NSSmallControlSize) { 
    155                 if(_image) { 
     152                if(_image || _whitespace) { 
    156153                        nameFrame = NSMakeRect(frame.origin.x + _imageWidth + 4, frame.origin.y, 
    157154                                                                   frame.size.width - _imageWidth - 4, 17); 
  • WiredClient/trunk/WCSearch.m

    r1396 r1398  
    1 /* $Id: WCSearch.m,v 1.27 2004/07/30 09:36:17 morris Exp $ */ 
     1/* $Id: WCSearch.m,v 1.28 2004/07/30 12:43:40 morris Exp $ */ 
    22 
    33/* 
     
    134134         
    135135        // --- set up our custom cell types 
    136         iconCell = [[WCIconCell alloc] initWithImageWidth:16]; 
     136        iconCell = [[WCIconCell alloc] initWithImageWidth:16 whitespace:NO]; 
    137137        [iconCell setControlSize:NSSmallControlSize]; 
    138138        [[_searchTableView tableColumnWithIdentifier:@"Name"] setDataCell:iconCell]; 
  • WiredClient/trunk/WCTrackers.m

    r1369 r1398  
    1 /* $Id: WCTrackers.m,v 1.23 2004/07/22 18:18:27 morris Exp $ */ 
     1/* $Id: WCTrackers.m,v 1.24 2004/07/30 12:43:40 morris Exp $ */ 
    22 
    33/* 
     
    124124         
    125125        // --- set up our custom cell type for the transfer text 
    126         iconCell = [[WCIconCell alloc] initWithImageWidth:16]; 
     126        iconCell = [[WCIconCell alloc] initWithImageWidth:16 whitespace:NO]; 
    127127        [iconCell setControlSize:NSSmallControlSize]; 
    128128        [[_trackersOutlineView tableColumnWithIdentifier:@"Name"] setDataCell:iconCell];