summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.c9
-rw-r--r--config.h11
-rw-r--r--nopacity.c5
-rw-r--r--setup.c4
4 files changed, 18 insertions, 11 deletions
diff --git a/config.c b/config.c
index 28aaeaa..812954d 100644
--- a/config.c
+++ b/config.c
@@ -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()) {
diff --git a/config.h b/config.h
index 1e50d44..46404fb 100644
--- a/config.h
+++ b/config.h
@@ -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();
diff --git a/nopacity.c b/nopacity.c
index cbe2841..eb0e650 100644
--- a/nopacity.c
+++ b/nopacity.c
@@ -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();
diff --git a/setup.c b/setup.c
index d87088d..a9135fb 100644
--- a/setup.c
+++ b/setup.c
@@ -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();