Make sure Windows can find the user manual

This worked before without the "file:///" prefix, but something else that
I did broke that. Oh well, now it works again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
windows.c: prevent a warning due to #define _WIN32_WINNT...

mingw 4.8.2 complains:
warning: "_WIN32_WINNT" redefined

0x500 suits our needs windows.c wise.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
planner.c: use implicit struct initializer

We should either use mplicit struct initializers (empty braces { }
or double braced zero {{ 0 }}) or memset the struct.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
qt-gui.cpp: add another QT_VERSION check

encodeUtf8() and decodeUtf8() are only used for Q_OS_WIN in init_ui(),
but also that branch is wrapped in a "#if QT_VERSION < 0x050000"

we do the same for the actual function declarations.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
mainwindow.cpp: fix a warning about parentheses

"warning: suggest parentheses around assignment used
as truth value [-Wparentheses]"

I think 4.8.2 is confused about this one, but we suppress
it regardless by separating into two assignments.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
profilewidget2: fix -Wreorder warnings

warning: 'ProfileWidget2::someVariableName' will be
initialized after [-Wreorder]

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
planner.c: prevent an uninitialized warning

"warning: 'bottom_time' may be used uninitialized in this
function"

we set it to zero for now.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't show the average depth for the selected dives

Being shown between the deepest and shallowest dive's max depth it
confuses a lot of people - the average depth is frequently less than the
shallowest of the dives, so at first glance it looks like the "average" is
less than the "minimum". So having three numbers grouped like this that
use different algorithms is just distracting.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add gas consumption statistic for selected dives

We already did a list of gases and volume consumed for the selected dive
on the Dive Info tab, but did not provide that same data on the Stats tab
for all the selected dives.

I arbitrary limited this to eight gases (as the list can get quite long
when you select a lot of dives). The gases are sorted by volume consumed.

Fixes #535

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: use the actual setting for GF low at max depth

Using the default_prefs value makes no sense.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: reset GFlow and GFhigh when we're done

While planning we might change the gradient factors. Make sure they are
back to what's in the preferences when we're done planning.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: show the GF used for planning on top of the profile

Showing the GF in the preferences is just confusing.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: don't reset GF when preferences change

The planner has its own view of the gradient factors. So replacing those
with the ones set up for viewing dives in the preferences is wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>