From df353a932a1c1c861f5fe335fadb07d8daaf6a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Stadler?= Date: Fri, 16 Nov 2007 15:56:57 +0200 Subject: [PATCH] Add markers for warning and error log messages to the timeline display --- debug-viewer/GstDebugViewer/Plugins/LineFrequency.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/debug-viewer/GstDebugViewer/Plugins/LineFrequency.py b/debug-viewer/GstDebugViewer/Plugins/LineFrequency.py index 37b130d584..36eee78bd5 100644 --- a/debug-viewer/GstDebugViewer/Plugins/LineFrequency.py +++ b/debug-viewer/GstDebugViewer/Plugins/LineFrequency.py @@ -241,6 +241,18 @@ class LineFrequencyWidget (gtk.DrawingArea): ctx.set_source_rgb (*(theme.colors_float (level)[1])) self.__draw_graph (ctx, w, h, maximum, [counts[level] for counts in dist_data]) + for level in (Data.debug_level_warning, Data.debug_level_error,): + ctx.set_source_rgb (*(theme.colors_float (level)[1])) + for i, counts in enumerate (dist_data): + if counts[level] == 0: + continue + SIZE = 8 + ctx.move_to (i - SIZE // 2, 0) + ctx.line_to (i + SIZE // 2, 0) + ctx.line_to (i, SIZE / 1.41) + ctx.close_path () + ctx.fill () + def __draw_graph (self, ctx, w, h, maximum, data): from operator import add