From 9838f4b35c25ca171c3d3806d190a8c0535ded38 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Mon, 20 Oct 2014 23:20:14 +0100 Subject: [PATCH] Using the +/- format application to remove bold etc where used. This requires a patch from herdsman to evas to work effectively --- src/bin/editor/edi_editor.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c index 61736a9..1e3139e 100644 --- a/src/bin/editor/edi_editor.c +++ b/src/bin/editor/edi_editor.c @@ -32,7 +32,7 @@ static Edi_Color EDI_COLOR_CLASS = "+ color=#72AAD4 font_weight=Bold"; static Edi_Color EDI_COLOR_FUNCTION = "+ color=#72AAD4 font_weight=Bold"; static Edi_Color EDI_COLOR_PARAM = "+ color=#ffffff"; static Edi_Color EDI_COLOR_KEYWORD = "+ color=#ff9900 font_weight=Bold"; -static Edi_Color EDI_COLOR_PREPROCESSOR = "+ color=#00B000 font_weight=Bold"; +static Edi_Color EDI_COLOR_PREPROCESSOR = "+ color=#00B000"; static Edi_Color EDI_COLOR_BACKGROUND = "+ backing_color=#000000"; static Edi_Color EDI_COLOR_SEVIRITY_IGNORED = "+ backing_color=#000000"; @@ -280,13 +280,19 @@ _edi_editor_statusbar_add(Evas_Object *panel, Edi_Editor *editor, Edi_Mainview_I static void _edi_range_color_set(Edi_Editor *editor, Edi_Range range, Edi_Color color) { + char *format; + format = strdup(color); + evas_textblock_cursor_line_set(_format_cursor, range.start.line - 1); evas_textblock_cursor_pos_set(_format_cursor, evas_textblock_cursor_pos_get(_format_cursor) + range.start.col - 1); - evas_textblock_cursor_format_prepend(_format_cursor, color); + evas_textblock_cursor_format_prepend(_format_cursor, format); + format[0] = '-'; evas_textblock_cursor_line_set(_format_cursor, range.end.line - 1); evas_textblock_cursor_pos_set(_format_cursor, evas_textblock_cursor_pos_get(_format_cursor) + range.end.col - 1); - evas_textblock_cursor_format_append(_format_cursor, EDI_COLOR_FOREGROUND); + evas_textblock_cursor_format_append(_format_cursor, format); + + free(format); } static void