1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

No need to create an autoreleased object and then retain it when it can be done in one step.

This commit is contained in:
Mitchell Livingston 2006-06-07 22:02:28 +00:00
parent 82a1354790
commit 4d1902cacf
3 changed files with 5 additions and 7 deletions

View file

@ -47,11 +47,10 @@
[stringShadow setShadowOffset: NSMakeSize(2, -2)];
[stringShadow setShadowBlurRadius: 4];
fAttributes = [[NSDictionary dictionaryWithObjectsAndKeys:
fAttributes = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSColor whiteColor], NSForegroundColorAttributeName,
[NSFont fontWithName: @"Helvetica-Bold" size: 28], NSFontAttributeName,
stringShadow, NSShadowAttributeName,
nil] retain];
stringShadow, NSShadowAttributeName, nil];
[stringShadow release];

View file

@ -1012,7 +1012,7 @@ static void sleepCallBack( void * controller, io_service_t y,
{
[item setLabel: @"Inspector"];
[item setPaletteLabel: @"Show/Hide Inspector"];
[item setToolTip: @"Displays torrent inspector"];
[item setToolTip: @"Display torrent inspector"];
[item setImage: [NSImage imageNamed: @"Info.png"]];
[item setTarget: self];
[item setAction: @selector( showInfo: )];

View file

@ -30,9 +30,8 @@
{
if ((self = [super initWithFrame:frameRect]))
{
fBackgroundColor = [NSColor colorWithPatternImage:
[NSImage imageNamed: @"StatusBorder"]];
[fBackgroundColor retain];
fBackgroundColor = [[NSColor colorWithPatternImage:
[NSImage imageNamed: @"StatusBorder"]] retain];
}
return self;
}