Skip to content

Commit

Permalink
Big merge for stable release of 2.2
Browse files Browse the repository at this point in the history
- Improved the code for storing the
- Fixed sort arrows not showing in the column header in vertical layout
- Restyle/changed the divider between the notes list and note textview
- Improved handling of collapsing/expanding the notes list
- Updated some deprecated methods.
- Improved support/stability on 10.9. (for example turned off
ResponsiveScrolling as the code doesn’t handle it properly yet).
- Fixed some localization stuff (menu items from English not showing up
in other languages)
- Improved 64-bit compatibility
- Fixed a lot of static analyzer and compiler warnings (see init
methods not properly setting self==[super init])
  • Loading branch information
elasticthreads committed Jun 13, 2014
1 parent 2c81548 commit 5176a9f
Show file tree
Hide file tree
Showing 87 changed files with 7,463 additions and 34,192 deletions.
27 changes: 15 additions & 12 deletions AlienNoteImporter.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ - (NSArray*)_importDelimitedFile:(NSString*)filename withDelimiter:(NSString*)de
@implementation AlienNoteImporter

- (id)init {
if ([super init]) {
if (self=[super init]) {
shouldGrabCreationDates = NO;
documentSettings = [[NSMutableDictionary alloc] init];
return self;
}
return self;
return nil;
}

+ (void)importBlorOrHelpFilesIfNecessaryIntoNotation:(NotationController*)notation {
Expand Down Expand Up @@ -95,20 +96,21 @@ + (NSString*)blorPath {
}

- (id)initWithStoragePaths:(NSArray*)filenames {
if ([self init]) {
if (self=[self init]) {
if ((source = [filenames retain])) {

importerSelector = @selector(notesWithPaths:);
} else {
return nil;
}
return self;
}

return self;
return nil;
}

- (id)initWithStoragePath:(NSString*)filename {
if ([self init]) {
if (self=[self init]) {
if ((source = [filename retain])) {

//auto-detect based on bundle/extension/metadata
Expand All @@ -124,9 +126,10 @@ - (id)initWithStoragePath:(NSString*)filename {
} else {
return nil;
}
return self;
}

return self;
return nil;
}

- (void)dealloc {
Expand Down Expand Up @@ -521,9 +524,9 @@ - (NSString *) contentUsingReadability: (NSString *)htmlFile
data = [file readDataToEndOfFile];

NSString *string;
string = [[NSString alloc] initWithData: data
encoding: NSUTF8StringEncoding];

string = [[[NSString alloc] initWithData: data
encoding: NSUTF8StringEncoding] autorelease];
[task release];
return [self markdownFromSource:string];
}

Expand Down Expand Up @@ -553,9 +556,9 @@ - (NSString *) markdownFromHTMLFile: (NSString *)htmlFile
data = [file readDataToEndOfFile];

NSString *string;
string = [[NSString alloc] initWithData: data
encoding: NSUTF8StringEncoding];

string = [[[NSString alloc] initWithData: data
encoding: NSUTF8StringEncoding] autorelease];
[task release];
return string;
}

Expand Down
53 changes: 27 additions & 26 deletions AppController.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,33 +58,33 @@
BOOL wasVert;
BOOL wasDFVisible;
BOOL fieldWasFirstResponder;
BOOL isAutocompleting;
BOOL wasDeleting;
IBOutlet ETContentView *mainView;
BOOL isAutocompleting;
BOOL wasDeleting;
IBOutlet ETContentView *mainView;
DFView *dualFieldView;
StatusItemView *cView;
NSStatusItem *statusItem;
NSStatusItem *statusItem;
IBOutlet NSMenu *statBarMenu;
TagEditingManager *tagEditor;
NSColor *backgrndColor;
NSColor *foregrndColor;
NSInteger userScheme;
NSString *noteFormat;
NSTextView *theFieldEditor;
NSDictionary *fieldAttributes;
NSDictionary *fieldAttributes;
NSTimer *modifierTimer;
IBOutlet WordCountToken *wordCounter;
IBOutlet DualField *field;
IBOutlet DualField *field;
RBSplitSubview *splitSubview;
RBSplitSubview *notesSubview;
RBSplitView *splitView;
IBOutlet ETScrollView *notesScrollView;
IBOutlet ETScrollView *textScrollView;
IBOutlet NotesTableView *notesTableView;
IBOutlet LinkingEditor *textView;
IBOutlet ETScrollView *notesScrollView;
IBOutlet ETScrollView *textScrollView;
IBOutlet NotesTableView *notesTableView;
IBOutlet LinkingEditor *textView;
IBOutlet EmptyView *editorStatusView;
IBOutlet NSMenuItem *sparkleUpdateItem;
IBOutlet NSWindow *window;
IBOutlet NSWindow *window;
IBOutlet NSPanel *syncWaitPanel;
IBOutlet NSProgressIndicator *syncWaitSpinner;
NSToolbar *toolbar;
Expand All @@ -93,16 +93,16 @@

BOOL waitedForUncommittedChanges;

NSImage *verticalDividerImg;
// NSImage *verticalDividerImg;
LinearDividerShader *dividerShader;

NSString *URLToInterpretOnLaunch;
NSMutableArray *pathsToOpenOnLaunch;

NSUndoManager *windowUndoManager;
PrefsWindowController *prefsWindowController;
GlobalPrefs *prefsController;
NotationController *notationController;
NSUndoManager *windowUndoManager;
PrefsWindowController *prefsWindowController;
GlobalPrefs *prefsController;
NotationController *notationController;

SpaceSwitchingContext spaceSwitchCtx;
ViewLocationContext listUpdateViewCtx;
Expand All @@ -114,15 +114,16 @@
NoteObject *currentNote;
NSArray *savedSelectedNotes;
BOOL hasLaunched;
PreviewController *previewController;
// IBOutlet NSMenuItem *markdownPreview;
IBOutlet NSMenuItem *multiMarkdownPreview;
IBOutlet NSMenuItem *textilePreview;
IBOutlet NSMenuItem *previewToggler;
IBOutlet NSMenuItem *lockNoteItem;
IBOutlet NSMenuItem *printPreviewItem;
IBOutlet NSMenuItem *savePreviewItem;
NSInteger currentPreviewMode;
PreviewController *previewController;
// IBOutlet NSMenuItem *markdownPreview;
IBOutlet NSMenuItem *multiMarkdownPreview;
IBOutlet NSMenuItem *textilePreview;
IBOutlet NSMenuItem *previewToggler;
IBOutlet NSMenuItem *lockNoteItem;
IBOutlet NSMenuItem *printPreviewItem;
IBOutlet NSMenuItem *savePreviewItem;
NSInteger currentPreviewMode;
BOOL splitViewIsChangingLayout;
}

@property(readwrite)BOOL isEditing;
Expand Down Expand Up @@ -151,7 +152,7 @@ void outletObjectAwoke(id sender);
- (NoteObject*)createNoteIfNecessary;
- (void)searchForString:(NSString*)string;
- (NSUInteger)revealNote:(NoteObject*)note options:(NSUInteger)opts;
- (BOOL)displayContentsForNoteAtIndex:(int)noteIndex;
- (BOOL)displayContentsForNoteAtIndex:(NSUInteger)noteIndex;
- (void)processChangedSelectionForTable:(NSTableView*)table;
- (void)setEmptyViewState:(BOOL)state;
- (void)cancelOperation:(id)sender;
Expand Down
Loading

0 comments on commit 5176a9f

Please sign in to comment.