Remove the now obsolete multiline_label_.

This commit is contained in:
Mark de Wever 2008-10-11 19:53:43 +00:00
parent 4c60ff1e4c
commit 4534d6cf8b
3 changed files with 2 additions and 22 deletions

View File

@ -23,7 +23,6 @@ namespace gui2 {
tcontrol::tcontrol(const unsigned canvas_count)
: visible_(true)
, label_()
, multiline_label_(false)
, use_tooltip_on_label_overflow_(true)
, tooltip_()
, help_message_()
@ -337,11 +336,6 @@ tpoint tcontrol::get_best_text_size(const tpoint& minimum_size, const tpoint& ma
renderer_.set_ellipse_mode(PANGO_ELLIPSIZE_NONE);
}
if(multiline_label_) {
// FIXME multiline seems to be unused
renderer_.set_maximum_height(size.y);
}
DBG_G_L << "tcontrol(" + get_control_type() + ") status:\n";
DBG_G_L << "minimum_size " << minimum_size
<< " maximum_size " << maximum_size
@ -357,9 +351,6 @@ tpoint tcontrol::get_best_text_size(const tpoint& minimum_size, const tpoint& ma
// but also we don't adjust for the extra text space yet!!!
const tpoint maximum_size(config_->max_width, config_->max_height);
renderer_.set_maximum_width(maximum_size.x ? maximum_size.x - border.x : -1);
if(multiline_label_) {
renderer_.set_maximum_height(maximum_size.y ? maximum_size.y - border.y : -1);
}
}
size = renderer_.get_size() + border;

View File

@ -167,10 +167,6 @@ public:
void set_visible(const bool visible = true)
{ if(visible_ != visible) { visible_ = visible; set_dirty();} }
bool get_multiline_label() const { return multiline_label_; }
void set_multiline_label(const bool multiline = true)
{ if(multiline != multiline_label_) { multiline_label_ = multiline; set_dirty(); } }
bool get_use_tooltip_on_label_overflow() const { return use_tooltip_on_label_overflow_; }
void set_use_tooltip_on_label_overflow(const bool use_tooltip = true)
{ use_tooltip_on_label_overflow_ = use_tooltip; }
@ -235,14 +231,6 @@ private:
/** Contain the non-editable text associated with control. */
t_string label_;
/**
* Can the label contain multiple lines.
*
* This is needed in order to get the sizing, when the control can contain
* multiple lines of text we need to find the best width/height combination.
*/
bool multiline_label_;
/**
* If the text doesn't fit on the label should the text be used as tooltip?
*

View File

@ -24,6 +24,8 @@ namespace gui2 {
*
* This is a small class which only has one state and that's active, so the
* functions implemented are mostly dummies.
*
* @todo Allow wrapping for the tooltip.
*/
class ttooltip : public tcontrol
{
@ -32,7 +34,6 @@ public:
ttooltip() :
tcontrol(1)
{
set_multiline_label();
}
/** Inherited from tcontrol. */