aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-04-24Don't load images too oftenGravatar Robert C. Helling
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-24Cleaning up variable names in image loadingGravatar Robert C. Helling
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-24cmake: include the git SHA in the Windows installer nameGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24Adapt CSV test to include suitGravatar Dirk Hohndel
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-24Add suit field for CSV importGravatar Miika Turkia
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-23When deleting a cylinder, adapt gas changesGravatar Dirk Hohndel
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-23Profile context menu: trigger editing of manually added diveGravatar Dirk Hohndel
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-22ostctools - resource leaksGravatar Marcos CARDINOT
some resources are not being freed. Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-22Handle XSLT based imports correctlyGravatar Dirk Hohndel
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-22Remove debug output about verbosityGravatar Dirk Hohndel
This snuck in on commit f4f791ffbdd2 ("Add verbose debug output to parse_manual_file"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-22When editing the location, make sure it gets applied to the divesGravatar Dirk Hohndel
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-22When remembering the selection, don't try to be too smart with tripsGravatar Dirk Hohndel
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-21Uemis downloader: don't use bogus sensor data from UemisGravatar Dirk Hohndel
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-21Uemis downloader: adjust the threshold for stopping downloadsGravatar Dirk Hohndel
A complete batch of divelog and dive data takes about 20% of the available space (depending on how long those dives are). This is a hack and I can see this potentially going wrong, but the alternative is to be even more conservative and that has its own set of problems as it causes us to need more "unplug, wait, plug in again and restart" cycles. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-21Uemis downloader: download additional dive data after every batchGravatar Dirk Hohndel
This looks like a fairly big change but it mostly just moves a block of code inside an earlier loop and adjust a few variables around it. The completely broken and insane Uemis download protocol distributes data across different "databases" on the dive computer. The "divelogs" are downloaded in batches of 10 (most of the time), and with this change every time one of those batches is downloaded we straight away get the matching "dive" entries. Hopefully this will avoid having the download abort (for lack of space) before all components are loaded. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-21Uemis downloader: get the right values set before bailingGravatar Dirk Hohndel
This caused us to not read the auxiliary information for up to the last ten dives that were downloaded from the SDA. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-21cmake: fix finding MarbleGravatar Dirk Hohndel
Silly bug. A lot of things in cmake are case insensitive. Some care about case. Stupid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Don't crash if add_gas_switch_event() gets called with invalid indexGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Uemis downloader: even with an empty divelist, check where to startGravatar Dirk Hohndel
If the user hits retry from within the download dialog, the dive list might still be empty but we still have to look for the best point to restart. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Uemis downloader: allow continuing download by clicking RetryGravatar Dirk Hohndel
When we run out of space in the Uemis filesystem we return an error. The user could reasonably unplug the SDA, insert it again and then retry to continue the download (that's what we tell them to do). In that case we need to make sure we start at the correct dive otherwise the same dives keep getting downloaded over and over again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Download dialog: we can accept a partial download after an errorGravatar Dirk Hohndel
The dialog didn't accept "OK" and store the dives downloaded / selected so far if there had been an error. Especially with partial downloads from the Uemis SDA this is something that is quite reasonable to want to do, so allow exiting the dialog with OK even after an error. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Uemis downloader: don't discard samples too earlyGravatar Dirk Hohndel
We do a good job in the fixup_dive() code to make sure we don't add long surface tails to the dives, so don't try too hard to guess the correct last sample in the Uemis specific code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Uemis downloader: avoid double freeGravatar Dirk Hohndel
A well intentioned attempt in commit ff860b3c044a ("uemis-downloader - resource leaks") to fix resource leaks actually introduced a bug. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: more consitent multi-line callsGravatar Lubomir I. Ivanov
- don't put anything on the first line after the opening "(" - fix indentation of the closing "(" Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: use uppercase for defined macrosGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: fix message for NO_MARBLEGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: lowercase all built-in callsGravatar Lubomir I. Ivanov
e.g. SET() -> set() ELSEIF() -> elseif() Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: generate clean ssrf-version.hGravatar Lubomir I. Ivanov
remoevs the extra white sapce in the generated ssrf-version.h. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: whitespace cleanupGravatar Lubomir I. Ivanov
- indentation - spaces near comments Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-17cmake: add LIBGIT2_FROM_PKGCONFIG and LIBDC_FROM_PKGCONFIGGravatar Lubomir I. Ivanov
These two new options allow usage of pkg-config to retrieve libdivecomputer and libgit2. For some reason the variables *_LIBRARIES have to be set to blank strings in the process, otherwise "-l" is passed to the linker. LIBGIT2_FROM_PKGCONFIG is a rename from PREFER_GIT_FROMSOURCE for consistency. The IF() check is also fixed. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-17cmake: add the NO_MARBLE optionGravatar Lubomir I. Ivanov
If NO_MARBLE is set to ON, the MARBLE package is not seeked. If set to OFF the package is seeked, but if the find fails the gcc definition -DNO_MARBLE is set and marble is disabled. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-17cmake: add the NO_TESTS NO_DOCS optionsGravatar Lubomir I. Ivanov
NO_TESTS: disable the tests NO_DOCS: disable the docs Both are set to OFF by default. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-16cmake: fix bug when using system libgit2Gravatar Dirk Hohndel
Simple omission in commit 7596db28b5ad ("cmake: allow looking for optional libraries"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-16cmake: add extra -lpthread to fix Ubuntu buildsGravatar Dirk Hohndel
We shouldn't need this. Ubuntu is once again broken. What else is new. But since this shouldn't hurt any of the sane Linux version, I'll just add it for any Linux flavor. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-15build.sh: successfully build an App bundle on the MacGravatar Dirk Hohndel
Some install name magic on two of the libraries we build was necessary for things to work out correctly. And I added an install step to the default build that puts Subsurface in the install_root on other OSs and creates the Subsurface.app under subsurface/build/Subsurface.app on the Mac. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-14Add ability to undo removing of dives from tripsGravatar Grace Karanja
Add the functionality to undo/redo removing of dives from trips. The code calling remove_dive_from_trip has moved to the UndoCommands class. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-14cmake: remove references to LRELEASEGravatar Tomaz Canabrava
This is being taken care by Qt5::LinguistTool Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-14Show error messages for incorrect edit invocationGravatar Gehad elrobey
Planned dives must be replanned while manually added dives must be edited. Show error messages to handle wrong user input. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-10cmake: try to find the macdeployqt programGravatar Dirk Hohndel
There is no variable for it, but we can abuse the variable that shows us where moc is located. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-10cmake: improve test for variableGravatar Dirk Hohndel
CMake still confuses me. When testing if a variable was set it sometimes needs to want "DEFINED", but sometimes I need to compare it to an empty string. Let's do both (this seems to fix the problem I ran into) - but this is still weird. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-10cmake: allow looking for optional librariesGravatar Dirk Hohndel
And use this to look for libusb. If it's there then libdivecomputer likely was linked against it. If it isn't then we don't need it, either. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Update the INSTALL file to reflect the switch to cmakeGravatar Dirk Hohndel
The cross building instructions for Windows are still lacking. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Update the mxe based sample scriptGravatar Dirk Hohndel
Working on making the different ways we build things more consistent Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09build.sh: use "install-root" for our local install destinationGravatar Dirk Hohndel
This seems less confusing then calling it just "install". Also adjust our cmake/Modules/Find... files accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Recmode: Fix ascent gas consumption.Gravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Recmode: Allow the user to specify gas reserve.Gravatar Joakim Bygdell
Since most regulators have an intermediate pressure of 10bar the minimum value is 10 while the max is 99. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Recmode: Take safety stop into account when calculating ascent gas consumption.Gravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Move the translations to it's own subfolderGravatar Tomaz Canabrava
By adding a new CMakeLists.txt file and configuring the translations inside of it's folder, the buildsystem will compile everything on that folder. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Use Qt5Translations to deal with translationsGravatar Tomaz Canabrava
And remove the old code that did the same thing in a very complex way. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09We use static library if we find - option was not being used.Gravatar Tomaz Canabrava
Currently we search for a static library and if we don't find it, we search for a shared library. If one of them is found, we return success but if none of them is found, error. So - A static library for libgit and libdivecomputer is preferred over the shared one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>