aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-06-18HTML export: before showing the dive list, sort descending by dive numberGravatar Dirk Hohndel
This way the newest dive gets shown first (which I think makes much more sense) and the dives are in order as we show them in Subsurface. I actually think we should toggle trips on by default - but I'm not sure. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18HTML export: cosmetic change to show 20 dives by defaultGravatar Dirk Hohndel
10 just seemed a little... low. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18HTML: Fix spelling mistakeGravatar Gehad elrobey
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18Git storage: don't abort if there is no default user/email setGravatar Dirk Hohndel
I never ran into this because all of my computers have a global default set for my name and email address. But if the user never uses git and has no global settings there will be no such info. Instead of failing we need to just set up a default ID and then try to get a best guess from the OS (just as we used to do before libgit2 supported getting the git settings for authorship). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18HTML exporter: don't try to write to NULL file descriptorGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18HTML standalone exporter: use Subsurface dive numbersGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18HTML standalone exporter: give up if parsing the input failsGravatar Dirk Hohndel
There's no point in trying to export after not being able to read the data in the first place. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18Fix potential crash if the existing filename is NULLGravatar Dirk Hohndel
Should have used same_string() anyway... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Make sure cylinder related data is filled when dives are readGravatar Dirk Hohndel
This is re-run every time we update the dive list model for the UI, but we should run it a first time right after loading the dives so that this data is correct even without the UI running - this way the data in headless standalone applications like the HTML exporter is correct as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17HTML export: corretly show weird imperial tank sizesGravatar Dirk Hohndel
It's not enough to convert the wet volume - you need to multiply in the working pressure. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17HTML exports: minor cosmetic improvementsGravatar Dirk Hohndel
This brings up the satellite view when clicking on GPS coordinates and sets a slightly better page title. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Hide the dive-related controls when showing tripsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Make the expand/collapse buttons usefull on tripsGravatar Anton Lundin
There where some issues with trying to access non-existing dom elements when clicking them when showing trips. Instead of fixing that issue, this actually makes them do something useful, expanding and collapsing the trips. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Remove old timing of functionGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17HTML standalone exporter: don't setup preferencesGravatar Dirk Hohndel
We don't need them and they can cause the application to crash when called in a git hook. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17HTML export: better Google maps linkGravatar Dirk Hohndel
This way we get an actual place marker Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Remove some include files from qthelper.cppGravatar Dirk Hohndel
We keep forgetting to remove include files after modifying the code in ways that no longer requires them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17We don't really need a long to count the dive sitesGravatar Dirk Hohndel
At least I hope not. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Add missing package to INSTALL fileGravatar Dirk Hohndel
This way lupdate is present on Ubuntu Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17HTML Exporter: make JS work on Firefox as wellGravatar Dirk Hohndel
It appears the standard way to figure out what type of element is sending the event is to use .target instead of .toElement - specifically, Firefox doesn't understand .toElement and so the expansion of dives by clicking on them didn't work in Firefox. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Remove the references to QtPositioning from INSTALL fileGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Use saved units in the HTML exporterGravatar Dirk Hohndel
Also update the exporter to match the latest changes in the Subsurface code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Store the user's unit preferences in git storageGravatar Dirk Hohndel
Save and load a usually unused copy of the preferences with the units that were active the last time the dive list was saved to git storage (this isn't used in XML files); storing the unit preferences in the data file is usually pointless (that's a setting of the software, not a property of the data), but it's a great hint of what the user might expect to see when creating a backend service that visualizes the dive list without Subsurface running - so this is basically a functionality for the core library that Subsurface itself doesn't use but that another consumer of the library (like an HTML exporter) will need. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Git storage: only check git_id if saving to the same remoteGravatar Dirk Hohndel
If we switch to a different remote (let's say we opened a local git repo and want to save its content to the cloud storage) then don't check to make sure that the branch stayed unchanged (because, duh, it's a different remote, it will have changed). This fixes the problem where you could open an XML file and store it to cloud storage just fine, but opening a local git repository and then storing that to cloud storage failed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>