From 9c7e1c5291215c1093eb8a90a95d0535cbfc23b8 Mon Sep 17 00:00:00 2001 From: Offray Date: Thu, 30 May 2024 11:09:12 -0500 Subject: [PATCH] Improving configuration dictionaries. --- repository/TiddlyWiki/TiddlyWiki.class.st | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/repository/TiddlyWiki/TiddlyWiki.class.st b/repository/TiddlyWiki/TiddlyWiki.class.st index b950f48..c6b56d7 100644 --- a/repository/TiddlyWiki/TiddlyWiki.class.st +++ b/repository/TiddlyWiki/TiddlyWiki.class.st @@ -100,7 +100,7 @@ TiddlyWiki >> addToConfigFile [ | cleaned newConfig | cleaned := self copy. cleaned tiddlers: nil. - newConfig := self configDictonary + newConfig := self configDictionary at: cleaned name put: cleaned; yourself. ^ MarkupFile exportAsFileOn: self configFile containing:(STON toStringPretty: newConfig) @@ -164,7 +164,7 @@ TiddlyWiki >> commonTiddlers [ ] { #category : #accessing } -TiddlyWiki >> configDictonary [ +TiddlyWiki >> configDictionary [ ^ STONJSON fromString: self configFile contents. ] @@ -562,7 +562,7 @@ TiddlyWiki >> largeTiddlersFolderName [ { #category : #accessing } TiddlyWiki >> loadFromConfig: wikiname [ - ^ (self configDictonary at: wikiname) importJSONFile. + ^ (self configDictionary at: wikiname) importJSONFile. ] @@ -613,12 +613,17 @@ TiddlyWiki >> networkView [ { #category : #accessing } TiddlyWiki >> networkViewBackground [ - ^ self configDictonary at: 'networkView' at: 'background' ifAbsentPut: [Color lightGray] + ^ self configDictionary at: 'networkView' at: 'background' ifAbsentPut: [Color lightGray] +] + +{ #category : #accessing } +TiddlyWiki >> networkViewBackground: aColor [ + self configDictionary at: 'networkView' at: 'background' put: aColor ] { #category : #accessing } TiddlyWiki >> networkViewForeground [ - ^ self configDictonary at: 'networkView' at: 'background' ifAbsentPut: [Color blue] + ^ self configDictionary at: 'networkView' at: 'foreground' ifAbsentPut: [Color blue] ] { #category : #accessing }