Planner: Change 'lasttime' only if we printed something in the plan.

This makes the 'segment' durations equal the runtime differences even when
we don't display transitions in deco.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: Avoid bogus segments with 0 time

Don't show a stop if we continue at this depth.

This resolves a problem when there are more than two waypoints during deco
at the same depth. This can happen at 6m when there is a gaschange to O2
and the last stop depth is 6m (which turns the 3m stop into another 6m
stop).

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Switch to the new gasmix structure in dump_plan

dump_plan wasn't updated when the switch from he/o2 to gasmix was done
in the planner code, this makes it compile again.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Install HTML export theme files on Windows and Mac

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Prepare for Qt4 / Qt5 cross builds of Windows binaries

Admittedly I believe I'm the only one using this script (and related .nsi
file), it still seems to make sense to keep it up to date in the
repository.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
qmake: change the folder structure assumed for LIBMARBLEDEVEL

LIBMARBLEDEVEL is now assumed to point to the install prefix used for a
marble install (instead of into a mix of source and build trees as it did
in the past).

This makes it much easier to have Qt4 and Qt5 versions of this library and
link to the right one as needed.

Of course this requires a matching LD_LIBRARY_PATH when launching a
such-built Subsurface.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: Better quoting to the export strings

Move the quote function to membuffer.c and adding wrappers that call
it from both xml and html exporters to get rid of redundancy.

Quote the location, buddy, suit, tags and notes This
prevents js code from crashing.

[Miika Turkia: minor whitespace and code fix]

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: export to system dependant path separator

This will make the exporting path separators platform dependant

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>
Fix HTML export template syntax

Angle brackets must be quoted when not part of an HTML tag.

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

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

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: define decimal explicitly for parseInt()

Older browser assume octal radix on parseInt() when number starts with
0, thus declaring decimal notation explicitly.

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

String concatenation must be stated at the end of a string line (not by
starting the next line with the concatenation character).

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

Spanish translation for the user manual as of 4.1 tagged english version.
Trimmed to 80 columns except where this could break links and affect the
html conversion.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
User manual: update Makefile for multi language support

New translations need to be explicitly added to the Makefile

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
User manual: add html version of Spanish manual

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
User manual: show a localized version of the manual if it exists

So far we only have Spanish, but it always pays to plan ahead.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
User manual: install English and localized copies

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Typo in subsurface.pro prevents a clean build on Mac.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>