#4788 "export TRANSMISSION_HOME=" broken in Mac client

This commit is contained in:
Mitchell Livingston
2012-02-29 02:45:42 +00:00
parent 6ac2b87fd9
commit bc6d6fb54b

View File

@@ -320,8 +320,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
[NSLocalizedString(@"GB", "Memory size - gigabytes") UTF8String], [NSLocalizedString(@"GB", "Memory size - gigabytes") UTF8String],
[NSLocalizedString(@"TB", "Memory size - terabytes") UTF8String]); [NSLocalizedString(@"TB", "Memory size - terabytes") UTF8String]);
//use this instead of tr_getDefaultConfigDir("Transmission") so we are sure to get the "real" Application Support directory const char * configDir = tr_getDefaultConfigDir("Transmission");
const char * configDir = [[[NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) objectAtIndex: 0] stringByAppendingPathComponent: @"Transmission"] UTF8String];
fLib = tr_sessionInit("macosx", configDir, YES, &settings); fLib = tr_sessionInit("macosx", configDir, YES, &settings);
tr_bencFree(&settings); tr_bencFree(&settings);
@@ -3207,7 +3206,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
+ (NSHeight([fWindow frame]) - NSHeight([[fWindow contentView] frame])); //contentView to window + (NSHeight([fWindow frame]) - NSHeight([[fWindow contentView] frame])); //contentView to window
if (windowSize.height < minHeight) if (windowSize.height < minHeight)
windowSize.height =minHeight; windowSize.height = minHeight;
else else
{ {
NSSize maxSize = [scrollView convertSize: [[fWindow screen] visibleFrame].size fromView: nil]; NSSize maxSize = [scrollView convertSize: [[fWindow screen] visibleFrame].size fromView: nil];