diff options
author | corvid <corvid@lavabit.com> | 2011-02-09 01:31:14 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2011-02-09 01:31:14 +0000 |
commit | a11a2e0366866db9409760d312eda22a5bf0a690 (patch) | |
tree | c3aaaaf329bd6725bf02a38d2af5cf04bbcf05b6 /dw/fltkplatform.cc | |
parent | 5f25bfeed977c88e2b9ee2cb5f84bb2ba46f719f (diff) |
disable symbol-interpretation in labels
There was some discussion of how to do this last month in fltk-dev
http://fltk.org/newsgroups.php?s10630+gfltk.development+v10640+T0
Diffstat (limited to 'dw/fltkplatform.cc')
-rw-r--r-- | dw/fltkplatform.cc | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/dw/fltkplatform.cc b/dw/fltkplatform.cc index b3e33bce..dba4ab3f 100644 --- a/dw/fltkplatform.cc +++ b/dw/fltkplatform.cc @@ -191,26 +191,6 @@ FltkColor * FltkColor::create (int col) FltkTooltip::FltkTooltip (const char *text) : Tooltip(text) { shown = false; - - if (!text || !strpbrk(text, "&@")) { - escaped_str = NULL; - } else { - /* - * WORKAROUND: ::fltk::Tooltip::tooltip_timeout() makes instance_ - * if necessary, and immediately uses it. This means that we can't - * get our hands on it to set RAW_LABEL until after it has been shown - * once. So let's escape the special characters ourselves. - */ - const char *src = text; - char *dest = escaped_str = (char *) malloc(strlen(text) * 2 + 1); - - while (*src) { - if (*src == '&' || *src == '@') - *dest++ = *src; - *dest++ = *src++; - } - *dest = '\0'; - } } FltkTooltip::~FltkTooltip () @@ -221,8 +201,6 @@ probably can remember the one from onEnter if (shown) Fl_Tooltip::exit(); #endif - if (escaped_str) - free(escaped_str); } FltkTooltip *FltkTooltip::create (const char *text) @@ -235,7 +213,7 @@ void FltkTooltip::onEnter() Fl_Widget *widget = Fl::belowmouse(); Fl_Tooltip::enter_area(widget, widget->x(), widget->y(), widget->w(), - widget->h(), escaped_str ? escaped_str : str); + widget->h(), str); shown = true; } |