From a11a2e0366866db9409760d312eda22a5bf0a690 Mon Sep 17 00:00:00 2001 From: corvid Date: Wed, 9 Feb 2011 01:31:14 +0000 Subject: 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 --- src/dillo.cc | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/dillo.cc') diff --git a/src/dillo.cc b/src/dillo.cc index 440457a6..86f0a57b 100644 --- a/src/dillo.cc +++ b/src/dillo.cc @@ -24,8 +24,9 @@ #include #include -#include #include +#include +#include #include "msg.h" #include "paths.hh" @@ -167,6 +168,25 @@ static OptID getCmdOption(const CLI_options *options, int argc, char **argv, } return opt_id; } + +static void custLabelDraw(const Fl_Label* o, int X, int Y, int W, int H, + Fl_Align align) +{ + const int interpret_symbols = 0; + + fl_font(o->font, o->size); + fl_color((Fl_Color)o->color); + fl_draw(o->value, X, Y, W, H, align, o->image, interpret_symbols); +} + +static void custLabelMeasure(const Fl_Label* o, int& W, int& H) +{ + const int interpret_symbols = 0; + + fl_font(o->font, o->size); + fl_measure(o->value, W, H, interpret_symbols); +} + #if 0 PORT1.3 /* @@ -318,6 +338,10 @@ int main(int argc, char **argv) // Sets WM_CLASS hint on X11 Fl_Window::default_xclass("dillo"); + + // Disable '@' interpretation in labels + Fl::set_labeltype(FL_NORMAL_LABEL, custLabelDraw, custLabelMeasure); + #if 0 PORT1.3 checkPreferredFonts(); -- cgit v1.2.3