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>
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>
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>
User manual: complete the language preference section

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
First attempt at ReleaseNotes.txt for Subsurface 4

This will need some more fine tuning.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>