mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
@class PBViewController, PBGitSidebarController, PBGitCommitController;
|
||||
|
||||
@interface PBGitWindowController : NSWindowController /*<NSWindowDelegate>*/{
|
||||
@interface PBGitWindowController : NSWindowController PROTOCOL_10_6(NSWindowDelegate){
|
||||
__weak PBGitRepository* repository;
|
||||
|
||||
PBViewController *contentController;
|
||||
|
||||
Reference in New Issue
Block a user