aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-05-05Allow parsing of .txt files on importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04Update translation sourcesGravatar Dirk Hohndel
This removes the strings from the dummy files and the theme test file. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04QML-UI: don't translate the theme test stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04iOS build: dummy qml file to pull in the right dependenciesGravatar Dirk Hohndel
The iOS build process is rather stupid - it scans all .qml files in the root directory of the project to determine which QML dependencies are required. This is why we had the weird leftover fake QML project in our sources. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04Android build: we don't need the Qt translationsGravatar Dirk Hohndel
Only the Subsurface translation files as needed as the QML UI doesn't display any Qt internal strings. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04iOS build: create the translations to be bundledGravatar Dirk Hohndel
And add them to the bundle. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04Find bundled translations on iOSGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04Latest translation updateGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03Android build: prepare and copy translations into the APKGravatar Dirk Hohndel
And then load them at runtime. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03QML DiveDetailsView only use one bottomlayoutGravatar Rick Walsh
Splitting the bottomlayout in two leads to columns in the grid not lining up. It was a workaround that hopefully isn't needed any longer. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03QML Set width instead of minimumWidth equal to maximumWidthGravatar Rick Walsh
The QML manual advises against setting width property of gridLayout children directly, and recommends setting preferred, min and/or max width instead, letting QML do the work to determine the optimum width. But we've found letting QML determine gridLayout widths leads to infinite loops in too many situations, so we're forcing a width. It's better to force a width by setting it directly, rather than setting minimum = maximum. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03Update latest translationsGravatar Dirk Hohndel
This includes the first few terms translated for Subusurface-mobile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03Updated translation sources for QML UIGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03Mark strings in qml files for translationGravatar Robert C. Helling
I did this semi-automatically: I used the script from the previous patch and then did some manual corrections. This marks only title: and text: tags, there might be others Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03A script to find literal texts to be marked for translation in qmlGravatar Robert C. Helling
in perl... Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03Revert "QML UI: make sure Kirigami doesn't exit by mistake"Gravatar Dirk Hohndel
This reverts commit 3437fc1a64e5659528f1a0343d53a667147ffc71. Completely bogus.
2016-05-03QML UI: make sure Kirigami doesn't exit by mistakeGravatar Dirk Hohndel
The ApplicationWindow has the backRequested signal and if we don't accept that event, Kirigami will exit the app which is never what we want. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03QML UI: show nocloud button at startGravatar Dirk Hohndel
While this seemed to work fine on iOS and when compiling the QML UI on a desktop, on Android the nocloud button wasn't shown at app start. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03Parse date and time from on APD importGravatar Miika Turkia
This will parse the date and time information on CSV import if the file name matches the one used by APD log viewer (date and time are available in the file name). Hard coding the year to 20?? is a bit unfortunate, but as there is only 2 digits in the year, we have to invent something. And it would be quite optimistic to assume this will bite us back any time soon :D Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-02Make the last column take all the available sizeGravatar Marco Martin
The grid layout had each column fixed to a width taken as a portion of the grid width, but since the grid has a columnSpacing defined as well, the computation doesn't add up, helping in causing an infinite recursion problem in the attempt of sizing and positioning all the children of the layout [Dirk Hohndel: heavily modified, but the basic idea remains] Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-02CSV import: import dive number if definedGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-02CSV import: import time field if availableGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-02CSV import: support for user specified date formatGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-02Print xsltproc command line on verbose modeGravatar Miika Turkia
Printed command line can be used to manually test the import function, allowing faster testing of XSLT changes, and showing debug prints that are discarded by Subsurface. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-02CSV import: use date field on profile importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-02CSV import: convert cylinder size from imperialGravatar Miika Turkia
This will convert cylinder size when importing from imperial units. I am using default working pressure of 3000 PSI that is not precisely correct, but should be close enough for the most common aluminium cylinders. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-02Don't wrap labelsGravatar Marco Martin
if the text in every column can wrap anywhre, we don't have a stable way to know how large the columns themselves may be. This can cause an infinite recursion while trying to figure out the width of the items, as the sizeHint(Qt::ImplicitSize) of those labels (Buddy, Cylinder etc) will not be stable as it will once return the size of the text wrapped and once the size of the text not wrapped. Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-02Move the qtTranslator and ssrfTranslator pointers to qt-init.cppGravatar Thiago Macieira
No point in having it defined in each main program's .cpp. Especially since the unit tests don't define them. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-01QML UI: break grid layout into smaller layoutsGravatar Dirk Hohndel
Since the big layout causes an infinite recursion in the Qt/QML layout engine. Also remove a no longer accurate comment. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-01QML UI: Left align all labels in DiveDetailsViewGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Only attempt to download each picture onceGravatar Robert C. Helling
Otherwise we keep downloading the same image multiple times instead of new images. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Remove duplicate resource mentionGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Fix typoGravatar Dirk Hohndel
Otherwise this code makes no sense (and has no effect). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Merge branch 'offlineDefault'Gravatar Dirk Hohndel
2016-04-30QML UI: when first entering cloud credentials, force cloud connectionGravatar Dirk Hohndel
With offline the default now, we need to force a connection at least once so that the repos are in sync. And then of course we need to return to the correct state, regardless on whether this connection succeeded or failed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Remove pointless codeGravatar Dirk Hohndel
This isn't how you remove the default filename Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30QML UI: make offline the defaultGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Don't pretend that opening git repo succeededGravatar Dirk Hohndel
Not sure why we claimed that this was successful when clearly it wasn't. There's a risk that this could break something on the desktop, but it makes no sense to me why that would be the right thing to do. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Connect to the reply, not the managerGravatar Dirk Hohndel
This way if there are other pending connections we don't get triggered by the wrong completion. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30QML UI: forceRemoteSync means connect even without unsaved changesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30QML UI: better diagnostics when cloud connection failsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Only create the path to no cloud local storage onceGravatar Dirk Hohndel
This required a small change to the helper function, but this seemed totally worth it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30QML UI: make text match the implementationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Fix logic for when to mark dive list as changedGravatar Dirk Hohndel
Since saving checks if there are changes, we have to always mark the dive list as changed before asking for the changes to be saved. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-29QML UI: when switching from no cloud to cloud usage, don't drop local dataGravatar Dirk Hohndel
This is rather simplistic, it just imports the local data into the remote repository and therefore loses the git history of the local data - but I wasn't able to make the git merge without shared base commit work, so I went this much easier to implement route instead. One thing we need to be careful about is that contacting the remote server could fail. If we don't manage to merge the dives from cloud server and local storage, we need to revery to no cloud status in order not to lose the local data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-29QML UI: fix order of tests when saving changesGravatar Dirk Hohndel
Only check for previous cloud connection when actually trying to save to cloud Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-29Clean up comparison syntax in qmlGravatar Dirk Hohndel
For consistency. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-29Allow switching the user from the command lineGravatar Dirk Hohndel
This is a feature that many people have asked for. This implementation is somewhat simplistic because we simply use a different name for the program settings - but interestingly enough this appears to be enough to capture a lot of the core functionality that people are looking for in multi-user support. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-29QML UI: make sure nothing is lost when changing cloud credentialsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-29Protect access to image hash dictionaries with lockGravatar Robert C. Helling
Otherwise we step on our own feet when downloading several images, like after import from divelogs.de with many linked images. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>