aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-02-07Import MacDive divelogsGravatar Miika Turkia
This XSLT converts MacDive logs into Subsurface format. It supports both the current version and the upcoming version of the log format. Conversion was not tested with Imperial units as no samples were available of such logs. Thus functionality with Imperial units is not guaranteed. Note that the gear inventory is currently discarded. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-07Don't re-use the dive computer model string for all downloaded divesGravatar Linus Torvalds
When we download dives with libdivecomputer, we create this strdup'ed name of the model information, but we then re-use that (single) strdup allocation for every dive we download. This works fine *until* you start freeing those dives (possibly directly after the download because they are redundant), at which point things go to hell in a handbasket, since there is just the one allocation for all the different dives. Fix by just doing another strdup() at the point where we assign the model information to the dive computer. Reported-by: Marc Merlin <marc@merlins.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-06Yet another Norwegian translation updateGravatar Henrik Brautaset Aronsen
This time with " begin" and " end" Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-06Align last temperature text end of temperature plot lineGravatar Henrik Brautaset Aronsen
The temperature plot line was drawn to the end of the dive, but the last temperature plot text was printed near the last temperature *sample*. This was most visible on dives/test27.xml where two "20˚C" were printed on top of each other at the start of the dive, while nothing was printed at the end. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-05Change default MacOS fontGravatar Henrik Brautaset Aronsen
"Arial Unicode MS" doesn't have bold fonts, at least not on my system. This makes it impossible to distinguish trip dives from non-trip dives, since dives without at trip have bold index numbers. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-05Updated Russian translation.Gravatar Sergey Starosek
Profile related changes.c Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-05Updated Finnish translationGravatar Miika Turkia
Still plenty to be translated and verified by someone who actually knows the finnish scuba vocabulary Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-04Another update to the PO filesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-04Mark missing strings for translationGravatar Dirk Hohndel
Linus and Jan forgot to do so... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-04Fix dive computer interleaving so it works againGravatar Linus Torvalds
Merging two different dives by interleaving dive computer data got broken by the multi-dive-computer code in commit b6c9301e5847 ("Move more dive computer filled data to the divecomputer structure") which added a lot more entries to the dive computer data structure, and then copied the resulting structure incorrectly. Make sure we don't copy the events and samples allocations when we copy all the other fields of the divecomputer. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-04Get rid of dive->{start,end}Gravatar Linus Torvalds
We had this special logic to not show the end of a dive when a dive computer shows a series of very shallow samples (basically snorkeling back to shore after the dive ended). However, that logic ended up being global per dive, which is very annoying when you have two or more dive computers, and it decides to cut off the second one because the first one surfaces. So get rid of this per-dive state, and just use the plot-info 'maxtime' field for this (we never used the 'start' case anyway). That way we will properly cut off boring surface entries only when they are past the end of the interesting entries of *all* dive computers, and we won't be cutting things short. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-04Fix minor translation tool issue in Uemis downloaderGravatar Dirk Hohndel
If any component of the suit information downloaded from the Uemis SDA is "" we would replace that by the POT information when running the software in a different locale. So only add this text (and translate this text) if it is != "". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-04Better fix for translated cardinal directionsGravatar Dirk Hohndel
The previous attempt in commit f305c5c83fe1 ("Correctly parse translated cardinal directions") suffered from a bit of false advertising in that it wasn't, actually, "correct". It made silly assumptions about the length of the translated strings being 1 and also forgot the middle part of the algorithm where we use the appearance of 'E' or 'W' (and their translated brethren) as indication that there are no minutes for the the latitude. Hopefully this version does better. Reported-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-04Get printing parameters in the beginingGravatar Salvador Cuñat
- Set parameters for scaling the layout ( w and h_scale_factor), number of prints per page and rotation. - Let draw_page() manage the whole print whith the received params. - Remove draw_oneperpage() as it's unused. - Use the w_scale_factor for scaling the fonts. - Change option text in the GTK menu. TODO: - A GTK menu which let the user select the print params directly or ... - Introduce new predefined options in the printing menu. - Modify draw_page() for printing "landscaped" 6 dives if selected. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Sort the devices when adding them to the device listGravatar Linus Torvalds
This doesn't change any real semantics, but it means that we will write out the device computer information in a well-defined order, rather than in some random order (before this: reverse order of reading them in). Having the XML file be as stable as possible is important so that *real* changes stand out when you make changes to your dives. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Fix air temperature for multi-dive editingGravatar Linus Torvalds
The air temperature editing was broken when you edited multiple dives at once: even if you didn't actually change the air temperature, all dives would be reset to that particular temperature. The logic for editing dives is that we have a 'master' dive (which is the dive that all the entries get filled in from), and only if the entries have changed from what the master dive information was (ie the user actually edited it) do we change that particular piece of information. And we only change it for dives that match the master dive for that entry. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Increase the buffer for the gas text in plannerGravatar Sergey Starosek
UTF-8 strings could create more characters. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Update Russian translation for "Gas used"Gravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Allow using the map picker to refine a GPS address in info widgetGravatar Dirk Hohndel
This sets the dive gps location before calling the gps picker widget. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Add default GPS location for dive sites we already know aboutGravatar Linus Torvalds
When editing a new dive, and using a dive site name that we have already seen previously, and have GPS information for, pick up that GPS information from the previous dive by default. NOTE! When editing dive site locations for dives that already have GPS information, or when we've modified the GPS information explicitly some way while editing the dive (either through map input or by editing the text field directly) we do *not* use this automatic logic. So if you messed up the GPS information some way and want to re-populate it with the automatic mode, you need to explicitly clear the GPS text-field, at which point we go back to "ok, let's try to pick up automatic GPS data from previous dives with the same name" mode. Also note that we do the automatic location lookup only when actually editing the location field. So if you already wrote the dive site name, then cleared the GPS field, you now need to go back to the dive site name and edit it again to get the automatic GPS filling. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Updated Norwegian translationGravatar Henrik Brautaset Aronsen
Fixed the different usages of "Gas used", as well as a couple of other small fixes Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Update German translation for "Gas used"Gravatar Dirk Hohndel
Commit acd5a935850 ("Distinguish the two uses of "Gas Used" for translation purposes") allows us to get this right. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Merge branch 'po-files'Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Conflicts: po/nb_NO.po po/ru_RU.po
2013-02-03Update PO files againGravatar Dirk Hohndel
Commit acd5a935850 ("Distinguish the two uses of "Gas Used" for translation purposes") requires us to recreate the PO files. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Distinguish the two uses of "Gas Used" for translation purposesGravatar Dirk Hohndel
One is about the amount, the other about the specific type of gar that was used. Reported-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Correctly parse translated cardinal directionsGravatar Dirk Hohndel
We now compare to both the standard English characters ('N', 'E', etc) as well as to the translated strings (_("N"), _("E")) when parsing GPS strings. Reported-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Fix compiling, old api of parse_xml_bufferGravatar Martin Gysel
Commit 8843ee61 changes the api of 'parse_xml_buffer'. Unfortunately one occurrence has been left which fails if LIBZIP has been defined. Signed-off-by: Martin Gysel <me@bearsh.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Correctly reset stop depth if we receive NDL sample from libdivecomputerGravatar Dirk Hohndel
The existing code forgot to reset the stopdepth to 0 which resulted in a bogus safety stop being displayed on some divecomputers after the diver finished their deco obligation. Reported-by: Jan.Schubert <Jan.Schubert@GMX.li> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Imitialize gc y range for GF factor printGravatar Dirk Hohndel
It seemed so smart to just base the coordinates on what's already in the graphics context. Except that we apparently got a 0 to 0 range for y coordinates if there are no pressure samples for a dive. This fixes the problem and GF values are shown even for dives without pressure samples. Reported-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Increase the buffer for the gas text in plannerGravatar Dirk Hohndel
Translations that use UTF-8 could easily create more characters than I had initially specified. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Updated Russian translation in preparation for v3.0Gravatar Sergey Starosek
Some strings are not translated yet due to minor bugs. Needs to be discussed on the mailing list. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Merge branch 'subsurface-icon' of github.com:henrik242/subsurfaceGravatar Dirk Hohndel
2013-02-02Move about icon to include fileGravatar Henrik Brautaset Aronsen
Getting the about icon to display in various scenarios on MacOSX was a pain. Moving the icon to an include file solved the problem. This commit also fixes the problem Dirk was having when converting satellite.svg to a png in commit cf3c0266c2. I couldn't quite get ImageMagick to preserve transparency and color when converting subsurface-icon.svg, though, so I used Gimp instead. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
2013-02-02Rename subsurface.svg to subsurface-icon.svgGravatar Henrik Brautaset Aronsen
In preparation for a subsurface-icon.h, this should avoid confusion about whether "subsurface.h" is a core header file. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
2013-02-03Fixing SP handling in planner, adding eventGravatar Jan Schubert
This moves some double/floating handling for po2 to plain integer. There are still non int values around (also for phe and po2) in the plot area. Signed-off-by: Jan Schubert <Jan.Schubert@GMX.li> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Fixing SP handling in planner, adding eventGravatar Jan Schubert
Fixing the SP change event and introducing a bailout scenario. I decided not to use a event showing SP=0.0 nor using a gaschange event as is in fact there is no gas change related to bailing out itself. If there is also a gaschange for the event it will be displayed anyway. Signed-off-by: Jan Schubert <Jan.Schubert@GMX.li> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Fixing SP handling in planner, adding eventGravatar Jan Schubert
Fixes bug in planner which prevents from bailing out (setpoint = 0). Also introduces events for changing setpoints in planner. It also makes the eventtype for gaschange slightly more consistent by changing it from SAMPLE_EVENT_GASCHANGE (O2 only) to SAMPLE_EVENT_GASCHANGE2 (O2/He). But Subsurface treats them both the same (the distinction comes from libdivecomputer). Signed-off-by: Jan Schubert <Jan.Schubert@GMX.li> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-03Fix print displacement on SAC, CNS and OTUsGravatar Salvador Cuñat
Changes in print_weight had displaced the plot of next prints. This fix the displacement using cairo_save/restore. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-02Add 'Save As' entry to context menu shown when right clicking on a diveGravatar Pierre-Yves Chibon
Something which is nice especially when asked on the list to share an interesting dive is the possibility to save just some dives into a file. This commit adds to the context menu shown with right-click the 'Save As' entry. This entry allows to save selected dives. [Dirk Hohndel: clean up white space, commit message and remove unused variables] Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-02planner.c: Use g_time_zone_find_interval()Gravatar Lubomir I. Ivanov
current_time_notz(): Attempt to use g_time_zone_find_interval() to retrieve a timezone interval, which is then passed to g_time_zone_get_offset() Reported and tested-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-02Updated Norwegian translations in preparation for v3.0Gravatar Henrik Brautaset Aronsen
For all you Norwegians out there! Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01Quick attempt to complete the German translationsGravatar Dirk Hohndel
This will need careful review by German speakers who actually dive in German speaking countries! Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01Updated PO files in preparation of 3.0 releaseGravatar Dirk Hohndel
Translators, please start your engines... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01Fix the rules for creating the windows .nsi fileGravatar Dirk Hohndel
This was one of the reasons why I tagged version 2.9. I wanted to test all the Makefile magic we added to get sane and automated versions on Windows and Linux. And it turned out my sed script failed in rather obvious ways. These changes appear to fix that - but of course you won't see that unless you reset your git repository to the tag and manually apply this patch. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01Bump version number to 2.9v2.9Gravatar Dirk Hohndel
This is intended as a visual sign that we are getting closer to 3.0. We should consider this a "soft" code freeze / string freeze - I'm still looking for a bunch of fixes, small additions and of course documentation, but no new major features. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01Move flag icon to include fileGravatar Dirk Hohndel
Just like with the satellite icon we are creating a pixdata structure for the flag. The Makefile cleanup in commit df6a9ddd8a21 ("Auto-generate C file dependencies, and make the build more quiet") removed the rules for generating the .h file by mistake (I hope). This adds a more generic rule back in and also makes sure that the data structures get more useful names. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01print: Use logical text extents to layout text in weight system boxGravatar Carl Worth
The old code was computing locations based on relative portions of the available height. The correct thing to do, (and done here in the patch), is to advance by the logical height of rendered text each time. What's stll missing is anything to guarantee that the text drawn will fit in the box. The correct answer here is along one of two lines: 1. Use the logical text extents to decide what size to draw the box. 2. Use a pre-computed box size and choose a font size that will fit Either approach will involve a fairly substantial reworking of the rendering code in print.c. Signed-off-by: Carl Worth <cworth@cworth.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01print: Use cairo_save/cairo_restore to manage temporary cairo changesGravatar Carl Worth
The print_weight_data function was making several cairo_translate calls and then doing some final cairo_translate calls with the goal of manually undoing any changes to cairo's state. Obviously, this is fragile. Cairo provides save/restore calls which solve this problem in a robust way. Switch to using these instead. Signed-off-by: Carl Worth <cworth@cworth.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01When switching sort order, scroll the dive list to the current diveGravatar Linus Torvalds
Now that we actually seem to understand the whole notion of setting the active dive, let's take that code a bit further, and always scroll to it when we're introducing a new sort ordering. Sure, there may be other selected dives, but we have one primary (current) dive that we show the profile and dive data for, and when we switch sort order we probably want to see that dive in the dive list. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01Recognize O2 percentage from MacDive importGravatar Henrik Brautaset Aronsen
MacDive use "o2percent" in its XML export Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>