Plot cleanup

Use a helper to make things easier to read.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
First deselect, then select

For reasons I still don't understand, sometimes (but not always) when
clicking on a trip header we appear to get a select notification for the
trip and at the same time deselect notifications for every dive in the
trip. This seems wrong but I can't seem to figure out why it happens -
and of course it causes us to have a mixed up interpretation of what is
selected in our internal selection tracking.

Simply acting on the new selection after the newly deselected items are
handled appears to fix the issue, but I do worry about this change.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't offer "delete dive" context menu for trip

If we are not on a dive we shouldn't try to delete it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Show & edit trip location and notes when exactly one trip is selected

While we still show the selected_dive in the profile and use it for Dive
Info and Equipment, in the Dive Notes tab we now show the trip location
and trip notes (and none of the other fields), if the user directly
selects a whole trip by clicking on the trip header.

This clever reuse of the widget now allows trip location and notes to be
edited in place.

As a side note: the Gtk version has long allowed the user to edit the
trip location and trip notes, but nowhere did it ever SHOW the trip
notes... so this is more than just feature parity...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Calculate deco stops, TTS and NDL

Calculate TTS and NDL, and Deco stops and show them in the mouse-over.
Fix compilation on hipp