Use AL80 as default if no default cylinder is set

Otherwise the user could get uninitialized values for newly created
cylinders.

Fixes #345

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove pointless code

When removing the selected dives from their trips, it makes no sense to
check if the pointer was actually pointing at a valid dive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When the user cancels a download, reject already downloaded dives

This seems like the more logical behavior, anyway. Cancel means you didn't
want the result...

Fixes #341

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Actually process the dives downloaded from divelogs.de

Silly mistake in commit 93b5c0cd14fe ("Finish download from divelogs.de"):
parse_file() doesn't call process_dives() - the caller needs to do that.

Fixes #344

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add compact style to the Documentation

The Makefile changes were authored by Dirk, the CSS is based on a public
domain CSS file and authored by Willem

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add some assert guard around gas finding code

The code would have leaved gasidx undefined if it doesn't find a correct
gas, so this asserts instead of using uninitialized variables as array
index.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the air point at 0,0

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Silence signed vs. unsigned compare warning

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make local helpers static

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Calculate gas consumption for planned dives

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we have defined a gas, default to that one.

If we start to define a gas, we should use that one by default instead
of air.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Revert "Get rid of the planner"

This reverts commit c4a47a7d60b53c9b2e2ffb874afaf733d43123aa.
Add a travis.yml to test a build.
Mac support in travis.yml
TODO notes
Clone a bit deeper, so we get a tag to describe
Fix units boxes in preference panel

The groupBox-es got renamed, and thus the unit-systems radio-buttons
was enabling/disabling the wrong buttons.
Rename the radio button to match label kgs->kg
Update the diffrent units when switching system

When switching between metric and imperial, we should also show that the
different units are switching too. This signals the greyed out
radio buttons to switch to the right system.

Fixes #347
Keep track of user requested minimum depth

When got auto-rescaling of the depth scale, always reset the depth scale
to what the profile would suggest. This introduces a concept of user
requested minimum witch we will update and not scale down to lower than.

Reported-by: Henrik Brautaset Aronsen <henrik@synth.no>