X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Flabelwidget.cc;h=d76bd3f13f522046659adac6ef7e4855625ee2af;hb=00bc993775b916de76772bdc5e31618076194797;hp=9ff45298a834f59a5bcc4f17c91169f217e33b5f;hpb=77ab46d1e35d48e73c201e6de88b26f48bb06425;p=chaz%2Fopenbox diff --git a/src/labelwidget.cc b/src/labelwidget.cc index 9ff45298..d76bd3f1 100644 --- a/src/labelwidget.cc +++ b/src/labelwidget.cc @@ -1,5 +1,4 @@ // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- -// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- #ifdef HAVE_CONFIG_H # include "../config.h" @@ -15,8 +14,8 @@ LabelWidget::LabelWidget(otk::Widget *parent, WidgetBase::WidgetType type) : otk::Widget(parent), WidgetBase(type) { - const otk::ScreenInfo *info = otk::Display::screenInfo(_screen); - _xftdraw = XftDrawCreate(otk::Display::display, _window, info->visual(), + const otk::ScreenInfo *info = otk::display->screenInfo(_screen); + _xftdraw = XftDrawCreate(**otk::display, _window, info->visual(), info->colormap()); } @@ -27,7 +26,7 @@ LabelWidget::~LabelWidget() } -void LabelWidget::setText(const std::string &text) +void LabelWidget::setText(const otk::ustring &text) { _text = text; _dirty = true; @@ -78,7 +77,7 @@ void LabelWidget::update() otk::Widget::update(); if (draw) { - std::string t = _text; + otk::ustring t = _text; int x = _sidemargin; // x coord for the text // find a string that will fit inside the area for text