Commit graph

10791 commits

Author SHA1 Message Date
Dirk Hohndel
ec136defa8 QML UI: set the default local repo to load
This will allow the user to open a repo that was stored in no cloud mode.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-27 15:05:37 -07:00
Dirk Hohndel
4b1edceca0 Add helper function for the consumption of loaded dive data
This allows us to call that part of the process from multiple places
in the future.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-27 15:05:37 -07:00
Dirk Hohndel
7c156f3ba1 QML UI: in no cloud mode, save to a default local repo
And set that up as the default file to load at start.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-27 15:05:37 -07:00
Dirk Hohndel
9ba090c31f git storage: init local repository
So far we didn't do that at all, we either relied on the user manually
creating a local repo, or we cloned a remote repo.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-27 15:05:37 -07:00
Dirk Hohndel
1cf71a476b QML UI: start out with save button visible
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-26 10:28:46 -07:00
Marco Martin
7d9c306685 Adapt to Kirigami api changes
* add new file AbstractApplicationHeader.qml to the qrc
* add new file AbstractApplicationWindow.qml to the qrc
* use new api for custom ApplicationHeader

header: Kirigami.ApplicationHeader {
	minimumHeight: 0
	preferredHeight: Kirigami.Units.gridUnit * (Qt.platform.os == "ios" ? 2 : 1)
	maximumHeight: Kirigami.Units.gridUnit * 2
}

Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-26 10:06:44 -07:00
Miika Turkia
bc28944abb Add Ubuntu Xenial to be built (16.04)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-26 09:26:41 -07:00
Miika Turkia
61c9b2891c Fix time parsing for Divesoft Freedom
Divesoft uses 17 bits for time so parse accordingly.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 11:25:34 -07:00
Miika Turkia
90db7d3a50 Abort git authentication attempt
If we have incorrect cloud credentials, we need to return an error on
git authentication call back in order to avoid endless authentication
loop. This might well happen e.g. when changing the password on desktop
and then on laptop Subsurface still thinks the credentials are validated
and ends up in the authentication loop.

The authentication call back on libgit is intended to be used to ask for
user credentials, and as we handle credentials elsewhere, we just need
to fail the authentication attempts. (The threshold for bail out could
have been 1 attempt...)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:58:57 -07:00
Miika Turkia
d3867a09f3 DL7: parse temperature and cylinder pressure
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:17:52 -07:00
Miika Turkia
24edaf4be1 Parse date and time in DL7 import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:16:32 -07:00
Miika Turkia
f4ddc07883 Grab the payload of DL7 file
This allows us to parse the DL7 profile data (skipping the header and
footer)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:08:57 -07:00
Miika Turkia
0b8ac416bf CSV import: support min.sec format
Assume a format containing a dot to be min.sec as defined in DL7
specification.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:08:52 -07:00
Miika Turkia
1fec953a13 Special handling for DL7
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:08:45 -07:00
Miika Turkia
e31df43cde Detect DL7 depth units
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:08:34 -07:00
Miika Turkia
74f0192711 Basic GUI part for DL7 import
This sets the basic properties properly but is still missing the parsing
of meta-data, especially used units.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:08:25 -07:00
Miika Turkia
8a4f2f998a Fix file extension regesp
The original negative lookahead failed in case the file name contains
more than 1 dot as it looks for dot that is not followed by the given
extensions. And such a match exists in the file name. The new version
should look properly if the file ends with any of the given extensions.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:08:11 -07:00
Miika Turkia
4955f858bf Add CSV parsing trigger for zxu and zxl files
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:08:01 -07:00
Miika Turkia
46074ebf21 Add DAN DL7 file extensions for import UI
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:07:53 -07:00
Miika Turkia
375f698c78 Detect pipe as field separator in CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:07:34 -07:00
Miika Turkia
7a4fa510e9 Add pipe as supported field separator on CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 09:07:27 -07:00
Dirk Hohndel
d6b36c47cb Fix SettingsObjectWrapper to actually use the group set
At least for the GeneralSettings group.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22 12:04:24 -07:00
Dirk Hohndel
a1f0263c64 Remove useless command line handling code from mobile app
The files collected were never opened, this all is just the result of
a copy and paste job that clearly was never fully thought through.

Also remove support for ancient libgit2

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22 11:59:16 -07:00
Dirk Hohndel
8946edfd92 QML UI: adapt "Manage dives" to no cloud status
If we are in no cloud mode
- allow adding dives via the menu
- enabling / disabling automatic sync makes no sense.
- if the user wants to manually sync the cloud, they need to first enter
  credentials.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22 11:59:16 -07:00
Dirk Hohndel
27fccbbe4e QML UI: when chosing 'no cloud', switch to dive list
Currently we don't remember that we picked 'no cloud' across restarts.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22 11:59:16 -07:00
Dirk Hohndel
6b43b3015d QML UI: turn off 'no cloud' button when not in use
This needs to be actively cleared.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22 11:59:16 -07:00
Dirk Hohndel
34628f8e6d QML UI: add option to disable cloud to start screen
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22 11:59:15 -07:00
Dirk Hohndel
be30724ba0 QML UI: allow switching to offline mode without valid credentials
If the user wants to work offline, they don't need validated credentials.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22 11:59:15 -07:00
Dirk Hohndel
a5af2478d4 QML UI: reword the intro text to mention offline mode
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22 11:59:15 -07:00
Dirk Hohndel
6af77b08b2 QML UI: rename menu entry for offline use
That really is what it boils down to.

Also removes a few stray spaces in the warning text.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22 11:59:15 -07:00
Dirk Hohndel
4e62bfa9a9 QML UI: allow changing input fields with tab/return key
This assumes a physical keyboard (e.g., iPad with BT keyboard).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-21 14:00:37 -07:00
Dirk Hohndel
85560531da QML UI: don't exit on iOS
Apparently users interpret that as a crash.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-21 13:27:49 -07:00
Dirk Hohndel
68bb49e4ca Fix Android keyboard issue as recommended by Kirigami
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-21 11:40:02 -07:00
Dirk Hohndel
f3929af0e4 QML UI: add new Kirigami file
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-21 11:40:02 -07:00
Dirk Hohndel
31b34a24cc Don't calculate the 9 minute average
We don't do the "smoothed" profile anymore (and haven't for years),
so no need to calculate the data.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20 16:00:28 -07:00
Dirk Hohndel
eb07faef00 Only do 9 minute interval for min/max/avg
We don't use 3 and 6 minute values anywhere, so why calculate them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20 15:55:51 -07:00
Linus Torvalds
e0ac1c9a26 Fix 3-, 6- and 9-minute min/max calculations
Make them use indices into the plot-info, fix calculation of average
depth, and fix and add comments.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20 15:36:25 -07:00
Dirk Hohndel
d7103f97f7 Android build: use static libssl / libcrypto
Android M does not allow using those as shared libraries.

See #1029

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20 15:29:09 -07:00
Dirk Hohndel
5d1fbbe57b QML UI: don't show add dive button without valid credentials
Given that currently we don't deal well with not having a git repository
that is linked to cloud storage, don't allow people to add dives unless
there are verified cloud credentials.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20 15:25:16 -07:00
Dirk Hohndel
0fcf67ca55 QML UI: make sure drawer is really closed after delete
At least one iPhone user still has the drawer pop open and prevent
them from using the undo function.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20 07:42:10 -07:00
Dirk Hohndel
a8cfa0abf5 QML UI: make multi column support work again
Due to a change in Kirigami on most tablets even in landscape mode we are
only showing one column. Because of this I missed the fact that I had
broken multi column support by mistake. Without setting the width of the
dive list it expands all the way and prevents the showing of two pages
next to each other.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 14:14:49 -07:00
Marco Martin
b3d0d9fd4e Don't put margins outside the internal ListView
put the margins only around the fullscreen delegate of the listview,
making the listview go all trough the screen edges.
This because the cutted effect when the list view is half scrolled
looks quite ugly. Making the ListView reach the borders
also moves the scroll indicator at the screen edge
where it conventionally is.

Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 10:35:07 -07:00
Dirk Hohndel
660f421d6d QML UI: correctly show if we are accessing remote or local storage
This makes sure that if the user switches to offline mode they don't get
incorrect notifications that tell them that they are accessing cloud
storage.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 10:34:49 -07:00
Dirk Hohndel
ac0c1eb5e1 QML UI: prevent changing pages while showing the edit/add overlay sheet
If you switch back to the dive list by swiping horizontally you stay in
edit/add mode and then can't select a dive on the dive list. This way you
have to discard or save the edit, first.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 10:34:44 -07:00
Dirk Hohndel
1e86662e4a Remove QML files that are no longer used
The TextButton was what we used for actions very early on, and the TopBar
has now been replaced by the Kirigami header bar.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 10:34:40 -07:00
Dirk Hohndel
a807a5e8cd QML UI: show dive site on map with left action on dive details page
The icon isn't great, though.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 05:14:44 -07:00
Dirk Hohndel
c6dbbe1aac QML UI: adapt for latest Kirigami
In commit 50ebdd020e3c of the Kirigami project the syntax with which
actions are added to pages has changed. This commit tracks that, adds the
new file that was added in Kirigami and also removes the now obsolete
context menus (since we have a working back button on iOS now)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 05:14:44 -07:00
Dirk Hohndel
fe62da3a6b QML UI: always show the time stamp when logging data
This should help understand some of the issues with git storage and GPS
fixes better.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 04:20:12 -07:00
Miika Turkia
9607ff6c93 Import picture URLs from divelogs.de
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-18 21:03:27 -07:00
Rick Walsh
62b989979e Fix broken Bluetooth support
This partially reverts Commit 39313c5

Reported-and-analyzed-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-18 06:01:01 -07:00