summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-05-07Apply the edit of trip locationsGravatar Anton Lundin
This re-adds this code that got removed in a209dfbfd53 ("Multi dive edit: don't change location texts until user saves the change") Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07Only mark location changed when in edit modeGravatar Anton Lundin
Otherwise the code loading a dive into the field would mark it as changed. This re-adds this code that got removed in a209dfbfd53 ("Multi dive edit: don't change location texts until user saves the change") Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07Improve the color coding when editing coordinatesGravatar Dirk Hohndel
This still gets it wrong (i.e. marks things as edited when they are not or not edited when they are) but at least they are no longer incorrectly marked as incorrectly parsed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07Hack around a translation issueGravatar Dirk Hohndel
I cannot figure out how to get the hemisphere letters translated correctly in qthelper.cpp. Short term hack for now - someone who understands how this is supposed to work really needs to take a look. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07Remove spurious debug printoutGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07Globe: assume that we are looking at the current_diveGravatar Dirk Hohndel
As in commit 3870bdafee53 ("Globe: we always center on the current dive") passing in a specific dive here makes no sense - it's always about the current dive. Fixes #513 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07Globe: we always center on the current diveGravatar Dirk Hohndel
Simplify the API (we'll take advantage of this in the next commit). We always center the globe on the current dive, so no point in passing that dive in. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07Multi dive edit: don't change location texts until user saves the changeGravatar Dirk Hohndel
If we keep updating the location text of all selected dives we can lose the status of which dives had the same text of the original dive and which did not (this happens if the location we are adding is identical to a selected location but adds text to the end of it). Now we only edit the other dives after we accepted the change. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07Even if there is progress text, still set the progress bar percentageGravatar Dirk Hohndel
I don't understand why we wouldn't set the percentage if we displayed text there as well. This looks much better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07Fix stupid typoGravatar Dirk Hohndel
Yeah, that doesn't work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07Manually implement strndupGravatar Dirk Hohndel
Mac and Windows don't appear to have that function, so just implement the poor man's version by hand. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07Remove trailing spaces from the produced outputGravatar Anton Lundin
The code found the trailing spaces and just didn't care about it. This also removes the FIXME quoting, because quoting is managed. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07User manual: Updates regarding the companion appGravatar Willem Ferguson
These adiitions and changes were made in accordance with the screenshots provided by Venkatesh and Salvador and after managing to actually run the companion app on my phone. Large parts of the text of this section have been changed in accordance with the Companion V2 interface. Two graphics were changed. After Version 2 has stabilised, some more adaptation of the text will be required. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-06Qt turns edited locations into null-stringsGravatar Anton Lundin
They aren't null pointers after you touched them, so we can't rely on that to choose if we should use put_string or show_utf8. show_utf8 would not print the tag if it only contains a \0 as body. Fixes #440 Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-06Terminate the string before relying on strlenGravatar Anton Lundin
Its a c-string we put, so it must be null-terminated. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-06Revert "Save latitude and longitude on XML even if location not set"Gravatar Anton Lundin
This fixes the bug in #440 by accident, and introduces lots of empty attributes and tags in the xml. This reverts commit 6378bfd91ee6c0ad746b072d8a9389e0eba7c614. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-06Simplify string comparisonGravatar Dirk Hohndel
This is based on Linus' idea on the mailing list. Treat NULL strings and empty strings as identical. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-06More multi-edit fixesGravatar Dirk Hohndel
This time for values that aren't simply text. For normal integers this is rather straight forward. For the 'when' timestamp we simply assume that this is a shift in time. What is still missing is consistent handling of the three fields that are implemented as tags: tags, buddy and divemaster. We have special code for tags that makes no sense in a multi-edit scenario. And we treat divemaster and buddy as a single string - which kinda works but treats "Bill, Joe" and "Joe, Bill" as different. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-06Last minute Beta 4v4.0.99Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-06Only change identical fields when editing multiple divesGravatar Dirk Hohndel
This was broken when porting to Qt - we used to do this correctly in the Gtk version. When editing multiple dives we show the current dive to the user and allow them to edit that and then apply those edits to all selected dives. The way this is SUPPOSED to work is that we only change those selected dives that had the same value for the edited field as the current_dive had for that field. Let's say you select ten dives. The current dive shows divemaster Joe. You change that to divemaster Jim. Then only the selected dives that had divemaster Joe should change to Jim. All other dives should stay unchanged. This seems to implement that logic. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-06Change EDIT_SELECTED_DIVES macroGravatar Dirk Hohndel
The way this is implemented is broken in several ways. This fixes the first issue. For the invocations where we are in the 'WHAT' checking to see if the value we are changing in the selected dive was previously the same as in the current dive (which is the one shown to the user for editing), then we need to make sure we change the current dive last, otherwise the comparison will fail. Of course, right now we only do this check for gps location, which is a massive bug as far as I am concerned. Fixes #515 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-05Change the profile redraw logic after preferences were changedGravatar Dirk Hohndel
I we are showing a calculated ceiling, then we have to replot the profile after a preferences change as the gradient factors could have changed which might change a calculated ceiling. Also use the rulergraph preference instead of checking the settings directly. Fixes #511 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-05Correctly parse boolean preferencesGravatar Dirk Hohndel
QVariant does the right thing, regardless of whether the value is stored as int or as string - so let's just use that instead of manually checking for integers (and failing if the values are stored as "true" and "false"). Fixes #511 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-05Fix odd indentationGravatar Dirk Hohndel
I need to fix this in the tool as well... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-05Make rulergraph a pref as wellGravatar Dirk Hohndel
I don't see a point in treating it differently from the other graphs. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-05Fix standard cylinder namesGravatar Dirk Hohndel
We need to pass the size as an integer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-05Uemis downloader: handle more corner casesGravatar Dirk Hohndel
After receiving another report of the Uemis downloader failing I tried to make it more robust when unexpected things happen. The data structures returned by the SDA are rather convoluted and not all relationships are fully understood. This makes sure we don't try to parse invalid dive entries, we only read dive entries if we actually got new divelog entries, we only read dive sites if at least one was referenced and we use a much more patient (and hopefully, much more robust) algorithm to figure out which dive entry corresponds to the new divelog entries. What a pain. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-05Fix bug in handling of fake SAMPLE_EVENT_PO2 eventsGravatar Dirk Hohndel
In commit bcdd6192fe45 ("Show translated event names in tooltip") I was too aggressive in replacing the checking for event names with checking for event types. It turns out that we are abusing an existing event type in the planner (and use a different event name to mark the difference). By just checking for the type this now caused incorrect information to be displayed in the info box (a simply "PO2 warning" on a Suunto D9 could turn into a "Bailing out to OC" notice). The correct fix is to get our own range of SAMPLE_EVENT_xxx numbers from libdivecomputer. Once we have those, we can do this the right way. For now we just fall back to also checking the event name (which is what I wanted to get away from so translated names don't trip us up). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-05User manual: document importing GPX files in companion appGravatar Salvador Cuñat
Document the new "add" menu capabilities, partially as there are features still not functional. Documents the new feature with GPX files imports. Corrects a typo. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-05Marginal optimization of UDDF importGravatar Miika Turkia
This speeds up Aquadivelog imports marginally by doing lookup to used equipments only instead of all equipment ever used. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-05Add images to all dive computers and refresh profileGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-05Correct check for existence of DateTimeOriginal exif tagGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-04Add conditional so globe.cpp builds with older versions of MarbleGravatar Dirk Hohndel
In commit 7f3b487c77c7 ("Restore the previous globe zoom level after showing dive without GPS") I was a bit too aggressive in replacing a deprecated API function - people still need to be able to compile against Marble versions older than 4.10. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-02Optimize UDDF exportGravatar Miika Turkia
Writing the samples/waypoints to UDDF export in a totally new way. Previously the preparations for approximating waypoints was done for every sample, now only for the events. A few days ago it took 36 seconds for my test set of 8 dives to export to UDDF. This optimization round took it down from 0m4.745s to 0m0.253s. Fixes #508 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-01Bump to Beta 3 / 4.0.98v4.0.98Gravatar Dirk Hohndel
Beta 2 didn't last long... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-01Re-center on current dive if dive edit is canceledGravatar Dirk Hohndel
If the user changes the coordinates for a dive but then cancels the dive edit, the globe would stay at the location that was temporarily set and not rotate back to the still active coordinates. This fixes it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-01Only change dive coordinates on double clickGravatar Dirk Hohndel
Apparently this only happens on Windows, but there we would change the dive coordinates on a SINGLE click when editing a dive. With this change we simply bail if the event isn't a double click. Fixes #505 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-01Dont set coordinates when two or more dives are selectedv4.0.97Gravatar Tomaz Canabrava
If a trip is selected (or for other reasons more than one dive), this would change the GPS coordinates of the whole selection which almost certainly isn't what the user wanted. Instead, only allow changes of the coordinates on the globe if exactly one dive is selected. [Dirk Hohndel: massively rewritten and extended - but I didn't want to simply "steal" the commit from Tomaz... This now maintains the "zoom out mode" for dives without GPS coordinates and deals with edits of multiple dives that are initiated the "normal way" by starting to edit other data as well.] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-01Restore the previous globe zoom level after showing dive without GPSGravatar Dirk Hohndel
Thanks to commit 83c5ab58718e ("Zoom out when dive has no coords.") we show more of the globe when displaying dives without GPS data - but that caused us to forget the zoom level we used before and so the experience when switching back to a dive with GPS data was disappointing. This makes sure we track the last valid zoom level and restore it when needed. I also replaced the deprecated zoomView() calls with setZoom() calls. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-01Fix Uemis SDA downloadGravatar Dirk Hohndel
Stupid typo in commit e1a1c218 broke the Uemis download. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-01A better guard for 'dive being editted'Gravatar Tomaz Canabrava
Mouse activity on the globe should not select dives when one or more dives are being edited. This improves the detection of that state. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-01Zoom out when dive has no coords.Gravatar Tomaz Canabrava
This patch makes the globe zoom out to show it complete when the dive has no coordinates. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-30ReleaseNotes.txt: mention that unused cylinders are no longer shownGravatar Dirk Hohndel
See #504 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-30More import/export support info on ReleaseNotesGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-30Getting ready for 4.1 Beta 2Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-30Fix type in German translationGravatar Dirk Hohndel
This prevented the download link in the update response from working. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-30Tell Qt4 that we really meant Utf8 when we said Utf8Gravatar Dirk Hohndel
How strange. Telling Qt4 to assume that all C strings are Utf8 apparently isn't enough to convince tr() that the C strings we pass to it are Utf8. You need to set that codec separately. Fixes #503 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-30Make Subsurface with a British accent workGravatar Dirk Hohndel
Our workaround for the lack of a US-English translation breaks en-GB. With this the British version of Subsurface should work as well. Reported-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-30Improve header wording for CSV exportGravatar Miika Turkia
Duration is better term than time for the length of the dive. Also remove the repetitive word dive from some of the header fields. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-30Add export CSV to user manualGravatar Miika Turkia
Mention the option to export in CSV format in our user manual. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>