conditionalize usage of 10.6-only protocols

David Catmull (Uncommon)
Uncommon/gitx@e5b603f188

Conflicts:

	DBPrefsWindowController.h
	PBGitHistoryController.h
	PBGitSidebarController.h
	PBGitWindowController.h
This commit is contained in:
German Laullon
2011-05-19 00:01:49 +02:00
parent 2f828bb165
commit 94efa431a6
5 changed files with 17 additions and 4 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
#import <Cocoa/Cocoa.h>
@interface DBPrefsWindowController : NSWindowController /*<NSAnimationDelegate,NSToolbarDelegate>*/{
@interface DBPrefsWindowController : NSWindowController PROTOCOL_10_6(NSAnimationDelegate,NSToolbarDelegate){
NSMutableArray *toolbarIdentifiers;
NSMutableDictionary *toolbarViews;
NSMutableDictionary *toolbarItems;
+13
View File
@@ -17,3 +17,16 @@
#ifndef ALog
#define ALog(...) DLog(__VA_ARGS__)
#endif
// In 10.6, some NSObject categories (like NSWindowDelegate) were changed to
// protocols. Thus to avoid warnings we need to add protocol specifiers, but
// only when compiling for 10.6+.
#ifndef MAC_OS_X_VERSION_10_6
#define MAC_OS_X_VERSION_10_6 1060
#endif
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
#define PROTOCOL_10_6(...) <__VA_ARGS__>
#else
#define PROTOCOL_10_6(...)
#endif
+1 -1
View File
@@ -22,7 +22,7 @@
@class PBHistorySearchController;
@interface PBGitHistoryController : PBViewController /*<NSOutlineViewDelegate>*/{
@interface PBGitHistoryController : PBViewController PROTOCOL_10_6(NSOutlineViewDelegate){
IBOutlet PBRefController *refController;
IBOutlet NSSearchField *searchField;
IBOutlet NSArrayController* commitController;
+1 -1
View File
@@ -13,7 +13,7 @@
@class PBGitHistoryController;
@class PBGitCommitController;
@interface PBGitSidebarController : PBViewController /*<NSOutlineViewDelegate>*/{
@interface PBGitSidebarController : PBViewController PROTOCOL_10_6(NSOutlineViewDelegate, NSMenuDelegate){
IBOutlet NSWindow *window;
IBOutlet NSOutlineView *sourceView;
IBOutlet NSView *sourceListControlsView;
+1 -1
View File
@@ -14,7 +14,7 @@
@class PBViewController, PBGitSidebarController, PBGitCommitController;
@interface PBGitWindowController : NSWindowController /*<NSWindowDelegate>*/{
@interface PBGitWindowController : NSWindowController PROTOCOL_10_6(NSWindowDelegate){
__weak PBGitRepository* repository;
PBViewController *contentController;