diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-08-11 13:59:58 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-08-11 13:59:58 +0000 |
commit | 07082135254e88cbfd421aa41f12522582b10d89 (patch) | |
tree | 646e38024c453a0146ef59b33bae339f90c4749d /Source/SPEditSheetTextView.m | |
parent | 32df64e8f588f6a16f2ad9c821c6db149c3bdb03 (diff) | |
download | sequelpro-07082135254e88cbfd421aa41f12522582b10d89.tar.gz sequelpro-07082135254e88cbfd421aa41f12522582b10d89.tar.bz2 sequelpro-07082135254e88cbfd421aa41f12522582b10d89.zip |
• in Table Content the button status of "edit spreadsheet or sheet-like" will be saved in the Prefs
• font settings in the Field Editor Sheet will be saved in the Prefs
• improved max text length checking while using other InputManager (eg Japanese etc.) - still a bit under construction
Note: each Beep() wil be replaced by a tooltip soon.
Diffstat (limited to 'Source/SPEditSheetTextView.m')
-rw-r--r-- | Source/SPEditSheetTextView.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/SPEditSheetTextView.m b/Source/SPEditSheetTextView.m index 7f7e0d6c..83b691c9 100644 --- a/Source/SPEditSheetTextView.m +++ b/Source/SPEditSheetTextView.m @@ -24,6 +24,7 @@ #import "SPEditSheetTextView.h" #import "SPTextViewAdditions.h" +#import "SPFieldEditorController.h" @implementation SPEditSheetTextView @@ -51,11 +52,13 @@ if([charactersIgnMod isEqualToString:@"+"]) // increase text size by 1; ⌘+ and numpad + { [self makeTextSizeLarger]; + [self saveChangedFontInUserDefaults]; return; } if([charactersIgnMod isEqualToString:@"-"]) // decrease text size by 1; ⌘- and numpad - { [self makeTextSizeSmaller]; + [self saveChangedFontInUserDefaults]; return; } } @@ -246,5 +249,19 @@ NSLog(@"%@ ‘%@’.", NSLocalizedString(@"Couldn't read the file content of", @"Couldn't read the file content of"), aPath); } +// Store the font in the prefs for selected delegates only +- (void)saveChangedFontInUserDefaults +{ + if([[[[self delegate] class] description] isEqualToString:@"SPFieldEditorController"]) + [[NSUserDefaults standardUserDefaults] setObject:[NSArchiver archivedDataWithRootObject:[self font]] forKey:@"FieldEditorSheetFont"]; +} + +// Action receiver for a font change in the font panel +- (void)changeFont:(id)sender +{ + NSFont *nf = [[NSFontPanel sharedFontPanel] panelConvertFont:[self font]]; + [self setFont:nf]; + [self saveChangedFontInUserDefaults]; +} @end |