summaryrefslogtreecommitdiff
path: root/src/FbTk/Theme.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Theme.cc')
-rw-r--r--src/FbTk/Theme.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/FbTk/Theme.cc b/src/FbTk/Theme.cc
index ca39620..ddc68ec 100644
--- a/src/FbTk/Theme.cc
+++ b/src/FbTk/Theme.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Theme.cc,v 1.22 2003/12/03 00:18:58 fluxgen Exp $ 22// $Id: Theme.cc,v 1.23 2003/12/29 11:04:09 fluxgen Exp $
23 23
24#include "Theme.hh" 24#include "Theme.hh"
25 25
@@ -73,7 +73,8 @@ bool ThemeManager::unregisterTheme(Theme &tm) {
73 return true; 73 return true;
74} 74}
75 75
76bool ThemeManager::load(const std::string &filename) { 76bool ThemeManager::load(const std::string &filename, int screen_num) {
77 cerr<<"Load Theme: "<<filename<<endl;
77 std::string location = FbTk::StringUtil::expandFilename(filename); 78 std::string location = FbTk::StringUtil::expandFilename(filename);
78 std::string prefix = ""; 79 std::string prefix = "";
79 80
@@ -107,11 +108,15 @@ bool ThemeManager::load(const std::string &filename) {
107 location.append("/pixmaps"); 108 location.append("/pixmaps");
108 Image::addSearchPath(location); 109 Image::addSearchPath(location);
109 110
110 //get list and go throu all the resources and load them 111 // get list and go throu all the resources and load them
111 ThemeList::iterator theme_it = m_themelist.begin(); 112 ThemeList::iterator theme_it = m_themelist.begin();
112 const ThemeList::iterator theme_it_end = m_themelist.end(); 113 const ThemeList::iterator theme_it_end = m_themelist.end();
113 for (; theme_it != theme_it_end; ++theme_it) { 114 for (; theme_it != theme_it_end; ++theme_it) {
114 loadTheme(**theme_it); 115 if (screen_num < 0)
116 loadTheme(**theme_it);
117 else if (screen_num == (*theme_it)->screenNum()) // specified screen
118 loadTheme(**theme_it);
119
115 } 120 }
116 // notify all themes that we reconfigured 121 // notify all themes that we reconfigured
117 theme_it = m_themelist.begin(); 122 theme_it = m_themelist.begin();