Commit graph

11656 commits

Author SHA1 Message Date
Dirk Hohndel
b368ecd5aa Add SPDX header to remaining core files
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29 13:32:55 -07:00
Dirk Hohndel
ee1bf18189 Add SPDX header to tests
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29 13:32:55 -07:00
Dirk Hohndel
6399eaf271 Add SPDX header to core C files
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29 13:32:55 -07:00
Dirk Hohndel
b641757a0c Add SPDX header to smartrak importer
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29 13:32:55 -07:00
Robert C. Helling
5c98cf35d7 Change the Bluetooth connect call signature
By copying a line from the Linux bluetooth code I can download
from OSTC dive computers on Mac. Don't ask me why this works.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-04-28 17:55:22 -07:00
Anton Lundin
cd27c1cd44 Hide avg max depth thingie
We don't set it so just hide it.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-04-26 21:27:37 -07:00
Anton Lundin
1ec0d43e63 Always set min/max sac in statistics tab
It just looks weird when they aren't set, just because you only selected
one dive.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-04-26 21:27:37 -07:00
Anton Lundin
0f80d07e4b Rework statistics tab to use a grid layout
This makes everything line up better

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-04-26 21:27:37 -07:00
Dirk Hohndel
92e6cdf3e8 Update README for 4.6.4 release
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-26 18:46:25 +02:00
Dirk Hohndel
8c5c022c24 Last set of translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-26 18:46:25 +02:00
Tomaz Canabrava
7aac3852c1 Fix saving table size
We need to make sure the model is avaliable for the table
until it hits the destructor.

Fixes #347

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-26 17:45:34 +02:00
Dirk Hohndel
c4d6055e4a More translation updates
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-26 16:29:45 +02:00
Dirk Hohndel
63be0af1e2 Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-26 14:53:27 +02:00
Jan Mulder
12a59ef313 Correct divesite geocoding translation
See https://github.com/Subsurface-divelog/subsurface/issues/345. The
menues where not translated. The basis of this error is a simple
typo in core/taxonomy.c where the classname was mis-spelled in the
QT_TRANSLATE_NOOP. In addition, to pull and translate the strings
from C code, the normal tr() does not work, and the functionality
from the gettextfromc class is used.

Fixes: #345

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-26 05:34:40 -07:00
Jan Mulder
dc9cf7bcbc OSTC3 incorrect notice to upgrade firmware
See https://github.com/Subsurface-divelog/subsurface/issues/342. The reason is
that we never get a DC_EVENT_DEVINFO when doing a memory dump. Just do not
offer to update firmware when we are creating a libdc dump.

Full credits of this fix go to Anton.

Fixed-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-25 10:39:33 -07:00
Dirk Hohndel
cd9dc8f8fc Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-24 21:15:21 -07:00
Stefan Fuchs
1e6f0231e6 Deal with additional line break in dive notes from planner
With current code when re-planning a dive the planner output in the
dive notes is always moved down by one line.
This fix avoids that this additional line break is added.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-24 08:35:49 -07:00
Jan Mulder
9b5d3b60ab Do not carry po2 setpoint data over dive boundaries
The file static po2 value, used to set the setpoint data, was not re-initialized
at the parsing of a dive during import from the divecomputer. So, in one import session,
the po2 was transferred from one dive to the next, obviously resulting in weird bugs, due
to possible wrong po2 settings.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-24 07:51:12 -07:00
Dirk Hohndel
51ee9d4405 Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-23 12:36:13 -07:00
Dirk Hohndel
9c86a0f616 Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-23 08:08:46 -07:00
Stefan Fuchs
45dd564ee6 Translate string "cancel download" in DC download widget...
and change string "Retry" to "Retry download".

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-23 08:08:10 -07:00
Dirk Hohndel
d82e200d35 Download from divecomputer: reset progress bar fraction
Otherwise when retrying, the progress bar might already be reset, but
its text might still show 100%.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22 13:55:46 -07:00
Dirk Hohndel
82d37e7451 Download from divecomputer: don't show bogus progress text
On some divecomputers we download all the data from the device and
then parse the data afterwards just in memory (at which point the
progress bar has already run all the way to 100%). So don't try to
show the dive number and time in that case.

Fixes #335

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22 13:49:07 -07:00
Dirk Hohndel
0bd02bf1f0 Download from divecomputer: stop timer on error
If we run into an error during the download, stop the timer that
triggers the update to the progressbar.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22 13:46:27 -07:00
Dirk Hohndel
ed09b35dcf Another ReleaseNotes update
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22 12:49:30 -07:00
Dirk Hohndel
86d33b96e9 Update bundled user manual HTML files
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22 12:45:18 -07:00
Dirk Hohndel
2182f00177 Reduce default verbosity
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22 12:38:59 -07:00
Dirk Hohndel
bc6c8a3949 Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22 11:26:03 -07:00
Dirk Hohndel
2a9baa5693 Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22 11:12:24 -07:00
Dirk Hohndel
a321b02d9f Add -nopush option to translation script
This way I can easily see if there are new strings - without causing an
unnecessary push to Transifex.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22 11:09:16 -07:00
Salvador Cuñat
abf5656ce6 Update spanish translation of user manual to english 441260b8 2017-04-22 09:28:23 -07:00
Stefan Fuchs
bea1217f7b Move extra info tab in main window to the very right side again
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-21 11:27:15 -07:00
Stefan Fuchs
02e768a61b After DC import don't do RemoveRows if there is nothing to remove
This fixes an issue where beginRemoveRows is called with argument -1
in DiveImportedModel::setImportedDivesIndexes.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-21 11:26:49 -07:00
Salvador Cuñat
441cfb3f05 smtk-import: Add curly braces in nested conditionals
Curly braces are necessary in nested conditionals or results may not be
those expected. In this case, the "else" clause applied on second "if",
instead of first one.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2017-04-21 06:52:13 -07:00
Salvador Cuñat
75007aa4ef smtk-import reuse pre-existent code and fix leak
Use update_event_name() for bookmarks merge and free temp string.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2017-04-21 06:52:13 -07:00
Salvador Cuñat
329a6bc075 smtk-import: Abort bookmark parsing if table doesn't open
Do not just report the failure but abort parsing or we will get a crash

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2017-04-21 06:52:13 -07:00
Dirk Hohndel
76975ed425 Mention bot: no comments
I believe that even though the sample file clearly shows
comments, the syntax actually doesn't allow it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-20 15:58:30 -07:00
Robert C. Helling
6a249bd160 With curly braces
...sorry, I don't have a way to test this.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-20 15:52:28 -07:00
Robert C. Helling
dfe5092222 Identify user provided notes in plain text in replan
This is another attept at the problem if identifying a potentially
user supplied text in the dive notes upon replannig a dive.

It gets rid of the user visable position markers (*!* and ***) and
cirumvents problems with mark-up by first converting the old notes
to plan text (assuming that user only enters plain text in the notes
field as we do in other places as well). Then the automatically added
part is identified by locating the disclaimer in the text (if the user
edited/delted the disclaimer or changed langue in between it is her
problem to manually delete the old plan).

Everything from the disclaimer on is deleted and replaced by the new plan.

If the disclaimer is not found, the new plan is appended to the old notes.
This way we make sure no information gets automatically deleted.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-04-20 10:57:47 -07:00
Jan Mulder
ff5c04eb97 Do not abort when there is no current dive
Yes, currentdive can be undefined in case of of a new logbook and starting the planner
right away. Do not abort on that.

Reported-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-20 10:57:11 -07:00
Jan Mulder
abbb0a244d Handle CCR setpoint when replanning a dive
When replanning a dive, the setpoint information from the profile waypoints
were reset to 0, resulting in a dive that has a dive mode of CCR, but only with
OC legs in the profile. This is just wrong, and is corrected here. Notice
that there is no averaging involved (in the reduction of a replanned real
dive that has more than 100 waypoints) as is done for depth. This is just
fine for setpoint data.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-20 10:57:11 -07:00
Jan Mulder
89b914e47d Preserve dive mode when planning a dive
Data such as cilinders and used gasses are populated fromn the currently
selected dive when starting the planner. It is more logical to use
the dive mode (OC, CCR, pSCR) of the currently selected dive
as well. This commits changes this.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-20 10:57:11 -07:00
Jan Mulder
9b8fc9f64a Show % after Büllmanns GFs
2 strings in the planner output showed based on "Bühlmann ZHL-16B with GFLow = "
gradient factors without % after the factor. While this is fine for an
abbreviated form like GF 40/80, this looks strange for a verbose sentence like
the 2 corrected ones.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-20 10:57:11 -07:00
Miika Turkia
0bce84b09d Support for new DM5 blob format
Currently we do not know what the extra data in the sampleBlob is, but
the block size must be adjusted nevertheless.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-04-20 10:55:19 -07:00
Robert C. Helling
b81fdbe1c7 Tell mention-bot to mention @atdotde if planner/deco files touched
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-04-20 10:54:52 -07:00
Dirk Hohndel
cb15a37ee5 Update ReleaseNotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-18 21:26:28 -07:00
Rick Walsh
541b86e710 FAQ: update section on Bluetooth on Linux
Setting up an RFCOMM connection has not been required for a long time.

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-18 21:15:52 -07:00
Stefan Fuchs
5e67a932cf More strict filter for URL handling in dive notes
Applie a more strict filter to URL handling in dive notes:
The URL needs to have:
- Scheme like "http:" or "mailto:"
- Host name like "www.test.de" or path like "/pathtosomewhere/"

Otherwise strings like "OTU:" or "Runtime:" are treated as URL.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-18 18:13:52 -07:00
Stefan Fuchs
c257144bab Fix a crash in the URL handling for the dive notes
URLs in the dive notes are detected today. A tooltip is displayed and
one can follow the URL by Ctrl-click.

In the function fromCursorTilWhitespace there is an issue with incorrect
return value of Qt (5.7?!) function cursor->movePosition(). This value is
erroneous true in some condition e.g. if the cursor is inside a table at
the very beginning or the very end of a table line and not moving any more.
This can cause the function end up in an infinite loop.

Bugfix adds an additional exit criteria for the loop if the string is
not growing any more.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-18 18:13:52 -07:00
Miika Turkia
58a25d33ce Attempt latin1 parsing on import
We parse input XML using UTF-8 encoding by default. If this fails, try
latin1 instead.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-04-18 18:13:05 -07:00