Use the right event type

11 is SAMPLE_EVENT_GASCHANGE, and thats the one that doesn't contain any
He-part. The type where He and O2 is packed togeather is 25,
SAMPLE_EVENT_GASCHANGE2.

Left to implement is to figure out the type of the event when we read
the xml, so we can create the right type there.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Only calculate with he when he is present in event

Old gasswitch events only contains O2, so don't look at he part when
the event doesn't contain a He part.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Show sample time in the mouseover.

This is really nice to have when looking at specific coutures of a dive
or events.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Destroy the main window before exiting the application

This ensures all widgets inside the window get destroyed too.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Show DiveNotes when program starts.

Equipment tab was opened by default, it should be DiveNotes
as per the old GTK version. this fixes that.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Good deal of Code Cleanup for the maintab

Some cleanup was needed in the MainTab code for ages,
now the Edition / Cancel / Ok of the Notes tab is
way more intuitive on the code level.

This is needed to support multidive edition on the
Cylinders and Weigths too, since it's a bit more
complicated, I didn't want to start with a Spaguetti
Code.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Add a Warning icon on the changed tabs, for edition of dives.

Adds a Warning icon on the changed tabs, this is important as
usability, for you could change something on the 'notes' tab,
change the tab and did't realized that something was changed
( by forgotting or something ), then clicking on the cancel
button. so now there's a friendly reminder that you actually
changed something.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Added the Message and the Buttons on the Equipment Tab

Added the Message and the ok/cancel buttons on the Equipment
Tab, they don't control the Equipment edition yet, but already
does the same as the Notes one, Now I need to merge the other
part - the actuall Equipment Edition.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>