diff options
Diffstat (limited to 'src/FbTk/Theme.cc')
-rw-r--r-- | src/FbTk/Theme.cc | 9 |
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 | ||
53 | ThemeManager::ThemeManager(): | 53 | ThemeManager::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 | ||
60 | bool ThemeManager::registerTheme(Theme &tm) { | 62 | bool 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; |