aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-01-02 22:55:35 (GMT)
committerfluxgen <fluxgen>2004-01-02 22:55:35 (GMT)
commitb766418c4f4867b802eb34967433d0738449522c (patch)
treebb71779279c505c8f35dcd5aa90e1f54de3e3a7e /src/FbTk
parent0132b31f4e1036902f4c880d30ce573dddd3f1b9 (diff)
downloadfluxbox-b766418c4f4867b802eb34967433d0738449522c.zip
fluxbox-b766418c4f4867b802eb34967433d0738449522c.tar.bz2
init m_max_screens later
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Theme.cc9
-rw-r--r--src/FbTk/Theme.hh4
2 files changed, 9 insertions, 4 deletions
diff --git a/src/FbTk/Theme.cc b/src/FbTk/Theme.cc
index ddc68ec..5e9bc03 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.23 2003/12/29 11:04:09 fluxgen Exp $ 22// $Id: Theme.cc,v 1.24 2004/01/02 22:55:35 fluxgen Exp $
23 23
24#include "Theme.hh" 24#include "Theme.hh"
25 25
@@ -51,13 +51,18 @@ ThemeManager &ThemeManager::instance() {
51} 51}
52 52
53ThemeManager::ThemeManager(): 53ThemeManager::ThemeManager():
54 m_max_screens(ScreenCount(FbTk::App::instance()->display())), 54 // max_screens: we initialize this later so we can set m_verbose
55 // without having a display connection
56 m_max_screens(-1),
55 m_verbose(false), 57 m_verbose(false),
56 m_themelocation("") { 58 m_themelocation("") {
57 59
58} 60}
59 61
60bool ThemeManager::registerTheme(Theme &tm) { 62bool ThemeManager::registerTheme(Theme &tm) {
63 if (m_max_screens < 0)
64 m_max_screens = ScreenCount(FbTk::App::instance()->display());
65
61 // valid screen num? 66 // valid screen num?
62 if (m_max_screens < tm.screenNum() || tm.screenNum() < 0) 67 if (m_max_screens < tm.screenNum() || tm.screenNum() < 0)
63 return false; 68 return false;
diff --git a/src/FbTk/Theme.hh b/src/FbTk/Theme.hh
index c9262f5..105d860 100644
--- a/src/FbTk/Theme.hh
+++ b/src/FbTk/Theme.hh
@@ -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.hh,v 1.14 2003/12/29 11:04:09 fluxgen Exp $ 22// $Id: Theme.hh,v 1.15 2004/01/02 22:55:15 fluxgen Exp $
23 23
24/** 24/**
25 @file holds ThemeItem<T>, Theme and ThemeManager which is the base for any theme 25 @file holds ThemeItem<T>, Theme and ThemeManager which is the base for any theme
@@ -147,7 +147,7 @@ private:
147 /// map each theme manager to a screen 147 /// map each theme manager to a screen
148 typedef std::list<FbTk::Theme *> ThemeList; 148 typedef std::list<FbTk::Theme *> ThemeList;
149 ThemeList m_themelist; 149 ThemeList m_themelist;
150 const int m_max_screens; 150 int m_max_screens;
151 XrmDatabaseHelper m_database; 151 XrmDatabaseHelper m_database;
152 bool m_verbose; 152 bool m_verbose;
153 153