Test implementation of eos settings

This commit is contained in:
blitzman
2017-03-05 01:53:19 -05:00
parent ab34b31219
commit 9befaf7c91
4 changed files with 30 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ import os.path
import urllib2
import config
import eos.config
from logbook import Logger
pyfalog = Logger(__name__)
@@ -436,4 +437,23 @@ class ContextMenuSettings(object):
def set(self, type, value):
self.ContextMenuDefaultSettings[type] = value
class EOSSettings(object):
_instance = None
@classmethod
def getInstance(cls):
if cls._instance is None:
cls._instance = EOSSettings()
return cls._instance
def __init__(self):
self.EOSSettings = SettingsProvider.getInstance().getSettings("pyfaEOSSettings", eos.config.settings)
def get(self, type):
return self.EOSSettings[type]
def set(self, type, value):
self.EOSSettings[type] = value
# @todo: migrate fit settings (from fit service) here?