X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fstyle.cc;h=6349a6bcf4a23694222f3663e0794b14b37765b6;hb=ed4696f6910047ae596a874ef3f1f85b5390aadb;hp=d98c926b5a21e8d23070382c62a44085f49fafaa;hpb=196996230c7a3ac409c317a8a3be3970917bdd9a;p=chaz%2Fopenbox diff --git a/otk/style.cc b/otk/style.cc index d98c926b..6349a6bc 100644 --- a/otk/style.cc +++ b/otk/style.cc @@ -14,13 +14,9 @@ Style::Style() : font(NULL) { } -Style::Style(unsigned int screen) - : font(NULL), screen_number(screen) -{ -} - -Style::Style(unsigned int screen, BImageControl *ctrl) - : image_control(ctrl), font(NULL), 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 }