Invalid dives

Ďoďo dodo.sk at gmail.com
Sat Mar 16 21:40:10 PDT 2013


Dirk,

because my "Invalid dives" were dives I was swimming and freediving with my
dive computer. So I was checking how deep water was on different places.

Another cases are during the dive courses, actually during OWD mainly.

1. Swimming pool: I do not count for me swimming pool lessons as a real
dives. But I track them - yes, I am too lazy to write it on paper.
2. Till you really start some dive with group of beginners it takes
sometimes few "invalid" short dives. Again, I do not want to have them
displayed as real dive, but I wanna keep them.

is it enough?

I did not use boolean - I did consider - because SHORT allows to
distinguish between different type of invalid dives - if once needed.

Jozef









On Sat, Mar 16, 2013 at 11:27 PM, Dirk Hohndel <dirk at hohndel.org> wrote:

> Ďoďo <dodo.sk at gmail.com> writes:
>
> > Folks,
> >
> > after last diving trip I have in my computer several invalid dives which
> > should be removed, but I wanted to keep them hidden somewhere in the
> > background.
> >
> > I did small changes in Subsurface which allows to tag dives as "Invalid".
> > Invalid dives are displayed only if it is explicitly allowed in the
> > preferences.
> >
> > Would it be interesting to have it in subsurface?
>
> Why would you want the invalid dives in the datafile at all? Why not
> just delete them?
>
> > Attached is the first shot which does:
> > - Tagging single dive as invalid
> > - Not displaying invalid dives if not allowed
> > - Setting in the preferences
> > - Saving preferences as well as information about tag in XML file
> >
> > It does not yet:
> > - Tagging multiple dives as invalid
> > - After changing preferences it does not update the dive list. So far I
> am
> > restarting subsurface due to my ZERO knowledges about GTK
> >
> > It is:
> > - From graphic point of view ugly because:
> >  -- In the preferences the checkbox for invalid dive should be below the
> > default XML
> >  -- If dives is taged as invalid, there should not be Ybes, but some nice
> > graphical element.
>
> The patch is reversed (it tries to remove your new code).
> Indentation / code formatting certainly does not follow our style
> e.g.:
>
>         if(dive->invalid && ...) continue;
>
> there should be a space after the keyword "if" and continue should be in
> the next line...
>
> If you make dive.invalid a gboolean then you can simply write the
> callback as
>
>          dive->invalid = !dive->invalid;
>
> in prefs.h I think the comparison with ">= 0" is wrong.
>
> But this feedback is mostly for learning purposes... I still want to
> first understand why you would want that functionality to begin with.
>
> /D
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130317/9cbf5da7/attachment.html>


More information about the subsurface mailing list