Refactored the parsing logic to make it more solid (no more guessing) and
more flexible (support more formats).
Added a test for checking that.
Fixed a few warnings.
[Dirk Hohndel: some changes to coding style]
Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The user may have a different theme, as i did, and it
looked very wrong.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This sets the combobox to disabled if the profile is in
any mode besides PROFILE.
Fixes#824
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The position of one curly brace was wrong. Bummer.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We can end up having a divepoint that is outside the dive profile. In
this case, we used to crash, but this hack prevents the index out of
range issue.
Fixes#784
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I have no idea how the index ends up outside the range, but at least
this prevents a crash in this case.
See #784
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of inventing another way to do this (and inevitably forgetting a
path where this should be re-enabled) I renamed the DcShortcup related
function and made them enable/disable the copy and paste shortcuts as
well.
Of course there now is one exception (isn't there always?): in "ADD" state
we don't want to be able to switch DCs, but we do want to be able to
paste.
Fixes#825
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
My previous cmake patch was relying on ssrf-version.h to be generated
correctly by qmake, in the source directory. This one fixes the generation
of this file in the build directory.
Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When one has 2 pictures with the same timestamp, these pictures are
reordered on saving (requires something changed on the specific dive for
the save to actually trigger). This patch keeps the picture order intact
in the XML log.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This file is straight from WordPress and therefore has the odd mixed
markup of WordPress. Some HTML, some shortcodes and the super annoying
"oh, <p> ... </p> is too complicated, let's pretend that line breaks are a
better way to do this" logic that I hate more than any other WordPress
oddity...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Dirk, please read the paragraph marked *Important* to make sure
it does not constitute utter rubbish.
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
On Ubuntu, the completer often prevents applying/discarding the changes
on the dive info pane and disrupts editing of other fields as well. This
patch prevents the completer popup from appearing when not in edit mode
(apply or discard is pressed) or when the string is still empty.
Fixes#818
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Why someone would log in but then not allow us to post I don't know... but
it seems useful to at least handle it...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since UDDF import uses different namespaces, we need to count the
temperature samples in all of them to get temperature readings from
waypoints.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Without this patch, the user effectively cannot change the dive mode as
any change is overwritten by replot copying current_dive over
displayed_dive. The way out is not to call replot but only update the deco
ceiling directly.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Commit b72c32da7 turned off replotting while the cylinder
combo box was active to speed up editing. After leaving
the combo box, replotting was enabled again and a replot
was called.
This replot is too agressive, as it overwrites the displayed
dive with the current dive and thereby resets the cyinder
change. This eliminates the replot call.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
They stay valid while Subsurface is running, but once you quit, the
credentials are gone.
This way no one can steal them from our settings.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I did some editing of the image to increase contrast and make the text in
the screen shots more readable. In the process I also reduced the size of
the image substantially. I have also edited the text somewhat.
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The XSLT based exports can consume long time while applying the xml format.
This time can make the GUI unresponsive. Simply call the export functions
in a new Thread.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Commit d329420d55 changed the name of the
header from "Max depth" to "Max. depth", so we need to use that in the
code as well. (The dive profile is not drawn if we do not have max
depth.)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Should have removed the getFieldByIndex template from these files when
it was moved to commonTemplates. Otherwise these imports wont work.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
probably just a typo; taking the value of a (char *) will return
the first char (or byte).
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We should mention the iPhone companion app either alongside the Android
app or at its own line if more precise information is wanted. I suppose
this text change should be enough as we should get more precise
statistics of usage of these apps from the server logs.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Show either the login screen or the disconnect button, plus some text that
explains what the user is expected to do.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>