Stop doing the (very expensive) pow() calculation pointlessly

This re-organizes the saturation calculations to be in my opinion
clearer: we used to have the "one second" case completely separate from
the "generic interval" case, and this undoes that.

It *does* keep the special static cache for the one-second buehlmann
factors, and expands that with a *dynamic* cache for each tissue index
that contains the previous value of the buehlmann factor for a
particular duration.

The point is, usually we end up using some fixed duration, so the cache
hit ratio is quite high.  And doing a memory load from a cache is *much*
faster than calculating exponentials.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Ignore mouse wheel events on tags widget

This prevents tags widgets (dive tags and buddy) from grabbing
focus on mouse wheel events but allows entering dive edit mode
on mouse click.

It was attempted earlier by Dirk (commit d117beca), but edit mode
did not work properly.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use focus policy setting from widget constructor

Since we use tags widget for several input fields (tags, buddy,
divemaster), it makes sense to keep focus policy setting in one place.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Populate divemaster completion model using CSV

Split divemaster field value using comma and populate completion list.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Expand tags approach to divemaster field

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Enter dive edit mode on divemaster field focus

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>