Skip to content

Commit

Permalink
Use correct availability macros
Browse files Browse the repository at this point in the history
  • Loading branch information
b4winckler committed Jul 21, 2011
1 parent 88b7b92 commit 37741a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/MacVim/MMAppController.m
Expand Up @@ -241,7 +241,7 @@ - (id)init
{
if (!(self = [super init])) return nil;

#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7)
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
// Disable automatic relaunching
[NSApp disableRelaunchOnLogin];
#endif
Expand Down
12 changes: 6 additions & 6 deletions src/MacVim/MMVimController.m
Expand Up @@ -766,21 +766,21 @@ - (void)handleMessage:(int)msgid data:(NSData *)data
[self setServerName:name];
[name release];
} else if (EnterFullscreenMsgID == msgid) {
#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7)
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
[[windowController window] toggleFullScreen:self];
#else
const void *bytes = [data bytes];
int fuoptions = *((int*)bytes); bytes += sizeof(int);
int bg = *((int*)bytes);
NSColor *back = [NSColor colorWithArgbInt:bg];

[windowController enterFullscreen:fuoptions backgroundColor:back];
#else
[[windowController window] toggleFullScreen:self];
#endif
} else if (LeaveFullscreenMsgID == msgid) {
#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7)
[windowController leaveFullscreen];
#else
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
[[windowController window] toggleFullScreen:self];
#else
[windowController leaveFullscreen];
#endif
} else if (SetBuffersModifiedMsgID == msgid) {
const void *bytes = [data bytes];
Expand Down
2 changes: 1 addition & 1 deletion src/MacVim/MMWindowController.m
Expand Up @@ -181,7 +181,7 @@ - (id)initWithVimController:(MMVimController *)controller
if ([win respondsToSelector:@selector(_setContentHasShadow:)])
[win _setContentHasShadow:NO];

#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7)
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
[win setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
#endif

Expand Down

0 comments on commit 37741a0

Please sign in to comment.