Skip to content
Snippets Groups Projects
Commit 9e804e9a authored by George Nachman's avatar George Nachman
Browse files

Further cleanup for consistency

parent 66b6be74
No related branches found
No related tags found
No related merge requests found
Showing
with 56 additions and 63 deletions
Loading
Loading
@@ -14,6 +14,6 @@
@property(nonatomic, copy) Profile *profile;
 
// An array of keys that may be changed in self.profile. All take string values.
@property (readonly) NSArray<NSString*> *allKeys;
@property(nonatomic, readonly) NSArray<NSString *> *allKeys;
 
@end
Loading
Loading
@@ -56,8 +56,13 @@ enum {
kMenuItemGray = 7
};
 
- (void)dealloc {
[_color release];
[super dealloc];
}
// Returns the color gradient corresponding to the color index.
// These colours were chosen to appear similar to those in Aperture 3.
// These colors were chosen to appear similar to those in Aperture 3.
// Based on http://cocoatricks.com/2010/07/a-label-color-picker-menu-item-2/
 
- (NSGradient *)gradientForColorIndex:(NSInteger)colorIndex {
Loading
Loading
Loading
Loading
@@ -27,8 +27,7 @@ typedef NS_ENUM(NSInteger, ContextMenuActions) {
 
 
@interface ContextMenuActionPrefsController : NSWindowController <
NSWindowDelegate, NSTableViewDelegate, NSTableViewDataSource>
NSWindowDelegate, NSTableViewDelegate, NSTableViewDataSource>
 
@property (nonatomic, assign) id<ContextMenuActionPrefsDelegate> delegate;
@property (nonatomic, assign) BOOL hasSelection;
Loading
Loading
Loading
Loading
@@ -8,23 +8,17 @@
 
#import <Cocoa/Cocoa.h>
 
@interface Coprocess : NSObject {
pid_t pid_; // -1 after termination
int outputFd_;
int inputFd_;
NSMutableData *outputBuffer_;
NSMutableData *inputBuffer_;
BOOL eof_;
BOOL mute_;
}
@property (nonatomic, assign) pid_t pid;
@property (nonatomic, assign) int outputFd; // for writing
@property (nonatomic, assign) int inputFd; // for reading
@property (nonatomic, readonly) NSMutableData *outputBuffer;
@property (nonatomic, readonly) NSMutableData *inputBuffer;
@property (nonatomic, assign) BOOL eof;
@property (nonatomic, assign) BOOL mute;
@interface Coprocess : NSObject
@property(nonatomic, assign) pid_t pid; // -1 after termination
@property(nonatomic, assign) int outputFd; // for writing
@property(nonatomic, assign) int inputFd; // for reading
@property(nonatomic, readonly) NSMutableData *outputBuffer;
@property(nonatomic, readonly) NSMutableData *inputBuffer;
@property(nonatomic, assign) BOOL eof;
@property(nonatomic, assign) BOOL mute;
@property(nonatomic, readonly) int readFileDescriptor; // for reading
@property(nonatomic, readonly) int writeFileDescriptor; // for writing
 
+ (Coprocess *)launchedCoprocessWithCommand:(NSString *)command;
 
Loading
Loading
@@ -44,7 +38,5 @@
- (BOOL)wantToWrite;
- (void)mainProcessDidTerminate;
- (void)terminate;
@property(nonatomic, readonly) int readFileDescriptor; // for reading
@property(nonatomic, readonly) int writeFileDescriptor; // for writing
 
@end
Loading
Loading
@@ -14,10 +14,10 @@ const int kMaxOutputBufferSize = 1024;
static NSString *kCoprocessMruKey = @"Coprocess MRU";
 
@implementation Coprocess {
// When this is set, writing is no longer an option (probably because the
// coprocess terminated). This is different than eof_, which indicates that
// reading is no longer an option and the coprocess is well and truly dead.
BOOL writePipeClosed_;
// When this is set, writing is no longer an option (probably because the
// coprocess terminated). This is different than eof_, which indicates that
// reading is no longer an option and the coprocess is well and truly dead.
BOOL writePipeClosed_;
}
 
@synthesize pid = pid_;
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
@interface EquivalenceClassSet : NSObject
 
@property (nonatomic, readonly) NSArray<Class> *classes;
@property(nonatomic, readonly) NSArray<Class> *classes;
 
- (NSArray *)valuesEqualTo:(NSObject<NSCopying> *)target;
- (void)setValue:(NSObject<NSCopying> *)value equalToValue:(NSObject<NSCopying> *)otherValue;
Loading
Loading
Loading
Loading
@@ -26,7 +26,6 @@
 
@interface IntervalMap : NSObject
 
- (instancetype)init;
- (void)setObject:(id)object forRange:(IntRange *)range;
- (void)incrementNumbersBy:(int)amount inRange:(IntRange *)range;
- (NSArray *)allValues;
Loading
Loading
Loading
Loading
@@ -7,11 +7,11 @@
// Negative locations have special meaning. Don't use them.
@property(nonatomic, assign) long long location;
@property(nonatomic, assign) long long length;
@property(nonatomic, readonly) long long limit;
 
+ (instancetype)intervalWithLocation:(long long)location length:(long long)length;
+ (Interval *)maxInterval;
// One more than the largest value in the interval.
@property(nonatomic, readonly) long long limit;
- (BOOL)intersects:(Interval *)other;
- (BOOL)isEqualToInterval:(Interval *)interval;
 
Loading
Loading
@@ -50,10 +50,7 @@
 
@end
 
@interface IntervalTree : NSObject <AATreeDelegate> {
AATree *_tree;
int _count;
}
@interface IntervalTree : NSObject <AATreeDelegate>
 
@property(nonatomic, readonly) NSInteger count;
@property(nonatomic, readonly) NSString *debugString;
Loading
Loading
Loading
Loading
@@ -307,7 +307,10 @@ static NSString *const kIntervalLengthKey = @"Length";
 
@end
 
@implementation IntervalTree
@implementation IntervalTree {
AATree *_tree;
int _count;
}
 
- (instancetype)initWithDictionary:(NSDictionary *)dict {
self = [self init];
Loading
Loading
Loading
Loading
@@ -15,9 +15,9 @@
NSTimeInterval _timePaused; // Time at which -pauseTimer was called.
}
 
@property (nonatomic, assign) double alpha; // Initialized to 0.5. Small values make updates affect the moving average more.
@property (nonatomic, assign) double value;
@property (nonatomic, readonly) NSTimeInterval timeSinceTimerStarted;
@property(nonatomic, assign) double alpha; // Initialized to 0.5. Small values make updates affect the moving average more.
@property(nonatomic, assign) double value;
@property(nonatomic, readonly) NSTimeInterval timeSinceTimerStarted;
 
- (void)startTimer;
- (void)pauseTimer;
Loading
Loading
Loading
Loading
@@ -41,8 +41,8 @@
 
@interface PointerController : NSObject
 
@property (nonatomic, assign) id<PointerControllerDelegate> delegate;
@property (nonatomic, readonly) BOOL viewShouldTrackTouches;
@property(nonatomic, assign) id<PointerControllerDelegate> delegate;
@property(nonatomic, readonly) BOOL viewShouldTrackTouches;
 
- (BOOL)mouseDown:(NSEvent *)event withTouches:(int)numTouches ignoreOption:(BOOL)ignoreOption;
- (BOOL)mouseUp:(NSEvent *)event withTouches:(int)numTouches;
Loading
Loading
Loading
Loading
@@ -44,7 +44,7 @@ static NSError *SCPFileError(NSString *description) {
NSString *_hostName;
}
 
- (id)init {
- (instancetype)init {
self = [super init];
if (self) {
_queue = dispatch_queue_create("com.googlecode.iterm2.SCPFile", NULL);
Loading
Loading
Loading
Loading
@@ -12,10 +12,10 @@
 
extern NSString *const kTmuxControllerRegistryDidChange;
 
@interface TmuxControllerRegistry : NSObject
@interface TmuxControllerRegistry : NSObject
 
@property (readonly) NSInteger numberOfClients;
@property (readonly, copy) NSArray<NSString*> *clientNames;
@property(nonatomic, readonly) NSInteger numberOfClients;
@property(nonatomic, readonly) NSArray<NSString*> *clientNames;
 
+ (instancetype)sharedInstance;
- (TmuxController *)controllerForClient:(NSString *)client;
Loading
Loading
Loading
Loading
@@ -41,8 +41,6 @@ static NSString *kCommandIsLastInList = @"lastInList";
// set.
BOOL disconnected_;
 
id<TmuxGatewayDelegate> delegate_; // weak
// Data from parsing an incoming command
ControlCommand command_;
 
Loading
Loading
Loading
Loading
@@ -26,7 +26,7 @@ extern NSString *kWindowPasteboardType;
 
@end
 
@interface TmuxWindowsTable : NSObject <NSTableViewDelegate, NSTableViewDataSource>
@interface TmuxWindowsTable : NSObject <NSTableViewDelegate, NSTableViewDataSource>
 
@property (nonatomic, assign) id<TmuxWindowsTableProtocol> delegate;
 
Loading
Loading
Loading
Loading
@@ -53,8 +53,8 @@ int DebugLogImpl(const char *file, int line, const char *function, NSString* val
// Is Sparkle in the process of restarting us?
@property(nonatomic, readonly) BOOL sparkleRestarting;
 
@property (readonly) BOOL useBackgroundPatternIndicator;
@property (readonly) BOOL warnBeforeMultiLinePaste;
@property(nonatomic, readonly) BOOL useBackgroundPatternIndicator;
@property(nonatomic, readonly) BOOL warnBeforeMultiLinePaste;
 
- (void)awakeFromNib;
 
Loading
Loading
Loading
Loading
@@ -15,14 +15,14 @@
 
@interface iTermExposeView : NSView <GlobalSearchDelegate>
 
@property (nonatomic, assign) iTermExposeGridView *grid;
@property (readonly) NSRect searchFrame;
@property(nonatomic, assign) iTermExposeGridView *grid;
@property(nonatomic, readonly) NSRect searchFrame;
 
- (instancetype)initWithFrame:(NSRect)frameRect;
- (iTermExposeTabView*)resultView;
- (PTYSession*)resultSession;
- (iTermExposeTabView *)resultView;
- (PTYSession *)resultSession;
 
#pragma mark GlobalSearchDelegate
- (void)globalSearchSelectionChangedToSession:(PTYSession*)theSession;
- (void)globalSearchOpenSelection;
- (void)globalSearchViewDidResize:(NSRect)origSize;
Loading
Loading
Loading
Loading
@@ -56,10 +56,10 @@
 
@interface iTermObjectPool : NSObject
 
@property(nonatomic, readonly) iTermPooledObject *pooledObject;
- (instancetype)initWithClass:(Class)theClass
collections:(int)numCollections
objectsPerCollection:(int)objectsPerCollection;
 
@property(nonatomic, readonly) iTermPooledObject *pooledObject;
@end
Loading
Loading
@@ -35,9 +35,9 @@ extern NSString *kSemanticHistoryCoprocessAction;
 
@interface iTermSemanticHistoryPrefsController : NSObject
 
@property (nonatomic, copy) NSString *guid;
@property (nonatomic, assign) IBOutlet id<iTermSemanticHistoryPrefsControllerDelegate> delegate;
@property (readonly) NSDictionary *prefs;
@property(nonatomic, copy) NSString *guid;
@property(nonatomic, assign) IBOutlet id<iTermSemanticHistoryPrefsControllerDelegate> delegate;
@property(nonatomic, readonly) NSDictionary *prefs;
 
+ (NSString *)bestEditor;
+ (NSString *)schemeForEditor:(NSString *)editor;
Loading
Loading
Loading
Loading
@@ -56,10 +56,10 @@
 
@interface iTermToolWrapper : NSView
 
@property (nonatomic, copy) NSString *name;
@property (nonatomic, readonly) __weak NSView *container;
@property (nonatomic, assign) id<ToolWrapperDelegate> delegate;
@property (nonatomic, readonly) id<ToolbeltTool> tool;
@property(nonatomic, copy) NSString *name;
@property(nonatomic, readonly) __weak NSView *container;
@property(nonatomic, assign) id<ToolWrapperDelegate> delegate;
@property(nonatomic, readonly) id<ToolbeltTool> tool;
 
- (void)relayout;
- (void)removeToolSubviews;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment