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 setBool: fOpenTorrent forKey: @"CreatorOpen"];
|
||||||
[fDefaults setObject: [fLocation stringByDeletingLastPathComponent] forKey: @"CreatorLocation"];
|
[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];
|
[[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);
|
[fPrivateCheck state] == NSOnState);
|
||||||
|
|
||||||
fTimer = [NSTimer scheduledTimerWithTimeInterval: 0.1 target: self selector: @selector(checkProgress)
|
fTimer = [NSTimer scheduledTimerWithTimeInterval: 0.1 target: self selector: @selector(checkProgress)
|
||||||
|
|
|
@ -256,14 +256,18 @@ GroupsController * fGroupsInstance = nil;
|
||||||
[item setTarget: target];
|
[item setTarget: target];
|
||||||
[item setTag: -1];
|
[item setTag: -1];
|
||||||
|
|
||||||
NSImage * icon = [[NSImage imageNamed: @"GroupsNoneTemplate.png"] copy];
|
NSImage * icon = [NSImage imageNamed: @"GroupsNoneTemplate.png"];
|
||||||
if (small)
|
if (small)
|
||||||
{
|
{
|
||||||
|
icon = [icon copy];
|
||||||
[icon setScalesWhenResized: YES];
|
[icon setScalesWhenResized: YES];
|
||||||
[icon setSize: NSMakeSize(ICON_WIDTH_SMALL, ICON_WIDTH_SMALL)];
|
[icon setSize: NSMakeSize(ICON_WIDTH_SMALL, ICON_WIDTH_SMALL)];
|
||||||
|
|
||||||
|
[item setImage: icon];
|
||||||
|
[icon release];
|
||||||
}
|
}
|
||||||
[item setImage: icon];
|
else
|
||||||
[icon release];
|
[item setImage: icon];
|
||||||
|
|
||||||
[menu addItem: item];
|
[menu addItem: item];
|
||||||
[item release];
|
[item release];
|
||||||
|
@ -277,14 +281,18 @@ GroupsController * fGroupsInstance = nil;
|
||||||
|
|
||||||
[item setTag: [[dict objectForKey: @"Index"] intValue]];
|
[item setTag: [[dict objectForKey: @"Index"] intValue]];
|
||||||
|
|
||||||
NSImage * icon = [[self imageForGroup: dict] copy];
|
NSImage * icon = [self imageForGroup: dict];
|
||||||
if (small)
|
if (small)
|
||||||
{
|
{
|
||||||
|
icon = [icon copy];
|
||||||
[icon setScalesWhenResized: YES];
|
[icon setScalesWhenResized: YES];
|
||||||
[icon setSize: NSMakeSize(ICON_WIDTH_SMALL, ICON_WIDTH_SMALL)];
|
[icon setSize: NSMakeSize(ICON_WIDTH_SMALL, ICON_WIDTH_SMALL)];
|
||||||
|
|
||||||
|
[item setImage: icon];
|
||||||
|
[icon release];
|
||||||
}
|
}
|
||||||
[item setImage: icon];
|
else
|
||||||
[icon release];
|
[item setImage: icon];
|
||||||
|
|
||||||
[menu addItem: item];
|
[menu addItem: item];
|
||||||
[item release];
|
[item release];
|
||||||
|
@ -305,10 +313,10 @@ GroupsController * fGroupsInstance = nil;
|
||||||
NSDictionary * dict;
|
NSDictionary * dict;
|
||||||
while ((dict = [enumerator nextObject]))
|
while ((dict = [enumerator nextObject]))
|
||||||
{
|
{
|
||||||
NSMutableDictionary * newDict = [dict mutableCopy];
|
NSMutableDictionary * tempDict = [dict mutableCopy];
|
||||||
[newDict removeObjectForKey: @"Icon"];
|
[tempDict removeObjectForKey: @"Icon"];
|
||||||
[groups addObject: newDict];
|
[groups addObject: tempDict];
|
||||||
[newDict release];
|
[tempDict release];
|
||||||
}
|
}
|
||||||
|
|
||||||
[[NSUserDefaults standardUserDefaults] setObject: [NSArchiver archivedDataWithRootObject: groups] forKey: @"Groups"];
|
[[NSUserDefaults standardUserDefaults] setObject: [NSArchiver archivedDataWithRootObject: groups] forKey: @"Groups"];
|
||||||
|
|
Loading…
Add table
Reference in a new issue