aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-05-29Move CleanerTableModel to its own fileGravatar Tomaz Canabrava
models.h / .cpp was getting too big (around 2.5k lines), and each change triggered a rebuild in tons of parts of Subsurface, this is the first commit trying to make the models code sane by removing them all of the models.h/cpp file and also clearning code in the process. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move the models to its own folderGravatar Tomaz Canabrava
This is an attempt to help share code between the desktop version of Subsurface and the mobile version. More code will be moved around and the models will be split in a way that will help recompile times and also creation of different interfaces for different form-factors. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Remote storage: second attempt to fix build with older libgit2Gravatar Dirk Hohndel
That was embarrassing... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Correctly save dive rating after changing itGravatar Salvador Cuñat
Corrects typo in ebaa7d1fd which impeded that changes in dive rating were saved after editing. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Remote storage: turns out you need a newer libgit2Gravatar Dirk Hohndel
I was afraid that this would only work with a farily current git master of libgit2 and it turns out I was right. The API was available, but the correct type wasn't. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Remote storage: collect email and PIN in preferencesGravatar Dirk Hohndel
This allows entering / storing the PIN (aka passphrase) for the ssh key. The email isn't used, yet - this will be used by the automated backend to create a unique git repository that will turn into the remote storage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Remote storage: add preferences UIGravatar Dirk Hohndel
This isn't hooked up at all right now. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Remote storage: provide credentials for ssh based remotesGravatar Dirk Hohndel
The key location is hard coded as this is only intended for our own infrastructure, so we don't need multiple keys. If the private key is protected by a passphrase, this needs to be manually added to the preferences. As RemoteStorage->passphrase. This has only be tested with a current version of libgit2 master, but should compile with any previous version (the API doesn't exist in v0.19 and earlier - that's handled with appropriate #if clauses). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Remote storage: add preference for the passphraseGravatar Dirk Hohndel
While we don't expose it as this to the user, we'll need an ssh key and potentially a passphrase in order to communicate with the git server in our infrastructure. This simply sets up a way to store the passphrase. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Add USE_LIBGIT23_API as cmake optionGravatar Dirk Hohndel
Just as we would expect, the libgit2 developers of course once again broke their API. In order to compile against current master we need to remap those APIs once again. Simply call cmake with -DUSE_LIBGIT23_API Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Documentation: Merge/update french user-manual translationGravatar Guillaume GARDET
Merge/update french user-manual translation. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Add explicit casts to silence compiler warningsGravatar Robert C. Helling
clang complais when converting (char *) to (unsigned char *), so tell it it's fine. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Fix parsing of git branch encoded in file nameGravatar Dirk Hohndel
If the folder has a trailing '/' we picked the wrong substring as branch name. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Wire gui for diagnostic logs from dc configurationGravatar Anton Lundin
This copies peaces from the downloadfromdivecomputer dialog into the configuredivecomputerdialog and connects them to be able to create a logfile form the configuration of the divecomputer. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Enable diagnostic logs from dc configurationGravatar Anton Lundin
This implements support for writing debug/diagnostic logs when configuring dive computers and upgrading the firmware. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Remove the lastError from DeviceThreadsGravatar Anton Lundin
There is no reason for the DeviceThreads to keep a copy of the last error around, so this removes that code. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Remove unused variables and methodsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Restructure ReadSettingsThread::runGravatar Anton Lundin
This moves the dc_device_close call inside the if case for dc_device_open, to get rid of the special error case and to look and behave the same as the other ::run calls. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Strip the default suffix if saving to git branchGravatar Dirk Hohndel
For some reason the file selection dialog box now always adds a default suffix to the file name we pick - which results in our test for git storage to fail. So if the filename looks like "<path>[branch].ssrf" then remove the suffix that was added. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Fix crash when rejecting dive site changesGravatar Dirk Hohndel
Emitting the stopFilterDiveSite signal caused us to clean up the UI which reset currentDs to NULL if this was a new dive site... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Start editing new site regardless what the user does firstGravatar Dirk Hohndel
It doesn't matter if we first enter coordinates, name, description or notes. If there is no currentDs we need to handle that gracefully. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27Dive site management: make sure currentDs is validGravatar Dirk Hohndel
When double clicking on the globe on a dive with no dive site we did almost the right thing - except that we didn't create a dive site. Not 100% sure this is the right place to do this, but it seems to work and prevents the crash. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Expand trips that are filtered on dive_site_manageGravatar Tomaz Canabrava
While filtering we would have trips that were collapsed, but this doesn't really make much sense while managing dive_sites. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Filter out the dives that are not at dive_site.Gravatar Tomaz Canabrava
Untested code to filter out dives that are not at the active dive_site. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Create signals/slots for filtering the dive_site,Gravatar Tomaz Canabrava
The dive site management requires that we filter all the dives that are on the current dive_site, this is the preparatory work for that. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Only repopulate model when needed.Gravatar Tomaz Canabrava
The old way we set the location and *then* updated the model, so the very first location that we tried to show was empty. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Show the correct dive_site on the manage comboboxGravatar Tomaz Canabrava
When triggering the dive_site management, we need to get the uuid that was send to us and set it as the current dive_site on the combobox, the dialog can fill all required info for us. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Do not create a new dive site when curr is invalidGravatar Tomaz Canabrava
We will however create a new dive site when the user clicks on the add button - creating it here would led to strange behavior. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Don't setLocationId when accept/reject changesGravatar Tomaz Canabrava
setLocationId will filter the dives, so ignore the visual changes when accepting / rejecting, it will only be triggered again when we are showing this dialog again. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Do not set the dive_site when changing divesGravatar Tomaz Canabrava
We should only set the dive_site on the dive site management widget when we are going to use that information, this is because the dive_site management widget will filter all dives on the dive list. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Allow a comma in decimal GPS coordinatesGravatar Robert C. Helling
this is the format used by Google maps and thus this... Fixes #875 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-26Correct default RFCOMM channel in documentationGravatar Rick Walsh
The default RFCOMM channel is 1, not 0 as previously stated in FAQ and user manual. This patch corrects it. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix rating/visibility vs suitGravatar Dirk Hohndel
The suit field should take up all the remaining space and the stars should be vertically centered with the text. This looks much better Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix the Profile/ToolbarGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Do not connect null to a signalGravatar Tomaz Canabrava
The parent here should have been the mainwindow, but we create this dialog on the stack instead of the heap and because of that we don't set the parent to prevent a double free. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix planner layoutGravatar Tomaz Canabrava
Layout was wrong. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix DownloadFromDiveComputerGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix DiveShare export dialogGravatar Tomaz Canabrava
One more. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix the DiveImportDialogGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix the export dialogGravatar Tomaz Canabrava
This patch makes the export dialog more consistent with the rest of Subsurface. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Major rework on the MainTabGravatar Tomaz Canabrava
This seems almost perfect now. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix spacing for the filter dialogGravatar Tomaz Canabrava
This is the single filter dialog - the spacing is much better, but when activated it seems cluttered, this is because the outer layout (the one that encapsulates everything) has the wrong layouting - I need to find and fix that. I'll actually change that to a splitter, it will provide a more flexible resize of the widgets. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix issues in other places of the MainTabGravatar Tomaz Canabrava
Also, added tooltips to the Tab Texts. I need to fix the layout issues of the Equipments, but that's not inside the UI. Things are much more sane now. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Fix the layout ugliness on Mac & LinuxGravatar Tomaz Canabrava
I seem to have found a sane way to create layouts: If it's the 'outer' layout, the one that encapsulates everything: - Horizontal Spacing: 5 - Vertical Spacing: 5 If it's a vertical inner layout that is grouping items like label + control: - Spacing: 0 This way the label will be 'touching' the item, without empty space, so you know that the label refers to that widget. If it's an horizontal inner layout: - Spacing: 5 Different from the Vertical Layout, we don't want to make horizontal items touch each other, a bit of space is fundamental to the eyes. If it's a Grid Layout: - Vertical Space: 0 - Horizontal Space: 5 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Layout issues: Remove auto layout management from mainwindow.cppGravatar Tomaz Canabrava
While this worked for a bit, it was very error prone as it relied in layout having specific names, and layouts in the .ui files are treated as substandard items. Every time a 'break layout' command is issues (and it's issued quite a lot when trying to reorganize the items on the widget) all layout items are removed and new ones are added later, without any of the names. Since the new layout can be different the old names are not usefull anymore - and a clean compilation won't trigger a single warning either: the name resolution is done at runtime and not at compile time, so it would just fail silently. Instead of brute-forcing each layout to have 0,0 or 5,5 margins, we should put the correct values on the .ui files. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Use group of files to show the project hierarchyGravatar Tomaz Canabrava
This doesn't work on QtCreator yet - but it's the documented way in CMake to display the project hierarchy in some IDEs (the one that I know that it works with is Visual Studio). Even knowing that this doesn't work with QtCreator, it's a valid change because someone can fix creator in the future. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-24Remove rules and control files for Ubuntu 12.04Gravatar Dirk Hohndel
Since we got rid of all the Qt4 support there is no point in having those files around anymore, either. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-24Remove support for Qt4 (part 8)Gravatar Tomaz Canabrava
Also remove some of the code for building on Ubuntu 12.04. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-24Remove support for Qt4 (part 7)Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-24Remove support for Qt4 (part 6)Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>