summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-03 11:38:19 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-03 11:39:53 -0700
commit1bcb38dc4954df13f8772af275791b9df4bf0641 (patch)
treeda805da04e3762c2f728807a656c2ec7161d214a
parentd89cf361a0011b8f08c37bcdf89768e098781eec (diff)
downloadsubsurface-1bcb38dc4954df13f8772af275791b9df4bf0641.tar.gz
Planner: make the warnings visually stand out more
HTML is nice here. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--planner.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/planner.c b/planner.c
index 4df222d55..445d375c5 100644
--- a/planner.c
+++ b/planner.c
@@ -625,7 +625,8 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
* This only works if we have working pressure for the cylinder
* 10bar is a made up number - but it seemed silly to pretend you could breathe cylinder down to 0 */
if (cyl->end.mbar < 10000)
- warning = translate("gettextFromC", "WARNING: this is more gas than available in the specified cylinder!<br>");
+ warning = translate("gettextFromC", " &mdash; <span style='color: red;'>WARNING:</span> "
+ "this is more gas than available in the specified cylinder!<br>");
}
snprintf(buffer + len, sizeof(buffer) - len, translate("gettextFromC", "%.0f%s of %s%s<br>"), volume, unit, gasname(&cyl->gasmix), warning);
}
@@ -639,7 +640,8 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
double depth_value = get_depth_units(dp->depth, &decimals, &depth_unit);
len = strlen(buffer);
snprintf(buffer + len, sizeof(buffer) - len,
- translate("gettextFromC", "Warning: high pO2 value %.2f at %d:%02u with gas %s at depth %.*f %s<br>"),
+ translate("gettextFromC", "<span style='color: red;'>Warning:</span> "
+ "high pO2 value %.2f at %d:%02u with gas %s at depth %.*f %s<br>"),
pO2 / 1000.0, FRACTION(dp->time, 60), gasname(&dp->gasmix), depth_value, decimals, depth_unit);
}
}