1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

Add the begin/end markers to events with the proper flags

When we create the event names, the name itself does not include the
information about whether the event is the beginning or end of some
state, so we end up having things like events named "deco" and then in
the event flags it says whether this is the *beginning* of deco, or the
end.

And when we show the event, we only used to show the name.  This patch
makes us show whether it's the begin or end event for events that have
those flags.  So now you see "deco begin" and "deco end" instead of just
two events both called "deco".

It would perhaps be nice if we somehow showed the range between the
events too, and paired them up visually some way, but that's a separate
and much more difficult thing to do.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2013-01-31 10:34:41 +11:00 committed by Dirk Hohndel
parent 9099972c20
commit 1702eb3ab0

View file

@ -400,7 +400,9 @@ static void plot_one_event(struct graphics_context *gc, struct plot_info *pi, st
snprintf(buffer, sizeof(buffer), "%s: %d", _(event->name), event->value);
}
} else {
snprintf(buffer, sizeof(buffer), "%s", _(event->name));
snprintf(buffer, sizeof(buffer), "%s%s", _(event->name),
event->flags == SAMPLE_FLAGS_BEGIN ? " begin" :
event->flags == SAMPLE_FLAGS_END ? " end" : "");
}
attach_tooltip(x-15, y-6, 12, 12, buffer);
}