aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/MGTemplateEngine.m2
-rw-r--r--Source/NoodleLineNumberView.m2
-rw-r--r--Source/SPActivityTextFieldCell.m6
-rw-r--r--Source/SPCSVParser.m2
-rw-r--r--Source/SPColorSelectorView.h4
-rw-r--r--Source/SPColorSelectorView.m4
-rw-r--r--Source/SPComboPopupButton.h4
-rw-r--r--Source/SPComboPopupButton.m16
-rw-r--r--Source/SPDataStorage.m6
-rw-r--r--Source/SPEditorPreferencePane.m2
-rw-r--r--Source/SPGeometryDataView.m8
-rw-r--r--Source/SPImageView.h4
-rw-r--r--Source/SPImageView.m4
-rw-r--r--Source/SPNarrowDownCompletion.m2
-rw-r--r--Source/SPNetworkPreferencePane.m2
-rw-r--r--Source/SPPreferenceController.m99
-rw-r--r--Source/SPPreferenceControllerDelegate.h42
-rw-r--r--Source/SPPreferenceControllerDelegate.m131
-rw-r--r--Source/SPSQLParser.m10
-rw-r--r--Source/SPSplitView.m6
-rw-r--r--Source/SPTableFilterParser.m2
-rw-r--r--Source/SPTableView.m6
-rw-r--r--Source/SPTextView.m6
-rw-r--r--Source/SPTooltip.m2
-rw-r--r--Source/YRKSpinningProgressIndicator.m2
25 files changed, 134 insertions, 240 deletions
diff --git a/Source/MGTemplateEngine.m b/Source/MGTemplateEngine.m
index 4fe7620b..c10773bf 100644
--- a/Source/MGTemplateEngine.m
+++ b/Source/MGTemplateEngine.m
@@ -28,7 +28,7 @@
#define GLOBAL_DELIM_EXPR_END @"expressionEnd"
#define GLOBAL_DELIM_FILTER @"filter"
-@interface MGTemplateEngine (PrivateMethods)
+@interface MGTemplateEngine ()
- (NSObject *)valueForVariable:(NSString *)var parent:(NSObject **)parent parentKey:(NSString **)parentKey;
- (void)setValue:(NSObject *)newValue forVariable:(NSString *)var forceCurrentStackFrame:(BOOL)inStackFrame;
diff --git a/Source/NoodleLineNumberView.m b/Source/NoodleLineNumberView.m
index 8b678434..3894ac8f 100644
--- a/Source/NoodleLineNumberView.m
+++ b/Source/NoodleLineNumberView.m
@@ -53,7 +53,7 @@ typedef NSRange (*RangeOfLineIMP)(id object, SEL selector, NSRange range);
#pragma mark -
-@interface NoodleLineNumberView (Private)
+@interface NoodleLineNumberView ()
- (NSArray *)lineIndices;
- (void)invalidateLineIndices;
diff --git a/Source/SPActivityTextFieldCell.m b/Source/SPActivityTextFieldCell.m
index b09454bb..84bf37e9 100644
--- a/Source/SPActivityTextFieldCell.m
+++ b/Source/SPActivityTextFieldCell.m
@@ -33,7 +33,7 @@
#define FAVORITE_NAME_FONT_SIZE 12.0f
-@interface SPActivityTextFieldCell (PrivateAPI)
+@interface SPActivityTextFieldCell ()
- (NSAttributedString *)constructSubStringAttributedString;
- (NSAttributedString *)attributedStringForFavoriteName;
@@ -332,9 +332,7 @@ static inline NSRect SPTextLinkRectFromCellRect(NSRect inRect)
[super dealloc];
}
-@end
-
-@implementation SPActivityTextFieldCell (PrivateAPI)
+#pragma mark - Private API
/**
* Constructs the attributed string to be used as the cell's substring.
diff --git a/Source/SPCSVParser.m b/Source/SPCSVParser.m
index 819c34b7..0dee279d 100644
--- a/Source/SPCSVParser.m
+++ b/Source/SPCSVParser.m
@@ -34,7 +34,7 @@
* Please see the header files for a general description of the purpose of this class.
*/
-@implementation SPCSVParser : NSObject
+@implementation SPCSVParser
#pragma mark -
#pragma mark Retrieving data from the CSV string
diff --git a/Source/SPColorSelectorView.h b/Source/SPColorSelectorView.h
index 925034a3..5211bb86 100644
--- a/Source/SPColorSelectorView.h
+++ b/Source/SPColorSelectorView.h
@@ -70,8 +70,8 @@
@end
-@interface NSObject (SPColorSelectorViewDelegate)
-
+@protocol SPColorSelectorViewDelegate <NSObject>
+@optional
/**
* Called on a delegate when the selection did (really) change
* @param aView The changed view
diff --git a/Source/SPColorSelectorView.m b/Source/SPColorSelectorView.m
index ba577170..15c55f57 100644
--- a/Source/SPColorSelectorView.m
+++ b/Source/SPColorSelectorView.m
@@ -43,7 +43,7 @@
#import "SPColorSelectorView.h"
#import "SPOSInfo.h"
-@interface SPColorSelectorView (Private)
+@interface SPColorSelectorView ()
- (void)setupTrackingAreas;
- (void)_drawDotBevelStyleWithGradient:(NSGradient *)gradient insideRect:(NSRect)colorSquareRect;
@@ -414,7 +414,7 @@ enum trackingAreaIDs
}
if (delegate != nil && [delegate respondsToSelector:@selector(colorSelectorDidChange:)]) {
- [delegate colorSelectorDidChange:self];
+ [(id<SPColorSelectorViewDelegate>)delegate colorSelectorDidChange:self];
}
[self setNeedsDisplay:YES];
diff --git a/Source/SPComboPopupButton.h b/Source/SPComboPopupButton.h
index a3b34b10..035ab8d7 100644
--- a/Source/SPComboPopupButton.h
+++ b/Source/SPComboPopupButton.h
@@ -44,7 +44,3 @@
@property(readonly, assign) NSUInteger lineOffset;
@end
-
-@interface SPComboPopupButtonCell : NSPopUpButtonCell
-
-@end
diff --git a/Source/SPComboPopupButton.m b/Source/SPComboPopupButton.m
index 3df3d6ec..e1506322 100644
--- a/Source/SPComboPopupButton.m
+++ b/Source/SPComboPopupButton.m
@@ -34,12 +34,16 @@
#define kSPComboPopupButtonLineOffsetSmall 15;
#define kSPComboPopupButtonLineOffsetRegular 17;
-@interface SPComboPopupButton (PrivateAPI)
+@interface SPComboPopupButton ()
- (void)_initCustomData;
@end
+@interface SPComboPopupButtonCell : NSPopUpButtonCell
+
+@end
+
@implementation SPComboPopupButton
@synthesize shouldDrawNonHighlightState;
@@ -184,12 +188,8 @@
menuIsOpen = NO;
}
-@end
-
#pragma mark -
-@implementation SPComboPopupButton (PrivateAPI)
-
- (void)_initCustomData
{
@@ -221,12 +221,6 @@
#pragma mark -
-@interface SPComboPopupButtonCell (PrivateAPI)
-
-- (void)_initCustomData;
-
-@end
-
@implementation SPComboPopupButtonCell
/**
diff --git a/Source/SPDataStorage.m b/Source/SPDataStorage.m
index 5db56b1e..3072ed33 100644
--- a/Source/SPDataStorage.m
+++ b/Source/SPDataStorage.m
@@ -34,7 +34,7 @@
#include <stdlib.h>
#include <mach/mach_time.h>
-@interface SPDataStorage (Private_API)
+@interface SPDataStorage ()
- (void) _checkNewRow:(NSMutableArray *)aRow;
- (void) _addRowUnsafeUnchecked:(NSMutableArray *)aRow;
@@ -559,9 +559,7 @@ static inline NSMutableArray* SPDataStorageGetEditedRow(NSPointerArray* rowStore
[super dealloc];
}
-@end
-
-@implementation SPDataStorage (PrivateAPI)
+#pragma mark - Private API
// DO NOT CALL THIS METHOD UNLESS YOU CURRENTLY HAVE A LOCK ON SELF!!!
- (void) _checkNewRow:(NSMutableArray *)aRow
diff --git a/Source/SPEditorPreferencePane.m b/Source/SPEditorPreferencePane.m
index 7fc810ea..fba5ff92 100644
--- a/Source/SPEditorPreferencePane.m
+++ b/Source/SPEditorPreferencePane.m
@@ -43,7 +43,7 @@ static NSString *SPCustomColorSchemeNameLC = @"user-defined";
#define SP_EXPORT_COLOR_SCHEME_NAME_STRING NSLocalizedString(@"MyTheme", @"Preferences : Themes : Initial filename for 'Export'")
-@interface SPEditorPreferencePane (PrivateAPI)
+@interface SPEditorPreferencePane ()
- (BOOL)_checkForUnsavedTheme;
- (NSArray *)_getAvailableThemes;
diff --git a/Source/SPGeometryDataView.m b/Source/SPGeometryDataView.m
index 996c1cf8..a94b0f43 100644
--- a/Source/SPGeometryDataView.m
+++ b/Source/SPGeometryDataView.m
@@ -30,7 +30,7 @@
#import "SPGeometryDataView.h"
-@interface SPGeometryDataView (PrivateAPI)
+@interface SPGeometryDataView ()
- (NSPoint)_normalizePoint:(NSPoint)aPoint;
- (void)_drawPoint:(NSPoint)aPoint;
@@ -282,12 +282,8 @@
[super dealloc];
}
-@end
-
#pragma mark -
-#pragma mark PrivateAPI
-
-@implementation SPGeometryDataView (PrivateAPI)
+#pragma mark Private API
/**
* Converts original NSPoint to target coordinates
diff --git a/Source/SPImageView.h b/Source/SPImageView.h
index 873f4075..3db5dee0 100644
--- a/Source/SPImageView.h
+++ b/Source/SPImageView.h
@@ -29,8 +29,8 @@
//
// More info at <https://github.com/sequelpro/sequelpro>
-@interface NSObject (SPImageViewDelegate)
-
+@protocol SPImageViewDelegate <NSObject>
+@optional
- (void)processUpdatedImageData:(NSData *)data;
- (void)processPasteImageData;
diff --git a/Source/SPImageView.m b/Source/SPImageView.m
index d56b7fa5..76a9b1ff 100644
--- a/Source/SPImageView.m
+++ b/Source/SPImageView.m
@@ -39,7 +39,7 @@
*/
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
- id delegateForUse = nil;
+ id<SPImageViewDelegate> delegateForUse = nil;
// If the delegate or the delegate's content instance doesn't implement processUpdatedImageData:,
// return the super's implementation
@@ -113,7 +113,7 @@
- (void)paste:(id)sender
{
// [super paste:sender];
- id delegateForUse = nil;
+ id<SPImageViewDelegate> delegateForUse = nil;
// If the delegate or the delegate's content instance doesn't implement processUpdatedImageData:,
// return the super's implementation
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m
index ad355c26..fd6fd38c 100644
--- a/Source/SPNarrowDownCompletion.m
+++ b/Source/SPNarrowDownCompletion.m
@@ -52,7 +52,7 @@
@end
-@interface SPNarrowDownCompletion (Private)
+@interface SPNarrowDownCompletion ()
- (NSRect)rectOfMainScreen;
- (NSString*)filterString;
diff --git a/Source/SPNetworkPreferencePane.m b/Source/SPNetworkPreferencePane.m
index c734f07b..95387871 100644
--- a/Source/SPNetworkPreferencePane.m
+++ b/Source/SPNetworkPreferencePane.m
@@ -33,7 +33,7 @@
static NSString *SPSSLCipherListMarkerItem = @"--";
static NSString *SPSSLCipherPboardTypeName = @"SSLCipherPboardType";
-@interface SPNetworkPreferencePane (Private)
+@interface SPNetworkPreferencePane ()
- (void)updateHiddenFiles;
- (void)loadSSLCiphers;
- (void)storeSSLCiphers;
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m
index fad1d95b..c782c591 100644
--- a/Source/SPPreferenceController.m
+++ b/Source/SPPreferenceController.m
@@ -33,7 +33,7 @@
#import "SPEditorPreferencePane.h"
#import "SPGeneralPreferencePane.h"
-@interface SPPreferenceController (PrivateAPI)
+@interface SPPreferenceController () <NSWindowDelegate>
- (void)_setupToolbar;
- (void)_resizeWindowForContentView:(NSView *)view;
@@ -226,6 +226,103 @@
[view setFrameOrigin:NSMakePoint(0, 0)];
}
+#pragma mark - SPPreferenceControllerDelegate
+
+#pragma mark Window delegate methods
+
+/**
+ * Trap window close notifications and use them to ensure changes are saved.
+ */
+- (void)windowWillClose:(NSNotification *)notification
+{
+ [[NSColorPanel sharedColorPanel] close];
+
+ // Mark the currently selected field in the window as having finished editing, to trigger saves.
+ if ([[self window] firstResponder]) {
+ [[self window] endEditingFor:[[self window] firstResponder]];
+ }
+}
+
+/**
+ * Trap window resize notifications and use them to disable resizing on most tabs
+ * - except for the favourites tab.
+ */
+- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize
+{
+ [[NSColorPanel sharedColorPanel] close];
+
+ return [sender showsResizeIndicator] ? frameSize : [sender frame].size;
+}
+
+#pragma mark -
+#pragma mark Toolbar delegate methods
+
+- (NSToolbarItem *)toolbar:(NSToolbar *)aToolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
+{
+ if ([itemIdentifier isEqualToString:SPPreferenceToolbarGeneral]) {
+ return generalItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarTables]) {
+ return tablesItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarNotifications]) {
+ return notificationsItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarAutoUpdate]) {
+ return autoUpdateItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarNetwork]) {
+ return networkItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarEditor]) {
+ return editorItem;
+ }
+ else if ([itemIdentifier isEqualToString:SPPreferenceToolbarShortcuts]) {
+ return shortcutItem;
+ }
+
+ return [[[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier] autorelease];
+}
+
+- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)aToolbar
+{
+ return @[
+ SPPreferenceToolbarGeneral,
+ SPPreferenceToolbarTables,
+ SPPreferenceToolbarNotifications,
+ SPPreferenceToolbarEditor,
+ SPPreferenceToolbarShortcuts,
+ SPPreferenceToolbarAutoUpdate,
+ SPPreferenceToolbarNetwork
+ ];
+}
+
+- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)aToolbar
+{
+ return @[
+ SPPreferenceToolbarGeneral,
+ SPPreferenceToolbarTables,
+ SPPreferenceToolbarNotifications,
+ SPPreferenceToolbarEditor,
+ SPPreferenceToolbarShortcuts,
+ SPPreferenceToolbarAutoUpdate,
+ SPPreferenceToolbarNetwork
+ ];
+}
+
+- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)aToolbar
+{
+ return @[
+ SPPreferenceToolbarGeneral,
+ SPPreferenceToolbarTables,
+ SPPreferenceToolbarNotifications,
+ SPPreferenceToolbarEditor,
+ SPPreferenceToolbarShortcuts,
+ SPPreferenceToolbarAutoUpdate,
+ SPPreferenceToolbarNetwork
+ ];
+}
+
#pragma mark -
- (void)dealloc
diff --git a/Source/SPPreferenceControllerDelegate.h b/Source/SPPreferenceControllerDelegate.h
deleted file mode 100644
index bcfcb271..00000000
--- a/Source/SPPreferenceControllerDelegate.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// SPPreferenceControllerDelegate.h
-// sequel-pro
-//
-// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010.
-// Copyright (c) 2010 Stuart Connolly. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-// More info at <https://github.com/sequelpro/sequelpro>
-
-#import "SPPreferenceController.h"
-
-/**
- * @category SPPreferenceControllerDelegate SPPreferenceControllerDelegate.h
- *
- * @author Stuart Connolly http://stuconnolly.com/
- *
- * Preference controller delegate category.
- */
-@interface SPPreferenceController (SPPreferenceControllerDelegate) <NSWindowDelegate>
-
-@end
diff --git a/Source/SPPreferenceControllerDelegate.m b/Source/SPPreferenceControllerDelegate.m
deleted file mode 100644
index 6a16de0f..00000000
--- a/Source/SPPreferenceControllerDelegate.m
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// SPPreferenceControllerDelegate.m
-// sequel-pro
-//
-// Created by Stuart Connolly (stuconnolly.com) on October 31, 2010.
-// Copyright (c) 2010 Stuart Connolly. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-// More info at <https://github.com/sequelpro/sequelpro>
-
-#import "SPPreferenceControllerDelegate.h"
-
-@implementation SPPreferenceController (SPPreferenceControllerDelegate)
-
-#pragma mark -
-#pragma mark Window delegate methods
-
-/**
- * Trap window close notifications and use them to ensure changes are saved.
- */
-- (void)windowWillClose:(NSNotification *)notification
-{
- [[NSColorPanel sharedColorPanel] close];
-
- // Mark the currently selected field in the window as having finished editing, to trigger saves.
- if ([[self window] firstResponder]) {
- [[self window] endEditingFor:[[self window] firstResponder]];
- }
-}
-
-/**
- * Trap window resize notifications and use them to disable resizing on most tabs
- * - except for the favourites tab.
- */
-- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize
-{
- [[NSColorPanel sharedColorPanel] close];
-
- return [sender showsResizeIndicator] ? frameSize : [sender frame].size;
-}
-
-#pragma mark -
-#pragma mark Toolbar delegate methods
-
-- (NSToolbarItem *)toolbar:(NSToolbar *)aToolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
-{
- if ([itemIdentifier isEqualToString:SPPreferenceToolbarGeneral]) {
- return generalItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarTables]) {
- return tablesItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarNotifications]) {
- return notificationsItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarAutoUpdate]) {
- return autoUpdateItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarNetwork]) {
- return networkItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarEditor]) {
- return editorItem;
- }
- else if ([itemIdentifier isEqualToString:SPPreferenceToolbarShortcuts]) {
- return shortcutItem;
- }
-
- return [[[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier] autorelease];
-}
-
-- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)aToolbar
-{
- return @[
- SPPreferenceToolbarGeneral,
- SPPreferenceToolbarTables,
- SPPreferenceToolbarNotifications,
- SPPreferenceToolbarEditor,
- SPPreferenceToolbarShortcuts,
- SPPreferenceToolbarAutoUpdate,
- SPPreferenceToolbarNetwork
- ];
-}
-
-- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)aToolbar
-{
- return @[
- SPPreferenceToolbarGeneral,
- SPPreferenceToolbarTables,
- SPPreferenceToolbarNotifications,
- SPPreferenceToolbarEditor,
- SPPreferenceToolbarShortcuts,
- SPPreferenceToolbarAutoUpdate,
- SPPreferenceToolbarNetwork
- ];
-}
-
-- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)aToolbar
-{
- return @[
- SPPreferenceToolbarGeneral,
- SPPreferenceToolbarTables,
- SPPreferenceToolbarNotifications,
- SPPreferenceToolbarEditor,
- SPPreferenceToolbarShortcuts,
- SPPreferenceToolbarAutoUpdate,
- SPPreferenceToolbarNetwork
- ];
-}
-
-@end
diff --git a/Source/SPSQLParser.m b/Source/SPSQLParser.m
index d9bec2eb..3e37cc0a 100644
--- a/Source/SPSQLParser.m
+++ b/Source/SPSQLParser.m
@@ -41,7 +41,7 @@ typedef struct to_buffer_state *TO_BUFFER_STATE;
void to_switch_to_buffer(TO_BUFFER_STATE);
TO_BUFFER_STATE to_scan_string (const char *);
-@interface SPSQLParser (PrivateAPI)
+@interface SPSQLParser ()
- (unichar) _charAtIndex:(NSInteger)index;
- (void) _clearCharCache;
@@ -53,7 +53,7 @@ TO_BUFFER_STATE to_scan_string (const char *);
* Please see the header files for a general description of the purpose of this class,
* and increased overview detail for the functions below.
*/
-@implementation SPSQLParser : NSMutableString
+@implementation SPSQLParser
#pragma mark -
#pragma mark Parser information
@@ -1044,11 +1044,7 @@ TO_BUFFER_STATE to_scan_string (const char *);
[super dealloc];
}
-@end
-
-#pragma mark -
-
-@implementation SPSQLParser (PrivateAPI)
+#pragma mark - Private API
/**
* Provide a method to retrieve a character from the local cache.
diff --git a/Source/SPSplitView.m b/Source/SPSplitView.m
index 467e0cd1..34cb4250 100644
--- a/Source/SPSplitView.m
+++ b/Source/SPSplitView.m
@@ -32,7 +32,7 @@
#import "SPDateAdditions.h"
#include <stdlib.h>
-@interface SPSplitView (Private_API)
+@interface SPSplitView ()
- (void)_initCustomProperties;
- (void)_ensureDefaultSubviewSizesToIndex:(NSUInteger)anIndex;
@@ -692,13 +692,9 @@
}
}
-@end
-
#pragma mark -
#pragma mark Private API
-@implementation SPSplitView (Private_API)
-
- (void)_initCustomProperties
{
collapseToggleButton = nil;
diff --git a/Source/SPTableFilterParser.m b/Source/SPTableFilterParser.m
index f7c9ed62..93b976f8 100644
--- a/Source/SPTableFilterParser.m
+++ b/Source/SPTableFilterParser.m
@@ -31,7 +31,7 @@
#import "SPTableFilterParser.h"
#import "RegexKitLite.h"
-@interface SPTableFilterParser (Private)
+@interface SPTableFilterParser ()
+ (NSString *)escapeFilterArgument:(NSString *)argument againstClause:(NSString *)clause;
@end
diff --git a/Source/SPTableView.m b/Source/SPTableView.m
index df48a407..1c2bef25 100644
--- a/Source/SPTableView.m
+++ b/Source/SPTableView.m
@@ -34,8 +34,8 @@
#import "SPWindowController.h"
#import "SPFieldMapperController.h"
-@interface SPTableView (SPTableViewDelegate)
-
+@protocol SPTableViewDelegate <NSObject>
+@optional
- (BOOL)cancelRowEditing;
@end
@@ -212,7 +212,7 @@
// Check if ESCAPE is hit and use it to cancel row editing if supported
else if ([theEvent keyCode] == 53 && [[self delegate] respondsToSelector:@selector(cancelRowEditing)]) {
- if ([[self delegate] performSelector:@selector(cancelRowEditing)]) return;
+ if ([(id<SPTableViewDelegate>)[self delegate] cancelRowEditing]) return;
}
// If the Tab key is used, but tab editing is disabled, change focus rather than entering edit mode.
diff --git a/Source/SPTextView.m b/Source/SPTextView.m
index f06bbaef..cb27b8da 100644
--- a/Source/SPTextView.m
+++ b/Source/SPTextView.m
@@ -79,7 +79,7 @@
#pragma mark -
-@interface SPTextView (Private_API)
+@interface SPTextView ()
NSInteger _alphabeticSort(id string1, id string2, void *reverse);
#ifndef SP_CODA
@@ -3695,13 +3695,9 @@ static inline NSPoint SPPointOnLine(NSPoint a, NSPoint b, CGFloat t) { return NS
[super dealloc];
}
-@end
-
#pragma mark -
#pragma mark Private API
-@implementation SPTextView (Private_API)
-
/**
* Sort function (mainly used to sort the words in the textView)
*/
diff --git a/Source/SPTooltip.m b/Source/SPTooltip.m
index ff68fdbe..af899129 100644
--- a/Source/SPTooltip.m
+++ b/Source/SPTooltip.m
@@ -71,7 +71,7 @@ static CGFloat slow_in_out (CGFloat t)
return t;
}
-@interface SPTooltip (Private)
+@interface SPTooltip ()
- (void)setContent:(NSString *)content withOptions:(NSDictionary *)displayOptions;
- (void)runUntilUserActivity;
diff --git a/Source/YRKSpinningProgressIndicator.m b/Source/YRKSpinningProgressIndicator.m
index c706e17a..4128acf7 100644
--- a/Source/YRKSpinningProgressIndicator.m
+++ b/Source/YRKSpinningProgressIndicator.m
@@ -31,7 +31,7 @@
#import "YRKSpinningProgressIndicator.h"
-@interface YRKSpinningProgressIndicator (YRKSpinningProgressIndicatorPrivate)
+@interface YRKSpinningProgressIndicator ()
- (void)updateFrame:(NSTimer *)timer;
- (void) animateInBackgroundThread;