aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-09-23Code cleanupGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Much simpler code to set the dive siteGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Don't crash on new dive siteGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Do not display popup with modifiersGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Select an index if no index is selectedGravatar Tomaz Canabrava
Defaults to first row. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Set the correct dive site uuidGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Correctly fix the popup positionGravatar Tomaz Canabrava
When the message to 'This dive site is being edited' was being show while the popup to choose the dive site, the line edit was being covered. now it correctly moves to the correct place. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Removed a ton of dead codeGravatar Tomaz Canabrava
Unused dead code / hack for the old QCompleter Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Handle palette change for dive site selectionGravatar Tomaz Canabrava
If you select a dive site with a different uuid than your current dive.dive_site_uuid, you should get a different pallete to state clearly that something changed. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Fix keyboard inconsistenciesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Fix new/existing dive site choicesGravatar Tomaz Canabrava
Only set the currType and currUuid if text changed. This is needed because if you hit key_down it would set NEW_DIVE_SITE because a keypress on the lineedit was due. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Set the current dive site uid / textGravatar Tomaz Canabrava
Start to make this thing usefull: Upon selecting the current index or writting something on the line edit, we need to set the dive site. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Correctly handle space and tabGravatar Tomaz Canabrava
Space and tab should select the item in the itemview and hide it; enter and return also do that automatically. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Block focus out eventGravatar Tomaz Canabrava
The line edit wasn't being properly updated regarding its paint event. Turns out it was because it received a focus out event and then stopped refreshing the paint. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Random fixes and improvementsGravatar Tomaz Canabrava
Whitespace fixes, constructor fixes, new slot (still unused) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Whitespace fixGravatar Tomaz Canabrava
Sorry. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Fix correct size of the popupGravatar Tomaz Canabrava
Correct the popup visibility. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Handle dive site activationGravatar Tomaz Canabrava
Connect the view activated signal to send us the index. Removing debug output that I forgot inside it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Made it possible to keypress againGravatar Tomaz Canabrava
Click outside of the popup closes it, also handles theme enter / return keys. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Start to handle keypressesGravatar Tomaz Canabrava
Keypress management is one of the main functions of the completer, so we must create an event filter and hook things up properly. key esq / enter should close the popup (and not leave us with a popup open and no way to close it - it breaks X) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Display the popup in the correct placeGravatar Tomaz Canabrava
The popup should be shown beneath the QLineEdit. this code here is shamelessy stolen from the QCompleter source code because I really didn't want to rethink the correct way of doing this. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Re-add the 'plus' button on the delegateGravatar Tomaz Canabrava
This was missing in the delegate - now it's prettier. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Stabilize the location model/proxy modelGravatar Tomaz Canabrava
Since I removed the old location edit from the UI, I also need to remove a bit of code from the UI that was calling it. fix a few crashes regarding the old location edit. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Skeleton of the new LocationComboboxGravatar Tomaz Canabrava
This is the bare minimum skeleton of the new completer for the dive site management. Nothing works, yet, nothing is hoocked up, yet. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23MXE build script: more cleanupsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Hide a couple of debugging messagesGravatar Dirk Hohndel
They are useful to show when trying to figure out what's going on, so just move them behind a check for verbose. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Show progress bar when loading from cloud storage by defaultGravatar Dirk Hohndel
It turns out that I forgot to make sure that the progress bar is shown if the user has things set up so that the cloud storage is the default dive file that they open. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Windows XP doesn't contain a valid CA for our cloud certificateGravatar Dirk Hohndel
This is the authentication check and cloud server availability check which are different from the one git does. The mechanism for overriding things is different from there, but this should work just as well. We intercept the SslErrors signal and if we get the known good hash for our certificate, we simply call it good. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23planner.c: fix missing brances warningGravatar Lubomir I. Ivanov
for a 'struct gasmix' initialization, the 'permille' value from franction_t should have it's own braces. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23planner.c: fix warnings about unused variablesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23load-git.c: fix warning about sscanf() argumentGravatar Lubomir I. Ivanov
Type of the 4th argument is detected as "enum <anonymous> *", we cast it to (int *) when passed to sscanf(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23libdivecomputer.c: fix warnings about unused variablesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23file.c: fix warnings about unused variablesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23divesite.c: fix warnings about unused variablesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23deco.c: fix warnings about unused variablesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Cloud storage: more user friendly handling of local cache corruptionGravatar Dirk Hohndel
When dealing with cloud storage most of the time the user will not be familiar with git. So if the local cache is corrupted don't leave them to clean up the mess. Instead just move things out of the way (just in case they know how to extract data from the damaged local repository) and ask them to restart the operation which should give them a fresh copy of their data from the remote server (minus any local changes that hadn't been synced to the server before things went bad). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Add helper function to safely move away file or directoryGravatar Dirk Hohndel
Try numberical suffix until you find one that isn't used yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Update MXE cross build scriptGravatar Dirk Hohndel
Small addition for completeness Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22MXE build: small tweaksGravatar Dirk Hohndel
While this should be fixed in cmake, for now just manuallt get libssrfmarblewidget.dll and QtXml.dll in place Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22Dive merging: make sure that the profile is redrawnGravatar Dirk Hohndel
This uses the just introduced refreshProfile() function. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22Add refreshProfile member function to MainWindow classGravatar Dirk Hohndel
While the whole idea of calling these functions through the MainWindow instance is atrocious, until we change the architecture of all this refreshProfile() is a useful function to have. In order to make this cleaner to implement I allowed an argument to ProfileWidget's replot() which allows picking a specific dive. By defaulting this to 0 we get the previous behavior when calling replot() without an argument. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22User manual: Bluetooth UI descriptionGravatar Willem Ferguson
1) Inser Bluetooth UI description at end of section dealing with dive download. 2) Delete existing text in appendices that detail pairing a Bluetooth device with the Subsurface computer. One image is added to the manual. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22qtbluetooth: Break read/write loops on bad stateGravatar Anton Lundin
This introduces a state check to only continue to try to read/write from the bluetooth device while its in a sane state. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22qtbluetooth: add a read timeoutGravatar Anton Lundin
This adds a read timeout to the qt serial bluetooth code. This is needed for error handling and error recovery purposes. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22Be much more careful about merging divesGravatar Linus Torvalds
This patch changes the dive merging to be much more careful about things, because it turns out that we had several small oddities that caused big merge issues. The oddities are: - the dive "duration" is actually how long we spend under water. But that means that when we do "dive->when + dive.duration.seconds" to calculate the end of the dive, that is nonsensical if you came up to the surface in the middle of a dive. Now, normally you don't see profiles like that, but once you start merging dives together, it can go from "small detail" to "dominant factor". - We have two different cases of merging: the automatic "merge new dive computer download if it looks like the same dive" (which always has a merge offset of 0, since we merge it as a new dive computer) and the "merge two different dives into one longer dive. The code assumed that it could look at the "downloaded" flag for the dive to check one or the other, but that doesn't really work. Reading a dive from an XML file isn't any different from downloading it. So we need to change the logic to determine what kind of merge it is to actually check the passed-in time offset. With this, Stuart Vernon's test-case of eight dives with short surface intervals in between end up merging correctly into one dive. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Reported-by: Stuart Vernon <stuartv@force2.net> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22Cmake: fix installation of translationsGravatar Dirk Hohndel
Umm, that one's embarrassing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22TestPlan: Add test for repeating diveGravatar Rick Walsh
If variables were accidentally carried through from a previous calculated plan, subsequent plan could be affected. This test aims to detect if this happens. Commit 8994270 corrected such a bug. If it were reverted, this test would fail (as it should). Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22Documentation: update french translation of user-manualGravatar Guillaume GARDET
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-22Cmake: add LIBMARBLE_FROM_PKGCONFIG and some Marble related fixesGravatar Lubomir I. Ivanov
This patch adds the option to retrive Marble with pkg-config in a similar way to Grantlee, libgit2, etc. It reorganizes the "if(NO_MARBLE)" case to be the "else()" of if(NOT NO_MARBLE). Also, it adds the "-r" option to "rm" here: add_custom_target(link_marble_data ALL COMMAND rm -rf ./marbledata ... as otherwise it fails on Win32/Msys with "marbledata is a directory". Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-21More updates to MXE build scriptGravatar Dirk Hohndel
Two more changes that are needed for this to build successfully. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>