Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more on moving cache folder to ~/Library/Caches

when the user changes the folder where notes are stored there was a
conflict because nvALT expected the new folder location to note have an
Interim changes file. Since we always store it in one place now we need
to delete that file when this preference changes
  • Loading branch information...
commit 1c2d6dc51b16e61c048f047731a3dcaff816e3bd 1 parent 93891b7
@elasticthreads elasticthreads authored
Showing with 8 additions and 28 deletions.
  1. +6 −0 AppController.m
  2. +2 −28 ETTransparentScroller.m
View
6 AppController.m
@@ -50,6 +50,7 @@
#import "ETClipView.h"
#import "ETScrollView.h"
#import "NSFileManager+DirectoryLocations.h"
+#import "nvaDevConfig.h"
#define NSApplicationPresentationAutoHideMenuBar (1 << 2)
#define NSApplicationPresentationHideMenuBar (1 << 3)
@@ -981,6 +982,11 @@ - (void)settingChangedForSelectorString:(NSString*)selectorString {
NotationController *newNotation = nil;
NSData *newData = [prefsController aliasDataForDefaultDirectory];
if (newData) {
+#if kUseCachesFolderForInterimNoteChanges
+ if (notationController&&[notationController flushAllNoteChanges]) {
+ [notationController closeJournal];
+ }
+#endif
if ((newNotation = [[NotationController alloc] initWithAliasData:newData error:&err])) {
[self setNotationController:newNotation];
[newNotation release];
View
30 ETTransparentScroller.m
@@ -63,13 +63,7 @@ - (void)dealloc{
+ (CGFloat)scrollerWidthForControlSize:(NSControlSize)controlSize scrollerStyle:(NSScrollerStyle)scrollerStyle{
return 15.0;
}
-//
-
-
-//+ (BOOL)isCompatibleWithOverlayScrollers {
-// return self == [ETTransparentScroller class];
-//}
#else
+ (CGFloat)scrollerWidth
{
@@ -92,14 +86,7 @@ - (void)drawRect:(NSRect)aRect;
[super drawRect:aRect];
}else{
if (([self bounds].size.height - verticalPaddingTop - verticalPaddingBottom + 1) > minKnobHeight){
-// if (fillBackground) {
-// [[[[self window] contentView] backgroundColor] setFill];
-// NSRectFill([self bounds]);
-// }
-// else if (isOverlay){
-// [[NSColor clearColor] setFill];
-// NSRectFill([self bounds]);
-// }
+
if (fillBackground) {
[[[[self window] contentView] backgroundColor] setFill];
NSRectFill([self bounds]);
@@ -112,20 +99,7 @@ - (void)drawRect:(NSRect)aRect;
}
}
-- (void)drawKnobSlotInRect:(NSRect)slotRect highlight:(BOOL)flag{
-// if (isOverlay) {
-// NSRect knobRect=[self rectForPart:NSScrollerKnobSlot];
-// NSBezierPath *aPath=[NSBezierPath bezierPathWithRoundedRect:knobRect xRadius:4.0 yRadius:4.0];
-// [[NSColor colorWithCalibratedWhite:0.7 alpha:0.4] setFill];
-// [aPath fill];
-// [aPath setLineWidth:0.3];
-// [[NSColor colorWithCalibratedWhite:0.2 alpha:0.7] setStroke];
-// [aPath stroke];
-// [super drawKnobSlotInRect:slotRect highlight:flag];
-// }else{
-// NSDrawThreePartImage(slotRect, slotTop, slotVerticalFill, slotBottom, YES, NSCompositeSourceOver, slotAlpha, NO);
-// }
-
+- (void)drawKnobSlotInRect:(NSRect)slotRect highlight:(BOOL)flag{
NSDrawThreePartImage(slotRect, slotTop, slotVerticalFill, slotBottom, YES, NSCompositeSourceOver, slotAlpha, NO);
Please sign in to comment.
Something went wrong with that request. Please try again.