Now it is possible to enter a specific unit that is different from the
unit stored in the preferences. If only numbers are inputed the unit will
be the same as specified by the users preferences.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Android users are well used to using the back key for this. I kept the
code in place as things may end up completely different on IOS or other
mobile platforms.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This should have been obvious. Without explicitly asking for only local
git activity, it will connect to the remote.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This allows us to shrink the top bar quite a bit and have a little more
screen real estate. In order to maintain functionality we need to reenable
the context menu on some screens.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since some users report hangs when changing credentials it would be useful
to see how far the application got.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This doesn't quite work yet as the start page appears to miscalculate its
height (the cloud credentials page appears to be missing).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make things centered, lay them out correctly, make sure the image fits.
This includes the re-indentation of the previous commit - but the changes
are so massive that it seemed pointless to do this as its own commit.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Otherwise, when switching back and forth between two logins, during the
second switch the dive list is not loaded as the code checks against the
remembered git SHA before rewriting the dive list.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Otherwise Qt attempts to be smart and re-uses previously successful
username (email) and password. This is an odd corner case, but it seems
the right thing to do.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With the integration of the credentials into the start page the logic for
this has changed.
Since the code for start page and dive list is actually on the same page,
using opacity to switch between the two sub pages (depending on whether we
have valid credentials and dives to show), the old way of changing
credentials no longer worked.
With theis patch the user once again can change their credentials (and
change their mind and go back to the dive list).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Once we identified that our filename is actually a git designator (as seen
by the fact that it ends in a [branchname] surrounded by '[]'), we
shouldn't try to open that filename in order to try other ways of parsing
the data; instead we should just return an error to the caller.
This way the calling code can tell that an error occured.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
There are several parts of the UI that will do better if they know if the
credentials that we have are incomplete (e.g., no password), invalid
(server rejected them), valid (server accepted them) or potentially valid
(we found a local cache for the email address, so that's likely correct,
but because we are offline we cannot (or have not yet) verify the
passord).
So far this is specific for the mobile UI - it might make sense to try and
use the same backend code and status tracking for desktop and mobile.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
For the ThemeTest we could simply drop the item, for the GPS preferences
and the DowbloadFromDiveComputer page everything got indented by one
level.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Reported by a beta tester for the GPS preferences, but affects a couple
more. We need to make sure that any page on the page stack is actually a
MobileComponents.Page, other wise the Android back key doesn't close the
page.
This commit changes GPS preferences, the theme test, and the currently
disabled download from divecomputer. it contains only the actual change
(wrap the current content in a page). The reindentation is a separate
commit for readability.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It now explains the relationship between Subsurface-mobile and the desktop
application and allows the user to enter the cloud credentials right
there.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of using this on its own page, it makes more sense to use it as
part of the start page directly.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This isn't pretty, but having the version string available on a place
that people are likely to find does make sense when going public with
the Subsurface-mobile. Especially when we do a public release, I assume
the developer menu with App log might not be readily available for
people to identify their installed version.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When editing the duration of a dive, if only numbers are entered they are
treated as full miuntes.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A dive would linger in edit mode when following these steps:
start mobile. show theme info. click on dive in dive list.
click edit. click back in topbar, again click back in the topbar.
click on dive in dive list, still in edit mode.
Not anymore. Also enable back button when viewing a dive.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I don't know how this got here. Probably having fun
with copy and paste.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The app log and theme info had context menus
with a single close item. No need for that.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
First cylinder only, show warning if there are more than one cylinder defined.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since we only show the first cylinder we can also only edit the first cylinder.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We need to execute the same sequence of steps both when starting the app
and when switching cloud credentials. This way things will work correctly
when the device is offline and the user wants to switch accounts.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Even setting things up in the first row isn't enough. Every field in the
grid needs an explicit width. How dumb is that.
To make this more manageable calculate the correct widths at the beginning
and then just reference those properties.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In order for wrapping to work, the Text and TextEdit elements need to have
a defined width. Normally the GridLayout is supposed to be able to figure
out optimal widths for the different colums if you tell it which ones
should stretch, but that has repeatedly caused infinite loops and crashes
in the layout engine.
For now, in order to get both wrapping (and therefore no clipping of the
content) and avoid crashes, we hard code the width of the four columns by
setting Layout.maxWidth for each element in the first row of the grid.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Let's put the three likely rather narrow items above each other in the
right column and the others (especially the three that could run long:
suit, buddy, dive master) in the left one.
Also, make the individual entries more consistent in which attributes are
set in which order - easier to read.
Finally, make sure that all grid elements enable wrapping.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since this variable is specific to the cloud credentials in use, we need
to reset it when we change credentials.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>