implement api.resetUI, fixes #176
This commit is contained in:
parent
1d585811d3
commit
2c57b043cd
1 changed files with 11 additions and 0 deletions
|
@ -69,6 +69,17 @@ def setPreferences(data):
|
|||
return settings.preferences
|
||||
actions.register(setPreferences)
|
||||
|
||||
def resetUI(data):
|
||||
'''
|
||||
takes {
|
||||
}
|
||||
'''
|
||||
ui_json = os.path.join(settings.config_path, 'ui.json')
|
||||
if os.path.exists(ui_json):
|
||||
os.unlink(ui_json)
|
||||
settings.ui = settings.pdict(ui_json, settings.config['user']['ui'])
|
||||
return settings.ui
|
||||
actions.register(resetUI)
|
||||
|
||||
def setUI(data):
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue