summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-02-17Add visibility and weather to dive notesGravatar Miika Turkia
This adds a bit more information to dive notes on DiveLog import. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17Add time to DiveLog importGravatar Miika Turkia
I originally thought about converting the time as well, but my fingers were too slow and memory too short to actually do that :D Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17Quote tags as attributesGravatar Miika Turkia
We need to quote the tick char (') on tags as this is used as XML attribute. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17Add limits to cylinder maximum pressures on DM5 importGravatar Miika Turkia
DM5 seems to have occasionally bogus data for cylinder start and end pressures. Need to validate that. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17Hook up DiveLog importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17XSLT to import MacDive logsGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-16Fix profile toolbarGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15PRI: include some variables in the version generationGravatar Lubomir I. Ivanov
the following are needed in subsurface-install.pri FULL_VERSION VERSION (this one is previously set in subsurface.pro) PRODVERSION_STRING VERSION_STRING Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Remove unnecessary use of non-portable 'mkdir()'Gravatar Linus Torvalds
This fixes the problem with Windows being the usual non-POSIX PoS that it is.. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15PRI: fix typo in the version generation ruleGravatar Lubomir I. Ivanov
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15downloadfromdivecomputer.cpp: fix initializer list order warningGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15parse-xml.c: remove unused variables in divinglog_place()Gravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15qthelper.cpp: use QStandardPaths::DataLocation for older QtGravatar Lubomir I. Ivanov
system_default_directory(): QStandardPaths::AppDataLocation was introduced in Qt 5.4. For older versions we use the deprecated ::DataLocation. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15add and use a version.c / version.h pairGravatar Lubomir I. Ivanov
version.c is now object code which is recompiled each time ssrf-version.h changes, while the interface file version.h remains that same at all times and files which include it will not need to be recompiled. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15qmake: use a dedicated build script to generate ssrf-version.hGravatar Lubomir I. Ivanov
- added ./scripts/write-version - subsurface-gen-version.pri is much simpler now - .git/HEAD is no longer used explicitly in .pro/.pri files - the version_h rule is called on each 'make' invocation but recompilation will occur only if ssrf-version.h is updated by ./scripts/write-version - qmake now depends on the existence of ssrf-version.h so it creates an empty one on Makefile generation so that a warning is not shown Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Start parsing remote git repository addressesGravatar Linus Torvalds
This doesn't really usefully work, but I'm committing it to have git diff and history. It also insanely hardcodes the git-repo cache directory, because right now it's purely useful for development. The big missing pieces are: - progress information - credential callbacks not implemented where the first one makes the user interface horrible (long delays with nothing visibly going on), and the second one makes ssh logins etc not work. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15git-access: use the new format_string helpersGravatar Linus Torvalds
It may be a bit less efficient to use a printf-style interface rather than the explicit malloc and memcpy, but the code ends up simpler and more readable. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Start splitting out git repo helper routinesGravatar Linus Torvalds
This doesn't actually change any code, but it moves the 'is_git_repo()' function that is used by both loading and saving into a new git-access.c file. This is where I'll start doing remote repo syncing too. Knock wood. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Add 'system_default_directory()' helper functionGravatar Linus Torvalds
This is just a extern "C" wrapper around QStandardPaths::AppDataLocation, while also making sure the entry exists. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15membuffer: add helper functions to return regular C stringsGravatar Linus Torvalds
The whole "create a string using a printf-like interface" thing is pretty common, and most users then don't necessarily want to deal with the membuffer interfaces around it. So this just creates trivial wrappers to do this, so that you can do s = format_string("%d: %s\n", i, str); or similar things. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15INSTALL: remove the native win32 build notesGravatar Lubomir I. Ivanov
Outdated and should not be maintained as there are many levels of complications. The NOT RECOMMENDED note should suffice. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Get rid of double space after uuid in ssrf fileGravatar Henrik Brautaset Aronsen
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Fix Subsurface build with Qt 5.4.1 and laterGravatar Thiago Macieira
The intention had been all along to use the 5.4 QSysInfo API, but due to a silly mistake in the QT_VERSION check, it never got enabled for 5.4.0. On 5.4.1 it does get enabled and, unfortunately, causes compilation errors because the API changed between the time we backported to Subsurface and the final version. This commit backports the final QSysInfo API from Qt 5.4 into Subsurface, which includes the renaming of a few functions. Since the prettyOsName function no longer exists in the Qt API in that form, I've reimplemented it using the API that does exist. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Use unused cylinders in planner if they are displayedGravatar Robert C. Helling
This makes prefs.display_unused_tanks also relevant for the planner. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Documentation: update french translation of user-manualGravatar Guillaume GARDET
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15Fix error on HTML worldmap exports.Gravatar Gehad elrobey
As HTML worldmap export produces wrong HTML in languages that contains apostrophe in air/water temperature fields like italian. Translated strings need to be HTML quoted. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15HTML: Fix Null values in yearly statistics export.Gravatar Gehad elrobey
Null values should be handeled nicely instead of showing NULL or Nan. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15HTML: Fix exporting themes in multilingual environmentGravatar Gehad elrobey
Don't compare to static english string, must translate first. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Add ssrf as dive log extension on importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Proof of concept for reverse geo locationGravatar Dirk Hohndel
When reading a pre-v3 XML file, we now do reverse geo lookups on the GPS coordinates and add the country to the dive site notes. Eventually this wants to be a tag (once we implement tags for dive sites). This is going to add quite a bit of delay when people open a V2 XML file - depending on how many distinct GPS fixes they have. In my case with 127 GPS fixes it took about 20 seconds to open the file... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Test dives for duplicate names and conflicting GPSGravatar Dirk Hohndel
The conflicting GPS is somewhat artificial. Since the GPS gets parsed first in our syntax, the different GPS location would create a new dive site and we'd end up with two dive sites of the same name with different coordinates. By having a location tag with just the name and no coordinates we make sure that this gets identified with the existing dive site and THEN add the GPS coordinates in the second location tag. This would never happen in a XML file created by Subsurface, but it does a good job in testing the different code paths. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Keep conflicting information around when converting v2 to v3 on the flyGravatar Dirk Hohndel
When reading a v2 XML or git divelog it can happen that we get multiple names for the same GPS fix or multiple GPS fixes for the same name. We'll still consolidate them to one entry, but we should not throw away the conflicting information - instead we should just add this to the notes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Use C API for printGPSCoordsGravatar Dirk Hohndel
This way we can call this helper from both C and C++ code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Add helper function to extend C stringsGravatar Dirk Hohndel
This is trivial to do with Qt, but when we want to be able to do this in C code it takes a little more work. This creates a simple pattern to extend an existing C string. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Add ability to undo shifting of dive timeGravatar Grace Karanja
Adds the ability to undo shifting of dive times. The change is captured at simplewidgets.cpp and an undo command is created. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Update spanish translation of user manual to english 961bac9Gravatar Salvador Cuñat
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14When cleaning up the empty screen, also clean up dive sitesGravatar Dirk Hohndel
Otherwise we are using stale pointers in the displayed_dive_site global. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Associate existing dive site to current diveGravatar Miika Turkia
If the dive site exists, we need to associate the uuid to current dive. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Rename the tab "Dive info" to "Info", and "Dive notes" to "Notes"Gravatar Henrik Brautaset Aronsen
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14mainwindow.cpp: don't close a file if a dive site is being editedGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14divesite.c: use rand() instead of random()Gravatar Lubomir I. Ivanov
random() is POSIX and seems to be missing in MINGW. it can return a 64bit (if 'long' is 64bit) but given ID's are 32bit rand() should suffice. also random() is technically a better algorithm but for cryptographically unsafe usage like generating IDs the stdlib's LCPRNG rand() should siffuce. also this patch makes it so that a true 32bit random value is returned. how random it is, is another topic. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Merge branch 'divesites'Gravatar Dirk Hohndel
This brings in the dive site infrastructure and initial UI work
2015-02-13When updating the dive site name, show this on the maintabGravatar Dirk Hohndel
If we accept a change on the dive site management screen, it needs to be reflected on the Dive notes tab right away. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Don't store empty dive sitesGravatar Dirk Hohndel
And remove references to them from the dives. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13When closing a dive, delete all the dive sitesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Don't add empty dive sitesGravatar Dirk Hohndel
It makes no sense to keep them around, it makes no sense to have dives refer to them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Add helper function to detect empty dive sitesGravatar Dirk Hohndel
No point in keeping those. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Make sure there is a dive site if you try to edit itGravatar Dirk Hohndel
If the user clicks on manage (or double clicks on the globe) and the displayed_dive doesn't actually have a dive site associated with it (e.g. because we are adding a dive or because it was imported or downloaded without dive site information, then we need to make sure that there is an empty dive site that we can make changes to. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13When adding / planning a dive, reset the dive site manage screenGravatar Dirk Hohndel
Otherwise old data is still shown if the user clicks manage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Fix crash when adding a diveGravatar Dirk Hohndel
If a dive has no dive_site_uuid we would dereference a NULL pointer and crash. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>