diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/widget.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/widget.cc b/src/ui/widget.cc index ef5d472..15fa10f 100644 --- a/src/ui/widget.cc +++ b/src/ui/widget.cc @@ -171,13 +171,18 @@ void Widget::set_background(bool background) void Widget::set_label(std::string const & label) { - set_label(label.c_str()); + widget_label.assign(label); + aux::to_label(widget_label); } void Widget::set_label(char const *label) { - widget_label.assign(label); - aux::to_label(widget_label); + if (label) { + widget_label.assign(label); + aux::to_label(widget_label); + } else { + widget_label.clear(); + } } void Widget::set_palette(const Palette *palette) |