From daa5efe61df282fe602210b5b955a7d21206bf1e Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 19 Nov 2009 10:45:00 +0000 Subject: =?UTF-8?q?=E2=80=A2=20remember=20the=20spell=20checker=20status?= =?UTF-8?q?=20in=20the=20blob=20field=20editor=20-=20status=20can=20be=20t?= =?UTF-8?q?oggled=20by=20right-click=20in=20the=20text=20view=20and=20go?= =?UTF-8?q?=20to=20submenu=20"Spelling=20and=20Grammar"=20>=20"Check=20Spe?= =?UTF-8?q?lling=20while=20Typing"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note: up to now "Check Spelling while Typing" wont' be checked in the GUI if it's enabled → TODO (maybe related to the "sheet issue") --- Source/SPConstants.h | 1 + Source/SPConstants.m | 1 + Source/SPFieldEditorController.m | 7 ++++++- Source/TableDocument.m | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 30645a7d..221d057c 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -182,3 +182,4 @@ extern NSString *SPQueryHistory; extern NSString *SPQueryHistoryReplacesContent; extern NSString *SPQuickLookTypes; extern NSString *SPTableChangedNotification; +extern NSString *SPBlobTextEditorSpellCheckingEnabled; diff --git a/Source/SPConstants.m b/Source/SPConstants.m index 4c01f1d4..06e32b6d 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -126,3 +126,4 @@ NSString *SPQueryHistory = @"queryHistory"; NSString *SPQueryHistoryReplacesContent = @"QueryHistoryReplacesContent"; NSString *SPQuickLookTypes = @"QuickLookTypes"; NSString *SPTableChangedNotification = @"SPTableSelectionChanged"; +NSString *SPBlobTextEditorSpellCheckingEnabled = @"BlobTextEditorSpellCheckingEnabled"; diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m index 43bab67c..4df767f4 100644 --- a/Source/SPFieldEditorController.m +++ b/Source/SPFieldEditorController.m @@ -138,7 +138,9 @@ else { [editTextView setFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:@"FieldEditorSheetFont"]]]; } - + + [editTextView setContinuousSpellCheckingEnabled:[prefs boolForKey:SPBlobTextEditorSpellCheckingEnabled]]; + [hexTextView setFont:[NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]]]; [editSheetFieldName setStringValue:[NSString stringWithFormat:@"%@: %@", NSLocalizedString(@"Field", @"Field"), fieldName]]; @@ -319,6 +321,9 @@ // For safety reasons inform QuickLook to quit quickLookCloseMarker = 1; + // Remember spell cheecker status + [prefs setBool:[editTextView isContinuousSpellCheckingEnabled] forKey:SPBlobTextEditorSpellCheckingEnabled]; + return ( editSheetReturnCode && isEditable ) ? [sheetEditData retain] : nil; } diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 78df5e16..4e0f68fc 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -70,6 +70,7 @@ - (id)init { + if ((self = [super init])) { _mainNibLoaded = NO; -- cgit v1.2.3