Also plot green info line count in timeline display

This commit is contained in:
René Stadler 2007-11-19 10:59:52 +02:00 committed by Stefan Sauer
parent fad744c07f
commit 5329d7503e

View file

@ -240,16 +240,28 @@ class TimelineWidget (gtk.DrawingArea):
theme = GUI.LevelColorThemeTango ()
dist_data = self.level_dist_sentinel.data
level = Data.debug_level_debug
level_prev = Data.debug_level_log
def cumulative_level_counts (*levels):
for level_counts in dist_data:
yield sum ((level_counts[level] for level in levels))
level = Data.debug_level_info
levels_prev = (Data.debug_level_log, Data.debug_level_debug,)
ctx.set_source_rgb (*(theme.colors_float (level)[1]))
self.__draw_graph (ctx, w, h, maximum, [counts[level] + counts[level_prev]
for counts in dist_data])
self.__draw_graph (ctx, w, h, maximum,
list (cumulative_level_counts (level, *levels_prev)))
level = Data.debug_level_debug
levels_prev = (Data.debug_level_log,)
ctx.set_source_rgb (*(theme.colors_float (level)[1]))
self.__draw_graph (ctx, w, h, maximum,
list (cumulative_level_counts (level, *levels_prev)))
level = Data.debug_level_log
ctx.set_source_rgb (*(theme.colors_float (level)[1]))
self.__draw_graph (ctx, w, h, maximum, [counts[level] for counts in dist_data])
# Draw error and warning triangle indicators:
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):