Commit graph

4568 commits

Author SHA1 Message Date
Dirk Hohndel
d117becad8 Improve MainTab behavior when using the scroll wheel
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-13 21:18:54 -08:00
Tim Wootton
cd0a90014d Doc, and 1 more typo
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>
2013-12-13 17:12:59 -08:00
Tim Wootton
d16398d752 User manual: correct various typos and spellings
1) Corrects various typos and spellings
2) Standardises on infrared over infra-red (both were found)
3) Standrdises on colour over color (both were found) as most
   of the manual seems to use UK English spelling

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13 17:10:00 -08:00
Dirk Hohndel
4a53c652e2 Convert structure list of supported dive computers to txt / html
This adds a silly perl script to create either a txt or html file from the
structured descriptor3.tsv file. This way we can maintain the structured
file and easily create both text and html output from it.

Instead of somehow adding this to qmake I decided to simply add the two
output files so that they are included in the source tar file.

Recreate them by running
perl scripts/parse-descriptor.pl descriptor3.tsv SupportedDivecomputers.html
perl scripts/parse-descriptor.pl descriptor3.tsv SupportedDivecomputers.txt

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13 16:44:51 -08:00
Willem Ferguson
db9de2caf5 Add structured file with list of supported dive computers
3 data items per row
1) Make
2) Model
3) Download protocol used by libdivecomputer.

All arranged alphabetically.

I thought maybe the last item may be useful for users trying to set up
download infrstructure for a dive computer. For instance it turns out my
Mares Puck pro is more closely related to the Mares Ion than to the
Mares Puck family. For dive computers like the Uemis Zürich I set the
download protocol to "SUBSURFACE".

[Dirk Hohndel: changed the suffix to .tsv as this is tab separated, not
               comma separated values]

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13 16:26:01 -08:00
Dirk Hohndel
b6338cc30d Look in one more place for our files on a Mac
Our directory structure is somewhat inconsistent on a Mac.
Instead of trying to mess with the qmake files and breaking other things this
late in the process, I simply decided to look in one more place for our files
(this time the translations).

Fixes #362

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13 15:31:04 -08:00
Tim Wootton
70b2359a42 User manual: sync divenotes & equipment sections
Brings the changes that were made to Dive Notes and Equipment
under the Manual Entry section into the Imported from DC section
was well, while preserving the imported from DC specific stuff.

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13 15:10:10 -08:00
Tim Wootton
f9c0fd7f32 User manual: shortcut keys also depend on language
Notes dependancy of shortcut keys on language as well as OS.
Writes Operating System in full not abbr.
More fully describes how to spot a shortcut key in the menu

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13 15:09:50 -08:00
Tim Wootton
efa01dc94c User manual: Add space after punctuation
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13 15:07:59 -08:00
Willem Ferguson
c5e51e845c Usermanual final edit before Version 4.0
1) Many typos and lexical problems improved or corrected
2) Information for Heinrichs Weikamp DR5 moved to Appendix B
3) Small changes to images.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13 13:02:42 -08:00
Lubomir I. Ivanov
92476c76f3 prepare_dives_for_divelogs(): remove unused variable 'doc'
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13 07:42:39 -08:00
Miika Turkia
86d4a3db92 Mention that Qt version is needed for build-dep
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 16:31:29 -08:00
Miika Turkia
247e5a0db0 Use sudo when installing compile dependencies
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 16:31:27 -08:00
Dirk Hohndel
89a58e23e0 Correctly parse multiple tags in the divelog
The old parsing code overwrote the first comma with a '\0' and then
checked the index against the length of the buffer - which was changed by
replacing the ',' with the '\0'.

This means that since commit 78acf20848 ("Don't crash on loading tags
longer than 127 chars") Subsurface has potentially damaged / lost data in
dive files!

Added a test dive that shows the issue if opened by a Subsurface version
after the commit mentioned above but before this commit.

Reported-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 16:29:06 -08:00
Miika Turkia
007aa79fd7 List packages required for compile on Debian
The list of required packages to compile on Debian and Ubuntu.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 15:07:45 -08:00
Dirk Hohndel
719b732230 Fix incorrect handling of autogrouped trips
When toggling autogroup in the menu we ended up setting the NO_TRIP flag
for dives that were removed from a trip that was created by autogroup. So
toggling things on and off and on again meant no more auto grouping.

Fixes #337

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 15:03:25 -08:00
Dirk Hohndel
d541b9fd42 INSTALL file: correct Debian build dependency install
I wrote this on a plane from memory. Forgot the dash.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 13:27:21 -08:00
Sergey Starosek
7752e598c6 Fix broken image link
Rename .kpg -> .jpg

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 13:10:48 -08:00
Dirk Hohndel
b3f800d9fb User manual: small fixes
Once again use 'selected' and 'highlighted' consistently.
Use the correct units for the vertical speed during a dive. 30 m/s would
be more than just red :-)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 19:53:55 +01:00
Dirk Hohndel
586c7fbd90 User manual: update importing dive log data from other software
Minor changes and slight reorganization.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 19:38:47 +01:00
Dirk Hohndel
deead2a613 User manual: update the section on importing data from dive computer
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 19:03:18 +01:00
Dirk Hohndel
c698218ca3 User manual: updates of the initial sections on manual data entry
Also changed the term :weighting system" to "weight system".

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 18:53:10 +01:00
Dirk Hohndel
4ed4a32a5f User manual: consistently use second person to address the user
We kept switching between the somewhat impersonal 'one' and the much more
friendly 'you' to address the user. This commit changed all occurances
that I found to 'you' and adjusted the grammar around it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 18:15:42 +01:00
Dirk Hohndel
1476ca6ccd User manual: minor changes to the Start Using the Program section
Be more precise with selected dive vs. highlighted dives.
Avoid some redundancy.
Mention shortcut keys.
Discuss the different locations of the Main Menu and the fact that the
screen shots were taken on a Ubuntu system.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 18:15:39 +01:00
Dirk Hohndel
f970aacf37 User manual: slightly reword the introduction
we should focus on the typical user, so start with platforms that we have
binaries for

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 18:15:35 +01:00
Dirk Hohndel
7f2108ff52 Update INSTALL file
Create a brief introduction and pull the build options for Subsurface to
the top of the file.
Make the build instructions for the different platforms somewhat more
consistent
Mention the need for qmake-qt4 on some Linux distros

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 17:14:54 +01:00
Thiago Macieira
ee5d8e3cfc Don't install the actual icon files
They are loaded into a Qt resource and always accessed via it.

[Dirk Hohndel: had to hand edit / apply the changes to the .pri file]

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 08:00:41 +01:00
Dirk Hohndel
76251c27da Fix the logic when to display the "language changed" warning
If the user had never set up the language selection they could end up
getting the "language changed, restart required" warning even if they
didn't touch the language setting at all.

This fixes that issue by assuming that UseSystemLanguage is true if the
setting is undefined and only comparing the selected language if that
selection actually matters (i.e., UseSystemLanguage is false).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 06:44:09 +01:00
Dirk Hohndel
9f8db51c03 Latest translation updates from Transifex
I am not the author, just the person pulling from Transifex. Authorship is
tracked there.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 04:21:12 +01:00
Thiago Macieira
8cbe433e55 Remove unused file
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 04:17:09 +01:00
Dirk Hohndel
9db72cda21 Update the README
Removed lots of redundant text and tried to update the rest for 4.0.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 04:16:42 +01:00
Dirk Hohndel
c230837a2b First attempt at ReleaseNotes.txt for Subsurface 4
This will need some more fine tuning.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 04:00:00 +01:00
Thiago Macieira
0f3928f315 Don't check if a file exists right before trying to open it
The open call will tell us what we need to know. Obviously we can't open
a file that doesn't exist. This saves us one stat() or Windows
equivalent.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:37:24 +01:00
Thiago Macieira
841bdf3462 Make the streamsize variable actually int
Casting a pointer to a size_t variable to a pointer to int is wrong on
big endian machines. Not that I expect anyone to compile Subsurface 4
for Mac on PowerPC 64-bit, but just in case... Who knows, we may have
some Solaris-on-UltraSPARC or AIX-on-POWER6 users.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:37:07 +01:00
Thiago Macieira
0a57befb69 Don't call strlen() on something we already know the size of
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:36:36 +01:00
Thiago Macieira
cb39bb5e9c Don't leak the zip structure in case of error
This also erases the zip file that we created

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:36:16 +01:00
Thiago Macieira
b3d59cb890 Don't leak the buffer or temporary file used to save the dive
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:35:46 +01:00
Thiago Macieira
04ec3cf31f Hoist the getting of the XSLT style-sheet out of the loop
We don't need to get it for every file, since it's the same. This also
avoids leaking temporary files and memory if the stylesheet cannot be
found.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:35:37 +01:00
Thiago Macieira
a17880ca02 Make the errPrefix a static variable
No need to allocate memory for something that will show in debugging
only. Besides, qDebug() of a QString adds quotes around it, which we
can do without.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:34:54 +01:00
Thiago Macieira
aadf2cd19c Don't leak the zip structure if no dives are selected
Just move the check above the zip_open call.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:34:25 +01:00
Thiago Macieira
1b5b562da8 Fix compilation with older libzip
Older libzip lack zip_get_num_entries. Thanks to Lubomir for spotting
the version macro.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:33:34 +01:00
Tomaz Canabrava
5ac29bbe74 Save and reestore scrollbar position on editing the items.
Save and restore scrollbar position on editing the dives.
I think this is not the best place for it, but I'll leave
it here for a while untill I find a better place.

Fixes: #343
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:26:39 +01:00
Tomaz Canabrava
9a497b1cb0 Keep track of the minimum Depth / time on the planner.
This patch makes sure that the minimum time / depth is
correctly set on the profile planner.

Fixes: #358

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:26:39 +01:00
Tomaz Canabrava
0b0860d24a Copyed the code from Dirk that solved the mac issue on cylinders.
This is the same code that Dirk used on the Mac to fix the
bad-behavior of Cylinder Selection, this time applyed to
Weigthsystem selection.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:26:39 +01:00
Tomaz Canabrava
0b5f9512ef Fix TableWidget ( equipment ones ) on dark scheme.
This patch uses the class created by the previous patch
to get rid of the CSS and be really desktop native. it
fixes a lot of stuff in non-blue-styles and throws
a lot of code away. <3

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:26:39 +01:00
Tomaz Canabrava
c5c44e3a82 Kill the use of CSS - Fixes a Lot of issues on dark color schemes.
The css was done by me in the first days of subsurface for Qt, and it
was a code that I was never proud of. Mostly because I tougth at the
time that it was better to write it into CSS than to create a new class
just to take care of the size of the default cell height on a tree view.

Now I see that it was a biased approach since it created issues on
dark color schemes and it also didn't make a 'native' experience on
Gnome or OSX, only on KDE.

This fixes that.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:26:39 +01:00
Dirk Hohndel
b87cfa9666 User manual: complete the language preference section
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:17:34 +01:00
Tim Wootton
4d7e6430e8 User manual: add stub for Language Preferences
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:13:38 +01:00
Tim Wootton
415e8bd877 User manual: Add section about Profile Pane context menu
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:13:37 +01:00
Tim Wootton
0f23e3f04c User manual: correct typo in Uemis Zurich section
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:13:22 +01:00