Remove unused menu "Filter"

The filter menu wasn't connected to anything other than a debug print.
This removes that menu.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
profile2: remove unused varable diveComputer

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
usersurvey: Add : for consistency

All the other statements there had : in them.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove warning about undeclared menuFilter

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: display dive status in detailed view

Add dive status in the detailed dive view.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: Add dive photos to the detailed view

Dive photos are copied to the photos directory on export. The photos
section appears only if photos exist.

C++ helper functions are added to copy images to the photos directory,
Additionally the photos directory must be passed as a parameter to the
write_one_dive function to save photos to it. Some options structure may
be needed instead of passing many arguments.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: prevent implicit type conversion on testing

== and != comparison of true, false, null, allows implicit type
conversion, thus using === and !== instead

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

Concatenated string should have the plus sign at the end of the cut
line.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Removing extra commas from array initialization

Comma should be used on array initialization only between elements, not
at the end.

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

&nbsp; must be terminated with semicolon, just like any other named
character reference

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Shrink YAxis when heart rate is on display

This patch makes sure that YAxis is not expanded to cover heart rate
when it is displayed on profile panel.

Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Try to avoid inconsistent selection state after divecomputer download

I cannot reproduce the problem, but adding one more call to
unselectDives() should ensure that all dives are marked as not selected
before selecting the last dive that was downloaded.

See #620

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: even with broken plans, don't divide by 0

This fixes the crash in #623, but not the other oddities.

See #623

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: when adding new waypoint at the end, use previous gas

In commit b0da8c270736 ("When adding a waypoint, use the gasmix of the
_next_ waypoint.") we default to air when adding a waypoint at the end of
the plan by double-clicking. That seems silly since we could instead
continue using the last gas.

I wasn't able to reproduce the "gas list disappears" problem in bug #623,
but I did get a silly air segment added which was equally wrong. Maybe I'm
lucky and this fixes the problem that Henrik sees as well...

See #623

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: don't allow the user to remove the last point

This causes all kinds of assumptions to go wrong - and it makes no sense.
Move the point to where you want it or cancel the plan.

Fixes #623

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: Report CNS and OTU

In add_plan_to_notes(), call update_cylinder_related_info() to compute
CNS and OTU data for the planned dive. Report their values in the notes.

Besides CNS and OTU, update_cylinder_related_info() also recomputes the
SAC, which is harmless. Note that both dive->cns and dive->maxcns need
to be zeroed out for the CNS value to actually be recomputed.

Signed-off-by: Gaetan Bisson <bisson@archlinux.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix segfault in world map export

Attempting to export to write-protected file/directory results in NULL
file reference and leads to segfault when writing/closing it.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>