summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-06-12Indicate that there are unsaved changes with a '*' in the window titleGravatar Dirk Hohndel
This seems to be a fairly common way to indicate this property. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Add header for Qt helpers used from C functionsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Cloud storage: check connection before connectingGravatar Dirk Hohndel
libgit2 takes forever (a minute or so) to figure out that it can't connect to a remote server. So if we are using https as connection protocol, quickly check utilizing RFCs 2324/7168 to make sure we can reach the cloud server (and not some captive portal or something). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Cloud storage: Unset the proxy if none is configuredGravatar Dirk Hohndel
The settings are stored in the local cache repository - so without resetting it a proxy would stay configured even if it was disabled in the Subsurface preferences. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Cloud storage: Setup http proxy for git connectionGravatar Dirk Hohndel
At the time of this commit support for this feature has not landed in upstream libgit2, yet (but there is a pull request). Yet supporting this here doesn't appear to cause any issue with older versions of libgit2, either, so the http proxy support will simply not work when enabled and a version of libgit2 that's too old is used. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Cloud storage: Require libcurl in order to support http proxiesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-11Add two new libraries to requirement list (deb)Gravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-11Dive site management: show pictures instead of profileGravatar Dirk Hohndel
This seems to work better than moving the Globe up there. It's not ideal (I really want to be able to show one big picture for the site - and on all the sites without pictures we show nothing), but for now I think this is better than having the profile there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-11Revert "Dive site management: remove the profile view"Gravatar Dirk Hohndel
This reverts commit ec8ba5f830efc01f2db627e82e34c353c0dd13f7. Turns out that moving the globeGps widget to a different quadrant breaks the parent relationship and that causes things not to work. I know that I tested this and didn't notice any issues, but I now can reproduce a broken default screen. So let's revert. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-11Add a more complex sample diveGravatar Dirk Hohndel
This includes trips, dives outside trips, deco, gas changes, dives with multiple dive computers, a really short dive, a rather long dive, a dive with pictures, dive computers with very coarse sample rate, rather fine sample rate, with gas integration, without... Should touch a lot of different scenarios. The file is in V2 format to also allow testing the importing / conversion to dive sites. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-11Minor fixes to the INSTALL-fileGravatar Paul-Erik Törrönen
* Add needed qt5-qtlocation-devel package for Fedora install * Correct the call to subsurface binary after compilation] Signed-off-by: Paul-Erik Törrönen <poltsi@777-team.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10Cloud storage: use our credentials when updating the remoteGravatar Dirk Hohndel
If we are pushing to an ssh or https based remote we need to use our credentials. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10Cloud storageGravatar Dirk Hohndel
Use the credential helpers earlier in the source. This way we can use them for the push as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10Cloud storage: track the repository type and pass the information aroundGravatar Dirk Hohndel
This is easier than having various parts of the code to the string comparison on the URL. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10git storage: actually update the remote repository if the local cache is ↵Gravatar Linus Torvalds
more recent Again, note that this currently only happens when you initially open the repository. So if you do subsurface https://.../repo[myubranch] it will start up by fetching the remote information, and updating the local cache. If you then download new dives, and do a save-and-exit, it will save to the local cache, but it doesn't do the fetch at this point, so the remote is now begind. The *next* time you start subsurface, and load that git branch again, it will fetch the remote, and now notice that the local cache is ahead of it (because you downloaded new dives and saved them locally), and *then* it will try to update the remote with the new information. This is obviously bogus, but we will need to decide exactly how we want to sync with the remote repository. But now the core functionality is there, it's just that we need some interface to say "sync now". Especially in the face of spotty (or non-working) internet, you want a GUI etc for this whole remote sync, rather than doing it unconditionally and silently whenever you load the local cache initially. With that caveat: Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10git storage: re-organize code to make 'origin' remote more widely availableGravatar Linus Torvalds
I'm going to try to update the remote if the local cache is more recent when we fetch the data, which requires access to the remote over a wider range of code. This re-organizes the code so that we can free the remote later without having to have nasty error handling. We avoid the whole "if an error happened, free the remote and return" by creating helper functions and freeing the remote in the caller, so that all paths end up freeing it naturally. NOTE! We want to try to update the remote when we save the local cache too, so this whole "update remote when opening it" is incomplete. But (a) we do want to do it here as well and (b) this is the easiest place to create the initial "push to remote" code without any new "sync with cloud" interfaces. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10git storage: actually update cached copy from remoteGravatar Linus Torvalds
We used to fetch the remote information but not actually do anything about it, except report when it wasn't up-to-date. Now we actually update the local cached copy if the remote has changed. The code does not try to actually merge things, so only fast-forward updates are done, but that should be the normal case. We might eventually do some simple merging on our own, but I suspect manual merging may be the safer option. We don't currently ever update the remote repository, and only inform users that our local repository is ahead of the remote. Fixing that is the next step. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10Dive site management: remove the profile viewGravatar Dirk Hohndel
While this isn't what I really want (I wanted pictures of the dive site instead of the profile), at least this makes it clear that we aren't editing a dive but instead are looking at a site. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10Add "additional name" to the correct dive siteGravatar Dirk Hohndel
Adding the name to its own dive site was kind of silly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10When done reverse geocoding, hide the notificationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10Don't show the V2 warning anymoreGravatar Dirk Hohndel
This now happens in its own thread... But leave the infrastructure so we can ask questions about the geo encoding Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10When parsing V2 XML files try to be smarter when creating dive sitesGravatar Dirk Hohndel
Two "locations" from a V2 file are the same site if they have the same name AND if their GPS coordinates are within 20 meters of each other. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10Add helper function to determine the distance between two pointsGravatar Dirk Hohndel
And use this to find a dive site within a certain radius of a GPS fix. This will be used to figure out if dive sites might be the same. This uses a new Qt5 component (Positioning) which was added in Qt5.2. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10When saving only selected dives, only include referenced dive computersGravatar Dirk Hohndel
Since we should have far fewer dive computers than dives this straight forward algorithm shouldn't cause any performance issues. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10When saving only selected dives, only include referenced dive sitesGravatar Dirk Hohndel
The algorithm seems rather brute force; basically quadratic in the number of dives, assuming we have about the same number of dive sites as dives which seems a reasonable assumotion. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10Don't show all the auto generated dive sites on the globeGravatar Dirk Hohndel
When downloading GPS data from the Subsurface webservice we repopulated the globe before purging all the unused GPS fixes from the list of dive sites which caused massive clutter (until the next time the user changed the displayed dive or did anything else that caused the globe to redraw itself). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Cloud storage: be more careful when trying to determine a user nameGravatar Dirk Hohndel
Since we use the email address (including the '@' sign) as the repository name we have to be more careful when trying to pick an account name from a git URL. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09README should mention that this is not a releaseGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09ReleaseNotes: mention cloud storageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Merge branch 'cloudstorage'Gravatar Dirk Hohndel
2015-06-09Cloud storage: implement confirmation of email address via PINGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Cloud storage: deal with visibility of PIN entryGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Cloud storage: initial support for confirming the email PINGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Fix Ubuntu buildGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Build script: switch to working URL for grantleeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Discard all temporary sites after merging with dive listGravatar Dirk Hohndel
After we import all the GPS fixes from the Subsurfae webservice we delete the ones that didn't match any dives. The algorithm skipped every other one by mistake. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Subsurface GPS webservice: make sure dive log is marked as modifiedGravatar Dirk Hohndel
One of the cases was missing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Create unique dive sites when downloading from webserviceGravatar Dirk Hohndel
The Subsurface Webservice (as backend for the companion app) will usually send a lot of gps fixes encoded as dives, all with the same dive site name. When parsing the XML file it sends we need to make the dive site names unique so that we can then match them to the existing dives. The fake dives with all the dives sites will all be discarded, but without creating the unique dive sites we can't successfully add the GPS coordinates to the existing dives. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-09Fix building with NO_MARBLE issueGravatar Gehad elrobey
We can't build with -DNO_MARBLE after some previous commit broke globe.cpp - centerOnCurrentDive() is still existing in the code while removed from header in 6b81fb49d09. - Some referenced to MainWindow::instance()->globe() even if we are building with no marble. - include stdint.h Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Cloud storage: first stab at creating an account on the backendGravatar Dirk Hohndel
This triggers when the email address / password is changed in the preferences. It opens an https connection with the backend server (the URL is hardcoded) which should create an account with these credentials. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Select the correct dive in EditAddedDive modeGravatar Tomaz Canabrava
If we added two dives, and then tried to edit the first added one, the current 'added dive' set on main_tab would be the second one, so when we got to the accept() part of the call, it would reselect the last added_dive that we had. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Change the name of the dive site on the globeGravatar Tomaz Canabrava
The name of the dive site on the globe wasn't being updated when we changed the name of it in the dive management dialog. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Reset the current dive site when we reject itGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Plot the current dive site in edit modeGravatar Tomaz Canabrava
We were ignoring the displayed_dive_site as we were adding it and the changes weren't accepted yet. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Do not connect to same signal/slot twiceGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Temporary dive + temporary site = crashGravatar Tomaz Canabrava
We always thought that a dive had a dive site and that a dive really exists. but if we go to add dive and then go to add dive site, none of those exist yet and then we got a crash. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Always fill the fields in LocationInformation edit widget.Gravatar Tomaz Canabrava
If the current_dive was the same as the dive send to the LocationInformation widget, we would do nothing, wich is wrong because we could have filled the information on an add_dive_site action and then cancelled it, so the info will stay there until we change it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-07Always send the UUID of the coordinates to the globeGravatar Tomaz Canabrava
We were relying in the current_dive to display the globe coordinates correctly - but this is not always the case: you can be inserting a new dive site and it isn't yet inside of the dive until the user presses accept. So always pass the uuid of the dive site that we want to display. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Build script: fix several bugsGravatar Dirk Hohndel
With this I can now successfully run this on Mac and Arch Linux, both running "fresh" and running in an existing build directory (i.e., getting the updates right). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Build script: Integrate Grantlee & build Subsurface with printingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>