aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Theme.cc
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/Theme.cc
parent0132b31f4e1036902f4c880d30ce573dddd3f1b9 (diff)
downloadfluxbox_pavel-b766418c4f4867b802eb34967433d0738449522c.zip
fluxbox_pavel-b766418c4f4867b802eb34967433d0738449522c.tar.bz2
init m_max_screens later
Diffstat (limited to 'src/FbTk/Theme.cc')
-rw-r--r--src/FbTk/Theme.cc9
1 files changed, 7 insertions, 2 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;