miscellaneous cleanup
This commit is contained in:
parent
36689ca7c3
commit
86a701be34
|
@ -2125,7 +2125,7 @@
|
|||
GCC_WARN_UNUSED_FUNCTION = NO;
|
||||
GCC_WARN_UNUSED_PARAMETER = NO;
|
||||
GCC_WARN_UNUSED_VALUE = NO;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = NO;
|
||||
IBC_FLATTEN_NIBS = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||
OTHER_CFLAGS = "$(inherited)";
|
||||
|
|
|
@ -63,7 +63,7 @@ AboutWindowController * fAboutBoxInstance = nil;
|
|||
[[self window] center];
|
||||
}
|
||||
|
||||
- (void) windowWillClose: (id)sender
|
||||
- (void) windowWillClose: (id) sender
|
||||
{
|
||||
[fAboutBoxInstance release];
|
||||
fAboutBoxInstance = nil;
|
||||
|
|
|
@ -67,8 +67,11 @@ GroupsWindowController * fGroupsWindowInstance = nil;
|
|||
[fAddRemoveControl setEnabled: NO forSegment: REMOVE_TAG];
|
||||
}
|
||||
|
||||
- (void) windowWillClose: (id)sender
|
||||
- (void) windowWillClose: (id) sender
|
||||
{
|
||||
#warning remove when streamlined
|
||||
[[NSColorPanel sharedColorPanel] close];
|
||||
|
||||
[fGroupsWindowInstance release];
|
||||
fGroupsWindowInstance = nil;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
//TIGER-ONLY
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface MenuLabel : NSTextField
|
||||
|
|
|
@ -36,7 +36,6 @@ typedef enum
|
|||
|
||||
@interface Torrent : NSObject
|
||||
{
|
||||
tr_handle * fLib;
|
||||
tr_torrent * fHandle;
|
||||
const tr_info * fInfo;
|
||||
const tr_stat * fStat;
|
||||
|
|
|
@ -1542,7 +1542,6 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
static_lastid++;
|
||||
fID = static_lastid;
|
||||
|
||||
fLib = lib;
|
||||
fDefaults = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
fPublicTorrent = path && (publicTorrent ? [publicTorrent boolValue] : ![fDefaults boolForKey: @"DeleteOriginalTorrent"]);
|
||||
|
@ -1561,7 +1560,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
}
|
||||
|
||||
//set libtransmission settings for initialization
|
||||
tr_ctor * ctor = tr_ctorNew(fLib);
|
||||
tr_ctor * ctor = tr_ctorNew(lib);
|
||||
tr_ctorSetPaused(ctor, TR_FORCE, YES);
|
||||
tr_ctorSetMaxConnectedPeers(ctor, TR_FALLBACK, [fDefaults integerForKey: @"PeersTorrent"]);
|
||||
|
||||
|
@ -1570,39 +1569,39 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
if (hashString)
|
||||
{
|
||||
tr_ctorSetMetainfoFromHash(ctor, [hashString UTF8String]);
|
||||
if (tr_torrentParse(fLib, ctor, &info) == TR_OK)
|
||||
if (tr_torrentParse(lib, ctor, &info) == TR_OK)
|
||||
{
|
||||
NSString * currentDownloadFolder = [self shouldUseIncompleteFolderForName: [NSString stringWithUTF8String: info.name]]
|
||||
? fIncompleteFolder : fDownloadFolder;
|
||||
tr_ctorSetDestination(ctor, TR_FORCE, [currentDownloadFolder UTF8String]);
|
||||
|
||||
fHandle = tr_torrentNew(fLib, ctor, &error);
|
||||
fHandle = tr_torrentNew(lib, ctor, &error);
|
||||
}
|
||||
tr_metainfoFree(&info);
|
||||
}
|
||||
if (!fHandle && path)
|
||||
{
|
||||
tr_ctorSetMetainfoFromFile(ctor, [path UTF8String]);
|
||||
if (tr_torrentParse(fLib, ctor, &info) == TR_OK)
|
||||
if (tr_torrentParse(lib, ctor, &info) == TR_OK)
|
||||
{
|
||||
NSString * currentDownloadFolder = [self shouldUseIncompleteFolderForName: [NSString stringWithUTF8String: info.name]]
|
||||
? fIncompleteFolder : fDownloadFolder;
|
||||
tr_ctorSetDestination(ctor, TR_FORCE, [currentDownloadFolder UTF8String]);
|
||||
|
||||
fHandle = tr_torrentNew(fLib, ctor, &error);
|
||||
fHandle = tr_torrentNew(lib, ctor, &error);
|
||||
}
|
||||
tr_metainfoFree(&info);
|
||||
}
|
||||
if (!fHandle && data)
|
||||
{
|
||||
tr_ctorSetMetainfo(ctor, [data bytes], [data length]);
|
||||
if (tr_torrentParse(fLib, ctor, &info) == TR_OK)
|
||||
if (tr_torrentParse(lib, ctor, &info) == TR_OK)
|
||||
{
|
||||
NSString * currentDownloadFolder = [self shouldUseIncompleteFolderForName: [NSString stringWithUTF8String: info.name]]
|
||||
? fIncompleteFolder : fDownloadFolder;
|
||||
tr_ctorSetDestination(ctor, TR_FORCE, [currentDownloadFolder UTF8String]);
|
||||
|
||||
fHandle = tr_torrentNew(fLib, ctor, &error);
|
||||
fHandle = tr_torrentNew(lib, ctor, &error);
|
||||
}
|
||||
tr_metainfoFree(&info);
|
||||
}
|
||||
|
@ -1634,7 +1633,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
|
||||
fWaitToStart = waitToStart && [waitToStart boolValue];
|
||||
|
||||
fOrderValue = orderValue ? [orderValue intValue] : tr_torrentCount(fLib) - 1;
|
||||
fOrderValue = orderValue ? [orderValue intValue] : tr_torrentCount(lib) - 1;
|
||||
fGroupValue = groupValue ? [groupValue intValue] : -1;
|
||||
|
||||
[self createFileList];
|
||||
|
|
Loading…
Reference in New Issue