Permalink
Browse files

Switched bundle id and preference file out to avoid conflict during d…

…evelopment. Made note importer maintain first line when getting title.
  • Loading branch information...
1 parent dfe1eb2 commit a0befe3b0563c144e06dcc6c733266e2dd39079b @ttscoff ttscoff committed Feb 5, 2011
Showing with 8 additions and 7 deletions.
  1. +2 −2 AlienNoteImporter.m
  2. +1 −1 Info.plist
  3. +1 −1 NotationController.m
  4. +1 −1 NotationFileManager.m
  5. +3 −2 PreviewController.m
View
@@ -428,7 +428,7 @@ - (NoteObject*)noteWithFile:(NSString*)filename {
NSMutableAttributedString *attributedStringFromData = nil;
if (fileType == HTML_TYPE_ID || [extension isEqualToString:@"htm"] || [extension isEqualToString:@"html"] || [extension isEqualToString:@"shtml"]) {
- //should convert to text with markdown here
+ // convert to text with markdown here
if ([[GlobalPrefs defaultPrefs] useMarkdownImport]) {
if ([[GlobalPrefs defaultPrefs] useReadability] || [self shouldUseReadability]) {
attributedStringFromData = [[NSMutableAttributedString alloc] initWithString:[self contentUsingReadability:filename]
@@ -624,7 +624,7 @@ - (NSArray*)_importStickies:(NSString*)filename {
NSMutableAttributedString *attributedString = [[[NSMutableAttributedString alloc] initWithRTFD:[doc RTFDData] documentAttributes:NULL] autorelease];
[attributedString removeAttachments];
[attributedString santizeForeignStylesForImporting];
- NSString *syntheticTitle = [attributedString trimLeadingSyntheticTitle];
+ NSString *syntheticTitle = [attributedString getLeadingSyntheticTitle];
NoteObject *noteObject = [[[NoteObject alloc] initWithNoteBody:attributedString title:syntheticTitle uniqueFilename:nil format:SingleDatabaseFormat] autorelease];
if (noteObject) {
View
@@ -138,7 +138,7 @@
<key>CFBundleIconFile</key>
<string>Notality</string>
<key>CFBundleIdentifier</key>
- <string>net.notational.velocity</string>
+ <string>net.brettterpstra.nvalt</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
View
@@ -169,7 +169,7 @@ - (void)upgradeDatabaseIfNecessary {
NSLog(@"trying to upgrade note encodings");
[allNotes makeObjectsPerformSelector:@selector(upgradeToUTF8IfUsingSystemEncoding)];
//move aside the old database as the new format breaks compatibility
- (void)[self renameAndForgetNoteDatabaseFile:@"Notes & Settings (old version from 2.0b)"];
+ (void)[self renameAndForgetNoteDatabaseFile:@"nvALT Notes & Settings (old version from 2.0b)"];
}
if (epochIteration < 3) {
[allNotes makeObjectsPerformSelector:@selector(writeFileDatesAndUpdateTrackingInfo)];
View
@@ -25,7 +25,7 @@
#include <sys/param.h>
#include <sys/mount.h>
-NSString *NotesDatabaseFileName = @"Notes & Settings";
+NSString *NotesDatabaseFileName = @"nvALT Notes & Settings";
@implementation NotationController (NotationFileManager)
View
@@ -218,12 +218,13 @@ -(void)preview:(id)object
NSString *rawString = [app noteContent];
SEL mode = [self markupProcessorSelector:[app currentPreviewMode]];
NSString *processedString = [NSString performSelector:mode withObject:rawString];
+ NSString *previewString = processedString;
NSMutableString *outputString = [NSMutableString stringWithString:(NSString *)htmlString];
NSString *noteTitle = ([app selectedNoteObject]) ? [NSString stringWithFormat:@"%@",titleOfNote([app selectedNoteObject])] : @"";
if (lastNote == [app selectedNoteObject]) {
NSString *restoreScrollPosition = [NSString stringWithFormat:@"\n<script>window.onload = function(){var div = document.getElementById('contentdiv'),oldscroll = %@;div.scrollTop = oldscroll;}</script>",lastScrollPosition];
- processedString = [processedString stringByAppendingString:restoreScrollPosition];
+ previewString = [processedString stringByAppendingString:restoreScrollPosition];
} else {
[cssString release];
[htmlString release];
@@ -234,7 +235,7 @@ -(void)preview:(id)object
NSString *nvSupportPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Application Support/Notational Velocity"];
[outputString replaceOccurrencesOfString:@"{%support%}" withString:nvSupportPath options:0 range:NSMakeRange(0, [outputString length])];
[outputString replaceOccurrencesOfString:@"{%title%}" withString:noteTitle options:0 range:NSMakeRange(0, [outputString length])];
- [outputString replaceOccurrencesOfString:@"{%content%}" withString:processedString options:0 range:NSMakeRange(0, [outputString length])];
+ [outputString replaceOccurrencesOfString:@"{%content%}" withString:previewString options:0 range:NSMakeRange(0, [outputString length])];
[outputString replaceOccurrencesOfString:@"{%style%}" withString:cssString options:0 range:NSMakeRange(0, [outputString length])];
[[preview mainFrame] loadHTMLString:outputString baseURL:nil];

0 comments on commit a0befe3

Please sign in to comment.