* 'info-split' of git://git.hohndel.org/subsurface:
Add statistics for longest, shortest, and shallowest dive
Create separate single dive and total stats pages
Separate out single dive statistics and total statistics
I don't really like calling the shallowest dive "min depth", but all other
texts that I could come up with that were reasonably short weren't any
better...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Right now this just changes the infrastructure - nothing outside of
statistics.c is modified. This is simply in preparation to split out the
single dive info and the total dive statistics in the future (as we are
creating more info and more stats and they will overflow the screen area
available - so this will turn into two notebook tabs).
This commit does not change any functionality.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We have local variables or function arguments with the same names as
function static variables (or in one case, function arguments).
While all the current code was correct, it could potentially cause
confusion when chasing bugs or reviewing patches. This should make things
clearer.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Move the About and Preferences menu item to the App menu.
Switch the accelerator key to be Meta (i.e., Command) instead of Control
This required a bit of restructuring of the code, but it's all for a good
cause.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
CFPreferences* seems to be the proper way to handle preferences on MacOSX.
This approach also eliminates a problem where the hard coded preferences
path couldn't be read.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
[ fixed small coding style issues ]
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add missing internal links
Work on better visual representation of structured data
Start creating quoted text (instead of styled text)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
You can do "make doc" in the main directory to create the html version,
and if you want to play around with it, do "make show" in the
Documentation subdirectory to start firefox on the end result.
It's by no means perfect, but it gives somewhat reasonable results, and
this is enough initial work for people to play around with, I think.
NOTE! You need "asciidoc" installed to do this: it's a python program,
so it should be pretty easy even on non-Linux platforms. And on Linux,
most distributions package it, so you just have to do something like
yum install asciidoc
to get it (replace with apt-get/zypper/whatever).
Asciidoc can generate other output too (man-pages, LaTeX, etc), maybe
people want to play with that part too.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
To do this a few things needed to move into the os specific files, but the
overall change is fairly small and the difference on the Mac is amazing.
Subsurface now becomes a Mac app with Mac toolbar and useful default
fonts.
Changed the CFBundleIdentifier to be the reverse DNS of the subsurface
site (sadly, 'torvalds' is not yet a TLD).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Right now we do certain cylinder info operations only when importing
from an XML file, which is wrong. In particular, we do the "is the
gasmix air" or "what is the standard cylinder name" only at XML read
time, which means that if you import a dive directly from the dive
computer, it won't have the air sanitization or the proper default
cylinder names.
Of course, most dive computers don't actually save enough cylinder
information for us to do the cylinder name lookup anyway, but some do.
And all Nitrox-capable dive computers do have that O2 percentage that
needs cleanup too.
Reported-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'windows' of git://git.hohndel.org/subsurface:
Fixes for the Windows installer
* 'docs' of git://git.hohndel.org/subsurface:
Version 0.0.7 of user manual
* 'forlinus' of git://git.hohndel.org/subsurface:
Remove unused return value
We never use the number of decimals that this function returns. So we
might as well not return them to begin with.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add missing files and update a library version number.
The library version thing seems to indicate that this is much more fragile
than I'd want it to be...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Not sure, but us-ascii might have been intended.
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
[ And even if you do want to use utf8, you should use it correctly, not
with this "pick random character" approach - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Using xmlParseFile() was simple, but I'm planning on extending the file
parsing past just XML, since we want to be able to import other formats
too. And quite frankly, that means that we'll want to read the file
into memory to look at it before we start parsing it.
We could decide do it by file extensions too, and I'll look at that
approach as well, but regardless of how we do things it's almost
certainly a good idea to do the file access in one place. The XML
parsing might as well happen from a memory buffer instead anyway.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The plain dash may look a bit too much like a trimix specification. Is
the ellipsis better? Maybe.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Support for multiple cylinders and gas change events when Importing
JDiveLog logs to Subsurface. This is tested with manually crafted data
and not real data (originating from dive computer).
NOTE: Subsurface does not handle importing multiple cylinders
correctly but imports only the first cylinder. However, manually
converting data to a file and opening that in Subsurface works
correctly.
(xsltproc jdivelog2subsurface.xslt jdivelog-gas.jlb > gas.xml)
Some minor tweaking on importing JDiveLog specific fields to notes
fields in Subsurface is also included.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'forlinus' of git://git.hohndel.org/subsurface:
Improve Makefile for MacOS
Add reasonable default device names for divecomputer import
More intuitive label for "not saving" when exiting
Some macs appear to need "-framework CoreFoundation" added to the linking
step, others (which appear to have the exact same OS and tools installed),
don't. But as it doesn't appeart to hurt, I unconditionally add this.
Switched to using pkgconfig to find libdivecomputer on the Mac.
Tried to clean up the Makefile a bit
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Acked-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
So far we hard coded /dev/ttyUSB0 - which is a good starting point in
Linux but not so useful on Windows or MacOS. This was now moved into one
of our OS helper functions with (somewhat) reasonable defaults.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Cleanup of the layout
Changed line-length to 74
Added chapter 11. How to find the Device Name
Added Appendix A: Supported divecomputers
Signed-off-by: Jacco van Koll <jacco.van.koll@gmail.com>
Right now the options are "Save" and "Cancel". I wrote that code and it
always bugged me - "Cancel" could mean that I want to cancel the the whole
operation, i.e. that I don't want to quit after all. Showing "Save" and
"No" seems much more logical.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>