From: Linus Torvalds Date: Sun, 11 Dec 2011 22:38:58 +0000 (-0800) Subject: Add capability of custom sorts to divelist columns X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=8cca5404440960ba14ed870e77c6eb6537f4aa2e;hp=8cca5404440960ba14ed870e77c6eb6537f4aa2e;p=ext%2Fsubsurface.git Add capability of custom sorts to divelist columns .. and use this for the nitrox column, which can now be more complex than just a single number. The rule for the "nitrox" column is now: - we look up the highest Oxygen and Helium mix for the dive (Note: we look them up independently, so if you have a EAN50 deco bottle, and a 20% Helium low-oxygen bottle for the deep portion, then we'll consider the dive to be a "50% Oxygen, 20% Helium" dive, even though you obviously never used that combination at the same time) - we sort by Helium first, Oxygen second. So a dive with a 10% Helium mix is considered to be "stronger" than a 50% Nitrox mix. - If Helium is non-zero, we show "O2/He", otherwise we show just "O2" (or "air"). So "21/20" means "21% oxygen, 20% Helium", while "40" means "Ean 40". - I got rid of the decimals. We save them, and you can see them in the dive equipment details, but for the dive list we just use rounded percentages. Let's see how many bugs I introduced. I don't actually have any trimix dives, but I edited a few for (very limited) testing. Signed-off-by: Linus Torvalds ---