aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-10-19 23:37:15 +0000
committerstuconnolly <stuart02@gmail.com>2010-10-19 23:37:15 +0000
commitb2461e0658f6deebf2b4a24e261fadb99f5125c6 (patch)
treefea57ce1afb8986d4b20c2abfd27ebd4b6ca36d5 /Source
parent10990abb16783d89e5314549883fc1e5acc2e407 (diff)
downloadsequelpro-b2461e0658f6deebf2b4a24e261fadb99f5125c6.tar.gz
sequelpro-b2461e0658f6deebf2b4a24e261fadb99f5125c6.tar.bz2
sequelpro-b2461e0658f6deebf2b4a24e261fadb99f5125c6.zip
Tidy up.
Diffstat (limited to 'Source')
-rw-r--r--Source/GeneratePreviewForURL.m3
-rw-r--r--Source/ImageAndTextCell.h2
-rw-r--r--Source/SPAboutController.h2
-rw-r--r--Source/SPArrayAdditions.h2
-rw-r--r--Source/SPCSVParser.h3
-rw-r--r--Source/SPConnectionController.h1
-rw-r--r--Source/SPConsoleMessage.h2
-rw-r--r--Source/SPContentFilterManager.h3
-rw-r--r--Source/SPContentFilterManager.m4
-rw-r--r--Source/SPCopyTable.h1
-rw-r--r--Source/SPCustomQuery.h2
-rw-r--r--Source/SPDataAdditions.h2
-rw-r--r--Source/SPDataCellFormatter.h2
-rw-r--r--Source/SPDataCellFormatter.m1
-rw-r--r--Source/SPDataImport.h1
-rw-r--r--Source/SPDataStorage.h12
-rw-r--r--Source/SPDataStorage.m3
-rw-r--r--Source/SPDatabaseData.h1
-rw-r--r--Source/SPDatabaseDocument.h1
-rw-r--r--Source/SPDocumentController.h2
-rw-r--r--Source/SPEditSheetTextView.h2
-rw-r--r--Source/SPEncodingPopupAccessory.m7
-rw-r--r--Source/SPExtendedTableInfo.h1
-rw-r--r--Source/SPFavoriteTextFieldCell.h2
-rw-r--r--Source/SPFieldEditorController.h7
-rw-r--r--Source/SPFieldEditorController.m4
-rw-r--r--Source/SPFieldMapperController.h4
-rw-r--r--Source/SPFieldMapperController.m1
-rw-r--r--Source/SPFileManagerAdditions.h3
-rw-r--r--Source/SPGeometryDataView.h4
-rw-r--r--Source/SPGeometryDataView.m3
-rw-r--r--Source/SPGrowlController.h1
-rw-r--r--Source/SPHistoryController.h2
-rw-r--r--Source/SPImageView.h2
-rw-r--r--Source/SPLogger.h2
-rw-r--r--Source/SPLogger.m3
-rw-r--r--Source/SPMainThreadTrampoline.h2
-rw-r--r--Source/SPNarrowDownCompletion.h3
-rw-r--r--Source/SPNavigatorController.h1
-rw-r--r--Source/SPNotLoaded.h2
-rw-r--r--Source/SPOutlineView.h2
-rw-r--r--Source/SPPrintAccessory.h1
-rw-r--r--Source/SPPrintAccessory.m3
-rw-r--r--Source/SPProcessListController.h1
-rw-r--r--Source/SPProcessListController.m6
-rw-r--r--Source/SPQueryController.h2
-rw-r--r--Source/SPQueryController.m22
-rw-r--r--Source/SPQueryFavoriteManager.h2
-rw-r--r--Source/SPQueryFavoriteManager.m2
-rw-r--r--Source/SPSQLParser.h2
-rw-r--r--Source/SPSSHTunnel.h1
-rw-r--r--Source/SPServerVariablesController.h1
-rw-r--r--Source/SPServerVariablesController.m3
-rw-r--r--Source/SPStringAdditions.h11
-rw-r--r--Source/SPTableContent.h1
-rw-r--r--Source/SPTableData.h1
-rw-r--r--Source/SPTableInfo.h2
-rw-r--r--Source/SPTableRelations.h1
-rw-r--r--Source/SPTableStructure.h2
-rw-r--r--Source/SPTableTextFieldCell.h2
-rw-r--r--Source/SPTableTriggers.h10
-rw-r--r--Source/SPTableView.h2
-rw-r--r--Source/SPTablesList.h1
-rw-r--r--Source/SPTextAndLinkCell.h2
-rw-r--r--Source/SPTextView.m1
-rw-r--r--Source/SPTextViewAdditions.h2
-rw-r--r--Source/SPTooltip.h1
-rw-r--r--Source/SPUserManager.h1
-rw-r--r--Source/SPUserManager.m4
-rw-r--r--Source/SPWindowAdditions.h2
-rw-r--r--Source/SPWindowController.h1
71 files changed, 56 insertions, 145 deletions
diff --git a/Source/GeneratePreviewForURL.m b/Source/GeneratePreviewForURL.m
index 68369ccd..e72f8d9b 100644
--- a/Source/GeneratePreviewForURL.m
+++ b/Source/GeneratePreviewForURL.m
@@ -22,12 +22,13 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
+#import <Cocoa/Cocoa.h>
#include <CoreFoundation/CoreFoundation.h>
#include <CoreServices/CoreServices.h>
#include <QuickLook/QuickLook.h>
+
#import "SPDataAdditions.h"
#import "SPStringAdditions.h"
-#import <Cocoa/Cocoa.h>
#import "SPEditorTokens.h"
/* -----------------------------------------------------------------------------
diff --git a/Source/ImageAndTextCell.h b/Source/ImageAndTextCell.h
index a7728552..cf5bb2e0 100644
--- a/Source/ImageAndTextCell.h
+++ b/Source/ImageAndTextCell.h
@@ -37,8 +37,6 @@
OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <Cocoa/Cocoa.h>
-
#define INDENT_AMOUNT 17
@interface ImageAndTextCell : NSTextFieldCell
diff --git a/Source/SPAboutController.h b/Source/SPAboutController.h
index 9abff263..ff04d24c 100644
--- a/Source/SPAboutController.h
+++ b/Source/SPAboutController.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface SPAboutController : NSWindowController
{
IBOutlet NSTextField *appNameVersionTextField;
diff --git a/Source/SPArrayAdditions.h b/Source/SPArrayAdditions.h
index 284e588a..85ff061c 100644
--- a/Source/SPArrayAdditions.h
+++ b/Source/SPArrayAdditions.h
@@ -22,8 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
static inline id NSArrayObjectAtIndex(NSArray *self, NSUInteger i)
{
return (id)CFArrayGetValueAtIndex((CFArrayRef)self, i);
diff --git a/Source/SPCSVParser.h b/Source/SPCSVParser.h
index 63f7fef5..a230d69b 100644
--- a/Source/SPCSVParser.h
+++ b/Source/SPCSVParser.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
/*
* This class provides a string class intended for CSV parsing. Unlike SPSQLParser, this
* does not extend NSMutableString and instead provides only a subset of similar methods.
@@ -109,6 +107,7 @@
/* Initialisation and teardown */
#pragma mark -
+
- (id) init;
- (id) initWithString:(NSString *)aString;
- (id) initWithContentsOfFile:(NSString *)path encoding:(NSStringEncoding)enc error:(NSError **)error;
diff --git a/Source/SPConnectionController.h b/Source/SPConnectionController.h
index 47bd5d0a..28f6f1bd 100644
--- a/Source/SPConnectionController.h
+++ b/Source/SPConnectionController.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
#import "SPDatabaseDocument.h"
diff --git a/Source/SPConsoleMessage.h b/Source/SPConsoleMessage.h
index d78c4f09..680caf79 100644
--- a/Source/SPConsoleMessage.h
+++ b/Source/SPConsoleMessage.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface SPConsoleMessage : NSObject
{
BOOL isError;
diff --git a/Source/SPContentFilterManager.h b/Source/SPContentFilterManager.h
index e71934d8..ec2c1ef6 100644
--- a/Source/SPContentFilterManager.h
+++ b/Source/SPContentFilterManager.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@class BWAnchoredButtonBar, SPDatabaseDocument;
@interface NSObject (SPContentFilterManagerDelegate)
@@ -39,6 +37,7 @@
SPDatabaseDocument *tableDocumentInstance;
NSURL *delegatesFileURL;
+
IBOutlet id encodingPopUp;
IBOutlet id contentFilterTableView;
IBOutlet id contentFilterNameTextField;
diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m
index 6f301c12..cf71b741 100644
--- a/Source/SPContentFilterManager.m
+++ b/Source/SPContentFilterManager.m
@@ -35,10 +35,6 @@
#define SP_NAME_REQUIRED_PLACEHOLDER_STRING NSLocalizedString(@"[name required]", @"displayed when new content filter has empty Name field (ContentFilterManager)")
#define SP_FILE_PARSER_ERROR_TITLE_STRING NSLocalizedString(@"Error while reading data file", @"error while reading data file")
-@interface SPContentFilterManager (PrivateAPI)
-
-@end
-
@implementation SPContentFilterManager
/**
diff --git a/Source/SPCopyTable.h b/Source/SPCopyTable.h
index fed356fd..49867ac1 100644
--- a/Source/SPCopyTable.h
+++ b/Source/SPCopyTable.h
@@ -22,7 +22,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#import <AppKit/AppKit.h>
#import "SPTableView.h"
#define SP_MAX_CELL_WIDTH_MULTICOLUMN 200
diff --git a/Source/SPCustomQuery.h b/Source/SPCustomQuery.h
index e8710340..17c1a921 100644
--- a/Source/SPCustomQuery.h
+++ b/Source/SPCustomQuery.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
#import <WebKit/WebKit.h>
@@ -165,7 +164,6 @@
NSString *kCellEditorErrorNoMatch;
NSString *kCellEditorErrorNoMultiTabDb;
NSString *kCellEditorErrorTooManyMatches;
-
}
// IBAction methods
diff --git a/Source/SPDataAdditions.h b/Source/SPDataAdditions.h
index d37827a2..4deb3f48 100644
--- a/Source/SPDataAdditions.h
+++ b/Source/SPDataAdditions.h
@@ -22,8 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface NSData (SPDataAdditions)
- (NSString *)base64EncodingWithLineLength:(NSUInteger)lineLength;
diff --git a/Source/SPDataCellFormatter.h b/Source/SPDataCellFormatter.h
index 4eef3f7a..a2ba23b1 100644
--- a/Source/SPDataCellFormatter.h
+++ b/Source/SPDataCellFormatter.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface SPDataCellFormatter : NSFormatter
{
NSInteger textLimit;
diff --git a/Source/SPDataCellFormatter.m b/Source/SPDataCellFormatter.m
index 6c1f26fe..515bf2a7 100644
--- a/Source/SPDataCellFormatter.m
+++ b/Source/SPDataCellFormatter.m
@@ -33,7 +33,6 @@
- (NSString *)stringForObjectValue:(id)anObject
{
-
// Truncate the string for speed purposes if it's very long - improves table scrolling speed.
if ([(NSString *)anObject length] > 150) {
return ([NSString stringWithFormat:@"%@...", [anObject substringToIndex:147]]);
diff --git a/Source/SPDataImport.h b/Source/SPDataImport.h
index 6b4a622b..28bf8b04 100644
--- a/Source/SPDataImport.h
+++ b/Source/SPDataImport.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@class SPFieldMapperController, SPFileHandle;
diff --git a/Source/SPDataStorage.h b/Source/SPDataStorage.h
index 2baa8d03..6e5f455e 100644
--- a/Source/SPDataStorage.h
+++ b/Source/SPDataStorage.h
@@ -72,28 +72,32 @@
#pragma mark -
#pragma mark Cached method calls to remove obj-c messaging overhead in tight loops
-static inline void SPDataStorageAddRow(SPDataStorage* self, NSArray* row) {
+static inline void SPDataStorageAddRow(SPDataStorage* self, NSArray* row)
+{
typedef void (*SPDSAddRowMethodPtr)(SPDataStorage*, SEL, NSArray*);
static SPDSAddRowMethodPtr SPDSAddRow;
if (!SPDSAddRow) SPDSAddRow = (SPDSAddRowMethodPtr)[self methodForSelector:@selector(addRowWithContents:)];
SPDSAddRow(self, @selector(addRowWithContents:), row);
}
-static inline void SPDataStorageReplaceRow(SPDataStorage* self, NSUInteger rowIndex, NSArray* row) {
+static inline void SPDataStorageReplaceRow(SPDataStorage* self, NSUInteger rowIndex, NSArray* row)
+{
typedef void (*SPDSReplaceRowMethodPtr)(SPDataStorage*, SEL, NSUInteger, NSArray*);
static SPDSReplaceRowMethodPtr SPDSReplaceRow;
if (!SPDSReplaceRow) SPDSReplaceRow = (SPDSReplaceRowMethodPtr)[self methodForSelector:@selector(replaceRowAtIndex:withRowContents:)];
SPDSReplaceRow(self, @selector(replaceRowAtIndex:withRowContents:), rowIndex, row);
}
-static inline void SPDataStorageReplaceObjectAtRowAndColumn(SPDataStorage* self, NSUInteger rowIndex, NSUInteger colIndex, id newObject) {
+static inline void SPDataStorageReplaceObjectAtRowAndColumn(SPDataStorage* self, NSUInteger rowIndex, NSUInteger colIndex, id newObject)
+{
typedef void (*SPDSObjectReplaceMethodPtr)(SPDataStorage*, SEL, NSUInteger, NSUInteger, id);
static SPDSObjectReplaceMethodPtr SPDSObjectReplace;
if (!SPDSObjectReplace) SPDSObjectReplace = (SPDSObjectReplaceMethodPtr)[self methodForSelector:@selector(replaceObjectInRow:column:withObject:)];
SPDSObjectReplace(self, @selector(replaceObjectInRow:column:withObject:), rowIndex, colIndex, newObject);
}
-static inline id SPDataStorageObjectAtRowAndColumn(SPDataStorage* self, NSUInteger rowIndex, NSUInteger colIndex) {
+static inline id SPDataStorageObjectAtRowAndColumn(SPDataStorage* self, NSUInteger rowIndex, NSUInteger colIndex)
+{
typedef id (*SPDSObjectFetchMethodPtr)(SPDataStorage*, SEL, NSUInteger, NSUInteger);
static SPDSObjectFetchMethodPtr SPDSObjectFetch;
if (!SPDSObjectFetch) SPDSObjectFetch = (SPDSObjectFetchMethodPtr)[self methodForSelector:@selector(cellDataAtRow:column:)];
diff --git a/Source/SPDataStorage.m b/Source/SPDataStorage.m
index 200c4873..f03fbd7a 100644
--- a/Source/SPDataStorage.m
+++ b/Source/SPDataStorage.m
@@ -34,7 +34,8 @@
@implementation SPDataStorage
-static inline void SPDataStorageEnsureCapacityForAdditionalRowCount(SPDataStorage* self, NSUInteger numExtraRows) {
+static inline void SPDataStorageEnsureCapacityForAdditionalRowCount(SPDataStorage* self, NSUInteger numExtraRows)
+{
typedef void (*SPDSEnsureCapacityMethodPtr)(SPDataStorage*, SEL, NSUInteger);
static SPDSEnsureCapacityMethodPtr SPDSEnsureCapacity;
if (!SPDSEnsureCapacity) SPDSEnsureCapacity = (SPDSEnsureCapacityMethodPtr)[self methodForSelector:@selector(_ensureCapacityForAdditionalRowCount:)];
diff --git a/Source/SPDatabaseData.h b/Source/SPDatabaseData.h
index 4555acdf..b0c988eb 100644
--- a/Source/SPDatabaseData.h
+++ b/Source/SPDatabaseData.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@class SPServerSupport;
diff --git a/Source/SPDatabaseDocument.h b/Source/SPDatabaseDocument.h
index 3bb74e72..36514dd2 100644
--- a/Source/SPDatabaseDocument.h
+++ b/Source/SPDatabaseDocument.h
@@ -25,7 +25,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
#import <WebKit/WebKit.h>
diff --git a/Source/SPDocumentController.h b/Source/SPDocumentController.h
index 5f1de335..886e0785 100644
--- a/Source/SPDocumentController.h
+++ b/Source/SPDocumentController.h
@@ -22,8 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface SPDocumentController : NSDocument
@end
diff --git a/Source/SPEditSheetTextView.h b/Source/SPEditSheetTextView.h
index 52c04c1b..63d06210 100644
--- a/Source/SPEditSheetTextView.h
+++ b/Source/SPEditSheetTextView.h
@@ -22,8 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface SPEditSheetTextView : NSTextView
{
BOOL textWasChanged;
diff --git a/Source/SPEncodingPopupAccessory.m b/Source/SPEncodingPopupAccessory.m
index e1cc6ddc..f9c34238 100644
--- a/Source/SPEncodingPopupAccessory.m
+++ b/Source/SPEncodingPopupAccessory.m
@@ -26,7 +26,8 @@
@implementation SPEncodingPopupAccessory
-+ (NSView *)encodingAccessory:(NSUInteger)encoding includeDefaultEntry:(BOOL)includeDefaultItem encodingPopUp:(NSPopUpButton **)popup {
++ (NSView *)encodingAccessory:(NSUInteger)encoding includeDefaultEntry:(BOOL)includeDefaultItem encodingPopUp:(NSPopUpButton **)popup
+{
SPEncodingPopupAccessory *owner = [[[SPEncodingPopupAccessory alloc] init] autorelease];
// Rather than caching, load the accessory view everytime, as it might appear in multiple panels simultaneously.
if (![NSBundle loadNibNamed:@"EncodingPopupView" owner:owner]) {
@@ -43,8 +44,8 @@
* Secondary key is the actual encoding value, which works well enough.
* We treat Unicode encodings as special case, putting them at top of the list.
*/
-static int encodingCompare(const void *firstPtr, const void *secondPtr) {
-
+static int encodingCompare(const void *firstPtr, const void *secondPtr)
+{
CFStringEncoding first = *(CFStringEncoding *)firstPtr;
CFStringEncoding second = *(CFStringEncoding *)secondPtr;
CFStringEncoding macEncodingForFirst = CFStringGetMostCompatibleMacStringEncoding(first);
diff --git a/Source/SPExtendedTableInfo.h b/Source/SPExtendedTableInfo.h
index 9a067b0c..962eed6a 100644
--- a/Source/SPExtendedTableInfo.h
+++ b/Source/SPExtendedTableInfo.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@class SPTableData, SPDatabaseData, SPTablesList;
diff --git a/Source/SPFavoriteTextFieldCell.h b/Source/SPFavoriteTextFieldCell.h
index a02f7da4..9b50d1dd 100644
--- a/Source/SPFavoriteTextFieldCell.h
+++ b/Source/SPFavoriteTextFieldCell.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
#import "ImageAndTextCell.h"
@interface SPFavoriteTextFieldCell : ImageAndTextCell
diff --git a/Source/SPFieldEditorController.h b/Source/SPFieldEditorController.h
index a5ad776f..12342fea 100644
--- a/Source/SPFieldEditorController.h
+++ b/Source/SPFieldEditorController.h
@@ -22,16 +22,15 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
-
/**
- * @class SPExportFile SPExportFile.h
+ * @class SPFieldEditorController SPFieldEditorController.h
*
* @author Hans-Jörg Bibiko
*
- * This class offers a sheet for editing different kind of data such as text, blobs (including images) as editSheet and bit fields as bitSheet.
+ * 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
{
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m
index 1a6e4852..086811ed 100644
--- a/Source/SPFieldEditorController.m
+++ b/Source/SPFieldEditorController.m
@@ -111,15 +111,15 @@
[qlTypesItems addObject:type];
}
}
+
qlTypes = [NSDictionary dictionaryWithObject:qlTypesItems forKey:SPQuickLookTypes];
[qlTypesItems release];
fieldType = @"";
fieldEncoding = @"";
-
}
+
return self;
-
}
/**
diff --git a/Source/SPFieldMapperController.h b/Source/SPFieldMapperController.h
index 15295070..33b4a400 100644
--- a/Source/SPFieldMapperController.h
+++ b/Source/SPFieldMapperController.h
@@ -22,11 +22,9 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
-#import "SPTableView.h"
-@class SPTextView;
+@class SPTextView, SPTableView;
@interface SPFieldMapperController : NSWindowController
{
diff --git a/Source/SPFieldMapperController.m b/Source/SPFieldMapperController.m
index 4bed32a4..6d3db4f1 100644
--- a/Source/SPFieldMapperController.m
+++ b/Source/SPFieldMapperController.m
@@ -30,6 +30,7 @@
#import "SPStringAdditions.h"
#import "SPNotLoaded.h"
#import "SPTextView.h"
+#import "SPTableView.h"
#define SP_NUMBER_OF_RECORDS_STRING NSLocalizedString(@"%ld of %@%lu records", @"Label showing the index of the selected CSV row")
diff --git a/Source/SPFileManagerAdditions.h b/Source/SPFileManagerAdditions.h
index 9155952f..c12040e5 100644
--- a/Source/SPFileManagerAdditions.h
+++ b/Source/SPFileManagerAdditions.h
@@ -22,9 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-#import <Foundation/Foundation.h>
-
@interface NSFileManager (SPFileManagerAdditions)
- (NSString *)applicationSupportDirectoryForSubDirectory:(NSString*)subDirectory error:(NSError **)errorOut;
diff --git a/Source/SPGeometryDataView.h b/Source/SPGeometryDataView.h
index f02f4194..0fac2874 100644
--- a/Source/SPGeometryDataView.h
+++ b/Source/SPGeometryDataView.h
@@ -22,12 +22,8 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
-
@interface SPGeometryDataView : NSView
{
-
NSWindow *geometryDataWindow;
NSString *type;
diff --git a/Source/SPGeometryDataView.m b/Source/SPGeometryDataView.m
index 61dc6f25..10cf5b4a 100644
--- a/Source/SPGeometryDataView.m
+++ b/Source/SPGeometryDataView.m
@@ -290,7 +290,6 @@
*/
- (NSPoint)_normalizePoint:(NSPoint)aPoint
{
-
aPoint.x*=zoom_factor;
aPoint.y*=zoom_factor;
aPoint.x-=x_min;
@@ -305,14 +304,12 @@
*/
- (void)_drawPoint:(NSPoint)aPoint
{
-
NSBezierPath *circlePath = [NSBezierPath bezierPath];
[circlePath appendBezierPathWithOvalInRect:NSMakeRect(aPoint.x-5,aPoint.y-5,10,10)];
[pointStrokeColor setStroke];
[pointFillColor setFill];
[circlePath stroke];
[circlePath fill];
-
}
@end
diff --git a/Source/SPGrowlController.h b/Source/SPGrowlController.h
index ca52ccd1..d0a95d6d 100644
--- a/Source/SPGrowlController.h
+++ b/Source/SPGrowlController.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <Growl/Growl.h>
@class SPDatabaseDocument;
diff --git a/Source/SPHistoryController.h b/Source/SPHistoryController.h
index 825b8fc0..7429f75c 100644
--- a/Source/SPHistoryController.h
+++ b/Source/SPHistoryController.h
@@ -22,8 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@class SPDatabaseDocument, SPTableContent, SPTablesList;
@interface SPHistoryController : NSObject
diff --git a/Source/SPImageView.h b/Source/SPImageView.h
index 3576cf37..4cb3694a 100644
--- a/Source/SPImageView.h
+++ b/Source/SPImageView.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface NSObject (SPImageViewDelegate)
- (void)processUpdatedImageData:(NSData *)data;
diff --git a/Source/SPLogger.h b/Source/SPLogger.h
index 4d394b83..3fd2cae9 100644
--- a/Source/SPLogger.h
+++ b/Source/SPLogger.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface SPLogger : NSObject
{
/**
diff --git a/Source/SPLogger.m b/Source/SPLogger.m
index 124b19f0..112edb64 100644
--- a/Source/SPLogger.m
+++ b/Source/SPLogger.m
@@ -203,6 +203,9 @@ int isSPLeaksLog(struct direct *entry)
return (strstr(entry->d_name, "sp.leaks") != NULL);
}
+#pragma mark -
+#pragma mark Private API
+
- (void)_initLogFile
{
NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDesktopDirectory, NSUserDomainMask, YES);
diff --git a/Source/SPMainThreadTrampoline.h b/Source/SPMainThreadTrampoline.h
index 0fa5a9e6..aab2e7d9 100644
--- a/Source/SPMainThreadTrampoline.h
+++ b/Source/SPMainThreadTrampoline.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
/**
* Set up the categories, available on all NSObjects.
*/
diff --git a/Source/SPNarrowDownCompletion.h b/Source/SPNarrowDownCompletion.h
index 032aef24..a158926e 100644
--- a/Source/SPNarrowDownCompletion.h
+++ b/Source/SPNarrowDownCompletion.h
@@ -26,8 +26,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface SPNarrowDownCompletion : NSWindow
{
NSArray* suggestions;
@@ -72,7 +70,6 @@
NSMutableCharacterSet* textualInputCharacters;
NSUserDefaults *prefs;
-
}
- (id)initWithItems:(NSArray*)someSuggestions alreadyTyped:(NSString*)aUserString staticPrefix:(NSString*)aStaticPrefix
diff --git a/Source/SPNavigatorController.h b/Source/SPNavigatorController.h
index 2338b91a..f21c03c5 100644
--- a/Source/SPNavigatorController.h
+++ b/Source/SPNavigatorController.h
@@ -22,7 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@interface SPNavigatorController : NSWindowController
diff --git a/Source/SPNotLoaded.h b/Source/SPNotLoaded.h
index 25c4810c..45024d6b 100644
--- a/Source/SPNotLoaded.h
+++ b/Source/SPNotLoaded.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface SPNotLoaded : NSObject
+ (SPNotLoaded *) notLoaded;
diff --git a/Source/SPOutlineView.h b/Source/SPOutlineView.h
index 8d1686c1..680638c9 100644
--- a/Source/SPOutlineView.h
+++ b/Source/SPOutlineView.h
@@ -22,8 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Foundation/Foundation.h>
-
@interface SPOutlineView : NSOutlineView
@end
diff --git a/Source/SPPrintAccessory.h b/Source/SPPrintAccessory.h
index 4c780f28..cb3e3498 100644
--- a/Source/SPPrintAccessory.h
+++ b/Source/SPPrintAccessory.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
@interface SPPrintAccessory : NSViewController <NSPrintPanelAccessorizing>
diff --git a/Source/SPPrintAccessory.m b/Source/SPPrintAccessory.m
index e1084fee..d6f54da7 100644
--- a/Source/SPPrintAccessory.m
+++ b/Source/SPPrintAccessory.m
@@ -31,7 +31,8 @@
{
defaultsController = [NSUserDefaultsController sharedUserDefaultsController];
printWebView = nil;
- return [super initWithNibName:@"PrintAccessory" bundle:nibBundleOrNil];
+
+ return [super initWithNibName:@"PrintAccessory" bundle:nibBundleOrNil];
}
- (void)awakeFromNib
diff --git a/Source/SPProcessListController.h b/Source/SPProcessListController.h
index 298a2e48..3fc66c78 100644
--- a/Source/SPProcessListController.h
+++ b/Source/SPProcessListController.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@interface SPProcessListController : NSWindowController
diff --git a/Source/SPProcessListController.m b/Source/SPProcessListController.m
index 378a7538..20c1c4c6 100644
--- a/Source/SPProcessListController.m
+++ b/Source/SPProcessListController.m
@@ -28,7 +28,7 @@
#import "SPDatabaseDocument.h"
#import "SPAlertSheets.h"
-#define TABLEVIEW_ID_COLUMN_IDENTIFIER @"Id"
+static const NSString *SPTableViewIDColumnIdentifier = @"Id";
@interface SPProcessListController (PrivateAPI)
@@ -80,7 +80,7 @@
[self setWindowFrameAutosaveName:@"ProcessList"];
// Show/hide table columns
- [[processListTableView tableColumnWithIdentifier:TABLEVIEW_ID_COLUMN_IDENTIFIER] setHidden:![prefs boolForKey:SPProcessListShowProcessID]];
+ [[processListTableView tableColumnWithIdentifier:SPTableViewIDColumnIdentifier] setHidden:![prefs boolForKey:SPProcessListShowProcessID]];
// Set the process table view's vertical gridlines if required
[processListTableView setGridStyleMask:([prefs boolForKey:SPDisplayTableViewVerticalGridlines]) ? NSTableViewSolidVerticalGridLineMask : NSTableViewGridNone];
@@ -284,7 +284,7 @@
*/
- (IBAction)toggleShowProcessID:(id)sender
{
- [[processListTableView tableColumnWithIdentifier:TABLEVIEW_ID_COLUMN_IDENTIFIER] setHidden:([sender state])];
+ [[processListTableView tableColumnWithIdentifier:SPTableViewIDColumnIdentifier] setHidden:([sender state])];
}
/**
diff --git a/Source/SPQueryController.h b/Source/SPQueryController.h
index 9c8a9c8f..6f1d835d 100644
--- a/Source/SPQueryController.h
+++ b/Source/SPQueryController.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface SPQueryController : NSWindowController
{
// QueryConsoleController
diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m
index 73ba97ed..80e93a4a 100644
--- a/Source/SPQueryController.m
+++ b/Source/SPQueryController.m
@@ -32,10 +32,10 @@
#define MESSAGE_TRUNCATE_CHARACTER_LENGTH 256
-// Table view column identifiers
-#define TABLEVIEW_MESSAGE_COLUMN_IDENTIFIER @"message"
-#define TABLEVIEW_DATE_COLUMN_IDENTIFIER @"messageDate"
-#define TABLEVIEW_CONNECTION_COLUMN_IDENTIFIER @"messageConnection"
+// Table view column identifier constants
+static const NSString *SPTableViewMessageColumnID = @"message";
+static const NSString *SPTableViewDateColumnID = @"messageDatw";
+static const NSString *SPTableViewConnectionColumnID = @"messageConnection";
@interface SPQueryController (PrivateAPI)
@@ -164,8 +164,8 @@ static SPQueryController *sharedQueryController = nil;
[self setWindowFrameAutosaveName:@"QueryConsole"];
// Show/hide table columns
- [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_DATE_COLUMN_IDENTIFIER] setHidden:![prefs boolForKey:SPConsoleShowTimestamps]];
- [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_CONNECTION_COLUMN_IDENTIFIER] setHidden:![prefs boolForKey:SPConsoleShowConnections]];
+ [[consoleTableView tableColumnWithIdentifier:SPTableViewDateColumnID] setHidden:![prefs boolForKey:SPConsoleShowTimestamps]];
+ [[consoleTableView tableColumnWithIdentifier:SPTableViewConnectionColumnID] setHidden:![prefs boolForKey:SPConsoleShowConnections]];
showSelectStatementsAreDisabled = ![prefs boolForKey:SPConsoleShowSelectsAndShows];
showHelpStatementsAreDisabled = ![prefs boolForKey:SPConsoleShowHelps];
@@ -211,8 +211,8 @@ static SPQueryController *sharedQueryController = nil;
NSUInteger i = [rows firstIndex];
- BOOL dateColumnIsHidden = [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_DATE_COLUMN_IDENTIFIER] isHidden];
- BOOL connectionColumnIsHidden = [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_CONNECTION_COLUMN_IDENTIFIER] isHidden];
+ BOOL dateColumnIsHidden = [[consoleTableView tableColumnWithIdentifier:SPTableViewDateColumnID] isHidden];
+ BOOL connectionColumnIsHidden = [[consoleTableView tableColumnWithIdentifier:SPTableViewConnectionColumnID] isHidden];
[string setString:@""];
@@ -278,7 +278,7 @@ static SPQueryController *sharedQueryController = nil;
*/
- (IBAction)toggleShowTimeStamps:(id)sender
{
- [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_DATE_COLUMN_IDENTIFIER] setHidden:([sender state])];
+ [[consoleTableView tableColumnWithIdentifier:SPTableViewDateColumnID] setHidden:([sender state])];
}
/**
@@ -286,7 +286,7 @@ static SPQueryController *sharedQueryController = nil;
*/
- (IBAction)toggleShowConnections:(id)sender
{
- [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_CONNECTION_COLUMN_IDENTIFIER] setHidden:([sender state])];
+ [[consoleTableView tableColumnWithIdentifier:SPTableViewConnectionColumnID] setHidden:([sender state])];
}
/**
@@ -365,7 +365,7 @@ static SPQueryController *sharedQueryController = nil;
id object = [[messagesVisibleSet objectAtIndex:row] valueForKey:[tableColumn identifier]];
- if ([[tableColumn identifier] isEqualToString:TABLEVIEW_DATE_COLUMN_IDENTIFIER]) {
+ if ([[tableColumn identifier] isEqualToString:SPTableViewDateColumnID]) {
returnValue = [dateFormatter stringFromDate:(NSDate *)object];
}
diff --git a/Source/SPQueryFavoriteManager.h b/Source/SPQueryFavoriteManager.h
index e03193ae..4da1dd22 100644
--- a/Source/SPQueryFavoriteManager.h
+++ b/Source/SPQueryFavoriteManager.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@class BWAnchoredButtonBar, SPTextView, SPDatabaseDocument;
@interface NSObject (SPQueryFavoriteManagerDelegate)
diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m
index cffb5553..609b083e 100644
--- a/Source/SPQueryFavoriteManager.m
+++ b/Source/SPQueryFavoriteManager.m
@@ -32,7 +32,7 @@
#import "SPTextView.h"
#define SP_MULTIPLE_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[multiple selection]", @"[multiple selection]")
-#define SP_NO_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[no selection]", @"[no selection]")
+#define SP_NO_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[no selection]", @"[no selection]")
@interface SPQueryFavoriteManager (Private)
diff --git a/Source/SPSQLParser.h b/Source/SPSQLParser.h
index bbdefcd8..e425a75c 100644
--- a/Source/SPSQLParser.h
+++ b/Source/SPSQLParser.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
/*
* Define the length of the character cache to use when parsing instead of accessing
* via characterAtIndex:. There is a balance here between updating the cache very
diff --git a/Source/SPSSHTunnel.h b/Source/SPSSHTunnel.h
index 3af537c6..067cf42a 100644
--- a/Source/SPSSHTunnel.h
+++ b/Source/SPSSHTunnel.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@interface SPSSHTunnel : NSObject <MCPConnectionProxy>
diff --git a/Source/SPServerVariablesController.h b/Source/SPServerVariablesController.h
index a3894cce..3e87609a 100644
--- a/Source/SPServerVariablesController.h
+++ b/Source/SPServerVariablesController.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@interface SPServerVariablesController : NSWindowController
diff --git a/Source/SPServerVariablesController.m b/Source/SPServerVariablesController.m
index 3bda2077..e1383edf 100644
--- a/Source/SPServerVariablesController.m
+++ b/Source/SPServerVariablesController.m
@@ -39,6 +39,9 @@
@synthesize connection;
+#pragma mark -
+#pragma mark Initialisation
+
/**
* Initialisation
*/
diff --git a/Source/SPStringAdditions.h b/Source/SPStringAdditions.h
index fd30a50b..a0b39504 100644
--- a/Source/SPStringAdditions.h
+++ b/Source/SPStringAdditions.h
@@ -23,14 +23,13 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
/*
* NSStringUTF8String(@"a String") function can be used to speed up
* the convertion from a NSString to NSData or const char* resp.
* NSData *d = [aStr UTF8String]; :== NSData *d = NSStringUTF8String(aStr);
*/
-static inline const char* NSStringUTF8String(NSString* self) {
+static inline const char* NSStringUTF8String(NSString* self)
+{
typedef const char* (*SPUTF8StringMethodPtr)(NSString*, SEL);
static SPUTF8StringMethodPtr SPNSStringGetUTF8String;
if (!SPNSStringGetUTF8String) SPNSStringGetUTF8String = (SPUTF8StringMethodPtr)[NSString instanceMethodForSelector:@selector(UTF8String)];
@@ -38,7 +37,8 @@ static inline const char* NSStringUTF8String(NSString* self) {
return to_return;
}
-static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAttributedString* self, NSString* aStr, id aValue, NSRange aRange) {
+static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAttributedString* self, NSString* aStr, id aValue, NSRange aRange)
+{
typedef void (*SPMutableAttributedStringAddAttributeValueRangeMethodPtr)(NSMutableAttributedString*, SEL, NSString*, id, NSRange);
static SPMutableAttributedStringAddAttributeValueRangeMethodPtr SPMutableAttributedStringAddAttributeValueRange;
if (!SPMutableAttributedStringAddAttributeValueRange) SPMutableAttributedStringAddAttributeValueRange = (SPMutableAttributedStringAddAttributeValueRangeMethodPtr)[self methodForSelector:@selector(addAttribute:value:range:)];
@@ -46,7 +46,8 @@ static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAtt
return;
}
-static inline id NSMutableAttributedStringAttributeAtIndex (NSMutableAttributedString* self, NSString* aStr, NSUInteger index, NSRangePointer range) {
+static inline id NSMutableAttributedStringAttributeAtIndex (NSMutableAttributedString* self, NSString* aStr, NSUInteger index, NSRangePointer range)
+{
typedef id (*SPMutableAttributedStringAttributeAtIndexMethodPtr)(NSMutableAttributedString*, SEL, NSString*, NSUInteger, NSRangePointer);
static SPMutableAttributedStringAttributeAtIndexMethodPtr SPMutableAttributedStringAttributeAtIndex;
if (!SPMutableAttributedStringAttributeAtIndex) SPMutableAttributedStringAttributeAtIndex = (SPMutableAttributedStringAttributeAtIndexMethodPtr)[self methodForSelector:@selector(attribute:atIndex:effectiveRange:)];
diff --git a/Source/SPTableContent.h b/Source/SPTableContent.h
index 5a085ad7..2f139881 100644
--- a/Source/SPTableContent.h
+++ b/Source/SPTableContent.h
@@ -25,7 +25,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@class SPCopyTable, SPTextAndLinkCell, SPHistoryController, SPTableInfo, SPDataStorage, SPTextView;
diff --git a/Source/SPTableData.h b/Source/SPTableData.h
index 69a6ed2f..b978acc4 100644
--- a/Source/SPTableData.h
+++ b/Source/SPTableData.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@interface SPTableData : NSObject
diff --git a/Source/SPTableInfo.h b/Source/SPTableInfo.h
index c0016080..041f9173 100644
--- a/Source/SPTableInfo.h
+++ b/Source/SPTableInfo.h
@@ -22,8 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface SPTableInfo : NSObject
{
IBOutlet id infoTable;
diff --git a/Source/SPTableRelations.h b/Source/SPTableRelations.h
index 40ac2e79..1658861b 100644
--- a/Source/SPTableRelations.h
+++ b/Source/SPTableRelations.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@interface SPTableRelations : NSObject
diff --git a/Source/SPTableStructure.h b/Source/SPTableStructure.h
index b6c29f45..657cf777 100644
--- a/Source/SPTableStructure.h
+++ b/Source/SPTableStructure.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@interface SPTableStructure : NSObject
@@ -73,7 +72,6 @@
NSUserDefaults *prefs;
NSArray *collations;
NSArray *typeSuggestions;
-
}
// Table methods
diff --git a/Source/SPTableTextFieldCell.h b/Source/SPTableTextFieldCell.h
index adc2d0da..583653af 100644
--- a/Source/SPTableTextFieldCell.h
+++ b/Source/SPTableTextFieldCell.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
#import "ImageAndTextCell.h"
@interface SPTableTextFieldCell : ImageAndTextCell
diff --git a/Source/SPTableTriggers.h b/Source/SPTableTriggers.h
index c6178310..0dfd6f30 100644
--- a/Source/SPTableTriggers.h
+++ b/Source/SPTableTriggers.h
@@ -25,16 +25,6 @@
#import <MCPKit/MCPKit.h>
-// Constants
-/*extern NSString *SPTriggerName;
-extern NSString *SPTriggerTableName;
-extern NSString *SPTriggerEvent;
-extern NSString *SPTriggerActionTime;
-extern NSString *SPTriggerStatement;
-extern NSString *SPTriggerDefiner;
-extern NSString *SPTriggerCreated;
-extern NSString *SPTriggerSQLMode;*/
-
@interface SPTableTriggers : NSObject
{
IBOutlet id tableDocumentInstance;
diff --git a/Source/SPTableView.h b/Source/SPTableView.h
index 4dc10875..6914723d 100644
--- a/Source/SPTableView.h
+++ b/Source/SPTableView.h
@@ -22,8 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface SPTableView : NSTableView
@end
diff --git a/Source/SPTablesList.h b/Source/SPTablesList.h
index 5b20c270..f0b0bed4 100644
--- a/Source/SPTablesList.h
+++ b/Source/SPTablesList.h
@@ -23,7 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@class SPHistoryController;
diff --git a/Source/SPTextAndLinkCell.h b/Source/SPTextAndLinkCell.h
index ab2deef9..64ab6ddb 100644
--- a/Source/SPTextAndLinkCell.h
+++ b/Source/SPTextAndLinkCell.h
@@ -22,8 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface SPTextAndLinkCell : NSTextFieldCell
{
BOOL hasLink;
diff --git a/Source/SPTextView.m b/Source/SPTextView.m
index e913df51..c584a407 100644
--- a/Source/SPTextView.m
+++ b/Source/SPTextView.m
@@ -188,7 +188,6 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
[prefs addObserver:self forKeyPath:SPCustomQueryEditorTextColor options:NSKeyValueObservingOptionNew context:NULL];
[prefs addObserver:self forKeyPath:SPCustomQueryEditorTabStopWidth options:NSKeyValueObservingOptionNew context:NULL];
[prefs addObserver:self forKeyPath:SPCustomQueryAutoUppercaseKeywords options:NSKeyValueObservingOptionNew context:NULL];
-
}
- (void) setConnection:(MCPConnection *)theConnection withVersion:(NSInteger)majorVersion
diff --git a/Source/SPTextViewAdditions.h b/Source/SPTextViewAdditions.h
index f224a4e0..f32db8fd 100644
--- a/Source/SPTextViewAdditions.h
+++ b/Source/SPTextViewAdditions.h
@@ -22,8 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface NSTextView (SPTextViewAdditions)
- (NSRange)getRangeForCurrentWord;
diff --git a/Source/SPTooltip.h b/Source/SPTooltip.h
index a537e45d..23cf9e88 100644
--- a/Source/SPTooltip.h
+++ b/Source/SPTooltip.h
@@ -26,7 +26,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
@interface SPTooltip : NSWindow
diff --git a/Source/SPUserManager.h b/Source/SPUserManager.h
index db13fa93..c4eff098 100644
--- a/Source/SPUserManager.h
+++ b/Source/SPUserManager.h
@@ -22,7 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
@class SPServerSupport, BWAnchoredButtonBar;
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index 56e226ca..2014b2d6 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -32,7 +32,7 @@
#import "SPServerSupport.h"
#import "SPAlertSheets.h"
-#define COLUMNIDNAME @"NameColumn"
+static const NSString *SPTableViewNameColumnID = @"NameColumn";
@interface SPUserManager (PrivateAPI)
@@ -104,7 +104,7 @@
{
[tabView selectTabViewItemAtIndex:0];
- NSTableColumn *tableColumn = [outlineView tableColumnWithIdentifier:COLUMNIDNAME];
+ NSTableColumn *tableColumn = [outlineView tableColumnWithIdentifier:SPTableViewNameColumnID];
ImageAndTextCell *imageAndTextCell = [[[ImageAndTextCell alloc] init] autorelease];
[imageAndTextCell setEditable:NO];
diff --git a/Source/SPWindowAdditions.h b/Source/SPWindowAdditions.h
index cb201d6f..f3bc7309 100644
--- a/Source/SPWindowAdditions.h
+++ b/Source/SPWindowAdditions.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
@interface NSWindow (SPWindowAdditions)
- (CGFloat)toolbarHeight;
diff --git a/Source/SPWindowController.h b/Source/SPWindowController.h
index 828c6cda..e118e035 100644
--- a/Source/SPWindowController.h
+++ b/Source/SPWindowController.h
@@ -22,7 +22,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
@class PSMTabBarControl, SPDatabaseDocument;
@interface SPWindowController : NSWindowController <NSUserInterfaceValidations>