Commit graph

109 commits

Author SHA1 Message Date
Linus Torvalds
5a47bdc9c4 Add a checkbox for nitrox settings
Grey out the nitrox value unless the user explicitly checks the checkbox.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-13 11:47:20 -07:00
Linus Torvalds
c96e2d1767 Pack all the equipment widgets into boxes
We really do want to "pack" them, rather than use up the whole size.  I
think.

I may end up playing around more with this.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-11 15:49:50 -07:00
Linus Torvalds
d1b30212ff Add more static cylinder types - and pick them up from the dive log
This adds a few more predefined cylinder types to the static list, but
perhaps more importantly, if we try to show a cylinder description that
we haven't seen before, we automatically add that description to the
list as well.

This way, if people have their own cylinder types, our cylinder
management will automatically figure them out and make it easy to enter
them.

NOTE! It might be best to add the new cylinder description at dive log
load time, rather than at 'show' time.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-10 17:14:07 -07:00
Linus Torvalds
1fe687a16c Add new cylinder models to the cylinder model store
We also need to actually fill the model store with the cylinder models
we have in our dive lists to begin with.

This makes it all *trivial* to add a new cylinder model: just use a new
description, fill in the size and working pressure, and you're done.
The type automatically gets filled in, unless that description already
existed (in which case we leave it alone).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-10 16:27:19 -07:00
Linus Torvalds
c43e1ad21b Let people manage their cylinders in cuft and psi
If the output units are set to cuft and psi, then we should show the
cylinder size and pressure properly.

NOTE! In the absense of pressure data, we *always* show the cylinder
volume in liter.  There's no way to convert it to imperial units, since
the imperial units are not in physical size, but in air volume
normalized to surface pressure..

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-10 15:27:23 -07:00
Linus Torvalds
e48cebc2d8 Actually connect the cylinder configuration with the dive
It seems to be sufficiently useful to be worth updating the dive
information now.

This still doesn't handle multiple cylinders in any way.  I need to
think about the interface for that.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-10 11:09:39 -07:00
Linus Torvalds
ed8561bf59 Getting closer to a usable cylinder management interface
Not quite there yet, though. And never mind multiple cylinders..

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-09 21:39:54 -07:00
Linus Torvalds
8f12eed9e0 First (broken) try at actually tracking cylinder types
This doesn't actually change the cylinder type info in the dive, because
it's too broken for that.  Instead it prints out what it would change
things to.

The gtk2 notion of text input focus is *really* odd.  Why is the
cylinder type sometimes selected, and sometimes not?

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-09 19:46:53 -07:00
Linus Torvalds
067506038a Rename 'cylinder.c' as 'equipment.c'
Make it about general equipment management, and start hooking up
functions to show new equipment information when changing dives (and to
flush changes to equipment information for the previously active dive).

Nothing is hooked up yet, and it's now showing just one (really big)
cylinder choice, so this is all broken.  But it should make it possible
to at least get somewhere some day.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-09 17:10:17 -07:00
Renamed from cylinders.c (Browse further)