diff options
-rw-r--r-- | config.c | 9 | ||||
-rw-r--r-- | config.h | 11 | ||||
-rw-r--r-- | nopacity.c | 5 | ||||
-rw-r--r-- | setup.c | 4 |
4 files changed, 18 insertions, 11 deletions
@@ -23,6 +23,15 @@ cNopacityConfig::cNopacityConfig() { cNopacityConfig::~cNopacityConfig() { } +void cNopacityConfig::Init(void) { + LoadDefaults(); + LoadThemeSpecificConfigs(); + SetThemeSpecificDefaults(); + SetThemeSetup(); + SetPathes(); + SetFontName(); +} + int cNopacityConfig::GetValue(std::string name) { std::map<std::string, int>::iterator hit = conf.find(name); if (hit != conf.end()) { @@ -24,6 +24,11 @@ class cNopacityConfig { void LoadThemeConfig(cString confFile, cString theme); std::pair<std::string, int> ReadThemeConfigLine(const char *line); cString checkSlashAtEnd(std::string path); + void LoadDefaults(void); + void LoadThemeSpecificConfigs(void); + void SetThemeSpecificDefaults(void); + void SetThemeSetup(void); + void SetPathes(void); public: cNopacityConfig(); ~cNopacityConfig(); @@ -42,11 +47,7 @@ class cNopacityConfig { cString logoPathDefault; cString iconPathDefault; cString epgImagePathDefault; - void LoadDefaults(void); - void LoadThemeSpecificConfigs(void); - void SetThemeSpecificDefaults(void); - void SetThemeSetup(void); - void SetPathes(void); + void Init(void); void DumpConfig(void); void DumpThemeConfig(void); void SetFontName(); @@ -66,10 +66,7 @@ cSkinDisplayMessage *cNopacity::DisplayMessage(void) { void cNopacity::ReloadCaches(void) { if (geoManager->SetOSDSize() || imgCache->ThemeChanged()) { int start = cTimeMs::Now(); - config.LoadDefaults(); - config.SetThemeSpecificDefaults(); - config.SetThemeSetup(); - config.SetFontName(); + config.Init(); geoManager->SetGeometry(); delete fontManager; fontManager = new cFontManager(); @@ -7,9 +7,9 @@ cNopacitySetup::cNopacitySetup(void) { Setup(); } -cNopacitySetup::~cNopacitySetup() { - config.SetFontName(); +cNopacitySetup::~cNopacitySetup(void) { int start = cTimeMs::Now(); + config.SetFontName(); geoManager->SetGeometry(); delete fontManager; fontManager = new cFontManager(); |