Changeset 1398
- Timestamp:
- 07/30/04 14:43:40 (4 years ago)
- Files:
-
- WiredClient/trunk/WCAccount.m (modified) (20 diffs)
- WiredClient/trunk/WCAccounts.m (modified) (2 diffs)
- WiredClient/trunk/WCChat.m (modified) (2 diffs)
- WiredClient/trunk/WCFiles.m (modified) (2 diffs)
- WiredClient/trunk/WCIconCell.h (modified) (3 diffs)
- WiredClient/trunk/WCIconCell.m (modified) (4 diffs)
- WiredClient/trunk/WCSearch.m (modified) (2 diffs)
- WiredClient/trunk/WCTrackers.m (modified) (2 diffs)
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:26morris Exp $ */1 /* $Id: WCAccount.m,v 1.6 2004/07/30 12:43:40 morris Exp $ */ 2 2 3 3 /* … … 127 127 128 128 - (BOOL)getUserInfo { 129 return [ [_privileges objectAtIndex:0] isEqualToString:@"1"];129 return [_privileges count] > 0 && [[_privileges objectAtIndex:0] isEqualToString:@"1"]; 130 130 } 131 131 … … 133 133 134 134 - (BOOL)broadcast { 135 return [ [_privileges objectAtIndex:1] isEqualToString:@"1"];135 return [_privileges count] > 1 && [[_privileges objectAtIndex:1] isEqualToString:@"1"]; 136 136 } 137 137 … … 139 139 140 140 - (BOOL)postNews { 141 return [ [_privileges objectAtIndex:2] isEqualToString:@"1"];141 return [_privileges count] > 2 && [[_privileges objectAtIndex:2] isEqualToString:@"1"]; 142 142 } 143 143 … … 145 145 146 146 - (BOOL)clearNews { 147 return [ [_privileges objectAtIndex:3] isEqualToString:@"1"];147 return [_privileges count] > 3 && [[_privileges objectAtIndex:3] isEqualToString:@"1"]; 148 148 } 149 149 … … 151 151 152 152 - (BOOL)download { 153 return [ [_privileges objectAtIndex:4] isEqualToString:@"1"];153 return [_privileges count] > 4 && [[_privileges objectAtIndex:4] isEqualToString:@"1"]; 154 154 } 155 155 … … 157 157 158 158 - (BOOL)upload { 159 return [ [_privileges objectAtIndex:5] isEqualToString:@"1"];159 return [_privileges count] > 5 && [[_privileges objectAtIndex:5] isEqualToString:@"1"]; 160 160 } 161 161 … … 163 163 164 164 - (BOOL)uploadAnywhere { 165 return [ [_privileges objectAtIndex:6] isEqualToString:@"1"];165 return [_privileges count] > 6 && [[_privileges objectAtIndex:6] isEqualToString:@"1"]; 166 166 } 167 167 … … 169 169 170 170 - (BOOL)createFolders { 171 return [ [_privileges objectAtIndex:7] isEqualToString:@"1"];171 return [_privileges count] > 7 && [[_privileges objectAtIndex:7] isEqualToString:@"1"]; 172 172 } 173 173 … … 175 175 176 176 - (BOOL)alterFiles { 177 return [ [_privileges objectAtIndex:8] isEqualToString:@"1"];177 return [_privileges count] > 8 && [[_privileges objectAtIndex:8] isEqualToString:@"1"]; 178 178 } 179 179 … … 181 181 182 182 - (BOOL)deleteFiles { 183 return [ [_privileges objectAtIndex:9] isEqualToString:@"1"];183 return [_privileges count] > 9 && [[_privileges objectAtIndex:9] isEqualToString:@"1"]; 184 184 } 185 185 … … 187 187 188 188 - (BOOL)viewDropBoxes { 189 return [ [_privileges objectAtIndex:10] isEqualToString:@"1"];189 return [_privileges count] > 10 && [[_privileges objectAtIndex:10] isEqualToString:@"1"]; 190 190 } 191 191 … … 193 193 194 194 - (BOOL)createAccounts { 195 return [ [_privileges objectAtIndex:11] isEqualToString:@"1"];195 return [_privileges count] > 11 && [[_privileges objectAtIndex:11] isEqualToString:@"1"]; 196 196 } 197 197 … … 199 199 200 200 - (BOOL)editAccounts { 201 return [ [_privileges objectAtIndex:12] isEqualToString:@"1"];201 return [_privileges count] > 12 && [[_privileges objectAtIndex:12] isEqualToString:@"1"]; 202 202 } 203 203 … … 205 205 206 206 - (BOOL)deleteAccounts { 207 return [ [_privileges objectAtIndex:13] isEqualToString:@"1"];207 return [_privileges count] > 13 && [[_privileges objectAtIndex:13] isEqualToString:@"1"]; 208 208 } 209 209 … … 211 211 212 212 - (BOOL)elevatePrivileges { 213 return [ [_privileges objectAtIndex:14] isEqualToString:@"1"];213 return [_privileges count] > 14 && [[_privileges objectAtIndex:14] isEqualToString:@"1"]; 214 214 } 215 215 … … 217 217 218 218 - (BOOL)kickUsers { 219 return [ [_privileges objectAtIndex:15] isEqualToString:@"1"];219 return [_privileges count] > 15 && [[_privileges objectAtIndex:15] isEqualToString:@"1"]; 220 220 } 221 221 … … 223 223 224 224 - (BOOL)banUsers { 225 return [ [_privileges objectAtIndex:16] isEqualToString:@"1"];225 return [_privileges count] > 16 && [[_privileges objectAtIndex:16] isEqualToString:@"1"]; 226 226 } 227 227 … … 229 229 230 230 - (BOOL)cannotBeKicked { 231 return [ [_privileges objectAtIndex:17] isEqualToString:@"1"];231 return [_privileges count] > 17 && [[_privileges objectAtIndex:17] isEqualToString:@"1"]; 232 232 } 233 233 … … 235 235 236 236 - (BOOL)setTopic { 237 return [ [_privileges objectAtIndex:20] isEqualToString:@"1"];237 return [_privileges count] > 20 && [[_privileges objectAtIndex:20] isEqualToString:@"1"]; 238 238 } 239 239 WiredClient/trunk/WCAccounts.m
r1317 r1398 1 /* $Id: WCAccounts.m,v 1.1 5 2004/05/23 07:24:21morris Exp $ */1 /* $Id: WCAccounts.m,v 1.16 2004/07/30 12:43:40 morris Exp $ */ 2 2 3 3 /* … … 114 114 115 115 // --- set up our custom cell type 116 iconCell = [[WCIconCell alloc] initWithImageWidth:16 ];116 iconCell = [[WCIconCell alloc] initWithImageWidth:16 whitespace:NO]; 117 117 [iconCell setControlSize:NSSmallControlSize]; 118 118 [[_accountsTableView tableColumnWithIdentifier:@"Name"] setDataCell:iconCell]; WiredClient/trunk/WCChat.m
r1384 r1398 1 /* $Id: WCChat.m,v 1.5 4 2004/07/28 09:12:58morris Exp $ */1 /* $Id: WCChat.m,v 1.55 2004/07/30 12:43:40 morris Exp $ */ 2 2 3 3 /* … … 189 189 190 190 // --- set up our custom cell type 191 iconCell = [[WCIconCell alloc] initWithImageWidth:32 ];191 iconCell = [[WCIconCell alloc] initWithImageWidth:32 whitespace:YES]; 192 192 [_nickTableColumn setDataCell:iconCell]; 193 193 [iconCell release]; WiredClient/trunk/WCFiles.m
r1396 r1398 1 /* $Id: WCFiles.m,v 1. 39 2004/07/30 09:36:17morris Exp $ */1 /* $Id: WCFiles.m,v 1.40 2004/07/30 12:43:40 morris Exp $ */ 2 2 3 3 /* … … 132 132 133 133 // --- set up our custom cell types 134 iconCell = [[WCIconCell alloc] initWithImageWidth:16 ];134 iconCell = [[WCIconCell alloc] initWithImageWidth:16 whitespace:NO]; 135 135 [iconCell setControlSize:NSSmallControlSize]; 136 136 [[_filesTableView tableColumnWithIdentifier:@"Name"] setDataCell:iconCell]; WiredClient/trunk/WCIconCell.h
r1235 r1398 1 /* $Id: WCIconCell.h,v 1. 6 2004/05/18 18:33:11morris Exp $ */1 /* $Id: WCIconCell.h,v 1.7 2004/07/30 12:43:40 morris Exp $ */ 2 2 3 3 /* … … 31 31 NSTextFieldCell *_statusTextFieldCell; 32 32 NSImageCell *_imageCell; 33 int _imageWidth; 33 34 unsigned int _imageWidth; 35 BOOL _whitespace; 34 36 35 37 NSString *_name; … … 45 47 46 48 47 - (id) initWithImageWidth:(unsigned int)imageWidth ;49 - (id) initWithImageWidth:(unsigned int)imageWidth whitespace:(BOOL)whitespace; 48 50 49 51 - (void) setName:(NSString *)string; WiredClient/trunk/WCIconCell.m
r1235 r1398 1 /* $Id: WCIconCell.m,v 1. 5 2004/05/18 18:33:11morris Exp $ */1 /* $Id: WCIconCell.m,v 1.6 2004/07/30 12:43:40 morris Exp $ */ 2 2 3 3 /* … … 32 32 @implementation WCIconCell 33 33 34 - (id)initWithImageWidth:(unsigned int)imageWidth {34 - (id)initWithImageWidth:(unsigned int)imageWidth whitespace:(BOOL)whitespace { 35 35 self = [super init]; 36 36 37 37 _nameTextFieldCell = [[NSTextFieldCell alloc] initTextCell:@""]; 38 38 [_nameTextFieldCell setFont:[NSFont systemFontOfSize:12.0]]; 39 // [_nameTextFieldCell setBackgroundColor:[NSColor blueColor]];40 // [_nameTextFieldCell setDrawsBackground:YES];41 39 42 40 _statusTextFieldCell = [[NSTextFieldCell alloc] initTextCell:@""]; 43 41 [_statusTextFieldCell setFont:[NSFont systemFontOfSize:10.0]]; 44 42 [_statusTextFieldCell setTextColor:[NSColor grayColor]]; 45 // [_statusTextFieldCell setBackgroundColor:[NSColor greenColor]];46 // [_statusTextFieldCell setDrawsBackground:YES];47 43 48 44 _imageCell = [[NSImageCell alloc] initImageCell:NULL]; 49 45 _imageWidth = imageWidth; 46 _whitespace = whitespace; 50 47 51 48 return self; … … 140 137 // --- set sizes 141 138 if([self controlSize] == NSRegularControlSize) { 142 if(_image ) {139 if(_image || _whitespace) { 143 140 nameFrame = NSMakeRect(frame.origin.x + _imageWidth + 4, frame.origin.y + 1, 144 141 frame.size.width - _imageWidth - 4, 17); … … 153 150 } 154 151 else if([self controlSize] == NSSmallControlSize) { 155 if(_image ) {152 if(_image || _whitespace) { 156 153 nameFrame = NSMakeRect(frame.origin.x + _imageWidth + 4, frame.origin.y, 157 154 frame.size.width - _imageWidth - 4, 17); WiredClient/trunk/WCSearch.m
r1396 r1398 1 /* $Id: WCSearch.m,v 1.2 7 2004/07/30 09:36:17morris Exp $ */1 /* $Id: WCSearch.m,v 1.28 2004/07/30 12:43:40 morris Exp $ */ 2 2 3 3 /* … … 134 134 135 135 // --- set up our custom cell types 136 iconCell = [[WCIconCell alloc] initWithImageWidth:16 ];136 iconCell = [[WCIconCell alloc] initWithImageWidth:16 whitespace:NO]; 137 137 [iconCell setControlSize:NSSmallControlSize]; 138 138 [[_searchTableView tableColumnWithIdentifier:@"Name"] setDataCell:iconCell]; WiredClient/trunk/WCTrackers.m
r1369 r1398 1 /* $Id: WCTrackers.m,v 1.2 3 2004/07/22 18:18:27morris Exp $ */1 /* $Id: WCTrackers.m,v 1.24 2004/07/30 12:43:40 morris Exp $ */ 2 2 3 3 /* … … 124 124 125 125 // --- set up our custom cell type for the transfer text 126 iconCell = [[WCIconCell alloc] initWithImageWidth:16 ];126 iconCell = [[WCIconCell alloc] initWithImageWidth:16 whitespace:NO]; 127 127 [iconCell setControlSize:NSSmallControlSize]; 128 128 [[_trackersOutlineView tableColumnWithIdentifier:@"Name"] setDataCell:iconCell];
