Add more data to our tool-tip display in the profile window

This shows the values for all the graphs that are shown (depth,
temperature, tank pressure, pO2, pN2m pHe), but also correctly doesn't
display them when they are turned off or no data is available (prior to
this commit, tank pressure was always shown, even if no pressure samples
were available for the dive).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2012-11-11 17:12:09 +01:00
parent b304562fa8
commit 502e2b0e86
2 changed files with 41 additions and 14 deletions

View file

@ -1332,7 +1332,7 @@ static gboolean profile_tooltip (GtkWidget *widget, gint x, gint y,
}
get_plot_details(gc, time, plot, sizeof(plot));
snprintf(buffer, sizeof(buffer), " %d:%02d%c%s%c%s", time / 60, time % 60,
snprintf(buffer, sizeof(buffer), "@ %d:%02d%c%s%c%s", time / 60, time % 60,
*plot ? '\n' : ' ', plot,
*event ? '\n' : ' ', event);
gtk_tooltip_set_text(tooltip, buffer);