From 5aa28626ad2ac5344ec1747cebe89f4df77b1347 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Wed, 3 Oct 2018 19:33:28 +0200 Subject: [PATCH] NotificationDisplay: function to demote error entries into warnings ...and remove them from the mark-index for special handling --- src/gui/widget/error-log-display.hpp | 13 +++++++++- wiki/thinkPad.ichthyo.mm | 38 ++++++++++++++-------------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/gui/widget/error-log-display.hpp b/src/gui/widget/error-log-display.hpp index 526013c69..3f5d316b1 100644 --- a/src/gui/widget/error-log-display.hpp +++ b/src/gui/widget/error-log-display.hpp @@ -238,10 +238,21 @@ namespace widget { addInfo (_Fmt{_("───════ %d old log lines removed ════───\n")} % (oldLines-newLines)); } + + /** visit all errors and downgrade the markup; discard all bookmarks */ void turnError_into_InfoMsg() { - UNIMPLEMENTED ("visit all errors and downgrade the markup; discard all bookmarks"); + auto buff = textLog_.get_buffer(); + for (Entry& entry : errorMarks_) + { + auto begin = entry.first->get_iter(); + auto end = entry.second->get_iter(); + + buff->remove_tag_by_name(uString{TAG_ERROR}, begin,end); + buff->apply_tag_by_name (uString{TAG_WARN}, begin,end); + } + errorMarks_.clear(); } void diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 106e5c755..f582a7386 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -2072,9 +2072,9 @@ - + - + @@ -2112,12 +2112,12 @@ - + - + - + @@ -2243,14 +2243,14 @@ - - - + + + - + - - + + @@ -2669,8 +2669,8 @@ - - + + @@ -2807,16 +2807,16 @@ - - + + - - - - + + + +