Commit graph

9392 commits

Author SHA1 Message Date
Claudiu Olteanu
813f6f502f Exit with failure if the first dc_open method fails
If the dc_serial_*_open method fails then we should exit with
an error and don't try to open the device using the native
implementation.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-09 13:05:38 -07:00
Sander Kleijwegt
30a410036b Do not ignore the first tag on autocompletion.
Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-09 13:05:14 -07:00
Dirk Hohndel
2025bc1b2b Replace the spinner with a progress dialog for cloud storage access
Since the spinner caused all kinds of problems inside VMs, wasn't shown at
all for some people on Win10 and appeared to get stuck a lot and still
left people with the perception that Subsurface was hung, this patch takes
a more traditional approach and gives the user a progress dialog.

An additional benefit of this is that the user now can cancel a hung
transfer.

The slightly weird passing in of the callback allows for the separation of
UI and core logic code...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-09 13:02:39 -07:00
Lubomir I. Ivanov
2c74a8c315 qthelper.cpp: don't hardcode the Dive m_duration as minutes
get_dive_duration_string() should be used in a similiar way
to socialnetworks.cpp so that the Dive::put_duration()
method sets the variable in the h:min format.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-09 09:16:15 -07:00
Lubomir I. Ivanov
6ff1837b05 qthelper.cpp: use timeFormat and dateFormat for the Dive class
The Dive class has a method which sets the m_time and m_date
members but it uses a custom format. By using the static
dateFormat and timeFormat variables this helper class now uses
the same date and time format as in the dive list.

Fixes #920

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-09 09:15:55 -07:00
Miika Turkia
43627922e0 Delay freeing of memory after use
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-09 09:14:16 -07:00
Miika Turkia
ce608b7ecf Fix a crash on divelogs.de export
Subsurface crashes when multiple dives are selected on divelogs.de
export. The crash occurs on malloc that is called indirectly from
xmlReadMemory().

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-09 03:05:54 -07:00
Dirk Hohndel
af541f7f6a Translation updates
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-09 03:04:22 -07:00
Dirk Hohndel
708fd2fe84 Two small string changes
Reported by Ettore Atalan on Trnasifex.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-09 02:53:30 -07:00
Anton Lundin
7bbd60a4fd Only use DC_TRANSPORT_* with SSRF_CUSTOM_SERIAL
This if'defs DC_TRANSPORT_* use with SSRF_CUSTOM_SERIAL, because the
enum doesn't exist when building against stock libdivecomputer.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-08 13:27:53 -07:00
Anton Lundin
647645d6e4 Better import of libdivecomputer universal xml
This teaches subsurface how to understand more fields in the xml that
libdivecomputers's universal tool generates.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-08 12:30:17 -07:00
Dirk Hohndel
cb1aac0c4d Update the script to build Mac Bundle
This is trying to clean things up quite a bit and make it less specific to
my directory layout.

It still calls the signing script that tries to sign things with my keys,
so it won't work for others without tuning, but this should get you
closer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-08 11:42:14 -07:00
Claudiu Olteanu
a0e33bec71 Disable Bluetooth option from GUI if SSRF_CUSTOM_SERIAL is undefined
The Bluetooth implementation doesn't work if SSRF_CUSTOM_SERIAL
is undefined. Therefore it is a good idea to remove it from
the UI if the libdivecomputer version is wrong.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-08 10:15:35 -07:00
Lubomir I. Ivanov
bb4e34003c Uemis downloader: don't use unknown type u_int32_t
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-08 10:10:23 -07:00
Willem Ferguson
e4c0f3f3e2 User manual update: Location management
1) Add text to cover location management
2) Delete duplicate text for entering dives manually
   and entering dives from a dive computer. The sections dealing
   with location, cylinders, weights, and other items on the Info tab
   were duplicated for these two types of data entry into Subsurface.
   This duplication is now removed.
3) Replace five screen shots

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-08 10:06:10 -07:00
Guillaume GARDET
33831162f1 Documentation: update french translation of user-manual
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-08 09:55:56 -07:00
Dirk Hohndel
a29f897125 Only store dive site uuid in dive if the dive site exists
Don't store stale uuids.
As a side effect this makes it easy to remove dive sites from the XML file
(or the git repository) when duplicates have been added for some reason
and the user wants to restart from scratch.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-08 09:45:09 -07:00
glerch
4f3a9ba583 Uemis downloader: code cleanup
Do some cleanup of the code, there might be more of that as I am still
learning the Uemis code

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 17:43:37 -07:00
glerch
0790dfdad5 Uemis downloader: original dive number support
- enabled capturing of the original Uemis dive number
- previousely the object_id was passed to dive as dive number
- I am using a workaround (not nice but effective) by parsing the dive_no
  out of a copy of inbuf before the object_id is parsed. The reason why is
  that the dive_no comes before the object_id hence the normal parsing
  would miss it.

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 17:43:12 -07:00
glerch
e77d9cbd55 Uemis downloader: multiple buddy support
- changed the uemis_add_string to support a delimiter in parameter 3
- passing each nickname to the parse_tag function appending dive->buddy
  with concatentated nicknames separaed by comma

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 17:42:57 -07:00
Rick Walsh
bc3a2ff89b Planner notes: Show VPM-B conservatism
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 17:26:55 -07:00
Dirk Hohndel
f09b46d47a CodingStype: add explanation how to install the QtCreator settings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 07:58:35 -07:00
Claudiu Olteanu
a05cf2136d Reset the index of the device if the Bth mode is disabled
If the Bluetooth download mode was disabled then remove
the Bth address from the device or mount point section and
reset the index.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 07:29:29 -07:00
Claudiu Olteanu
9e97f124c6 Save Bluetooth download mode settings
Save the dive computer download mode flag. In this way,
if the user used Bluetooth mode to download its dives on
his last session he doesn't need to open the Bth selection
dialog if he wants to use the same device.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 07:29:15 -07:00
Willem Ferguson
384ab944f2 Updates to user manual: dive log printing and APD CCR import
Updates to the APD import interface that Miika has recently completed.
Updates to reflect the new print interface. Added some images and modified
existing text.
Swapped APPENDIX E and APPENDIX F so that FAQs are at end of document.
Updated appendix [F] dealing with customising print templates.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 07:28:13 -07:00
Miika Turkia
12a60cf9e6 Include dive site on divelogs export
Due to the new dive site management, we need to include this information
before transforming the XML to divelogs.de format.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 07:24:32 -07:00
Miika Turkia
5430eec99d New location management for divelogs.de export
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 07:24:11 -07:00
Miika Turkia
c87b9645e7 CSV import: validate column count
We need at least 23 columns when reading in Subsurface CSV.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 07:23:53 -07:00
Miika Turkia
c8e542e5d3 UDDF export: adapt to new dive site management
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 07:23:46 -07:00
Dirk Hohndel
1cada7847e Build script: make sure we find the cmake files for our libraries
This way cmake should pick the right libraries that we built earlier in the
process.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:53:18 -07:00
Dirk Hohndel
34930c0110 Cmake: make Grantlee5 required
Otherwise printing doesn't work. And we get weird build errors.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:53:12 -07:00
Miika Turkia
65267e6e9d CSV import: default formats for Subsurface import
Let's set the configs properly for Subsurface CSV import for better
usability. (Actually the only meaningful configuration is units as
others are discarded, but I could not figure out how to set that to
imperial when needed - what is the variable holding this information?)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:41:10 -07:00
Miika Turkia
f576c16f75 CSV import: show headers for Subsurface CSV import
Showing the header line improves user experience quite a bit, even
though this configuration is actually discarded in the XSLT transform.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:40:59 -07:00
Miika Turkia
67aca27501 CSV import: fix import of Sensus and Subsurface
When adding APD2 import, the Sensus and Subsurface indexes should have
been increased by 1. While fixing this, switch to using enum names for
clarity.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:40:54 -07:00
Miika Turkia
4a72ac2d2b CSV import: improve header parsing
The skipping of header field manipulation for APD was a bit too
aggressive, skipping the header fix up for all logs when on initial
state. Also, addition of APD2 was not taken into account.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:40:45 -07:00
Miika Turkia
e8df3da9e3 CSV export: support for new location management
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:40:40 -07:00
Salvador Cuñat
22cf98bbd7 Update spanish translation of user manual to english-8afd5e8
Introducing mobile app
Updating manual version number and date

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:40:21 -07:00
Salvador Cuñat
8ac1fb1df3 Update spanish translation of user manual to english 20c2259
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:40:16 -07:00
Guido Lerch
5f3093e02b Uemis downloader: change download logic
- change the way how dive logs are mapped to dive details in
  do_uemis_import()
- dives deleted on the Uemis will not be downloaded anymore (added
  function uemis_delete_dive_by_diveid)
- change the way the memory consumption was checked to acknowledge
  very large files (trying to predic on how many more files fit into
  the buffer by calculating an average consumbtion over each
  divelogs block)
- minimal design change to support the above

[Dirk Hohndel: refactored one huge commit into smaller pieces]

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:33:12 -07:00
Guido Lerch
9d5fe3af60 Uemis downloader: add helper function to dump buffer
[Dirk Hohndel: refactored one huge commit into smaller pieces]

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 11:29:13 -07:00
Guido Lerch
fa56d5d136 Uemis downloader: add heler function to delete dive
[Dirk Hohndel: refactored one huge commit into smaller pieces]

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 11:29:13 -07:00
Guido Lerch
040caaa00b Uemis downloader: parse dive_no as well
[Dirk Hohndel: refactored one huge commit into smaller pieces]

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 11:29:13 -07:00
Guido Lerch
ff0859ff21 Uemis downloader: add helper function to estimate memory needs
[Dirk Hohndel: refactored one huge commit into smaller pieces]

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 11:29:13 -07:00
Guido Lerch
4ba5dd85d4 Uemis downloader: parse_divespot should return if it was successful
But sadly the code then doesn't actually use that return value, so this is
not quite perfect, yet.

[Dirk Hohndel: refactored one huge commit into smaller pieces]

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 11:29:12 -07:00
Guido Lerch
b7f5871e59 Uemis downloader: add constant for maximum number of ANS files
[Dirk Hohndel: refactored one huge commit into smaller pieces]

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 11:28:57 -07:00
Guido Lerch
8647f95953 Uemis downloader: fix and move helper function
This function is only used in the Uemis downloader, and it got broken when
we switched to using a separate table for the downloaded dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 11:27:50 -07:00
Guido Lerch
a547ee0ff2 Uemis downloader: various changes to the debugging output
This shouldn't change any of the actualy code, except when it comes to
debugging output.

[Dirk Hohndel: refactored one huge commit into smaller pieces]

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 11:27:50 -07:00
Guido Lerch
3a074b61d1 Uemis downloader: small whitespace change
This makes the comments line up more nicely and fixes some other random
issues in preparation for the following changes.

[Dirk Hohndel: refactored one huge commit into smaller pieces]

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 11:27:12 -07:00
Dirk Hohndel
6917d021fb Fix perl warning in whitespce.pl
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 10:24:04 -07:00
Dirk Hohndel
f9c32a5883 Update source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 07:43:12 -07:00