diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-11-11 10:03:11 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-11-11 10:03:11 +0000 |
| commit | fb0dd6cf9a839f9990ac877bf1b3d469d883b463 (patch) | |
| tree | 26e92f3701e9164e7cba3ddb2106d8bb9402b7b1 /otk/style.cc | |
| parent | 590f7f58a6d4ba9214d3bd2d42ba2c353b492d4e (diff) | |
some small cleanups
make style not take a screen separate from the image control
make style::load() take a const ref
Diffstat (limited to 'otk/style.cc')
| -rw-r--r-- | otk/style.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/otk/style.cc b/otk/style.cc index aa821300..6349a6bc 100644 --- a/otk/style.cc +++ b/otk/style.cc @@ -14,13 +14,9 @@ Style::Style() : font(NULL) { } -Style::Style(unsigned int screen) - : font(0), screen_number(screen) -{ -} - -Style::Style(unsigned int screen, BImageControl *ctrl) - : image_control(ctrl), font(0), screen_number(screen) +Style::Style(BImageControl *ctrl) + : image_control(ctrl), font(0), + screen_number(ctrl->getScreenInfo()->getScreenNumber()) { } @@ -43,7 +39,7 @@ Style::~Style() { stick_button.mask = None; } -void Style::load(Configuration &style) { +void Style::load(const Configuration &style) { std::string s; // load fonts/fontsets @@ -302,7 +298,11 @@ BFont *Style::readDatabaseFont(const std::string &rbasename, return b; delete b; } - + + if (style.getValue(rbasename + "xft.font", s)) + printf("Unable to load font \"%s\". Exiting\n", s.c_str()); + else + printf("Font not defined by style. Exiting\n"); exit(2); // can't continue without a font } |
