Install Subsurface icon

We want to install the Subsurface icon so it can be used e.g. in menus.
(Commit ee5d8e3c moved the icons to resources, but the application icon
is special case, that should be installed globally.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Disable DC device node if it is not needed

This patch disables/enables the DC device node based on what type of
transport the selected DC uses. The only time the device node field is
used is if the selected DC uses a serial transport type. IrDA and USB type
transports do not use the device node.

Signed-off-by: Benjamin Fogel <nystire@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix warning about initialization ordering

I cannot tell what the potential impact of this might be, but the fix is
trivial.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Handle editing a manually added dive consistently

Regardless of whether the user clicks in the info tab, makes a change to
equipment or starts by editing the profile (i.e., clicking on the little
penguin), we should get into the same state and behave the same way.

This means that when editing a manually added dive we are always in
editMode == MANUALLY_ADDED_DIVE - and editMode == DIVE means we are
editing a dive that came from another source.

Fixes #379

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Clear equipment tab for trips display

And prevent the user from editing equipment in trip edit mode (those edits
are both meaningless and of course will be ignored once we save the
changes to the trip).

Also moved some code for setting up tanks, weights, tags, etc, into the
"this is not a trip-edit" part of the updateDiveInfo() function.

Fixes #392

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Allow tracking of more weight systems

I never imagined that people would want to track more than 4
weightsystems, but we just had an enhancement request from a user who
tried to enter a 5th system. Let's hope 6 is enough for everyone.

Fixes #383

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Including alarms and bookmarks on UDDF import

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add depth conversions to XSLT

Convert depth to and from mm.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use bookmark flag when bookmark contains heading

Bookmark with compass heading is named 'heading' and should use the
bookmark icon.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Test dive for events

Dive with test events, can be used to test approximation of depth when
exporting dives.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Generate UDDF waypoints for in-between events

This patch generates a waypoint for events occurring between profile
samples. It approximates the depth of the crafted waypoint linearly
between the recorded sample depths.

Fixes #385

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Support for multiple cylinders on UDDF export

Adding support for multiple cylinders on UDDF export. This also adds a
cylinder reference to the tankdata to enable mix lookups.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Cylinder support improved on UDDF import

This patch adds support for cylinders for UDDF version 3.2.1.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove unnecessary cylinder generation on UDDF

Nowadays cylinder tags are generated based on actual usage. This
includes all the required information on cylinders. Therefore generating
incomplete cylinder tags from all listed cylinders is not needed
anymore.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix bookmark/gaschange setting for Ubuntu

On Ubuntu, new events have time zero. This is fixed by resetting
gc.rightx to maxtime at the end of plot function.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove nonexisting member from header

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Update tank model with custom tanks used in XML files

Fixes #377

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Enable https for Windows binaries

This requires the ssleay32.dll and libeay32.dll to be copied into
packaging/windows, first.

Fixes #367

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use field numbers in CSV import instead of indexes

For the common user, a field number is more intuitive than field index.
So let's use that in numbering CSV import fields.

Fixes #388

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Update manual to reflect CSV import numbering

Patch f4db392a changed CSV import to use field numbers instead of
indexes. Thus removing the now incorrect description of numbering from
user manual. Note, that screenshot should be updated as well.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>