summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-06-17HTML: fix the unclosed <ul> tag.Gravatar Gehad elrobey
The <ul> tag must be closed as defined by the html specs. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Re-fix silly typoGravatar Rick Walsh
The previous Fix silly typo patch didn't quite work. This one should Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16git save: fix crash with no remoteGravatar Linus Torvalds
Commit e21cae2d46db ("Cloud storage: sync the remote after save") broke regular git saving without any remotes: it would never initialize the "remote" pointer, and then use that uninitialized remote pointer to see if it was a cloud storage remote that it should try to sync. Fix it. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Set up signalling to display notes in planner again.Gravatar Robert C. Helling
This got broken in a recent transition to more abstract models. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Show duration before runtime on planner notes tableGravatar Rick Walsh
Switch the column order of the planner notes table so that duration is displayed before runtime. This is consistent with: - the verbatim output order, e.g. "Stay at 12.0 m for 3:00 min - runtime 32:48 on EAN50" - MultiDeco, e.g. http://www.hhssoftware.com/multideco/view_multideco.html - Planner on the Shearwater Petrel - How I have been taught to write out my dive plan in my wetnotes Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Fix silly typoGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Remove all the no longer necessary code that aborts read of first V2 fileGravatar Dirk Hohndel
This was a poorly implemented hack when we executed the reverse geo lookup in the main thread and opening a V2 file could take a very long time. We need to do the "Welcome" message quite differently. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Cloud storage: warn the user if we are not onlineGravatar Dirk Hohndel
This isn't perfect, but at least tells the user if we weren't able to connect and are working just off the local cache. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Implement a standalone HTML exporterGravatar Dirk Hohndel
This is mostly a proof of concept right now; it shows that it is possible to create a headless server application that exports a git repository based data file as html. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Separate initializing Qt from initializing the UIGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16HTML export: separate UI and logic codeGravatar Dirk Hohndel
In order to be able to initiate an HTML export from the core library we need to separate the actual logic from the UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Don't crash with NULL string in settingsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Move checking the cloud connection into its own filesGravatar Dirk Hohndel
This isn't UI related and shouldn't have been in a file full of UI functionality. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Code cleanup: implement window title update via signalGravatar Dirk Hohndel
This seems quite convoluted to me but I can't seem to make a more straight forward implementation work. The idea is that core code should never directly call into the UI. So instead the core code (this is C code) calls a helper function. That helper function calls a member function of a class which in return emits a signal. The UI code connects to that signal and acts accordingly when it is received. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-15Cloud storage: use preference member instead of hard coded stringsGravatar Dirk Hohndel
This creates the basis to allow other backends to be used with the cloud storage infrastructure. So far this should all just transparently continue to work. A user would have to manually add the cloud_base_url entry to the CloudStorage section in their config file in order to use a different backend server. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-15Cloud storage: create preference entry for base URLGravatar Dirk Hohndel
This just deals with the mechanics. There is no UI to enter / change this URL (and that's intentional), neither is it used, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Add libcurl to the default library dowloads for debian/ubuntuGravatar willem ferguson
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Fix renumbering of divesGravatar Dirk Hohndel
The implementation in commit 182fe790c9e8 ("Add ability to undo renumbering of dives") looks perfectly reasonable, but it depends on an implementation detail: it assumes that the keys of the QMap are returned in the same order in which they were placed there. Which apparently isn't the case for some version of Qt. With this commit we simply remember both the old and the new number for each dive and therefore the order in which they are processed doesn't matter. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Don't compare signed and unsigned valuesGravatar Jan Darowski
This fixes a "reproducable hang when using "edit dive in planner" on non-planned dive". Comparing unsigned and signed integers isn't a great idea. Fixes #880 Signed-off-by: Jan Darowski <jan.darowski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Fix compiling against libgit2-0.22.1Gravatar Gaetan Bisson
I have no idea whether the semantics is right, this patch was only written so Subsurface compiles against the current stable release of libgit2. [Dirk Hohndel: added an extra conditional so this also compiles with the curl-stream branch needed for https proxy support in libgit2] Signed-off-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Cloud storage: only offer cloud storage related options when verifiedGravatar Dirk Hohndel
If we don't have verified cloud credentials disable the menu options and disallow the use of cloud storage as default data file. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14User manual: first stab at documentation of Subsurface cloud storageGravatar Dirk Hohndel
This needs screenshots and better wording, but it's a start. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Release notes: add a few more details about cloud storageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Cloud storage: clear our last error if verification succeedsGravatar Dirk Hohndel
This is cosmetic but makes things friendlier, I think. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Cloud storage: show in preferences if cloud account was verifiedGravatar Dirk Hohndel
This should make it easier to figure out what's happening. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Cloud storage: clean up handling of cloud storage accountGravatar Dirk Hohndel
Correctly tracking the status of our authentication with the cloud service is non-trivial, especially since the user may quit Subsurface between registering and verifying an account, they might even register on one machine and verify on another. This tries to make sure that when in doubt we check with the cloud service backend. And we show errors in the UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Main menu: rephrase the cloud load/save optionsGravatar Dirk Hohndel
This seems to be more logical and more consistent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Make default file behavior work as expectedGravatar Dirk Hohndel
Subsurface will now start with the no default file, the local default file or cloud storage as chosen in the preferences. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Preferences: hook up default file behavior in the dialogGravatar Dirk Hohndel
This now sets the preference variable / config entry and keeps them in sync. Doesn't actually change the behavior at program start, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-14Preferences: radio buttons for default data file behaviorGravatar Dirk Hohndel
These aren't hooked up, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13system_default_directory() is broken with Qt 5.4Gravatar Dirk Hohndel
So for now just keep using the same function as we use with earlier versions of Qt5 as that seems to work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Simplify distance calculationsGravatar Anton Lundin
This simplifies the distance calculations and removes a dependency. This version uses propper math instead of my to simple previous version. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Cloud storage: clean up error propagationGravatar Dirk Hohndel
We were falling of the end of a number of functions that were supposed to return 0 on success or an error. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Cloud storage: initialize local cache and remote on first useGravatar Dirk Hohndel
There's no point in telling the user that the remote is empty. We need to instead fix that and create the local cache and set things up for the remote. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Cloud storage: if there is no remote tracking branch, create itGravatar Dirk Hohndel
When we first store things to the remote there won't be a matching branch for it. And even if for some silly reason the remote branch got lost - what's the point of telling the user that there is no remote branch? What are they supposed to do about it. Let's just fix the problem and move on. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Cloud storage: make do_git_save available to other modulesGravatar Dirk Hohndel
And add a parameter that tells it whether to try to save any Subsurface data or whether to just create a branch and push it out. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Add helper function to create a directoryGravatar Dirk Hohndel
Yes, this could easily done from the C code. But this seems just so much easier and I don't have to worry about the oddities of Windows and all that. I'm lazy. So sue me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Cloud storage: don't print confusing warningGravatar Dirk Hohndel
This is no longer correct and is actively misleading. We now correctly sync with the remote. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Cloud storage: Remove another git related messageGravatar Dirk Hohndel
Once we failed to load data from cloud storage (for example the first time we try to use it when the remote repository is empty), don't show git related errors to the user. It's enough to tell them that the cloud storage is empty. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Cloud storage: setup proxy before cloning new repositoryGravatar Dirk Hohndel
If we don't have a repository yet, we can't setup the proxy option before calling into libgit2. Instead we use a callback. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Don't show an error if you fail to open the cloud storageGravatar Dirk Hohndel
The lower level functions will already report that things didn't connect successfully, no reason to repeat it here (which then exposes the git URL). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Cloud storage: give user friendly error messagesGravatar Dirk Hohndel
Instead of showing the git URL and talking about failures to clone repositories, simply tell the user what's happening with the cloud storage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Cloud storage: check connectivity before trying to connectGravatar Dirk Hohndel
With a new repository we take a different path. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Move git related declarations into their own header fileGravatar Dirk Hohndel
Also change the name of the enum and make sure all the inner functions get passed the remote transport information. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Cloud storage: sync the remote after saveGravatar Dirk Hohndel
This change once again tests if the remote can be reached. Even with a fairly big data file and a medium speed internet connection the remote sync is fast enough to call it nearly instantaneous. Maybe a couple of seconds. We may need more checks / different heuristics / warnings if the sync didn't happen, etc. But for now this should allow more reasonable testing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Cloud storage: Add preference option whether to sync in the backgroundGravatar Dirk Hohndel
This defaults to on as that's the most useful setting for the average user. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Cloud storage: don't clear out password by mistakeGravatar Dirk Hohndel
If the user didn't enable saving the password to the preferences, then the password was cleared out as the preferences got synced. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Use friendlier file name when asking about saving changesGravatar Dirk Hohndel
It's silly to show our full URL with branch name in that case. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Cloud storage: better window titleGravatar Dirk Hohndel
This makes it clear that we are working with the cloud storage and removes the (in that case, redundant) branch name from the title. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>