summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-06-09Picture handling: parse and convert old style picture eventsGravatar Dirk Hohndel
Speacial case handling for event type '123' to instead add a picture to the picture_list of the dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Change character for liter in SAC values as wellGravatar Dirk Hohndel
And fix the bug that in the info overlay SAC was always given in metric values. And try to reduce the number of places in which we calculate the unit conversions... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Really display liters with script elGravatar Dirk Hohndel
In commit 125ddd955c04 ("Display liters with script el") Robert only fixed the C routine we use to show units. Strangely, we had a separately implemented C++ function as well. Instead of implementing this in two spots I now simply have the C++ function use the C function to do the actual work and then wrap this into an easier to use (from UI code) QString output. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Planner: incease step size in deco ascends to 3 secondsGravatar Robert C. Helling
Triple time step in deco ascents to improve responsiveness of interactive deco calculation. [Dirk Hohndel: split commit into two] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Display liters with script elGravatar Robert C. Helling
Use script ell instead of 'l' for liters to avoid confusion with digit 1. Let's hope that this glyph is available in the common fonts, otherwise we'll have to revert it. [Dirk Hohndel: split commit into two] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Simplify the code that checks if it's OK to close the current fileGravatar Dirk Hohndel
And make sure it gets called whenever it needs to get called - it was missing from the openRecentFile case. Fixes #530 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Pick the correct API function name for Qt5Gravatar Dirk Hohndel
Subtle change in function name from Qt4 to Qt5 setAcceptsHoverEvents -> setAcceptHoverEvents Now Subsurface builds with Qt5 again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Picture handling: parse XML dataGravatar Dirk Hohndel
Using XML data files we can now save picture data and load it back in again. The corresponding code for save-git and load-git is still missing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Picture handling: change data structure to store offset instead timestampGravatar Dirk Hohndel
It makes no sense to store a 64bit time stamp with every picture. Even the 32bit offset (in seconds) from the dive start is WAY overkill. But switching to that makes the code much more simple in a number of spots. And makes what is saved to the XML file easier to read, too. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Picture handling: stagger the picturesGravatar Dirk Hohndel
If the pictures are too close to each other, spread them out a bit more. This seems to give a reasonably pleasant layout. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Picture handling: keep picture list sortedGravatar Dirk Hohndel
And simplify the list handling algorithm. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Picture handling: put the picture near its correct time during the diveGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Picture handling: don't add the same picture more than onceGravatar Dirk Hohndel
It confuses us elsewhere (the model suddenly doesn't match the list of pictures as the model doesn't reflect the duplicate pictures). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Picture handling: adjust timestamp after it's setGravatar Dirk Hohndel
We need to first parse the exif and then adjust the timestamp. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Rotate the picture around -4 and 4 degrees.Gravatar Tomaz Canabrava
This patch rotates the picture a bit, so it looks like it was splattered around the profile. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Add a drop shadow on the pictureGravatar Tomaz Canabrava
This patch adds a drop shadow on the picture. a real blurry shadow could be much better, but without OpenGL it's too costly to calculate the shadow for each picture. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Add a nice white rectangle around the pictureGravatar Tomaz Canabrava
This makes the picture looks a bit more like a real paper picture shadow's missing, though. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Subtle animation when the picture gets hovered with the mouse.Gravatar Tomaz Canabrava
This patch adds a subtle animation when the picture gets hovered with the mouse, and restored to it's original size when mouse exits the image area. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Add a scaleTo animationGravatar Tomaz Canabrava
ScaleTo animation will scale or shrinks an graphical element in an animated way. This is going primarelly to be used on the pictures on the profile, but can be used on anything else later. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Save the timestamp of the dive.Gravatar Tomaz Canabrava
Save the timestamp of the dive if it exists in the data provided by the exif library. [Dirk Hohndel: fixed whitespace and format specifier] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Attempt at telling Makefile how to build the user manualGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Make make clean also clean in the doc subdirGravatar Thiago Macieira
Also add reminder comments for creating debug builds on Windows Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Gas was printed in permille, use gasname insteadGravatar Anton Lundin
After the switch to a central event decoder and just return gasmix from that we printed things in permille, eg. EAN1000 and 180/550 which looks kinda strange. This fixes that by using gasname instead to give the gas a name. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Fix out of tree building without asciidocGravatar Anton Lundin
We tried to copy the .html.git file from the out of tree build dir, not from the source dir. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08HTML export: fix packaging of theme dirGravatar Dirk Hohndel
I was confused by the function name getSubsurfaceDataPath() - it does not find paths relative to the "data" folder, if finds the path where we might install folders like "data", "translations", or "theme". "data" is for some reason where we install the "marbledata" files. Therefore on both Mac and Windows we need to put the "theme" directory next to the "data" directory, not below it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Correctly test QString for being emptyGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-07Ignore user-manual_es.htmlGravatar Cristian Ionescu-Idbohrn
Some 'clean' Makefile target should remove the generated user-manual_es.html too. Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-07Make parse-xml callbacks be type-safeGravatar Linus Torvalds
.. and fix the type breakage brought in by commit eaf6d564874a ("CCR code: Change to sample structure") The XML parsing callbacks pass a "void *" around, because the helper function that matches the XML node names ("match()") does so for all the different dive/sample/dc member nodes that all have different types. But that also hid the fact that it very much depended on the various types being regular "int" etc, rather than the denser types that were introduced so that the CCR data wouldn't expand memory use excessively. As a result, XML loading would overwrite other members, and possibly even the allocation, when it wrote an "int" value to something that only was a 8-bit allocation. I left the "utf8_string()" without type checking - so it still uses "void *_res" for the result type, with the cast happening inside the function. That's because the result destination ends up being a bit mixed-up wrt "const char **" and just plain "char **". Note that the thing we modify itself isn't const (it's not "char *const *"), but the pointer, but we basically sometimes assign a "const char *", and sometimes a "char *". I considered making two different versions of the callback, but it just wasn't worth it. So "utf8_string()" users still aren't type-checked, and you'd better give it a pointer to something that is some kind of "char *" This patch doesn't really change the calling convention of the matching function itself, but it makes the wrapper macro ("MATCH()") take a properly type-checked function pointer instead (with a dummy call to do type checking), and then casts the pointer to the "void *" type for the actual real call. The function pointer call is not really portable (although it works on all sane architectures, particularly since the cast only changes one argument from one type of pointer to another), and to make matters worse uses the gcc statement-expression extension. But all the compilers we use seem to support that gcc'ism, so in practice this gives us type-safety with no downsides. (If we ever want to use MSVC to compile subsurface, I suspect we'll have to ifdef out the statement expression use and not type-check things. Or perhaps re-write the thing as a ternary expression instead, or something). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-07Build tools: allow debuggable cross builds for WindowsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-07Typo in subsurface.pro prevents a clean build on Mac.Gravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06User manual: install English and localized copiesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06User manual: show a localized version of the manual if it existsGravatar Dirk Hohndel
So far we only have Spanish, but it always pays to plan ahead. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06User manual: add html version of Spanish manualGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06User manual: update Makefile for multi language supportGravatar Dirk Hohndel
New translations need to be explicitly added to the Makefile Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06User manual: Spanish translationGravatar Salvador Cuñat
Spanish translation for the user manual as of 4.1 tagged english version. Trimmed to 80 columns except where this could break links and affect the html conversion. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06HTML: fix unexpectedly ended stringsGravatar Miika Turkia
String concatenation must be stated at the end of a string line (not by starting the next line with the concatenation character). Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06HTML: define decimal explicitly for parseInt()Gravatar Miika Turkia
Older browser assume octal radix on parseInt() when number starts with 0, thus declaring decimal notation explicitly. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06HTML: prevent implicit type conversion on testingGravatar Miika Turkia
== comparison of true, false, null, allows implicit type conversion, thus using === instead Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06Fix HTML export template syntaxGravatar Miika Turkia
Angle brackets must be quoted when not part of an HTML tag. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06HTML: export to system dependant path separatorGravatar Gehad elrobey
This will make the exporting path separators platform dependant Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06HTML: Better quoting to the export stringsGravatar Gehad elrobey
Move the quote function to membuffer.c and adding wrappers that call it from both xml and html exporters to get rid of redundancy. Quote the location, buddy, suit, tags and notes This prevents js code from crashing. [Miika Turkia: minor whitespace and code fix] Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06qmake: change the folder structure assumed for LIBMARBLEDEVELGravatar Dirk Hohndel
LIBMARBLEDEVEL is now assumed to point to the install prefix used for a marble install (instead of into a mix of source and build trees as it did in the past). This makes it much easier to have Qt4 and Qt5 versions of this library and link to the right one as needed. Of course this requires a matching LD_LIBRARY_PATH when launching a such-built Subsurface. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06Prepare for Qt4 / Qt5 cross builds of Windows binariesGravatar Dirk Hohndel
Admittedly I believe I'm the only one using this script (and related .nsi file), it still seems to make sense to keep it up to date in the repository. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-05Install HTML export theme files on Windows and MacGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-05Switch to the new gasmix structure in dump_planGravatar Anton Lundin
dump_plan wasn't updated when the switch from he/o2 to gasmix was done in the planner code, this makes it compile again. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-05Planner: Avoid bogus segments with 0 timeGravatar Robert C. Helling
Don't show a stop if we continue at this depth. This resolves a problem when there are more than two waypoints during deco at the same depth. This can happen at 6m when there is a gaschange to O2 and the last stop depth is 6m (which turns the 3m stop into another 6m stop). Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-05Planner: Change 'lasttime' only if we printed something in the plan.Gravatar Robert C. Helling
This makes the 'segment' durations equal the runtime differences even when we don't display transitions in deco. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-04Disclaimer included in the printed diveplanGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-04Force TTS/NDL calculation off if things take too longGravatar Dirk Hohndel
This is kind of a random cut off, but if plotting the dive takes more than a second and TTS/NDL is on, we force it off. Because the algorithm for that is fundamentally quadratic in nature it can take a VERY long time - getting users to think something is broken. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-04More tweaks to TTS calculationsGravatar Anton Lundin
Add a lager step value when walking the calculations forward. [Dirk Hohndel: this was sent ages ago and in all the discussions about the implications I apparently never applied this] Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>