aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-12-20Move the variable initialisations closer to use and add blanksGravatar Thiago Macieira
Makes the code easier to read, IMHO. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Get more descriptive error messages when uploading to divelogs.deGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Move the divelogs.de preparation function into the C++ classGravatar Thiago Macieira
This is so we can mark the error messages for translation. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Generate the file name for the dive log upload in the callerGravatar Thiago Macieira
This is a cleaner approach, according to the discussion in the mailing list. It is also better because we can use QTemporaryDir in Qt 5. Finally, it avoids having to remember to free it at every point.s Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Use QFile::{encode,decode}Name for file namesGravatar Thiago Macieira
And make them use UTF-8 on Windows instead of the local 8 bit encoding. This will also get us the proper NFD encoding on OS X. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Fix compilation with libzip < 0.10Gravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Add preprocessor directives around debug functionsGravatar Anton Lundin
These adds some ifdef's around some debug functions to disable them when not using them. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Planner: don't abort when saving a diveGravatar Anton Lundin
The fix for dereferencing a null pointer from me was a bad fix that broke the possibility of saving a planned dive as a dive. This is a better fix to not dereference a null pointer and be able to save the plan again. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20When saving / canceling edition, focus back to the Dive ListGravatar Tomaz Canabrava
When saving / canceling the edition, focus was still being kept on the current selected widget. not good. :) this patch makes the DiveList keep the focus after a edit. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Fix the cursor problem on the TagWidgetGravatar Tomaz Canabrava
The problem was the Focus Prevention system on the EventFilter. Instead of that we can pass the setFocusPolicy ( strongFocus ) that ignores the mousewheel. simpler and cleaner. Fixes #376 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Simplify the code by removing a few options from the if.Gravatar Tomaz Canabrava
There was some options on the 'if' that didn't really belonged there, so I create a if before those to quit earlier if the condition is true. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Do not New / Delete the item, use the Stack.Gravatar Tomaz Canabrava
This should be somewhat faster, and the code is cleaner. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Removed obsolete code.Gravatar Tomaz Canabrava
The QPainter::hightQualityAntiAliasing is ignored by Qt, the docs says we should use QPainter::AntiAliasing. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Make it possible to use the Tag System in dark themesGravatar Tomaz Canabrava
The color used on the bright theme was cyan, and it's too bright when the font is also white. This patch uses the HSL information of the color to determine if the text color is light or dark, and adjusting the background color for that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Code cleanup: QPair<int, int> -> qMakePairGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Improve signing script, adjust flags for gcc-4.2Gravatar Dirk Hohndel
On one of my machines codesign doesn't find my signing key by hash, but does find it by name. Go figure. Also on that same system (32bit Mac Mini with running Snow Leopard / 10.6) gcc 4.2 doesn't support the -unused-result warning. So let's only turn that on for more modern versions of gcc Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Files: use the new opendir() wrapperGravatar Lubomir I. Ivanov
This is a separate patch because it required more changes and branches due to how opendir() works on win32 with the separate struct type _WDIR and the according _w... methods for it. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Fix an unused variable warningGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Files: prefer toUtf8() over toLocal8Bit()Gravatar Lubomir I. Ivanov
We may want to use toUtf8() for win32 considerations. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Fix a missing parentheses warningGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Fix a small coding style issueGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Files: use the new open() wrappersGravatar Lubomir I. Ivanov
Adds use of everything from the new wrappers(), but the opendir() one. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Files: add wrappers for certain open() methodsGravatar Lubomir I. Ivanov
Due to filepath encoding issues on win32 we need wrappers for: - open() - fopen() - opendir() - zip_open() (this is readonly on win32) Patch only declares/defines the wrappers in dive.h, windows.c, linux.c, macos.c. Suggestions-by: Thiago Macieira <thiago@macieira.org> Suggestions-by: Jef Driesen <jefdriesen@telenet.be> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Splits long lines in manualGravatar Tim Wootton
This allows patches to be read more easily This prevents the lines longer than 998 error in git send-email Breaks lines at somewhere near 80 chars where possible Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-18Adds unhide to profile menu context menuGravatar Tim Wootton
Unhide menu is only shown when hidden events exist. Also updates relavent manual section. Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-18Make default font setting actually workGravatar Tomaz Canabrava
We were asking the widget.font() which returned the font that the QFontSelector uses to display it's contents, instead of using currentFont() that's the correctly selected font. duh. :)) Fixes #368 Fixes #375 (for #375 the solution is to select a different font that a) looks better and b) has the missing characters) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-18Whitespace fixGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-17Fix broken Linux installGravatar Dirk Hohndel
In commit ca8aee4701f9 ("Move the XSLT files into a Qt resource") we removed a line from the .pri file without removing the trailing '\' from the previous line which caused the following line to be consumed by the assignment - and the dummy target not being added to the EXTRA_TARGETS... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-17Don't enter edit profile mode when already editing the diveGravatar Dirk Hohndel
This is not the ideal solution. Ideally we might want to simply enter the profile edit mode if we edit a dive that was manually added. But right now the code contains lots of assumptions about being in one mode or the other and as we are redoing the profile / planner classes for 4.1 anyway, I'd rather err on the safe side for 4.0.1 Fixes #374 (well, it fixes the second bug reported in 374 which is quite different from the original bug) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-16Don't quit while dive is editedGravatar Dirk Hohndel
If the user edits a dive and then quits we try to ask them to finish editing, first. If the user did this by either clicking the little 'x' in the window decoration or by hitting Alt-F4 (or similar), we didn't have that question (only the 'save changes' question in case the dive list had already been modified. Fixes #374 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-16Remove the xslt_path now that all XSLT files are kept in a resourceGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-16Move the XSLT files into a Qt resourceGravatar Thiago Macieira
This means we no longer need to keep them on disk and worry about installing / uninstalling them. They will always be kept in-memory (compressed). Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-16Use UTF-8 for text strings.Gravatar Michael Andreen
Fixes #371 Signed-off-by: Michael Andreen <harv@ruin.nu> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-16The info icon of the manual got mislaid somewhereGravatar Willem Ferguson
Here it is. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-15Final update to ReleaseNotes for 4.0v4.0Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-15Disable https on Windows for 4.0Gravatar Dirk Hohndel
We appear to be missing the correct dll. I'm out of time trying to track this down, so I just switched Subsurface to access divelogs.de via http on Windwos. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-15Tools to create nice signed DMGGravatar Dirk Hohndel
These are only useful for me, but having them in git makes my life so much easier... Instead of using macdeployqt to create my DMG I use the tool that I used for Subsurface 3. This allows for much prettier DMG content as well. Fixes #329 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-15Fix install directory for Documentation on MacGravatar Dirk Hohndel
Can't believe I didn't catch that when I did the equivalent fix for Linux a couple of days ago... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-15Make the SupportedDivecomputers.html match web siteGravatar Dirk Hohndel
I had forgotten that I used <dl> and not <ul> for the dive computers on the web site. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-15Minor tweaks to INSTALL fileGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-15User manual: new banner imageGravatar Dirk Hohndel
This reflects the Qt version (and again matches the one on the web site). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-15Minor tweaks to the READMEGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-14Tweaking man page to better reflect current statusGravatar Miika Turkia
Small tweaks to reflect the recent changes in Subsurface. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-14Remove translations with insufficient coverageGravatar Dirk Hohndel
Catalan, Croatian, Vietnamese and Indonesian all have less than 50% coverage in their translations, so we had to remove them. Hebrew just sneaked past this (rather arbitrary) cutoff. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-14Inching towards the 4.0 releaseGravatar Dirk Hohndel
Updates to README, ReleaseNotes.txt and subsurface.pro Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-14Update translationsGravatar Dirk Hohndel
As always, I'm not the author. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-14When editing multiple dives, only copy the cylinder typeGravatar Dirk Hohndel
Previously we would overwrite the gasmix as well as start and end pressure even when editing multiple dives, which clearly is wrong. Fixes #364 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13Correct install path for Documentation under LinuxGravatar Dirk Hohndel
One could argue that /usr/share/doc/subsurface is indeed correct, but we look for the user-manual.html in /usr/share/subsurface/Documentation Fixes #363 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13Improve MainTab behavior when using the scroll wheelGravatar Dirk Hohndel
This gets the behavior close to what we really want. - scroll wheel no longer enters edit mode when over the tabWidget - scroll wheel doesn't modify dateTimeEdit, nor does it enter edit mode - scroll wheel still scrolls both the notes and the full widget The only oddity is that when clicking on either the dateTimeEdit or the tabWidget we don't immediately turn on the 'being edited' warning (as we do for all the other widgets). For those two widgets the user has to press a key before edit mode starts. I think this Fixes #176 Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Ideas-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13Doc, and 1 more typoGravatar Tim Wootton
Also added line-break as I ran into: "patch contains a line longer than 998 characters warning: no patches were sent" so that shouldn't happen next time. cheers, Tim From afb5fdfa2eff86ab2913e8f2a6f195c0cee3c13e Mon Sep 17 00:00:00 2001 From: Tim Wootton <tim@tee-jay.demon.co.uk> Date: Sat, 14 Dec 2013 00:31:12 +0000 Subject: [PATCH] Doc, and 1 more typo Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>