diff --git a/macosx/Controller.m b/macosx/Controller.m index ded00ced6..5fb97f28a 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -171,13 +171,12 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy //make sure another Transmission.app isn't running already BOOL othersRunning = NO; - #warning enable when 10.6-only - /*if ([NSApp isOnSnowLeopardOrBetter]) + if ([NSApp isOnSnowLeopardOrBetter]) { - NSArray * apps = [NSRunningApplication runningApplicationsWithBundleIdentifier: [[NSBundle mainBundle] bundleIdentifier]]; + NSArray * apps = [NSRunningApplicationSL runningApplicationsWithBundleIdentifier: [[NSBundle mainBundle] bundleIdentifier]]; othersRunning = [apps count] > 1; } - else*/ + else { NSString * bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; const int processIdentifier = [[NSProcessInfo processInfo] processIdentifier]; diff --git a/macosx/NSApplicationAdditions.h b/macosx/NSApplicationAdditions.h index ec7c37f4f..c468e6cb9 100644 --- a/macosx/NSApplicationAdditions.h +++ b/macosx/NSApplicationAdditions.h @@ -23,6 +23,7 @@ *****************************************************************************/ #define QLPreviewPanelSL NSClassFromString(@"QLPreviewPanel") +#define NSRunningApplicationSL NSClassFromString(@"NSRunningApplication") @interface NSApplication (NSApplicationAdditions) diff --git a/macosx/TorrentTableView.h b/macosx/TorrentTableView.h index 9eb8f09b0..4678b53d0 100644 --- a/macosx/TorrentTableView.h +++ b/macosx/TorrentTableView.h @@ -31,7 +31,7 @@ #define GROUP_SEPARATOR_HEIGHT 18.0 -#warning revert +#warning uncomment @interface TorrentTableView : NSOutlineView // { IBOutlet Controller * fController;