From fb0dd6cf9a839f9990ac877bf1b3d469d883b463 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 11 Nov 2002 10:03:11 +0000 Subject: some small cleanups make style not take a screen separate from the image control make style::load() take a const ref --- otk/style.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'otk/style.cc') 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 } -- cgit v1.2.3