diff --git a/BookmarksController.m b/BookmarksController.m index 43411dbe..46e5fc46 100755 --- a/BookmarksController.m +++ b/BookmarksController.m @@ -342,7 +342,7 @@ - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColu ctrlCharStr = [[NSString stringWithCharacters:&ch length:1] retain]; } - return [NSString stringWithFormat:@"%@%@%@ %d", rowIndex > 17 ? ctrlCharStr : @"", rowIndex > 8 ? shiftCharStr : @"", cmdCharStr, (rowIndex % 9) + 1]; + return [NSString stringWithFormat:@"%@%@%@ %l", rowIndex > 17 ? ctrlCharStr : @"", rowIndex > 8 ? shiftCharStr : @"", cmdCharStr, (rowIndex % 9) + 1]; } - (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView { diff --git a/BufferUtils.c b/BufferUtils.c index 00105323..cc1bd8de 100755 --- a/BufferUtils.c +++ b/BufferUtils.c @@ -411,7 +411,7 @@ CFStringRef CreateRandomizedFileName() { } CFStringRef name = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(".%lu%lu-%d-%d"), - psn.highLongOfPSN, psn.lowLongOfPSN, (int)CFAbsoluteTimeGetCurrent(), sequence); + psn.highLongOfPSN, (NSUInteger)psn.lowLongOfPSN, (int)CFAbsoluteTimeGetCurrent(), sequence); return name; } diff --git a/ExternalEditorListController.h b/ExternalEditorListController.h index aa34e6bc..803bb72d 100644 --- a/ExternalEditorListController.h +++ b/ExternalEditorListController.h @@ -27,6 +27,8 @@ extern NSString *ExternalEditorsChangedNotification; @class NoteObject; +@protocol NSMenuDelegate; + @interface ExternalEditor : NSObject { BOOL installCheckFailed; @@ -49,7 +51,7 @@ extern NSString *ExternalEditorsChangedNotification; @end -@interface ExternalEditorListController : NSObject { +@interface ExternalEditorListController : NSObject { NSMutableArray *userEditorList; NSArray *ODBEditorList; diff --git a/FastListDataSource.h b/FastListDataSource.h index 09f68c1d..19aace32 100755 --- a/FastListDataSource.h +++ b/FastListDataSource.h @@ -30,7 +30,7 @@ NSUInteger count; } -- (const id *)immutableObjects; +- (id *)immutableObjects; - (NSUInteger)count; - (NSUInteger)indexOfObjectIdenticalTo:(id)address; diff --git a/LinkingEditor.h b/LinkingEditor.h index ec05d732..ac770eea 100755 --- a/LinkingEditor.h +++ b/LinkingEditor.h @@ -24,6 +24,9 @@ @class NoteObject; @class GlobalPrefs; +// From old version of NSTextFinder.h before including in OSX 10.8 +enum {LAST_FIND_UNKNOWN, LAST_FIND_NO, LAST_FIND_YES}; + @interface LinkingEditor : NSTextView #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 diff --git a/LinkingEditor.m b/LinkingEditor.m index de5b4d13..756a9137 100755 --- a/LinkingEditor.m +++ b/LinkingEditor.m @@ -20,7 +20,6 @@ #import "AppController.h" #import "AppController_Importing.h" #import "NotesTableView.h" -#import "NSTextFinder.h" #import "LinkingEditor_Indentation.h" #import "NSCollection_utils.h" #import "AttributedPlainText.h" diff --git a/NSTextFinder.h b/NSTextFinder.h deleted file mode 100755 index b26b9995..00000000 --- a/NSTextFinder.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * NSTextFinder.h - * Notation - * - * Created by class-dump (Steve Nygard) from AppKit framework in 10.4 - * - */ - -#import - -enum {LAST_FIND_UNKNOWN, LAST_FIND_NO, LAST_FIND_YES}; - -@interface NSTextFinder : NSObject -{ - #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - //10.6 - NSComboBox *findComboBox; - NSComboBox *replaceComboBox; - NSTextField *statusField; - NSButton *ignoreCaseButton; - NSButton *replaceAllButton; - NSButton *replaceButton; - NSButton *findNextButton; - NSButton *findPreviousButton; - NSButton *replaceAndFindButton; - NSButton *wrapAroundButton; - NSPopUpButton *matchPopUp; - NSTextView *fieldEditor; - NSString *findString; - BOOL lastFindWasSuccessful; - BOOL findStringChangedInUI; - BOOL findStringNeedsToBeRefreshedFromPB; - NSInteger lastChangeCount; - BOOL caseInsensitiveSearchDefault; - NSInteger substringMatchDefault; - NSMutableArray *recentFindStrings; - NSMutableArray *recentFindOptions; - NSMutableArray *recentReplaceStrings; - NSInteger numberOfRecentStrings; - #else - // 10.4 - NSTextField *findTextField; - NSTextField *replaceTextField; - NSTextField *statusField; - NSButton *ignoreCaseButton; - NSButton *replaceAllButton; - NSButton *replaceButton; - NSButton *findNextButton; - NSButton *findPreviousButton; - NSButton *replaceAndFindButton; - NSButton *wrapAroundButton; - NSPopUpButton *matchPopUp; - NSTextView *fieldEditor; - NSString *findString; - @public - BOOL lastFindWasSuccessful; - BOOL findStringChangedInUI; - BOOL findStringNeedsToBeRefreshedFromPB; - #endif -} - -+ (id)sharedTextFinder; -- (id)init; -- (void)dealloc; -- (void)finalize; -- (id)windowWillReturnFieldEditor:(id)fp8 toObject:(id)fp12; -- (void)appDidActivate:(id)fp8; -- (BOOL)loadFindStringFromPasteboard; -- (void)loadFindStringToPasteboard; -- (void)loadUI; -- (void)controlTextDidChange:(id)fp8; -- (id)findString; -- (void)setFindString:(id)fp8 writeToPasteboard:(BOOL)fp12 updateUI:(BOOL)fp16; -- (id)textObjectToSearchIn; -- (id)findPanel:(BOOL)fp8; -- (void)takeFindStringFromView:(id)fp8; -- (unsigned int)optionsFromPanel; -- (BOOL)findInView:(id)fp8 forward:(BOOL)fp12; -- (BOOL)replaceInView:(id)fp8; -- (BOOL)replaceAndFindInView:(id)fp8; -- (int)replaceAllInView:(id)fp8 selectionOnly:(BOOL)fp12; -- (BOOL)selectAllInView:(id)fp8 selectionOnly:(BOOL)fp12; -- (void)orderFrontFindPanel:(id)fp8; -- (void)findNextAndOrderFindPanelOut:(id)fp8; -- (void)performFindPanelAction:(id)fp8; -- (void)performFindPanelAction:(int)fp8 forClient:(id)fp12; -- (BOOL)validateFindPanelAction:(int)fp8 forClient:(id)fp12; -- (void)windowDidUpdate:(id)fp8; - -@end - -@interface NSTextFinder (LastFind) -- (int)nv_lastFindWasSuccessful; -@end - - -// Dump from 10.6 x86_64 -#if 0 -@interface NSTextFinder : NSObject -{ - NSComboBox *findComboBox; - NSComboBox *replaceComboBox; - NSTextField *statusField; - NSButton *ignoreCaseButton; - NSButton *replaceAllButton; - NSButton *replaceButton; - NSButton *findNextButton; - NSButton *findPreviousButton; - NSButton *replaceAndFindButton; - NSButton *wrapAroundButton; - NSPopUpButton *matchPopUp; - NSTextView *fieldEditor; - NSString *findString; - BOOL lastFindWasSuccessful; - BOOL findStringChangedInUI; - BOOL findStringNeedsToBeRefreshedFromPB; - long long lastChangeCount; - BOOL caseInsensitiveSearchDefault; - long long substringMatchDefault; - NSMutableArray *recentFindStrings; - NSMutableArray *recentFindOptions; - NSMutableArray *recentReplaceStrings; - long long numberOfRecentStrings; -} - -+ (id)sharedTextFinder; -- (id)init; -- (void)awakeFromNib; -- (void)dealloc; -- (id)windowWillReturnFieldEditor:(id)arg1 toObject:(id)arg2; -- (BOOL)needToRefreshFromPasteboard; -- (void)appDidActivate:(id)arg1; -- (BOOL)loadFindStringFromPasteboard; -- (void)loadFindStringToPasteboard; -- (void)restoreDefaultSearchOptions; -- (void)makeCurrentSearchOptionsDefault; -- (void)setDefaultSearchOptions:(id)arg1; -- (void)loadUI; -- (void)controlTextDidChange:(id)arg1; -- (void)addStringToRecentSearchStrings:(id)arg1; -- (void)addStringToRecentReplaceStrings:(id)arg1; -- (id)comboBox:(id)arg1 objectValueForItemAtIndex:(long long)arg2; -- (long long)numberOfItemsInComboBox:(id)arg1; -- (void)comboBoxSelectionDidChange:(id)arg1; -- (id)findString; -- (void)setFindString:(id)arg1 writeToPasteboard:(BOOL)arg2 updateUI:(BOOL)arg3; -- (id)textObjectToSearchIn; -- (id)findPanel:(BOOL)arg1; -- (void)takeFindStringFromView:(id)arg1; -- (unsigned long long)optionsFromPanel; -- (BOOL)findInView:(id)arg1 forward:(BOOL)arg2; -- (BOOL)replaceInView:(id)arg1; -- (BOOL)replaceAndFindInView:(id)arg1; -- (long long)replaceAllInView:(id)arg1 selectionOnly:(BOOL)arg2; -- (BOOL)selectAllInView:(id)arg1 selectionOnly:(BOOL)arg2; -- (void)orderFrontFindPanel:(id)arg1; -- (void)findNextAndOrderFindPanelOut:(id)arg1; -- (void)performFindPanelAction:(id)arg1; -- (void)performFindPanelAction:(unsigned long long)arg1 forClient:(id)arg2; -- (BOOL)validateFindPanelAction:(unsigned long long)arg1 forClient:(id)arg2; -- (void)windowDidUpdate:(id)arg1; - -@end -#endif \ No newline at end of file diff --git a/NSTextFinder_LastFind.m b/NSTextFinder_LastFind.m index a118e57e..d182b233 100755 --- a/NSTextFinder_LastFind.m +++ b/NSTextFinder_LastFind.m @@ -5,7 +5,8 @@ * Created by Zachary Schneirov * */ -#import "NSTextFinder.h" +#include +#import "LinkingEditor.h" @implementation NSTextFinder (LastFind) diff --git a/Notation.xcodeproj/project.pbxproj b/Notation.xcodeproj/project.pbxproj index f16c90f2..b520ec47 100755 --- a/Notation.xcodeproj/project.pbxproj +++ b/Notation.xcodeproj/project.pbxproj @@ -383,7 +383,6 @@ 217CEBA209E9885500DF0E09 /* NotationFileManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotationFileManager.m; sourceTree = ""; }; 217D4280096545A000E84749 /* LabelObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelObject.h; sourceTree = ""; }; 217D4281096545A000E84749 /* LabelObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LabelObject.m; sourceTree = ""; }; - 217D4B570A61F42700887100 /* NSTextFinder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSTextFinder.h; sourceTree = ""; }; 217EB3CD0B0F62FB0041A8A9 /* NSTextFinder_LastFind.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = NSTextFinder_LastFind.m; sourceTree = ""; }; 2181171109F311110020A252 /* DeletedNoteObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeletedNoteObject.h; sourceTree = ""; }; 2181171209F311110020A252 /* DeletedNoteObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeletedNoteObject.m; sourceTree = ""; }; @@ -1018,7 +1017,6 @@ 21BD2ECF10DAF31500BA3DF6 /* LinearDividerShader.m */, 2114C23B095883A600614E74 /* NSData_transformations.h */, 2114C23C095883A600614E74 /* NSData_transformations.m */, - 217D4B570A61F42700887100 /* NSTextFinder.h */, 217EB3CD0B0F62FB0041A8A9 /* NSTextFinder_LastFind.m */, 214495040ADC7F4F00E2A2B6 /* SFPasswordAssistantInspectorController.h */, 213FAD510B3C6B52004C74BD /* FSExchangeObjectsCompat.h */, @@ -1798,7 +1796,7 @@ GCC_PFE_FILE_C_DIALECTS = "c objective-c"; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Notation_Prefix.pch; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; @@ -1818,10 +1816,7 @@ INSTALL_PATH = "$(HOME)/Applications"; LD_GENERATE_MAP_FILE = YES; LIBRARY_SEARCH_PATHS = "$(LIBRARY_SEARCH_PATHS)"; - OTHER_CFLAGS = ( - "-pg", - "-whatsloaded", - ); + OTHER_CFLAGS = "-pg"; OTHER_LDFLAGS = ( "-pg", "-whatsloaded", @@ -1830,6 +1825,7 @@ ); PREBINDING = NO; PRODUCT_NAME = "Notational Velocity"; + SDKROOT = macosx; STRIP_STYLE = "non-global"; WARNING_CFLAGS = "-pg"; WARNING_LDFLAGS = "-pg"; @@ -1863,7 +1859,7 @@ GCC_PFE_FILE_C_DIALECTS = "c objective-c"; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Notation_Prefix.pch; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; @@ -1886,6 +1882,7 @@ OTHER_LDFLAGS = ""; PREBINDING = NO; PRODUCT_NAME = "Notational Velocity"; + SDKROOT = macosx; "SDKROOT[arch=x86_64]" = macosx10.5; SECTORDER_FLAGS = ( "-sectorder", @@ -1924,7 +1921,7 @@ GCC_PFE_FILE_C_DIALECTS = "c objective-c"; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Notation_Prefix.pch; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; @@ -1946,6 +1943,7 @@ PDFKit, ); PRODUCT_NAME = "Notational Velocity"; + SDKROOT = macosx; WRAPPER_EXTENSION = app; }; name = Default; diff --git a/NotationController.m b/NotationController.m index 27e8236a..1f3c5204 100755 --- a/NotationController.m +++ b/NotationController.m @@ -262,7 +262,7 @@ - (NSNumber*)verifyDataAtTemporaryFSRef:(NSValue*)fsRefValue withFinalName:(NSSt } } - NSLog(@"verified %u notes in %g s", [notesToVerify count], (float)[[NSDate date] timeIntervalSinceDate:date]); + NSLog(@"verified %lu notes in %g s", (unsigned long)[notesToVerify count], (float)[[NSDate date] timeIntervalSinceDate:date]); returnResult: if (notesData) free(notesData); return [NSNumber numberWithInt:result]; diff --git a/NotationFileManager.m b/NotationFileManager.m index 4091157b..5ad92088 100755 --- a/NotationFileManager.m +++ b/NotationFileManager.m @@ -30,6 +30,7 @@ #import "NSData_transformations.h" #include #include +#include NSString *NotesDatabaseFileName = @"Notes & Settings"; diff --git a/NoteObject.h b/NoteObject.h index 6cfe73ca..aa09b961 100755 --- a/NoteObject.h +++ b/NoteObject.h @@ -37,6 +37,7 @@ typedef struct _NoteFilterContext { } NoteFilterContext; @interface NoteObject : NSObject { +@public NSAttributedString *tableTitleString; NSString *titleString, *labelString; NSMutableAttributedString *contentString; @@ -52,7 +53,7 @@ typedef struct _NoteFilterContext { NSString *dateModifiedString, *dateCreatedString; id delegate; //the notes controller - + //for syncing to text file NSString *filename; UInt32 nodeID; diff --git a/TemporaryFileCachePreparer.m b/TemporaryFileCachePreparer.m index 3c431ebf..a06a2278 100755 --- a/TemporaryFileCachePreparer.m +++ b/TemporaryFileCachePreparer.m @@ -132,7 +132,7 @@ - (void)_attachRAMDiskOfCapacity:(NSUInteger)numberOfMegabytes { [self retain]; [(attachTask = [NSTask new]) setLaunchPath:@"/usr/bin/hdiutil"]; - [attachTask setArguments:[NSArray arrayWithObjects:@"attach", @"-nomount", @"-nobrowse", [NSString stringWithFormat:@"ram://%u", (2 * 1024 * numberOfMegabytes)], nil]]; + [attachTask setArguments:[NSArray arrayWithObjects:@"attach", @"-nomount", @"-nobrowse", [NSString stringWithFormat:@"ram://%lu", (unsigned long)(2 * 1024 * numberOfMegabytes)], nil]]; [attachTask setStandardOutput:[NSPipe pipe]]; [attachTask launch]; } diff --git a/URLGetter.h b/URLGetter.h index e05e3d2b..2e32069a 100755 --- a/URLGetter.h +++ b/URLGetter.h @@ -19,7 +19,9 @@ #import -@interface URLGetter : NSObject +@protocol NSURLDownloadDelegate; + +@interface URLGetter : NSObject { IBOutlet NSButton *cancelButton; IBOutlet NSTextField *objectURLStatus;