Commit graph

3796 commits

Author SHA1 Message Date
Anton Lundin
7bbd60a4fd Only use DC_TRANSPORT_* with SSRF_CUSTOM_SERIAL
This if'defs DC_TRANSPORT_* use with SSRF_CUSTOM_SERIAL, because the
enum doesn't exist when building against stock libdivecomputer.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-08 13:27:53 -07:00
Claudiu Olteanu
a0e33bec71 Disable Bluetooth option from GUI if SSRF_CUSTOM_SERIAL is undefined
The Bluetooth implementation doesn't work if SSRF_CUSTOM_SERIAL
is undefined. Therefore it is a good idea to remove it from
the UI if the libdivecomputer version is wrong.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-08 10:15:35 -07:00
Claudiu Olteanu
a05cf2136d Reset the index of the device if the Bth mode is disabled
If the Bluetooth download mode was disabled then remove
the Bth address from the device or mount point section and
reset the index.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 07:29:29 -07:00
Claudiu Olteanu
9e97f124c6 Save Bluetooth download mode settings
Save the dive computer download mode flag. In this way,
if the user used Bluetooth mode to download its dives on
his last session he doesn't need to open the Bth selection
dialog if he wants to use the same device.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 07:29:15 -07:00
Miika Turkia
12a60cf9e6 Include dive site on divelogs export
Due to the new dive site management, we need to include this information
before transforming the XML to divelogs.de format.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 07:24:32 -07:00
Miika Turkia
c87b9645e7 CSV import: validate column count
We need at least 23 columns when reading in Subsurface CSV.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07 07:23:53 -07:00
Miika Turkia
65267e6e9d CSV import: default formats for Subsurface import
Let's set the configs properly for Subsurface CSV import for better
usability. (Actually the only meaningful configuration is units as
others are discarded, but I could not figure out how to set that to
imperial when needed - what is the variable holding this information?)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:41:10 -07:00
Miika Turkia
f576c16f75 CSV import: show headers for Subsurface CSV import
Showing the header line improves user experience quite a bit, even
though this configuration is actually discarded in the XSLT transform.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:40:59 -07:00
Miika Turkia
67aca27501 CSV import: fix import of Sensus and Subsurface
When adding APD2 import, the Sensus and Subsurface indexes should have
been increased by 1. While fixing this, switch to using enum names for
clarity.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:40:54 -07:00
Miika Turkia
4a72ac2d2b CSV import: improve header parsing
The skipping of header field manipulation for APD was a bit too
aggressive, skipping the header fix up for all logs when on initial
state. Also, addition of APD2 was not taken into account.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-06 07:40:45 -07:00
Salvador Cuñat
e830cb421a Add ON and OFF strings to translation
In btdeviceselectiondialog.cpp ON and OFF strings need to be
translatables to avoid issues in the translation of the resulting
displayed string, as "turn on" and "turn off" translates to a single
word in most languages.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 07:43:12 -07:00
Tim Wootton
800cfc50d6 Style & spelling changes to printing
Signed-off-by: Tim Wootton <tim@tee-jay.org.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 07:43:11 -07:00
Tim Wootton
6a468b4d39 More style and readability changes
Changes to capitalisation to comply with coding style
Changes to make some blocks of english sound a bit better

Signed-off-by: Tim Wootton <tim@tee-jay.org.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 07:42:57 -07:00
Tim Wootton
8f6702d0b3 Style and readability tweaks to btdeviceselectiondialog
Signed-off-by: Tim Wootton <tim@tee-jay.org.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-05 07:08:20 -07:00
Dirk Hohndel
f3f4cf17f4 Fix typo in UI string
Reported-by: Pedro Neves <nevesdiver@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-04 10:30:15 -07:00
Dirk Hohndel
1f81186dde Re-assign numbers for beta versions
After an incorrect upload I can no longer fix the source tar on launchpad.
Oh well, so now Beta 1 is 4.4.96. No big deal.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-03 07:40:14 -07:00
Dirk Hohndel
a5288fb60c Reintroduce the beta version naming hack
The changes in commit 3bcb634e06 were a bit over ambitious. There was a
reason why I had this hack in place and preparing for the beta reminded me
of that. Oops. Oh well. The code is back, adapted for the current release
cylcle.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-03 03:40:23 -07:00
Claudiu Olteanu
d1a4020ad5 Translate strings for Bluetooth download mode
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 15:52:39 -07:00
Anton Lundin
9212458f23 Enable the configuration of more OSTC settings
This enables enables you to configure a couple more settings in the
OSTC devices, roughly corresponding to the new ones that can be
configured in the OSTC3 devices.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 15:26:26 -07:00
Anton Lundin
37953d163e Enable the configuration of more OSTC3 settings
This enables enables you to configure a couple of new settings in the
OSTC3 devices.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 15:26:20 -07:00
Anton Lundin
c69d5619ce Remove getters and setters in DeviceDetails
The DeviceDetails class is just a storage container for passing values
back and forth between backend and ui code. The different names between
the setters and getters just made it a pain to write nice macros and
keeping the two ends in sync, so this just removes the setters and
getters in favor of having the members public.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 15:26:06 -07:00
Tomaz Canabrava
6944084653 Make it possible to use Subsurface in height=768
Small, Small screen. why are you still used today?

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 15:25:44 -07:00
Dirk Hohndel
a1c023bee0 Event filters need to tell the caller if they took the event
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 19:24:36 -07:00
Dirk Hohndel
5670b5fedd Silly compile fix
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 19:24:23 -07:00
Tomaz Canabrava
2da439f34c Correctly refresh dive site list
And also show a warning to the user saying that that
action is non-cancelable.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:43:52 -07:00
Tomaz Canabrava
1ef20ee5d8 Merge the dive sites selected.
Wee. :)

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:43:43 -07:00
Tomaz Canabrava
e36e4d1faa UI code to merge dive sites
Get the Qt data structures and convert to something
that we can use in our C - core.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:43:09 -07:00
Tomaz Canabrava
560426bf82 Offer the option to merge dive sites.
Almost finishing. :)

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:42:56 -07:00
Tomaz Canabrava
b52b95f3ec Show the correct data on the Dive Site List
We where showing the UID, wich didn't made sense.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:42:32 -07:00
Tomaz Canabrava
a3d6098c8c Display dive sites with same gps as the current
So we can merge them later - currently we are showing
only the ID, ugly - fixing next.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:42:15 -07:00
Tomaz Canabrava
5db6d41598 Widget to show other dive sites at the same coordinates
Add a new widget on the dive site management view to
display all other dive sites at the same coordinates.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:37:45 -07:00
Anton Lundin
b7038e4bec Remove unneeded includes
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 15:12:18 -07:00
Dirk Hohndel
3bcb634e06 Remove about window have for Beta releases
Simply tag the beta versions correctly and none of this is needed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 10:36:49 -07:00
Sander Kleijwegt
d22a135343 Fix edit & show of divesites for new and existing dives.
The UI detects when it should refresh the loction after the
user finished editting a divesite. Creating and editting
divesites is now working even when the current dive is not
saved yet.

Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-29 20:10:32 -07:00
Sander Kleijwegt
9770369889 Always show the dive site edit button
Update the tooltip and enable only when there is a divesite selected

Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-28 16:16:05 -07:00
Sander Kleijwegt
67abcd0c2c Fix mouse clicks on divesite completer.
Use clicked instead of activated signal on the completerList to
handle the selection of a divesite.

Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-28 16:15:25 -07:00
Sander Kleijwegt
10d0604297 Fix crash when creating a dive site without any dives in logbook.
A divesite uuid is created using the timestamp of the currently
selected dive. When there is no current_dive, use the current
time to create a uuid.

Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-28 16:13:50 -07:00
Dirk Hohndel
035e08e633 QtBT: avoid crash at exit if no BT device found
If localDevice isn't valid we never initialize the discory agent, so
let's not dereference it in the destructor unless it is valid.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-27 09:23:38 -07:00
Miika Turkia
8e08fdcc85 Clean up CSV import parameters
Continuing the crusade against excessive number of parameters for some
functions. This should be the last of the import functions to be cleaned
up.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-27 08:59:44 -07:00
Sander Kleijwegt
57e15bf789 Explicitly show the menubar after mainwindow initialisation.
At least on Ubuntu with xfce instead of Unity this appears to be necessary
to get a menu bar for the application.

Fixes #833

Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-26 11:01:37 -07:00
Dirk Hohndel
a99839a4f1 Remove a couple of debug messages
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25 18:15:24 -07:00
Tomaz Canabrava
b8a09ca520 Keep the dive list disabled if editing a dive
When, in a dive edit mode user entered a dive site
and went to dive site edit mode then finished the ds
edit, the app would lose the disabled property of the
dive list, making it possible to select a new dive
when we where editing another one, complete mess.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25 18:00:26 -07:00
Tomaz Canabrava
fc6d819616 Create a new dive site and edit it automatically
If the user clicks on the first or second option of the drop
down list, subsurface will move him to the dive site edit panel
automatically, since it's a new dive site and there's no information
about it yet.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25 18:00:15 -07:00
Tomaz Canabrava
0ba832ef12 Move dive site list to its correct position
When we are in display dive mode, and then edit the
location text edit, going to edit dive mode, the location
text edit will be moved a bit below of it's original position
but the Dive Site List would be already opened, and stuck
on it's original position, covering the dive list.
This patch fixes that.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25 17:59:25 -07:00
Tomaz Canabrava
32db7e5fb5 Remove edit dive site from the menubar
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25 17:59:15 -07:00
Tomaz Canabrava
03702edf87 Get taxonomy from edit dive site widget
Moved the get taxonomy button from the maintab to the edit dive site
widget.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25 17:58:59 -07:00
Tomaz Canabrava
aaa70ff56e Turn the get taxonomy button into a manage dive site button
The get taxonomy button will be inside the manage dive site interface.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25 17:58:46 -07:00
Tomaz Canabrava
028f0401f6 Disable profile when in dive site edit mode
I didn't have time to create / finish the photos widget, so
I'm adding back the profile view while in dive site edit mode,
but disabling it.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25 17:58:30 -07:00
Dirk Hohndel
c22adebebe Merge branch 'gitMerge' 2015-08-25 13:57:12 -07:00
Dirk Hohndel
0db80103ca Add spinner while opening or saving cloud storage
Right now this is quite ugly. And at least in my VM the transparency
doesn't seem to work correctly. But at least we now have some visual
indication that we are doing something while opening or saving cloud
storage.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25 13:07:20 -07:00