init m_max_screens later
This commit is contained in:
parent
0132b31f4e
commit
b766418c4f
2 changed files with 9 additions and 4 deletions
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Theme.cc,v 1.23 2003/12/29 11:04:09 fluxgen Exp $
|
||||
// $Id: Theme.cc,v 1.24 2004/01/02 22:55:35 fluxgen Exp $
|
||||
|
||||
#include "Theme.hh"
|
||||
|
||||
|
@ -51,13 +51,18 @@ ThemeManager &ThemeManager::instance() {
|
|||
}
|
||||
|
||||
ThemeManager::ThemeManager():
|
||||
m_max_screens(ScreenCount(FbTk::App::instance()->display())),
|
||||
// max_screens: we initialize this later so we can set m_verbose
|
||||
// without having a display connection
|
||||
m_max_screens(-1),
|
||||
m_verbose(false),
|
||||
m_themelocation("") {
|
||||
|
||||
}
|
||||
|
||||
bool ThemeManager::registerTheme(Theme &tm) {
|
||||
if (m_max_screens < 0)
|
||||
m_max_screens = ScreenCount(FbTk::App::instance()->display());
|
||||
|
||||
// valid screen num?
|
||||
if (m_max_screens < tm.screenNum() || tm.screenNum() < 0)
|
||||
return false;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Theme.hh,v 1.14 2003/12/29 11:04:09 fluxgen Exp $
|
||||
// $Id: Theme.hh,v 1.15 2004/01/02 22:55:15 fluxgen Exp $
|
||||
|
||||
/**
|
||||
@file holds ThemeItem<T>, Theme and ThemeManager which is the base for any theme
|
||||
|
@ -147,7 +147,7 @@ private:
|
|||
/// map each theme manager to a screen
|
||||
typedef std::list<FbTk::Theme *> ThemeList;
|
||||
ThemeList m_themelist;
|
||||
const int m_max_screens;
|
||||
int m_max_screens;
|
||||
XrmDatabaseHelper m_database;
|
||||
bool m_verbose;
|
||||
|
||||
|
|
Loading…
Reference in a new issue