Commit graph

3094 commits

Author SHA1 Message Date
Gehad elrobey
043ab5b02c HTML: Fix exporting themes in multilingual environment
Don't compare to static english string, must translate first.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17 08:52:16 -08:00
Miika Turkia
9e92d27bd0 Add ssrf as dive log extension on import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17 08:52:11 -08:00
Robert C. Helling
b60a3d71d3 Use unused cylinders in planner if they are displayed
This makes prefs.display_unused_tanks also relevant for the planner.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17 08:51:05 -08:00
Lubomir I. Ivanov
d6d0fb09f9 subsurfacewebservices.cpp: add QDebug include
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17 08:49:34 -08:00
Lubomir I. Ivanov
0cf2f90507 simplewidgets.cpp: QLineEdit::setClearButtonEnabled() is from Qt5.2
This could cause problems if the user tries to compile with
Qt versions between 5.0 and 5.2.

Reported-by: Michele Fabi <fabiemme@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17 08:49:26 -08:00
Dirk Hohndel
d449ac3208 Only update tags in the selected dives if they were changed
If current_dive and displayed_dive still have the same tags then we
shouldn't touch the tags of other selected dives.

Fixes #826

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10 15:04:29 -08:00
Miika Turkia
01199728fb Select the known import for APD automatically
If the filename has extension of .apd, then set the known import
automatically.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10 15:03:28 -08:00
Miika Turkia
c104ff67e4 Add the .apd file extension to be treated as CSV file
Adding support for importing .apd files (APD Log Viewer). They are CSV
files and already supported in CSV import, but the file extension .apd
is added here.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10 15:03:28 -08:00
Dirk Hohndel
2dab00f5dc Change the tooltip for bailout
While this text makes sense if this is a CCR dive and the diver does bail
out, the more neutral text "Manual switch to OC" works in all use cases
for this event, e.g. at the beginning of a dive when we manually set this
dive to be OC.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10 15:02:53 -08:00
Dirk Hohndel
e0ad44c1b3 Don't show a setpoint switch event at t=0
When using that to indicate the dive type at the start of the dive, it's
visually strange to have an event marker.

See #826

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10 15:02:53 -08:00
Tomaz Canabrava
cc9c24d46a Do not set default bg to white on the models
The user may have a different theme, as i did, and it
looked very wrong.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-03 15:14:09 -08:00
Tomaz Canabrava
3671c991e8 Don't allow the Cylinder option be edited in PLAN / ADD mode
This sets the combobox to disabled if the profile is in
any mode besides PROFILE.

Fixes #824

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-03 15:13:05 -08:00
Miika Turkia
4f9705f3f5 Fix crash when removing an out-of-profile divepoints
We can end up having a divepoint that is outside the dive profile. In
this case, we used to crash, but this hack prevents the index out of
range issue.

Fixes #784

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-03 11:27:41 -08:00
Miika Turkia
6f795a0059 Fix crash when moving divepoints rigorously
I have no idea how the index ends up outside the range, but at least
this prevents a crash in this case.

See #784

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-03 11:27:35 -08:00
Dirk Hohndel
d34965135a Disable dive component copy/paste shortcuts when no profile show
Instead of inventing another way to do this (and inevitably forgetting a
path where this should be re-enabled) I renamed the DcShortcup related
function and made them enable/disable the copy and paste shortcuts as
well.

Of course there now is one exception (isn't there always?): in "ADD" state
we don't want to be able to switch DCs, but we do want to be able to
paste.

Fixes #825

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-03 07:36:09 -08:00
Dirk Hohndel
baa4b4d7c5 Don't show the plot_info table in every debug build
Instead add a new define SHOW_PLOT_INFO_TABLE that triggers if this
debugging aid is shown.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-02 13:14:04 -08:00
Patrick Valsecchi
7e0ff8c1e4 Fixed CMakeLists.txt to work with Qt5
Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-02 08:00:49 -08:00
Miika Turkia
414b9807e6 Do not go to edit mode if nothing changed
Fixes #804

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-02 07:06:56 -08:00
Miika Turkia
e1db5f21b1 Fix Ubuntu glitch with completer popup
On Ubuntu, the completer often prevents applying/discarding the changes
on the dive info pane and disrupts editing of other fields as well. This
patch prevents the completer popup from appearing when not in edit mode
(apply or discard is pressed) or when the string is still empty.

Fixes #818

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01 13:50:35 -08:00
Dirk Hohndel
62bc751bd9 Facebook integration: recognize when user didn't allow us to post
Why someone would log in but then not allow us to post I don't know... but
it seems useful to at least handle it...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01 10:52:28 -08:00
Dirk Hohndel
f30ff4fde7 Facebook integration: only set the URL once
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01 10:47:31 -08:00
Dirk Hohndel
1e4a13d3ba Clean up all the debug messages from Facebook integration
Even for a beta this was a bit too verbose for my liking.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01 07:24:48 -08:00
Dirk Hohndel
5343b909fa Get ready for Beta 3
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01 07:08:11 -08:00
Miika Turkia
2dc1a42b29 Fix crash if one selects incorrectly Seabear CSV
Fixes #814

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01 07:06:12 -08:00
Robert C. Helling
1e45858ee6 Update ceiling when changing dive mode
Without this patch, the user effectively cannot change the dive mode as
any change is overwritten by replot copying current_dive over
displayed_dive. The way out is not to call replot but only update the deco
ceiling directly.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31 14:09:50 -08:00
Robert C. Helling
c70ba77199 Don't call replot when exiting cylinder combo box
Commit b72c32da7 turned off replotting while the cylinder
combo box was active to speed up editing. After leaving
the combo box, replotting was enabled again and a replot
was called.

This replot is too agressive, as it overwrites the displayed
dive with the current dive and thereby resets the cyinder
change. This eliminates the replot call.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31 14:07:52 -08:00
Dirk Hohndel
eeb0c6a756 Don't store the Facebook credentials between multiple runs of Subsurface
They stay valid while Subsurface is running, but once you quit, the
credentials are gone.

This way no one can steal them from our settings.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31 12:01:36 -08:00
Dirk Hohndel
646fa22c01 Correctly quote a double quote in the message
Otherwise the message on Facebook will end at the first double quote.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31 10:57:15 -08:00
Dirk Hohndel
fd33d6aa3f Hide tooltip when posting a profile to Facebook
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31 10:32:02 -08:00
Gehad elrobey
ad60ca84ee Export the XSLT based exports in a new thread.
The XSLT based exports can consume long time while applying the xml format.
This time can make the GUI unresponsive. Simply call the export functions
in a new Thread.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31 10:15:12 -08:00
Miika Turkia
b01f14efab Fix maximum depth on CSV import
Commit d329420d55 changed the name of the
header from "Max depth" to "Max. depth", so we need to use that in the
code as well. (The dive profile is not drawn if we do not have max
depth.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31 10:14:48 -08:00
Lubomir I. Ivanov
8eb25f6700 DiveMeanDepthItem: fix bad translated depth units
probably just a typo; taking the value of a (char *) will return
the first char (or byte).

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31 10:13:36 -08:00
Miika Turkia
bc6569f10f Include iPhone companion app to user survey
We should mention the iPhone companion app either alongside the Android
app or at its own line if more precise information is wanted. I suppose
this text change should be enough as we should get more precise
statistics of usage of these apps from the server logs.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30 22:48:08 -08:00
Dirk Hohndel
39e68c795c Try to make the Facebook interaction be more pleasant
Show either the login screen or the disconnect button, plus some text that
explains what the user is expected to do.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30 22:36:49 -08:00
Dirk Hohndel
13e2be5889 Use the 'popup' style Facebook login window
This fits much better in the preferences dialog.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30 22:09:50 -08:00
Dirk Hohndel
cb6bda4e0c Compile Facebook support when building with Qt5
Now that Facebook approved our use of the API, we can build this by
default.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30 22:08:50 -08:00
Dirk Hohndel
d8e5e1922f Minor whitespace change - this line was getting long
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30 22:07:36 -08:00
Dirk Hohndel
86c25b7157 Fix update message popping up when there is no new version
I was just missing one key phrase to check for. Oops.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30 17:23:59 -08:00
Gehad elrobey
f16f4e2f6e Don't go to edit mode if the dive notes field didn't change.
The maintab view should be consistent; some fields just go to edit mode
whenever they acquire focus and most of them wait till their values are
changed.

Change the dive notes field to be consistent with the other fields and
only enter edit mode if its value is changed.

[Dirk Hohndel: changed to use same_string()]

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30 17:03:03 -08:00
Anton Lundin
e9558d848c Prevent crash on shutdown
We always call reply->deleteLater(), so we where actually calling delete
on a stale pointer, that caused subsurface to crash on shutdown.

Reported-by: Sergey Starosek <sergey-starosek@yandex.ru>
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-30 07:16:12 -08:00
Dirk Hohndel
07e94c67e0 Make sure the index is valid
There are reports that the replace calls can cause the application to
crash. This doesn't seem to make sense, looking at the code - this change
shouldn't make any difference. But it makes it even more clear that there
shouldn't be any possible scenario in which we call replace with an index
that's out of range.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-29 15:26:24 -08:00
Dirk Hohndel
cd992bd14a Don't reimplement the clear() method
Much easier and clearer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-29 14:00:19 -08:00
Dirk Hohndel
4e40872fc0 Prevent potential access to uninitialized variable
If we have a dive with no data (e.g. from a failed import), we might never
assign a value otherwise.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-29 13:37:32 -08:00
Tomaz Canabrava
5649086d61 Make search and close shortcut for user manual work on Mac
When the help dialog appears, remove the shortcuts for filter and close from
the main window so that the identical keys for the help window work. This is
not necessary on other platforms, but on Mac it appears to be required.

[Dirk Hohndel: Tomaz had a slightly different approach of removing the actions,
               instead I changed this to just modify the shortcuts]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-28 14:30:19 -08:00
Dirk Hohndel
eaec0bc842 Small changes to the mean depth text
Add a tiny bit of white space to the left and display the unit as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-28 13:35:49 -08:00
Tomaz Canabrava
7f1373ea6d Implement the mean depth text
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-28 13:35:43 -08:00
Tomaz Canabrava
343b82708e Remove dead code
We changed this MeanDepthLine to the MeanDepthCurve (or something),
no need to keep old code around.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-28 12:29:47 -08:00
Tomaz Canabrava
ee4f9494f2 Hide ruler when in ADD or PLAN mode.
This ruler shouldn't appear in ADD or PLAN mode, it's a bug
and may crash things.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-28 12:29:33 -08:00
Anton Lundin
991531d847 Let notes expand to full with fbsupport off
This hides the whole QWidget with the share-to-fb button in it. This
lets the Notes field expand to the full width.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-28 07:36:34 -08:00
willem ferguson
bc7d233365 User manual: Tying up loose ends
As the heading above says.
1) Place user manual option in main menu at the bottom of the Help submenu.
   It is more easily seen in that position.
2) Replace two images. I forgot one of the images that had been changed to F20 format.
3) A few small changes, including in the systematic description of the main menu.

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-27 22:58:38 -08:00