aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-12-09Updated source stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Divelogs.de: change the 'Apply' button to 'Done' for uploadGravatar Lubomir I. Ivanov
Post downloading we have an 'Apply' button that can be clicked to apply/merge the downloaded dives. When uploading we rename the button to 'Done' and enable the button if the upload was successful. The 'Cancel' button on the other hand becomes disabled. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Divelogs.de: use qDebug() instead of fprintf()Gravatar Lubomir I. Ivanov
Use qDebug() instead of fprintf(stderr, ...) in prepare_dives_for_divelogs(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Merge branch 'web' of github.com:neolit123/subsurfaceGravatar Dirk Hohndel
2013-12-09Divelogs.de: attempt to impletent 'Cancel' properlyGravatar Lubomir I. Ivanov
The correct way to stop the upload/download is to use reply->abort(). If the dialog closes, post exec() we check if the reply 'isOpen' and abort and delete it. Without this modification the program seems to crash as the connection is still in action and it attempts to read an already deleted file. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-09Fix possible compatibility issue with asciidocGravatar Dirk Hohndel
Apparently some version os asciidoc don't support the --theme option. Work around this by using -a theme='theme' instead. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Missing images for the manualGravatar Willem Ferguson
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Divelogs.de: store the user/pass on uploadGravatar Lubomir I. Ivanov
We store the user/pass for 'Apply' when downloading, but we also want to store these values for 'Upload'. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-09Divelogs.de: Improve the error handling post DLD creationGravatar Lubomir I. Ivanov
Only show a filename in the error report if such was previsly set. We also add a string for translation, that is shown in the main window. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-09Divelogs.de: Add a 'filename' field when uploadingGravatar Lubomir I. Ivanov
The 'Content-Disposition' header, requires that we pass 'name' but also a 'filename' field. Suggested-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-09Divelogs.de: further improve reading the server reponseGravatar Lubomir I. Ivanov
We now check for the following entries: <Login>succeeded</Login> <FileCopy>failed</FileCopy> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-09Divelogs.de: improve prepare_dives_for_divelogs()Gravatar Lubomir I. Ivanov
prepare_dives_for_divelogs() is based on GTK / C code where we used GLib methods to generate a temp zip file. Qt has QTemporaryFile, but it seems there is some sort of a problem when using with with zip_open (ZIP_CREATE considered) or at least in this particular case. To workaround that, we generate a random name ourself with qrand() and simply pass it to zip_open (with ZIP_CREATE) and then return the filename. Also (!), there is memory corruption when trying to return 'tempfile'. This wasn't the case with the C compiler, to my knowledge. Regardless of this fact the generated zip does not look corrupt. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-09Divelogs.de: parse response once the upload is finishedGravatar Lubomir I. Ivanov
This is based on the GTK version. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-09Divelogs.de: add code for zipping up all divesGravatar Lubomir I. Ivanov
prepare_dives_for_divelogs() comes from the GTK version, originally. The upload seems to fail at this point with an error. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-09Divelogs.de: add a divelist context menu item for uploadGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-09Divelogs.de: allow import of downloaded divesGravatar Lubomir I. Ivanov
This patch adds commands to the dialog buttons, to apply (and possibly show an error if 'parse_file' fails', reject, or show help - which is a link to the 'divelogs.de' website. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-09Update to manualGravatar Willem Ferguson
- Companion app added - Figures updated & reorganised - Small amount of reorganisation of text - Typos corrected Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Removes unnecessary references to number of elements inGravatar Tim Wootton
the date field Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Updates main menu entriesGravatar Tim Wootton
Updates summary of main menu entries to those in the new GUI Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Replaced writing email to, with sending an email toGravatar Tim Wootton
Seems to read better as "sending an email to" Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Implement a settingsChanged in DivePlannerWidgetGravatar Anton Lundin
This is so we can default to the GF's from the preferences. We need the bail handler in createTemporaryPlan, because its triggered when we change GF's, and if we don't have a stagingDive there, we will access a NULL-pointer. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Don't crash when trying to open a empty fileGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Keep track of user requested minimum depthGravatar Anton Lundin
When got auto-rescaling of the depth scale, always reset the depth scale to what the profile would suggest. This introduces a concept of user requested minimum witch we will update and not scale down to lower than. Reported-by: Henrik Brautaset Aronsen <henrik@synth.no> Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Update the diffrent units when switching systemGravatar Anton Lundin
When switching between metric and imperial, we should also show that the different units are switching too. This signals the greyed out radio buttons to switch to the right system. Fixes #347 Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Rename the radio button to match label kgs->kgGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Fix units boxes in preference panelGravatar Anton Lundin
The groupBox-es got renamed, and thus the unit-systems radio-buttons was enabling/disabling the wrong buttons. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Clarification on EAD and END meaning in SubsurfaceGravatar Salvador Cuñat
As pointed out in commit 23ce727 by Dirk and remembered Jan, there are different meanings for EAD and END depending on organisations. Let's explain a bit the one Subsurface has choosen, as this is confusing, even while translating the acronyms. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08If we have defined a gas, default to that one.Gravatar Anton Lundin
If we start to define a gas, we should use that one by default instead of air. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Calculate gas consumption for planned divesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Make local helpers staticGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Silence signed vs. unsigned compare warningGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Remove the air point at 0,0Gravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Add some assert guard around gas finding codeGravatar Anton Lundin
The code would have leaved gasidx undefined if it doesn't find a correct gas, so this asserts instead of using uninitialized variables as array index. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Add compact style to the DocumentationGravatar Willem Ferguson
The Makefile changes were authored by Dirk, the CSS is based on a public domain CSS file and authored by Willem Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Actually process the dives downloaded from divelogs.deGravatar Dirk Hohndel
Silly mistake in commit 93b5c0cd14fe ("Finish download from divelogs.de"): parse_file() doesn't call process_dives() - the caller needs to do that. Fixes #344 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08When the user cancels a download, reject already downloaded divesGravatar Dirk Hohndel
This seems like the more logical behavior, anyway. Cancel means you didn't want the result... Fixes #341 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-08Remove pointless codeGravatar Dirk Hohndel
When removing the selected dives from their trips, it makes no sense to check if the pointer was actually pointing at a valid dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07Use AL80 as default if no default cylinder is setGravatar Dirk Hohndel
Otherwise the user could get uninitialized values for newly created cylinders. Fixes #345 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07Build language list from Subsurface translationsGravatar Sergey Starosek
On Windows platform translation/ folder contains Qt translation files as well. This results in extra languages in preferences. From now we filter these translations and choose only those matching ^subsurface_*.qm$ Fixes #339 Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07Fix typo in colorGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07Language chooser improvementsGravatar Sergey Starosek
Show language instead of country, sort the list. Show country in brackets to avoid ambiguity for locales like de_DE and de_CH. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07Show CC-sp in bar, and not mbarGravatar Anton Lundin
Fixes #257 Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07Add support to edit a planned diveGravatar Anton Lundin
Left to do is to remove all the auto-added deco-points, aka the ones that had entered==FALSE before we created a dive from the plan. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07Fix gas for start dpGravatar Anton Lundin
It previously always started with o2 in air, now we start with 0 as its the same default as in the cylinders too, which fixes a uninitialized index there too. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07Propagate gas and setpoint from previous pointGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07Bugfix first deco stop finderGravatar Anton Lundin
The previous code checked against the current depth to find the next deco stop, not the ceiling we actually should head for. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07Adapt depth-scale to current way pointsGravatar Anton Lundin
If the scale is too big or too small, adapt the scale automatically. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07Make units in cells consistant in CylindersModelGravatar Anton Lundin
Now they all have units in the cells. Fixes #259 Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07amount_selected should never be decremented if already 0Gravatar Martin Gysel
this is probably more a workaround than a proper fix to a problem which I think only happens if started with no dive loaded and then create one. in that case, deselect_dive is called after saving the dive but probalby before it was added to the dive list properly resulting in an underflow of amount_selected. Signed-off-by: Martin Gysel <me@bearsh.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07redraw profile (actually clean it) if no dive is selectedGravatar Martin Gysel
otherwise the previous selected dive is still visible in the profile view. clicking on edit crashs subsurface: null pointer dereference in editCurrentDive as it uses 'current_dive' which is null. Signed-off-by: Martin Gysel <me@bearsh.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>