Skip to content

Commit 1a8c66c

Browse files
Lil fixes
Mostly little fixes. A lot of weird stuff in the project folder. /build/... and localization weirdnesses. but also some bug fixes with Find... and the Scrollviews
1 parent d7e0a5a commit 1a8c66c

File tree

573 files changed

+4378
-655799
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

573 files changed

+4378
-655799
lines changed

AppController.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
//@class AugmentedScrollView;
3737
@class ETContentView;
3838
@class ETScrollView;
39+
@class ETNoteScrollView;
3940

4041
#ifndef MarkdownPreview
4142
#define MarkdownPreview 13371
@@ -79,7 +80,7 @@
7980
RBSplitSubview *notesSubview;
8081
RBSplitView *splitView;
8182
IBOutlet ETScrollView *notesScrollView;
82-
IBOutlet ETScrollView *textScrollView;
83+
IBOutlet ETNoteScrollView *textScrollView;
8384
IBOutlet NotesTableView *notesTableView;
8485
IBOutlet LinkingEditor *textView;
8586
IBOutlet EmptyView *editorStatusView;

AppController.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
or promote products derived from this software without specific prior written permission. */
1111
//ET NV4
1212

13-
#import "NSTextFinder.h"
13+
//#import "NSTextFinder.h"
1414
#import "AppController.h"
1515
#import "NoteObject.h"
1616
#import "GlobalPrefs.h"
@@ -34,7 +34,6 @@
3434
#import "DualField.h"
3535
#import "TitlebarButton.h"
3636
#import "RBSplitView/RBSplitView.h"
37-
//#import "AugmentedScrollView.h"
3837
#import "BookmarksController.h"
3938
#import "SyncSessionController.h"
4039
#import "MultiplePageView.h"
@@ -48,7 +47,7 @@
4847
#import "ETContentView.h"
4948
#import "PreviewController.h"
5049
#import "ETClipView.h"
51-
#import "ETScrollView.h"
50+
//#import "ETScrollView.h"
5251
#import "NSFileManager+DirectoryLocations.h"
5352
#import "nvaDevConfig.h"
5453
#import <Sparkle/SUUpdater.h>

AugmentedScrollView.h

Lines changed: 0 additions & 16 deletions
This file was deleted.

AugmentedScrollView.m

Lines changed: 0 additions & 18 deletions
This file was deleted.

ETNoteScrollView.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// ETNoteScrollView.h
3+
// Notation
4+
//
5+
// Created by David Halter on 10/3/16.
6+
// Copyright © 2016 David Halter. All rights reserved.
7+
//
8+
9+
#import "ETScrollView.h"
10+
11+
@interface ETNoteScrollView : ETScrollView
12+
13+
14+
15+
@end

ETNoteScrollView.m

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//
2+
// ETNoteScrollView.m
3+
// Notation
4+
//
5+
// Created by David Halter on 10/3/16.
6+
// Copyright © 2016 David Halter. All rights reserved.
7+
//
8+
9+
#import "ETNoteScrollView.h"
10+
#import "LinkingEditor.h"
11+
12+
@implementation ETNoteScrollView
13+
14+
//- (void)awakeFromNib{
15+
//}
16+
17+
18+
- (NSView *)hitTest:(NSPoint)aPoint{
19+
NSRect vsRect=[[self verticalScroller] frame];
20+
vsRect.origin.x-=4.0;
21+
vsRect.size.width+=4.0;
22+
23+
if (NSPointInRect (aPoint,vsRect)) {
24+
return [self verticalScroller];
25+
}else if (IsLionOrLater){
26+
NSView *tView=[super hitTest:aPoint];
27+
BOOL tViewIsDoc=(tView==self.documentView);
28+
if (tViewIsDoc||[tView isKindOfClass:self.class]||[tView isKindOfClass:NSClassFromString(@"ETClipView")]){
29+
[self.documentView setMouseInside:YES];
30+
return self.documentView;
31+
}
32+
return tView;
33+
}
34+
35+
return [super hitTest:aPoint];
36+
}
37+
38+
39+
@end

ETScrollView.m

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#import "ETScrollView.h"
99
#import "ETOverlayScroller.h"
1010
#import "GlobalPrefs.h"
11-
#import "LinkingEditor.h"
1211

1312
@implementation ETScrollView
1413

@@ -17,39 +16,13 @@ + (BOOL)isCompatibleWithResponsiveScrolling{
1716
return NO;
1817
}
1918

20-
- (NSView *)hitTest:(NSPoint)aPoint{
21-
if([[[self documentView]className] isEqualToString:@"LinkingEditor"]){
22-
NSRect vsRect=[[self verticalScroller] frame];
23-
vsRect.origin.x-=4.0;
24-
vsRect.size.width+=4.0;
25-
26-
if (NSPointInRect (aPoint,vsRect)) {
27-
return [self verticalScroller];
28-
}else if (IsLionOrLater){
29-
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
30-
if([[self subviews]containsObject:[self findBarView]]) {
31-
NSView *tView=[super hitTest:aPoint];
32-
if ((tView==[self findBarView])||([tView superview]==[self findBarView])||([[tView className]isEqualToString:@"NSFindPatternFieldEditor"])) {
33-
[[self window]invalidateCursorRectsForView:tView];
34-
[[self documentView]setMouseInside:NO];
35-
return tView;
36-
}
37-
}
38-
#endif
39-
}
40-
[[self documentView]setMouseInside:YES];
41-
return [self documentView];
42-
}
43-
return [super hitTest:aPoint];
44-
}
4519

46-
47-
- (void)awakeFromNib{
20+
- (void)awakeFromNib{
4821
needsOverlayTiling=NO;
49-
if([[[self documentView]className] isEqualToString:@"NotesTableView"]){
22+
if ([self.documentView isKindOfClass:[NSTableView class]]) {
5023
scrollerClass=NSClassFromString(@"ETOverlayScroller");
24+
[self setAutohidesScrollers:YES];
5125
if (!IsLionOrLater) {
52-
[self setAutohidesScrollers:YES];
5326
needsOverlayTiling=YES;
5427
}
5528
}else{
@@ -62,12 +35,12 @@ - (void)awakeFromNib{
6235
[self setVerticalScrollElasticity:NSScrollElasticityAllowed];
6336
}
6437
#endif
65-
[self changeUseETScrollbarsOnLion];
38+
[self changeUseETScrollbarsOnLion];
6639
}
6740

6841

6942
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
70-
- (void)settingChangedForSelectorString:(NSString*)selectorString{
43+
- (void)settingChangedForSelectorString:(NSString*)selectorString{
7144
if (IsLionOrLater&&([selectorString isEqualToString:SEL_STR(setUseETScrollbarsOnLion:sender:)])){
7245
[self changeUseETScrollbarsOnLion];
7346
}
@@ -76,8 +49,8 @@ - (void)settingChangedForSelectorString:(NSString*)selectorString{
7649
- (void)changeUseETScrollbarsOnLion{
7750
id theScroller;
7851
if (!IsLionOrLater||[[GlobalPrefs defaultPrefs]useETScrollbarsOnLion]) {
79-
theScroller=[[scrollerClass alloc]init];
80-
[theScroller setFillBackground:!IsLionOrLater&&(scrollerClass==NSClassFromString(@"ETTransparentScroller"))];
52+
theScroller=[[scrollerClass alloc]init];
53+
[theScroller setFillBackground:!IsLionOrLater&&(scrollerClass==[ETTransparentScroller class])];
8154
}else{
8255
theScroller=[[NSScroller alloc]init];
8356
}
@@ -86,22 +59,22 @@ - (void)changeUseETScrollbarsOnLion{
8659
style=[[theScroller class] preferredScrollerStyle];
8760
}
8861
[self setVerticalScroller:theScroller];
89-
[theScroller release];
90-
62+
9163
if (IsLionOrLater) {
9264
[theScroller setScrollerStyle:style];
9365
[self setScrollerStyle:style];
9466
}
67+
[theScroller release];
9568
[self tile];
9669
[self reflectScrolledClipView:[self contentView]];
97-
// if (IsLionOrLater) {
98-
// [self flashScrollers];
99-
// }
70+
// if (IsLionOrLater) {
71+
// [self flashScrollers];
72+
// }
10073
}
10174
#endif
10275

10376
- (void)tile {
104-
[super tile];
77+
[super tile];
10578
if (needsOverlayTiling) {
10679
if (![[self verticalScroller] isHidden]) {
10780
// NSRect vsRect=[[self verticalScroller] frame];
@@ -111,7 +84,7 @@ - (void)tile {
11184
[[self contentView] setFrameSize:conRect.size];
11285
// [wdContent setFrame:conRect];
11386
// [wdContent release];
114-
// [[self verticalScroller] setFrame:vsRect];
87+
// [[self verticalScroller] setFrame:vsRect];
11588
}
11689
}
11790
}

0 commit comments

Comments
 (0)