Remove external declaration of non-existant global variable

Just to slightly reduce possible confusion.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't use current_dive instead of the argument to the function

I could have gone either way - the other alternative would have been to
remove the argument to the function. But since current_dive is a macro
and since the semantic of the function make sense with the argument being
passed in, it seemed better to just not use current_dive in the function.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't reuse a variable name with a different type inside the same function

Since the variable was inside of an inner scope this was technically legal,
but it's just too annoying for words.
(The diff in the commit doesn't make this obvious, but outside the for
loop in the same function there is a divedatapoint *dp, so we had a
pointer to divedatapoint and a divedatapoint with the same name...)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't shadow object members like this

If you need to use this->error to distinguish the local variable from the
object membe that should be a hint that maybe you didn't pick the best
name for the local variable.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make sure the about dialog is correctly centered

Otherwise, why pass in the parent to begin with?

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
More variable scope confusions

Don't have nested loops with the same loop variable. Really. Even if it is
legal C++.
And don't declare local variables more than once. This will only cause
issues later.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Whitespace and dead code cleanup

The coding style for switch isn't the prettiest, but let's at least keep
things consistent.

Also, those ugly break statements never got reached, anyway.

And there was no need to re-declare and re-generate currentString.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Correctly track parent of print dialog

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