Permalink
Browse files

Fix for Find… bug [issue 174]

  • Loading branch information...
1 parent 5906b47 commit 2c81548cf33a42338e30f4f6b2b637733c94d770 David committed Jul 3, 2013
Showing with 24 additions and 41 deletions.
  1. +24 −40 AppController.m
  2. +0 −1 NotesTableHeaderCell.m
View
@@ -1384,8 +1384,6 @@ - (void)cacheTypedStringIfNecessary:(NSString*)aString {
- (void)controlTextDidChange:(NSNotification *)aNotification {
if ([aNotification object] == field) {
- // [self resetModTimers];
- // [[NSNotificationCenter defaultCenter] postNotificationName:@"ModTimersShouldReset" object:nil];
typedStringIsCached = NO;
isFilteringFromTyping = YES;
@@ -1395,6 +1393,7 @@ - (void)controlTextDidChange:(NSNotification *)aNotification {
BOOL didFilter = [notationController filterNotesFromString:fieldString];
if ([fieldString length] > 0) {
+// [[NSNotificationCenter defaultCenter] postNotificationName:@"TextFindContextShouldReset" object:self];
[field setSnapbackString:nil];
@@ -1654,6 +1653,7 @@ - (void)setEmptyViewState:(BOOL)state {
[editorStatusView setHidden:!state];
if (state) {
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"TextFinderShouldHide" object:self];
[editorStatusView setLabelStatus:[notesTableView numberOfSelectedRows]];
if ([notesSubview isCollapsed]) {
[self toggleCollapse:self];
@@ -2305,9 +2305,8 @@ - (IBAction)toggleNVActivation:(id)sender {
}
- (void)focusControlField:(id)sender activate:(BOOL)shouldActivate{
- if (IsLionOrLater) {
- [[NSNotificationCenter defaultCenter] postNotificationName:@"TextFinderShouldHide" object:sender];
- }
+// [[NSNotificationCenter defaultCenter] postNotificationName:@"TextFinderShouldHide" object:sender];
+
if ([notesSubview isCollapsed]) {
[self toggleCollapse:self];
}else if (![self dualFieldIsVisible]){
@@ -2720,7 +2719,6 @@ - (IBAction)switchFullScreen:(id)sender
}
#endif
if(IsLeopardOrLater){
- //@try {
self.isEditing = NO;
NSResponder *currentResponder = [window firstResponder];
@@ -2793,10 +2791,6 @@ - (IBAction)switchFullScreen:(id)sender
if (![NSApp isActive]) {
[NSApp activateIgnoringOtherApps:YES];
}
- /*}
- @catch (NSException * e) {
- NSLog(@"fullscreen issues >%@<",[e name]);
- }*/
}
}
@@ -2825,11 +2819,9 @@ - (IBAction)setBWColorScheme:(id)sender{
- (IBAction)setLCColorScheme:(id)sender{
userScheme=1;
[[NSUserDefaults standardUserDefaults] setInteger:userScheme forKey:@"ColorScheme"];
- // [self setForegrndColor:[NSColor colorWithDeviceRed:0.405 green:0.405 blue:0.405 alpha:1.0]];
+
[self setForegrndColor:[NSColor colorWithCalibratedRed:0.2430 green:0.2430 blue:0.2430 alpha:1.0]];
- //[self setBackgrndColor:[NSColor colorWithDeviceWhite:0.970 alpha:1.0]];
-// [NSColor colorWithCalibratedRed:0.902 green:0.902 blue:0.902 alpha:1.0]
[self setBackgrndColor:[NSColor colorWithCalibratedRed:0.902 green:0.902 blue:0.902 alpha:1.0]];
NSMenu *mainM = [NSApp mainMenu];
NSMenu *viewM = [[mainM itemWithTitle:@"View"] submenu];
@@ -2866,35 +2858,27 @@ - (IBAction)setUserColorScheme:(id)sender{
[self updateColorScheme];
}
- - (void)updateColorScheme{
-// @try {
- if (!IsLionOrLater) {
-
- [window setBackgroundColor:backgrndColor];//[NSColor blueColor]
- [dualFieldView setBackgroundColor:backgrndColor];
- }
- [mainView setBackgroundColor:backgrndColor];
- [notesTableView setBackgroundColor:backgrndColor];
- [NotesTableHeaderCell setTxtColor:foregrndColor];
- [notationController setForegroundTextColor:foregrndColor];
-
- [textView setBackgroundColor:backgrndColor];
- [textView updateTextColors];
- [self updateFieldAttributes];
- //[editorStatusView setBackgroundColor:backgrndColor];
- // [editorStatusView setNeedsDisplay:YES];
- // [field setTextColor:foregrndColor];
- if (currentNote) {
- [self contentsUpdatedForNote:currentNote];
- }
- [dividerShader updateColors:backgrndColor];
- [splitView setNeedsDisplay:YES];
-// }
-// @catch (NSException * e) {
-// NSLog(@"setting SCheme EXception : %@",[e name]);
-// }
+- (void)updateColorScheme{
+ if (!IsLionOrLater) {
+
+ [window setBackgroundColor:backgrndColor];//[NSColor blueColor]
+ [dualFieldView setBackgroundColor:backgrndColor];
}
+ [mainView setBackgroundColor:backgrndColor];
+ [notesTableView setBackgroundColor:backgrndColor];
+ [NotesTableHeaderCell setTxtColor:foregrndColor];
+ [notationController setForegroundTextColor:foregrndColor];
+ [textView setBackgroundColor:backgrndColor];
+ [textView updateTextColors];
+ [self updateFieldAttributes];
+ if (currentNote) {
+ [self contentsUpdatedForNote:currentNote];
+ }
+ [dividerShader updateColors:backgrndColor];
+ [splitView setNeedsDisplay:YES];
+}
+
- (void)updateFieldAttributes{
if (!foregrndColor) {
foregrndColor = [self foregrndColor];
@@ -131,7 +131,6 @@ + (void)setTxtColor:(NSColor *)inColor{
tColor = [[inColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace] retain];
}
-
+ (void)releaseColors{
if (bColor) {
[bColor release];

0 comments on commit 2c81548

Please sign in to comment.