Changeset 5982
- Timestamp:
- May 31, 2008, 2:38:44 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Transmission.xcodeproj/project.pbxproj
r5960 r5982 2443 2443 GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 2444 2444 GCC_WARN_UNUSED_FUNCTION = NO; 2445 GCC_WARN_UNUSED_PARAMETER = NO; 2445 2446 GCC_WARN_UNUSED_VARIABLE = NO; 2446 2447 MACOSX_DEPLOYMENT_TARGET = 10.4; … … 2462 2463 GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 2463 2464 GCC_WARN_UNUSED_FUNCTION = NO; 2465 GCC_WARN_UNUSED_PARAMETER = NO; 2464 2466 GCC_WARN_UNUSED_VARIABLE = NO; 2465 2467 MACOSX_DEPLOYMENT_TARGET = 10.4; -
trunk/macosx/Controller.m
r5975 r5982 1626 1626 } 1627 1627 1628 #warning migrate to Torrent.m1629 1628 - (void) torrentFinishedDownloading: (NSNotification *) notification 1630 1629 { … … 2280 2279 break; 2281 2280 default: 2282 icon = [[GroupsController groups] imageForIndex: groupIndex isSmall: YES];2281 icon = [[GroupsController groups] imageForIndex: groupIndex]; 2283 2282 toolTip = [NSString stringWithFormat: @"%@: %@", NSLocalizedString(@"Group", "Groups -> Button"), 2284 2283 [[GroupsController groups] nameForIndex: groupIndex]]; … … 2549 2548 { 2550 2549 int group = [[item objectForKey: @"Group"] intValue]; 2551 return group != -1 ? [[GroupsController groups] imageForIndex: group isSmall: YES]2550 return group != -1 ? [[GroupsController groups] imageForIndex: group] 2552 2551 : [NSImage imageNamed: @"GroupsNoneTemplate.png"]; 2553 2552 } -
trunk/macosx/English.lproj/MainMenu.xib
r5935 r5982 3 3 <data> 4 4 <int key="IBDocument.SystemTarget">1050</int> 5 <string key="IBDocument.SystemVersion">9 C7010</string>6 <string key="IBDocument.InterfaceBuilderVersion">6 58</string>7 <string key="IBDocument.AppKitVersion">949. 26</string>5 <string key="IBDocument.SystemVersion">9D34</string> 6 <string key="IBDocument.InterfaceBuilderVersion">667</string> 7 <string key="IBDocument.AppKitVersion">949.33</string> 8 8 <string key="IBDocument.HIToolboxVersion">352.00</string> 9 9 <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> 10 10 <bool key="EncodedWithXMLCoder">YES</bool> 11 <integer value=" 2"/>11 <integer value="3093"/> 12 12 </object> 13 13 <object class="NSArray" key="IBDocument.PluginDependencies"> … … 271 271 <object class="NSTableColumn" id="354434380"> 272 272 <string key="NSIdentifier">Color</string> 273 <double key="NSWidth"> 3.200000e+01</double>273 <double key="NSWidth">2.900000e+01</double> 274 274 <double key="NSMinWidth">1.600000e+01</double> 275 275 <double key="NSMaxWidth">3.000000e+03</double> -
trunk/macosx/GroupsController.h
r5835 r5982 42 42 - (void) setName: (NSString *) name forIndex: (int) index; 43 43 44 - (NSImage *) imageForIndex: (int) index isSmall: (BOOL) small;44 - (NSImage *) imageForIndex: (int) index; 45 45 46 46 - (NSColor *) colorForIndex: (int) index; -
trunk/macosx/GroupsController.m
r5835 r5982 28 28 29 29 #define ICON_WIDTH 16.0 30 #define ICON_WIDTH_SMALL 12.031 30 32 31 @interface GroupsController (Private) … … 34 33 - (void) saveGroups; 35 34 36 - (NSImage *) imageForGroup: (NS Dictionary *) dict isSmall: (BOOL) small;35 - (NSImage *) imageForGroup: (NSMutableDictionary *) dict; 37 36 38 37 @end … … 144 143 } 145 144 146 - (NSImage *) imageForIndex: (int) index isSmall: (BOOL) small145 - (NSImage *) imageForIndex: (int) index 147 146 { 148 147 int orderIndex = [self rowValueForIndex: index]; 149 return orderIndex != -1 ? [self imageForGroup: [fGroups objectAtIndex: orderIndex] isSmall: small] : nil;148 return orderIndex != -1 ? [self imageForGroup: [fGroups objectAtIndex: orderIndex]] : nil; 150 149 } 151 150 … … 257 256 258 257 NSEnumerator * enumerator = [fGroups objectEnumerator]; 259 NS Dictionary * dict;258 NSMutableDictionary * dict; 260 259 while ((dict = [enumerator nextObject])) 261 260 { … … 263 262 [item setTarget: target]; 264 263 265 [item setImage: [self imageForGroup: dict isSmall: small]]; 264 #warning factor in size 265 [item setImage: [self imageForGroup: dict]]; 266 266 [item setTag: [[dict objectForKey: @"Index"] intValue]]; 267 267 … … 282 282 } 283 283 284 - (NSImage *) imageForGroup: (NSDictionary *) dict isSmall: (BOOL) small 285 { 286 float width = small ? ICON_WIDTH_SMALL : ICON_WIDTH; 287 NSRect rect = NSMakeRect(0.0, 0.0, width, width); 284 - (NSImage *) imageForGroup: (NSMutableDictionary *) dict 285 { 286 NSImage * image; 287 if ((image = [dict objectForKey: @"Icon"])) 288 return image; 289 290 NSRect rect = NSMakeRect(0.0, 0.0, ICON_WIDTH, ICON_WIDTH); 288 291 289 292 NSBezierPath * bp = [NSBezierPath bezierPathWithRoundedRect: rect radius: 3.0]; … … 307 310 [icon unlockFocus]; 308 311 309 return [icon autorelease]; 312 [dict setObject: icon forKey: @"Icon"]; 313 [icon release]; 314 315 return icon; 310 316 } 311 317 -
trunk/macosx/GroupsWindowController.m
r5703 r5982 89 89 NSString * identifier = [tableColumn identifier]; 90 90 if ([identifier isEqualToString: @"Color"]) 91 return [groupsController imageForIndex: groupsIndex isSmall: NO];91 return [groupsController imageForIndex: groupsIndex]; 92 92 else 93 93 return [groupsController nameForIndex: groupsIndex];
Note: See TracChangeset
for help on using the changeset viewer.