Commit graph

7663 commits

Author SHA1 Message Date
Miika Turkia
fdd714435e Have computer data inside divecomputer tag
This includes all the data computer related data within the divecomputer
tag. All the extra noise is just indentation (apart from moving the
divecomputer end tag).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:29 -07:00
Miika Turkia
4f5db4a11f Re-order the MacDive import
Next commit will do indentation so this one will keep it clear of what
actually occurs.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:24 -07:00
Miika Turkia
6cd71882f2 Support for new data format for MacDive
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:20 -07:00
Dirk Hohndel
4c588c1f00 Improve multi dive tag list edits
The old behavior was kind of crude. Just smack the tags that were on the
displayed dive on all selected dives.

This seems to make more sense. We figure out which tags were added to the
displayed dive and add them to all selected dives. And we remove all tags
that were removed from the displayed dive from all selected dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-02 12:18:12 -07:00
Dirk Hohndel
51183f4ee7 Tag list handling: add two new helpers
taglist_added() simply figures out the tags that are in the new list but
not in the original list.

taglist_dump() makes debugging things easier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-02 12:16:03 -07:00
willem ferguson
2894ee0759 User manual update
This adds text to the following sections:
1) Dive planner (Open circuit planning)
2) Dive Planner (Recreational OC planning)
3) Use of hashes to move images between directories
4) Undo/Redo feature of dive list manipulations

One image in planner text is modified.

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-02 11:26:39 -07:00
willem ferguson
b846915f43 User manual update: OSTC Tools integration
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-02 11:26:18 -07:00
Miika Turkia
1559eb590d Use dynamic sample interval on divelogs.de export
Rounding always up should give us sensible sample interval as EON Steel
adds extra samples.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-02 11:25:57 -07:00
Miika Turkia
4f83bb9236 Have the dive duration in variable for further use
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-02 11:25:35 -07:00
Dirk Hohndel
e491f4a0db cmake: enable Facebook support
Not sure if we have this on Android, so right now I just enable it for
Linux, OS X, and Windows.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-01 19:17:22 -07:00
Miika Turkia
c21883c419 Select only "meaningful" samples for divelogs.de export
The logic to select samples from EON Steel for divelogs.de export is the
following:
- Ignore sample at time zero, as that is surface, and the second "odd"
  sample contains information we are interested in
- Grab the second sample, first sample with pressure and temperature
  readings
- Grab the third sample - "grand parent" is 0, thus our first interval
  sample
- Grab the samples when the predecessor (or grand parent) is at least 10
  seconds away

This logic seems to produce reasonable results when exporting EON Steel
logs to divelogs.de. Naturally there might be corner cases, that are not
taken into account, but this basic logic seems reasonable in normal
cases. (Unfortunately analysis is done based on a single dive.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-30 16:55:39 -07:00
Miika Turkia
3f25f84127 Use variable to track special handling of DCs
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-30 16:55:01 -07:00
Miika Turkia
5ab0cac1ca Set EON Steel sample interval to 10s on
This sets the Suunto EON Steel sample interval to 10 seconds when
exporting to divelogs.de.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-30 16:54:27 -07:00
willem ferguson
2286bc89de Add text to user manual: Recreational dive planning One figure has been added
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-30 07:18:28 -07:00
Anton Lundin
526b4500ba Add urldialog.ui to qmake ui list
This unbreaks the qmake build system by adding urldialog.ui there. Yes,
i know we're planning on switching away but i still build things via
qmake and its nice if it works until we actually remove it.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-29 14:54:51 -07:00
Anton Lundin
c38b7d3922 Add a default case for switch over dc_family_t
This adds a default case which just errors out for the switch over
dc_family_t instead of checking a uninitialized variable if this was
ever called with something else than one of the expected dc-family
types.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-29 14:53:03 -07:00
Robert C. Helling
a4c35f1d63 Rename menu entry for image hashing
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-29 14:01:24 -07:00
Robert C. Helling
66ac97d7ad Display a notification while image hashing is ongoing.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-29 14:01:14 -07:00
Dirk Hohndel
5fe8919424 Small design fix to make labels on Info tab look aligned
By wrapping the Location label in a layout as well they now all look
aligned again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-29 12:43:11 -07:00
Dirk Hohndel
7704ed31ff cmake: missing space
This caused cut to fail and the whole dll dependency calculation went
wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-28 13:40:18 -07:00
Dirk Hohndel
3a715c2299 Simplify creation of the upload file for Divelogs.de
Instead of writing each dive out to a file and reading that file back in,
let's just use the internal helper function that places the dive as XML
into a membuffer.

So much simpler, so much faster.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-28 11:28:53 -07:00
Dirk Hohndel
f4677d7604 Rename helper function and make it global
save_one_dive_to_mb() is very useful (but there was a namespace collision
with another helper in save_git.c)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-28 11:27:36 -07:00
Dirk Hohndel
c519d0b32f Debian/Ubuntu packaging files: give correct credit in copyright notice
That was an embarrassing oversight on my part.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-28 10:45:03 -07:00
Dirk Hohndel
3043114446 Show error if creation of the Divelogs.de upload file fails
Previously we simply failed silently without showing the user any
indication that something went wrong. That seems wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-28 10:42:54 -07:00
Salvador Cuñat
ef774032ed Update spanish translation of user manual to english c7c9b015
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-27 21:16:49 -07:00
Jan Mulder
fdef2adfae Set the shared library file extenstion for the specific platform.
The shared library extension differs on MacOS.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-27 06:10:31 -07:00
Robert C. Helling
e19d38193d Disable planner UI elements without function
This disables planner UI elements in recreational mode that have no function
in that mode.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-26 16:54:29 -07:00
Tomaz Canabrava
35a3ba0be0 Do not call install_name_tool for Marble library
Here on my Mac I had an issue that took a long time to understand.
The build.sh script was correctly creating Marble but did not
correctly run otool on it. So I fixed this by fixing CMake for
the marble library which means we don't need to worry about it
in the build script anymore.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-26 12:18:14 -07:00
Tomaz Canabrava
d7e08514f1 Always reconfigure libdivecomputer
After doing a make clean / make confclean the makefiles
were erased and running the configure script again didn't
created the makefile.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-26 12:17:17 -07:00
Tomaz Canabrava
34c88f9a15 CMake needs hints that this will be a win32 or a mac bundle.
MACOSX_BUNDLE and WIN32 give hints to cmake for different
install behaviors. for instance, trying to copy frameworks
and other stuff to the correct places.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-26 12:17:17 -07:00
Tomaz Canabrava
6ace243a2a Don't deppend on CMake to find the right libraries.
We are compilling those libraries and we know where they are, so
pass the directories and the libraries in a go directly. CMake was
a bit random when choosing the correct ones, this way we are sure
we got them.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-26 12:17:12 -07:00
willem ferguson
c7c9b0155f Update of user manual text dealing with dive list context menu
As the title says above

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-26 10:32:31 -07:00
willem ferguson
a8656759bb Modify wording of dive list context menu
Dive context menu:
After the addition of the item "Add image(s) from web" the item
immediately above is "Add images". It is proper to specify now:
"Add image(s) from file(s)" to make the distinction clear. I also
change "Shift times" to "Shift dive times".

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-26 10:31:52 -07:00
Dirk Hohndel
ac34413a35 cmake: don't always build tests
Only build the tests when running them. The downside of the way this is
implemented is that build errors for the tests actually show up as test
errors and are only seen in the test log - but this seemed worth not
having every build include the tests.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24 11:23:50 -07:00
Dirk Hohndel
38ba7177c7 cmake: copy images / icons into the build Documentation folder
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24 11:02:45 -07:00
Dirk Hohndel
541e67ba41 First stab at tracking the changes in the release notes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24 10:56:59 -07:00
Robert C. Helling
757c4aab20 Allow images to be added via the web
This adds a new divelist context menu entry which asks for a URL. The file
is retrieved and if it is an image it is added to the cache and the url
is associated to dives as with local files.

NB this currently only works with URLs pointing directly to images. But it
should not be too hard to add the possibility to add a direction via an html
file and its image tags.

To test: open dives/test43.xml and delete the image and then add the URL
http://euve10195.vserver.de/~robert/wreck.jpg

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24 09:36:21 -07:00
Robert C. Helling
98ae7b1f86 Don't load images too often
Factor out image load to find timestamp from loop over dives.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24 09:35:51 -07:00
Robert C. Helling
a0a3c6ec15 Cleaning up variable names in image loading
Use more explicit variabel names and make the get timestamp function actually
return the timestamp rather than getting a pointer argument

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24 09:35:35 -07:00
Dirk Hohndel
c97e136435 cmake: include the git SHA in the Windows installer name
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24 07:18:11 -07:00
Dirk Hohndel
79bb61dba1 Adapt CSV test to include suit
Also fixed it to correctly parse the mean depth (duh, a test that had a
bug) and added a buddy field for good measure.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24 07:07:31 -07:00
Miika Turkia
c80d1879b7 Add suit field for CSV import
Fixes #853

[Dirk Hohndel: fixed test compile]

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24 06:50:50 -07:00
Dirk Hohndel
415abeea66 When deleting a cylinder, adapt gas changes
When we delete a cylinder the gas changes in that dive may have to be
adjusted. We didn't do this at all in the past. With this commit we should
be doing this right for a single dive that is being edited.

This does NOT handle multiple dives being edited at the same time (or more
specifically - if you have multiple dives selected and delete a cylinder,
the dives that had the same set of cylinders (other than the displayed
dive) will get that particular cylinder deleted, but won't have their gas
change events (and sensor data in the samples) adapted.

Possibly we should simply prohibit deleting cylinders when more than one
dive are selected.

See #834

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-23 15:27:21 -07:00
Dirk Hohndel
bbfa2b655b Profile context menu: trigger editing of manually added dive
Right now the way to edit the profile of a manually added dive is really
counterintuitive: you have to first make some random change to the dive
information, then the profile switches in to editing mode.

This commit adds a simple context menu entry on the profile that is only
shown when the a manually added dive is displayed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-23 13:56:24 -07:00
Marcos CARDINOT
59f283a4fc ostctools - resource leaks
some resources are not being freed.

Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-22 13:59:50 -07:00
Dirk Hohndel
6f7e3d04cb Handle XSLT based imports correctly
XSLT conversions create V2 XML files, but we shouldn't abort when we parse
those without having the user informed about the potential slowness - all
XSLT based imports are slow, anyway.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-22 13:20:27 -07:00
Dirk Hohndel
959077c66b Remove debug output about verbosity
This snuck in on commit f4f791ffbd ("Add verbose debug output to
parse_manual_file").

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-22 11:18:00 -07:00
Dirk Hohndel
ab24c1df87 When editing the location, make sure it gets applied to the dives
Oops, that was embarrassing. Just setting it on displayed_dive doesn't
gain us anything if it isn't transferred to the selected dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-22 09:35:58 -07:00
Dirk Hohndel
429fcdb344 When remembering the selection, don't try to be too smart with trips
We assumed that a trip was selected when all of its dives were selected
instead of just remembering if the trip itself was selected. I'm sure
there was a reason for that but I cannot think of any. But a side effect
is that if you have a trip with only one dive in it and have that one dive
selected and edit it, after saving your changes you end up on the trip
(which is now also selected) and are no longer on the dive. And that seems
quite wrong.

The new code simply remembers that the trip was selected. And selects it
again if it was.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-22 08:42:28 -07:00
Dirk Hohndel
31b8dffbb1 Uemis downloader: don't use bogus sensor data from Uemis
Sometimes we get a sensor number of 255 - which gets turned into a tank
index and then causes all kinds of havoc. Simply refuse to use a tank
number larger than the maximum Subsurface has been compiled for.

Oh, and use consistent variables to handle these unsigned 8 bit integers.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-21 23:31:03 -07:00