mirror of
https://github.com/transmission/transmission
synced 2025-03-04 02:28:03 +00:00
mac build builds again
This commit is contained in:
parent
f0e7c54160
commit
4c20b4e0d4
2 changed files with 25 additions and 11 deletions
|
@ -359,8 +359,14 @@
|
|||
[fDefaults setBool: fOpenTorrent forKey: @"CreatorOpen"];
|
||||
[fDefaults setObject: [fLocation stringByDeletingLastPathComponent] forKey: @"CreatorLocation"];
|
||||
|
||||
#warning perhaps don't create at all if no trackers
|
||||
//create tracker
|
||||
tr_tracker_info trackerInfo;
|
||||
trackerInfo.tier = 0;
|
||||
trackerInfo.announce = (char *)[fTracker UTF8String];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"BeginCreateTorrentFile" object: fLocation userInfo: nil];
|
||||
tr_makeMetaInfo(fInfo, [fLocation UTF8String], [fTracker UTF8String], [[fCommentView string] UTF8String],
|
||||
tr_makeMetaInfo(fInfo, [fLocation UTF8String], &trackerInfo, 1, [[fCommentView string] UTF8String],
|
||||
[fPrivateCheck state] == NSOnState);
|
||||
|
||||
fTimer = [NSTimer scheduledTimerWithTimeInterval: 0.1 target: self selector: @selector(checkProgress)
|
||||
|
|
|
@ -256,14 +256,18 @@ GroupsController * fGroupsInstance = nil;
|
|||
[item setTarget: target];
|
||||
[item setTag: -1];
|
||||
|
||||
NSImage * icon = [[NSImage imageNamed: @"GroupsNoneTemplate.png"] copy];
|
||||
NSImage * icon = [NSImage imageNamed: @"GroupsNoneTemplate.png"];
|
||||
if (small)
|
||||
{
|
||||
icon = [icon copy];
|
||||
[icon setScalesWhenResized: YES];
|
||||
[icon setSize: NSMakeSize(ICON_WIDTH_SMALL, ICON_WIDTH_SMALL)];
|
||||
}
|
||||
|
||||
[item setImage: icon];
|
||||
[icon release];
|
||||
}
|
||||
else
|
||||
[item setImage: icon];
|
||||
|
||||
[menu addItem: item];
|
||||
[item release];
|
||||
|
@ -277,14 +281,18 @@ GroupsController * fGroupsInstance = nil;
|
|||
|
||||
[item setTag: [[dict objectForKey: @"Index"] intValue]];
|
||||
|
||||
NSImage * icon = [[self imageForGroup: dict] copy];
|
||||
NSImage * icon = [self imageForGroup: dict];
|
||||
if (small)
|
||||
{
|
||||
icon = [icon copy];
|
||||
[icon setScalesWhenResized: YES];
|
||||
[icon setSize: NSMakeSize(ICON_WIDTH_SMALL, ICON_WIDTH_SMALL)];
|
||||
}
|
||||
|
||||
[item setImage: icon];
|
||||
[icon release];
|
||||
}
|
||||
else
|
||||
[item setImage: icon];
|
||||
|
||||
[menu addItem: item];
|
||||
[item release];
|
||||
|
@ -305,10 +313,10 @@ GroupsController * fGroupsInstance = nil;
|
|||
NSDictionary * dict;
|
||||
while ((dict = [enumerator nextObject]))
|
||||
{
|
||||
NSMutableDictionary * newDict = [dict mutableCopy];
|
||||
[newDict removeObjectForKey: @"Icon"];
|
||||
[groups addObject: newDict];
|
||||
[newDict release];
|
||||
NSMutableDictionary * tempDict = [dict mutableCopy];
|
||||
[tempDict removeObjectForKey: @"Icon"];
|
||||
[groups addObject: tempDict];
|
||||
[tempDict release];
|
||||
}
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] setObject: [NSArchiver archivedDataWithRootObject: groups] forKey: @"Groups"];
|
||||
|
|
Loading…
Add table
Reference in a new issue