diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPAppController.h | 2 | ||||
-rw-r--r-- | Source/SPAppController.m | 1 | ||||
-rw-r--r-- | Source/SPChooseMenuItemDialog.h | 2 | ||||
-rw-r--r-- | Source/SPChooseMenuItemDialog.m | 1 | ||||
-rw-r--r-- | Source/SPContentFilterManager.h | 5 | ||||
-rw-r--r-- | Source/SPCustomQuery.h | 5 | ||||
-rw-r--r-- | Source/SPDataImport.h | 2 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.h | 8 | ||||
-rw-r--r-- | Source/SPEditorPreferencePane.h | 2 | ||||
-rw-r--r-- | Source/SPFieldEditorController.h | 5 | ||||
-rw-r--r-- | Source/SPFieldMapperController.h | 5 | ||||
-rw-r--r-- | Source/SPNarrowDownCompletion.h | 4 | ||||
-rw-r--r-- | Source/SPPreferenceController.h | 2 | ||||
-rw-r--r-- | Source/SPQueryFavoriteManager.h | 5 | ||||
-rw-r--r-- | Source/SPSplitView.h | 2 | ||||
-rw-r--r-- | Source/SPSplitView.m | 4 | ||||
-rw-r--r-- | Source/SPTableContent.h | 5 | ||||
-rw-r--r-- | Source/SPTextView.h | 5 | ||||
-rw-r--r-- | Source/SPWindowController.h | 2 |
19 files changed, 20 insertions, 47 deletions
diff --git a/Source/SPAppController.h b/Source/SPAppController.h index ccaf58dd..48ed2fea 100644 --- a/Source/SPAppController.h +++ b/Source/SPAppController.h @@ -40,7 +40,7 @@ @class SPDatabaseDocument; @class SPBundleEditorController; -@interface SPAppController : NSObject <FRFeedbackReporterDelegate> +@interface SPAppController : NSObject <FRFeedbackReporterDelegate, NSOpenSavePanelDelegate> { IBOutlet NSWindow* bundleEditorWindow; diff --git a/Source/SPAppController.m b/Source/SPAppController.m index da70ceb9..9737630e 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -222,6 +222,7 @@ YY_BUFFER_STATE yy_scan_string (const char *); } NSOpenPanel *panel = [NSOpenPanel openPanel]; + [panel setDelegate:self]; [panel setCanSelectHiddenExtension:YES]; [panel setCanChooseDirectories:NO]; diff --git a/Source/SPChooseMenuItemDialog.h b/Source/SPChooseMenuItemDialog.h index 558bbc4c..ff56ac2d 100644 --- a/Source/SPChooseMenuItemDialog.h +++ b/Source/SPChooseMenuItemDialog.h @@ -32,7 +32,7 @@ @class SPChooseMenuItemDialogTextView; -@interface SPChooseMenuItemDialog : NSWindow +@interface SPChooseMenuItemDialog : NSWindow <NSTextViewDelegate> { NSMenu *contextMenu; NSInteger selectedItemIndex; diff --git a/Source/SPChooseMenuItemDialog.m b/Source/SPChooseMenuItemDialog.m index a164e858..dc9ba92a 100644 --- a/Source/SPChooseMenuItemDialog.m +++ b/Source/SPChooseMenuItemDialog.m @@ -96,6 +96,7 @@ [self setAlphaValue:0.0f]; dummyTextView = [[SPChooseMenuItemDialogTextView alloc] init]; + [dummyTextView setDelegate:self]; [self setContentView:dummyTextView]; diff --git a/Source/SPContentFilterManager.h b/Source/SPContentFilterManager.h index 17ed782f..2268ba2a 100644 --- a/Source/SPContentFilterManager.h +++ b/Source/SPContentFilterManager.h @@ -39,10 +39,7 @@ @end -@interface SPContentFilterManager : NSWindowController -#ifdef SP_REFACTOR /* ivars */ -<NSOpenSavePanelDelegate> -#endif +@interface SPContentFilterManager : NSWindowController <NSOpenSavePanelDelegate> { #ifndef SP_REFACTOR /* ivars */ NSUserDefaults *prefs; diff --git a/Source/SPCustomQuery.h b/Source/SPCustomQuery.h index 982b2059..ffbe4549 100644 --- a/Source/SPCustomQuery.h +++ b/Source/SPCustomQuery.h @@ -58,10 +58,7 @@ @class SPMySQLFastStreamingResult; @class SPTextView; -@interface SPCustomQuery : NSObject -#ifdef SP_REFACTOR -<NSTableViewDataSource, NSWindowDelegate, NSTableViewDelegate> -#endif +@interface SPCustomQuery : NSObject <NSTableViewDataSource, NSWindowDelegate, NSTableViewDelegate> { IBOutlet id tableDocumentInstance; IBOutlet id tablesListInstance; diff --git a/Source/SPDataImport.h b/Source/SPDataImport.h index 5c66b07f..0d23b104 100644 --- a/Source/SPDataImport.h +++ b/Source/SPDataImport.h @@ -41,7 +41,7 @@ typedef enum { @class SPFieldMapperController, SPFileHandle; -@interface SPDataImport : NSObject +@interface SPDataImport : NSObject <NSOpenSavePanelDelegate> { IBOutlet id tableDocumentInstance; IBOutlet id tablesListInstance; diff --git a/Source/SPDatabaseDocument.h b/Source/SPDatabaseDocument.h index b5ea2373..ac9f45bc 100644 --- a/Source/SPDatabaseDocument.h +++ b/Source/SPDatabaseDocument.h @@ -57,18 +57,12 @@ #import "SPConnectionControllerDelegateProtocol.h" -#ifdef SP_REFACTOR /* patch */ #import <SPMySQL/SPMySQLConnectionDelegate.h> -#endif /** * The SPDatabaseDocument class controls the primary database view window. */ -@interface SPDatabaseDocument : NSObject <SPConnectionControllerDelegateProtocol -#ifdef SP_REFACTOR /* patch */ - , SPMySQLConnectionDelegate, NSTextFieldDelegate -#endif -> +@interface SPDatabaseDocument : NSObject <SPConnectionControllerDelegateProtocol, SPMySQLConnectionDelegate, NSTextFieldDelegate, NSToolbarDelegate> { #ifdef SP_REFACTOR /* patch */ id delegate; diff --git a/Source/SPEditorPreferencePane.h b/Source/SPEditorPreferencePane.h index 4db496bc..29610a08 100644 --- a/Source/SPEditorPreferencePane.h +++ b/Source/SPEditorPreferencePane.h @@ -39,7 +39,7 @@ * * Editor preference pane controller. */ -@interface SPEditorPreferencePane : SPPreferencePane <SPPreferencePaneProtocol> +@interface SPEditorPreferencePane : SPPreferencePane <SPPreferencePaneProtocol, NSOpenSavePanelDelegate> { IBOutlet NSWindow *enterNameWindow; IBOutlet NSWindow *editThemeListWindow; diff --git a/Source/SPFieldEditorController.h b/Source/SPFieldEditorController.h index fb3b6b80..a920c9b0 100644 --- a/Source/SPFieldEditorController.h +++ b/Source/SPFieldEditorController.h @@ -40,10 +40,7 @@ * This class offers a sheet for editing different kind of data such as text, blobs (including images) as * editSheet and bit fields as bitSheet. */ -@interface SPFieldEditorController : NSWindowController -#ifdef SP_REFACTOR -<NSComboBoxDataSource> -#endif +@interface SPFieldEditorController : NSWindowController <NSComboBoxDataSource> { IBOutlet id editSheetProgressBar; IBOutlet id editSheetSegmentControl; diff --git a/Source/SPFieldMapperController.h b/Source/SPFieldMapperController.h index 2f2a5920..79b73bcc 100644 --- a/Source/SPFieldMapperController.h +++ b/Source/SPFieldMapperController.h @@ -35,10 +35,7 @@ @class SPTablesList; @class SPMySQLConnection; -@interface SPFieldMapperController : NSWindowController -#ifdef SP_REFACTOR -<NSTokenFieldCellDelegate> -#endif +@interface SPFieldMapperController : NSWindowController <NSTokenFieldCellDelegate> { IBOutlet SPTableView *fieldMapperTableView; IBOutlet id fieldMapperTableScrollView; diff --git a/Source/SPNarrowDownCompletion.h b/Source/SPNarrowDownCompletion.h index 02a4ddc0..073844a1 100644 --- a/Source/SPNarrowDownCompletion.h +++ b/Source/SPNarrowDownCompletion.h @@ -34,11 +34,7 @@ @class SPDatabaseStructure; -#ifndef SP_REFACTOR -@interface SPNarrowDownCompletion : NSWindow -#else @interface SPNarrowDownCompletion : NSWindow <NSTableViewDelegate, NSTableViewDataSource, NSTokenFieldCellDelegate> -#endif { NSArray* suggestions; NSMutableString* mutablePrefix; diff --git a/Source/SPPreferenceController.h b/Source/SPPreferenceController.h index 23c2fdb8..3e7bdf23 100644 --- a/Source/SPPreferenceController.h +++ b/Source/SPPreferenceController.h @@ -46,7 +46,7 @@ * * Main preferences window controller. */ -@interface SPPreferenceController : NSWindowController +@interface SPPreferenceController : NSWindowController <NSToolbarDelegate> { // Preference pane controllers IBOutlet SPGeneralPreferencePane <SPPreferencePaneProtocol> *generalPreferencePane; diff --git a/Source/SPQueryFavoriteManager.h b/Source/SPQueryFavoriteManager.h index a0a62bdd..017e3cc1 100644 --- a/Source/SPQueryFavoriteManager.h +++ b/Source/SPQueryFavoriteManager.h @@ -40,10 +40,7 @@ @end -@interface SPQueryFavoriteManager : NSWindowController -#ifdef SP_REFACTOR -<NSOpenSavePanelDelegate> -#endif +@interface SPQueryFavoriteManager : NSWindowController <NSOpenSavePanelDelegate> { #ifndef SP_REFACTOR /* ivars */ NSUserDefaults *prefs; diff --git a/Source/SPSplitView.h b/Source/SPSplitView.h index 1b699671..f1edef8d 100644 --- a/Source/SPSplitView.h +++ b/Source/SPSplitView.h @@ -32,7 +32,7 @@ @class SPSplitViewAnimationRetainCycleBypass; -@interface SPSplitView : NSSplitView +@interface SPSplitView : NSSplitView <NSSplitViewDelegate> { NSObject *delegate; diff --git a/Source/SPSplitView.m b/Source/SPSplitView.m index 2793fd87..362b24aa 100644 --- a/Source/SPSplitView.m +++ b/Source/SPSplitView.m @@ -699,6 +699,7 @@ [self _ensureDefaultSubviewSizesToIndex:l-1]; delegate = [super delegate]; + [super setDelegate:self]; } @@ -1089,7 +1090,8 @@ } // Check for a first responder to restore, using the "true" first responder for field editors - NSResponder *firstResponderToRestore = [[self window] firstResponder]; + NSResponder<NSTextDelegate> *firstResponderToRestore = [[self window] firstResponder]; + if ([firstResponderToRestore respondsToSelector:@selector(isFieldEditor)] && [(NSText *)firstResponderToRestore isFieldEditor]) { firstResponderToRestore = [(NSText *)firstResponderToRestore delegate]; } diff --git a/Source/SPTableContent.h b/Source/SPTableContent.h index 3d191da4..fcc106b2 100644 --- a/Source/SPTableContent.h +++ b/Source/SPTableContent.h @@ -51,10 +51,7 @@ @class SPSplitView; #endif -@interface SPTableContent : NSObject -#ifdef SP_REFACTOR -<NSTableViewDelegate, NSTableViewDataSource, NSComboBoxDataSource, NSComboBoxDelegate> -#endif +@interface SPTableContent : NSObject <NSTableViewDelegate, NSTableViewDataSource, NSComboBoxDataSource, NSComboBoxDelegate> { IBOutlet SPDatabaseDocument *tableDocumentInstance; IBOutlet id tablesListInstance; diff --git a/Source/SPTextView.h b/Source/SPTextView.h index b6348407..d596395d 100644 --- a/Source/SPTextView.h +++ b/Source/SPTextView.h @@ -40,10 +40,7 @@ @class SPCopyTable; @class NoodleLineNumberView; -@interface SPTextView : NSTextView -#ifdef SP_REFACTOR -<NSTextStorageDelegate> -#endif +@interface SPTextView : NSTextView <NSTextStorageDelegate> { IBOutlet SPDatabaseDocument *tableDocumentInstance; IBOutlet SPTablesList *tablesListInstance; diff --git a/Source/SPWindowController.h b/Source/SPWindowController.h index 964cedd5..39b70dcf 100644 --- a/Source/SPWindowController.h +++ b/Source/SPWindowController.h @@ -33,7 +33,7 @@ @class PSMTabBarControl; @class SPDatabaseDocument; -@interface SPWindowController : NSWindowController +@interface SPWindowController : NSWindowController <NSWindowDelegate> { IBOutlet PSMTabBarControl *tabBar; IBOutlet NSTabView *tabView; |