Skip to content

Commit b415695

Browse files
author
Papoteur
committed
Add user preferences setting
1 parent 5f218a9 commit b415695

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

manatools/config.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ def userPreferences(self) :
8282
self._load()
8383
return self._userPrefs
8484

85+
def userPrefSet(self, prefs):
86+
'''
87+
Set a value for a user's preference
88+
category is the first level of parameters
89+
key is a key for the parameter
90+
value is a string
91+
'''
92+
if category in self._userPrefs.keys():
93+
self._userPrefs[category][key] = value
94+
else:
95+
self._userPrefs[category] = {key : value}
8596

8697
def saveUserPreferences(self) :
8798
'''

0 commit comments

Comments
 (0)