aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Theme.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Theme.cc')
-rw-r--r--src/FbTk/Theme.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/FbTk/Theme.cc b/src/FbTk/Theme.cc
index cd478fc..c92e563 100644
--- a/src/FbTk/Theme.cc
+++ b/src/FbTk/Theme.cc
@@ -27,6 +27,7 @@
27#include "FileUtil.hh" 27#include "FileUtil.hh"
28#include "I18n.hh" 28#include "I18n.hh"
29#include "Image.hh" 29#include "Image.hh"
30#include "STLUtil.hh"
30 31
31#ifdef HAVE_CSTDIO 32#ifdef HAVE_CSTDIO
32 #include <cstdio> 33 #include <cstdio>
@@ -50,13 +51,11 @@ struct LoadThemeHelper {
50 } 51 }
51 void operator ()(ThemeManager::ThemeList &tmlist) { 52 void operator ()(ThemeManager::ThemeList &tmlist) {
52 53
53 for_each(tmlist.begin(), tmlist.end(), 54 STLUtil::forAll(tmlist, *this);
54 *this);
55 // send reconfiguration signal to theme and listeners 55 // send reconfiguration signal to theme and listeners
56 ThemeManager::ThemeList::iterator it = tmlist.begin(); 56 ThemeManager::ThemeList::iterator it = tmlist.begin();
57 ThemeManager::ThemeList::iterator it_end = tmlist.end(); 57 ThemeManager::ThemeList::iterator it_end = tmlist.end();
58 for (; it != it_end; ++it) { 58 for (; it != it_end; ++it) {
59 (*it)->reconfigTheme();
60 (*it)->reconfigSig().notify(); 59 (*it)->reconfigSig().notify();
61 } 60 }
62 } 61 }
@@ -174,9 +173,7 @@ bool ThemeManager::load(const string &filename,
174 // get list and go throu all the resources and load them 173 // get list and go throu all the resources and load them
175 // and then reconfigure them 174 // and then reconfigure them
176 if (screen_num < 0 || screen_num > m_max_screens) { 175 if (screen_num < 0 || screen_num > m_max_screens) {
177 for_each(m_themes.begin(), 176 STLUtil::forAll(m_themes, load_theme_helper);
178 m_themes.end(),
179 load_theme_helper);
180 } else { 177 } else {
181 load_theme_helper(m_themes[screen_num]); 178 load_theme_helper(m_themes[screen_num]);
182 } 179 }