|
|
|
@ -360,6 +360,9 @@ void Source::ClangView::update_diagnostics() { |
|
|
|
diagnostic_tooltips.add(diagnostic.severity_spelling+": "+diagnostic.spelling, get_source_buffer()->create_mark(start), get_source_buffer()->create_mark(end)); |
|
|
|
diagnostic_tooltips.add(diagnostic.severity_spelling+": "+diagnostic.spelling, get_source_buffer()->create_mark(start), get_source_buffer()->create_mark(end)); |
|
|
|
auto tag=buffer->create_tag(); |
|
|
|
auto tag=buffer->create_tag(); |
|
|
|
tag->property_underline()=Pango::Underline::UNDERLINE_ERROR; |
|
|
|
tag->property_underline()=Pango::Underline::UNDERLINE_ERROR; |
|
|
|
|
|
|
|
auto tag_class=G_OBJECT_GET_CLASS(tag->gobj()); //For older GTK+ 3 versions:
|
|
|
|
|
|
|
|
auto param_spec=g_object_class_find_property(tag_class, "underline-rgba"); |
|
|
|
|
|
|
|
if(param_spec!=NULL) { |
|
|
|
if(diagnostic.severity<=CXDiagnostic_Warning) { |
|
|
|
if(diagnostic.severity<=CXDiagnostic_Warning) { |
|
|
|
//TODO: get color from config.json
|
|
|
|
//TODO: get color from config.json
|
|
|
|
tag->set_property("underline-rgba", Gdk::RGBA("orange")); |
|
|
|
tag->set_property("underline-rgba", Gdk::RGBA("orange")); |
|
|
|
@ -368,6 +371,7 @@ void Source::ClangView::update_diagnostics() { |
|
|
|
//TODO: get color from config.json
|
|
|
|
//TODO: get color from config.json
|
|
|
|
tag->set_property("underline-rgba", Gdk::RGBA("red")); |
|
|
|
tag->set_property("underline-rgba", Gdk::RGBA("red")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
buffer->apply_tag(tag, start, end); |
|
|
|
buffer->apply_tag(tag, start, end); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|