2
0

Reformat to AppCode style.

This commit is contained in:
Maarten Billemont 2017-04-01 00:30:25 -04:00
parent de4300c3d3
commit 559934607b
56 changed files with 180 additions and 196 deletions

View File

@ -11,7 +11,9 @@
#if TARGET_OS_IPHONE #if TARGET_OS_IPHONE
@interface MPAppDelegate_Shared : PearlAppDelegate @interface MPAppDelegate_Shared : PearlAppDelegate
#else #else
@interface MPAppDelegate_Shared : NSObject<PearlConfigDelegate> @interface MPAppDelegate_Shared : NSObject<PearlConfigDelegate>
#endif #endif
@property(strong, nonatomic, readonly) MPKey *key; @property(strong, nonatomic, readonly) MPKey *key;

View File

@ -72,7 +72,6 @@
} }
- (void)handleCoordinatorError:(NSError *)error { - (void)handleCoordinatorError:(NSError *)error {
} }
@end @end

View File

@ -10,7 +10,6 @@
#import <CoreData/CoreData.h> #import <CoreData/CoreData.h>
#import "MPSiteEntity.h" #import "MPSiteEntity.h"
@interface MPGeneratedSiteEntity : MPSiteEntity @interface MPGeneratedSiteEntity : MPSiteEntity
@property(nonatomic, retain) NSNumber *counter_; @property(nonatomic, retain) NSNumber *counter_;

View File

@ -8,7 +8,6 @@
#import "MPGeneratedSiteEntity.h" #import "MPGeneratedSiteEntity.h"
@implementation MPGeneratedSiteEntity @implementation MPGeneratedSiteEntity
@dynamic counter_; @dynamic counter_;

View File

@ -10,7 +10,6 @@
#import "MPSiteQuestionEntity.h" #import "MPSiteQuestionEntity.h"
#import "MPUserEntity.h" #import "MPUserEntity.h"
@implementation MPSiteEntity @implementation MPSiteEntity
//@dynamic content; //@dynamic content;

View File

@ -9,7 +9,6 @@
#import "MPSiteQuestionEntity.h" #import "MPSiteQuestionEntity.h"
#import "MPSiteEntity.h" #import "MPSiteEntity.h"
@implementation MPSiteQuestionEntity @implementation MPSiteQuestionEntity
@dynamic keyword; @dynamic keyword;

View File

@ -10,7 +10,6 @@
#import <CoreData/CoreData.h> #import <CoreData/CoreData.h>
#import "MPSiteEntity.h" #import "MPSiteEntity.h"
@interface MPStoredSiteEntity : MPSiteEntity @interface MPStoredSiteEntity : MPSiteEntity
@property(nonatomic, retain) NSData *contentObject; @property(nonatomic, retain) NSData *contentObject;

View File

@ -8,7 +8,6 @@
#import "MPStoredSiteEntity.h" #import "MPStoredSiteEntity.h"
@implementation MPStoredSiteEntity @implementation MPStoredSiteEntity
@dynamic contentObject; @dynamic contentObject;

View File

@ -9,7 +9,6 @@
#import "MPUserEntity.h" #import "MPUserEntity.h"
#import "MPSiteEntity.h" #import "MPSiteEntity.h"
@implementation MPUserEntity @implementation MPUserEntity
@dynamic avatar_; @dynamic avatar_;

View File

@ -123,11 +123,9 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
^(MPMacAppDelegate *self, NSNotification *note) { ^(MPMacAppDelegate *self, NSNotification *note) {
PearlMainQueue( ^{ PearlMainQueue( ^{
NSString *key = note.object; NSString *key = note.object;
if (!key || [key isEqualToString:NSStringFromSelector( @ if (!key || [key isEqualToString:NSStringFromSelector( @selector( hidePasswords ) )])
selector( hidePasswords ) )])
self.hidePasswordsItem.state = [[MPConfig get].hidePasswords boolValue]? NSOnState: NSOffState; self.hidePasswordsItem.state = [[MPConfig get].hidePasswords boolValue]? NSOnState: NSOffState;
if (!key || [key isEqualToString:NSStringFromSelector( @ if (!key || [key isEqualToString:NSStringFromSelector( @selector( rememberLogin ) )])
selector( rememberLogin ) )])
self.rememberPasswordItem.state = [[MPConfig get].rememberLogin boolValue]? NSOnState: NSOffState; self.rememberPasswordItem.state = [[MPConfig get].rememberLogin boolValue]? NSOnState: NSOffState;
} ); } );
} ); } );
@ -136,7 +134,8 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
// Global hotkey. // Global hotkey.
EventHotKeyRef hotKeyRef; EventHotKeyRef hotKeyRef;
EventTypeSpec hotKeyEvents[1] = { { .eventClass = kEventClassKeyboard, .eventKind = kEventHotKeyPressed } }; EventTypeSpec hotKeyEvents[1] = { { .eventClass = kEventClassKeyboard, .eventKind = kEventHotKeyPressed } };
OSStatus status = InstallApplicationEventHandler( NewEventHandlerUPP( MPHotKeyHander ), GetEventTypeCount( hotKeyEvents ), hotKeyEvents, (__bridge void *)self, NULL ); OSStatus status = InstallApplicationEventHandler( NewEventHandlerUPP( MPHotKeyHander ), GetEventTypeCount( hotKeyEvents ), hotKeyEvents,
(__bridge void *)self, NULL );
if (status != noErr) if (status != noErr)
err( @"Error installing application event handler: %i", (int)status ); err( @"Error installing application event handler: %i", (int)status );
status = RegisterEventHotKey( 35 /* p */, controlKey + cmdKey, MPShowHotKey, GetApplicationEventTarget(), 0, &hotKeyRef ); status = RegisterEventHotKey( 35 /* p */, controlKey + cmdKey, MPShowHotKey, GetApplicationEventTarget(), 0, &hotKeyRef );

View File

@ -18,6 +18,5 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
@interface MPNoStateButtonCell : NSButtonCell @interface MPNoStateButtonCell : NSButtonCell
@end @end

View File

@ -18,9 +18,7 @@
#import "MPNoStateButton.h" #import "MPNoStateButton.h"
@implementation MPNoStateButtonCell { @implementation MPNoStateButtonCell {
} }
- (void)setState:(NSInteger)state { - (void)setState:(NSInteger)state {

View File

@ -18,7 +18,6 @@
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
@interface MPPasswordWindow : NSWindow @interface MPPasswordWindow : NSWindow
@end @end

View File

@ -32,6 +32,7 @@ typedef NS_ENUM(NSUInteger, MPAvatarMode) {
}; };
@interface MPAvatarCell : UICollectionViewCell @interface MPAvatarCell : UICollectionViewCell
@property(copy, nonatomic) NSString *name; @property(copy, nonatomic) NSString *name;
@property(assign, nonatomic) NSUInteger avatar; @property(assign, nonatomic) NSUInteger avatar;
@property(assign, nonatomic) MPAvatarMode mode; @property(assign, nonatomic) MPAvatarMode mode;

View File

@ -20,6 +20,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@interface MPLogsViewController : UIViewController @interface MPLogsViewController : UIViewController
@property(weak, nonatomic) IBOutlet UITextView *logView; @property(weak, nonatomic) IBOutlet UITextView *logView;
@property(weak, nonatomic) IBOutlet UISegmentedControl *levelControl; @property(weak, nonatomic) IBOutlet UISegmentedControl *levelControl;

View File

@ -18,6 +18,5 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
@interface MPNavigationController : UINavigationController @interface MPNavigationController : UINavigationController
@end @end

View File

@ -18,7 +18,6 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
@interface MPOverlayViewController : UIViewController @interface MPOverlayViewController : UIViewController
@end @end

View File

@ -18,8 +18,6 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
@interface MPRootSegue : UIStoryboardSegue @interface MPRootSegue : UIStoryboardSegue
@end @end

View File

@ -18,9 +18,7 @@
#import "MPRootSegue.h" #import "MPRootSegue.h"
@implementation MPRootSegue { @implementation MPRootSegue {
} }
- (void)perform { - (void)perform {

View File

@ -18,7 +18,6 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
@interface MPWebViewController : UIViewController<UIWebViewDelegate> @interface MPWebViewController : UIViewController<UIWebViewDelegate>
@property(nonatomic) IBOutlet UIWebView *webView; @property(nonatomic) IBOutlet UIWebView *webView;