aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-12-10Add the new string introduced in the previous commitGravatar Dirk Hohndel
It gets lost in the noise with all the line number changes, but this introduces only a single new string. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-10Webservices: make the dialog title more genericGravatar Lubomir I. Ivanov
We use the same dialog for both the Subsurface WS and for the divelogs.de one. Instead of the old title (which suggests download) we can use a more generic one - "Webservice Connection" This makes it easy for us to maintain a dialog that can both upload and download data, while the dialog title is descriptive enough. Fixes #352 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-10Planner: fix potential assert in clear()Gravatar Lubomir I. Ivanov
If rowCount() is 0 we get an assert: ASSERT: "last >= first" in file kernel/qabstractitemmodel.cpp... To solve that we wrap the beginRemoveRows() call in a bnrach: if (rowCount() > 0) { ... Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Remove some unused variablesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Use implicit zero initialize for the whole array.Gravatar Anton Lundin
Clang yelled about it, and it looks prettier. It also felt kinda strange to explicit initialize the first element to zero and the rest to zero implicit. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Remove possible dual meaning in Divemaster and Buddy.Gravatar Tim Wootton
Pedantic Tim says "Barring waterproof device, most of us won't be entering these fields during the dive." ;-) Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Removes imperative to not save-as-you-go.Gravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Fix another potential crashGravatar Anton Lundin
Initialize diveplan.dp to NULL, so we know that we will bail in drawProfile, when the initial settingsChanged is fired. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Small addition to the INSTALL instructions for FedoraGravatar Pierre-Yves Chibon
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Updated user manualGravatar Willem Ferguson
1) Added Main Menu items description 2) Added Divelogs.de description 3) Removed paragraph defining EAD & END 4) Several typos corrected 5) Positions of several figures standardised to align="central" Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Re-enable login and password fields after uploadGravatar Sergey Starosek
Give user the possibility to re-enter username and password after unsuccessful upload due to wrong credentials. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Fix potential crashGravatar Anton Lundin
Initialize stagingDive to NULL, so we know that we will bail in createTemporaryPlan, when the initial settingsChanged is fired. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09Fix tab order for webservices dialogGravatar Sergey Starosek
At least username and password have to follow each other. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>