mirror of
https://github.com/transmission/transmission.git
synced 2025-12-23 11:58:36 +00:00
#4788 "export TRANSMISSION_HOME=" broken in Mac client
This commit is contained in:
@@ -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];
|
||||||
|
|||||||
Reference in New Issue
Block a user