Permalink
Browse files

merge and restructure remaining smaller stuff in main project (part of

  • Loading branch information...
dmoagx committed Jan 20, 2018
1 parent db2bdd8 commit b04243d4d7befb33383d434fe05ea3d7915ef27d
@@ -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;
@@ -53,7 +53,7 @@
#pragma mark -
@interface NoodleLineNumberView (Private)
@interface NoodleLineNumberView ()
- (NSArray *)lineIndices;
- (void)invalidateLineIndices;
@@ -33,7 +33,7 @@
#define FAVORITE_NAME_FONT_SIZE 12.0f
@interface SPActivityTextFieldCell (PrivateAPI)
@interface SPActivityTextFieldCell ()
- (NSAttributedString *)constructSubStringAttributedString;
- (NSAttributedString *)attributedStringForFavoriteName;
@@ -332,9 +332,7 @@ - (void)dealloc
[super dealloc];
}
@end
@implementation SPActivityTextFieldCell (PrivateAPI)
#pragma mark - Private API
/**
* Constructs the attributed string to be used as the cell's substring.
View
@@ -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
@@ -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
@@ -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 @@ - (void)mouseUp:(NSEvent*)event
}
if (delegate != nil && [delegate respondsToSelector:@selector(colorSelectorDidChange:)]) {
[delegate colorSelectorDidChange:self];
[(id<SPColorSelectorViewDelegate>)delegate colorSelectorDidChange:self];
}
[self setNeedsDisplay:YES];
@@ -44,7 +44,3 @@
@property(readonly, assign) NSUInteger lineOffset;
@end
@interface SPComboPopupButtonCell : NSPopUpButtonCell
@end
@@ -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 @@ - (void)menuDidClose:(NSMenu *)menu
menuIsOpen = NO;
}
@end
#pragma mark -
@implementation SPComboPopupButton (PrivateAPI)
- (void)_initCustomData
{
@@ -221,12 +221,6 @@ - (void)_initCustomData
#pragma mark -
@interface SPComboPopupButtonCell (PrivateAPI)
- (void)_initCustomData;
@end
@implementation SPComboPopupButtonCell
/**
View
@@ -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 @@ - (void) dealloc
[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
@@ -43,7 +43,7 @@
#define SP_EXPORT_COLOR_SCHEME_NAME_STRING NSLocalizedString(@"MyTheme", @"Preferences : Themes : Initial filename for 'Export'")
@interface SPEditorPreferencePane (PrivateAPI)
@interface SPEditorPreferencePane ()
- (BOOL)_checkForUnsavedTheme;
- (NSArray *)_getAvailableThemes;
@@ -30,7 +30,7 @@
#import "SPGeometryDataView.h"
@interface SPGeometryDataView (PrivateAPI)
@interface SPGeometryDataView ()
- (NSPoint)_normalizePoint:(NSPoint)aPoint;
- (void)_drawPoint:(NSPoint)aPoint;
@@ -282,12 +282,8 @@ - (void)dealloc
[super dealloc];
}
@end
#pragma mark -
#pragma mark PrivateAPI
@implementation SPGeometryDataView (PrivateAPI)
#pragma mark Private API
/**
* Converts original NSPoint to target coordinates
View
@@ -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;
View
@@ -39,7 +39,7 @@ @implementation SPImageView
*/
- (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 @@ - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
- (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
@@ -52,7 +52,7 @@ - (BOOL)SP_NarrowDownCompletion_canHandleEvent:(NSEvent*)anEvent;
@end
@interface SPNarrowDownCompletion (Private)
@interface SPNarrowDownCompletion ()
- (NSRect)rectOfMainScreen;
- (NSString*)filterString;
@@ -33,7 +33,7 @@
static NSString *SPSSLCipherListMarkerItem = @"--";
static NSString *SPSSLCipherPboardTypeName = @"SSLCipherPboardType";
@interface SPNetworkPreferencePane (Private)
@interface SPNetworkPreferencePane ()
- (void)updateHiddenFiles;
- (void)loadSSLCiphers;
- (void)storeSSLCiphers;
@@ -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 @@ - (void)_resizeWindowForContentView:(NSView *)view
[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

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit b04243d

Please sign in to comment.