Tags

Dirk Hohndel dirk at hohndel.org
Tue Apr 9 13:20:08 PDT 2013


Jozef (or should I say Ďoďo?) has contributed an implementation of dive
labels or tags. He and I went through a few iterations of this... his
first intent has been to just allow dives to be marked as "invalid" and
I kept nudging him along until this thing got much more complex.

There are still some issues with what has been commited a few minutes
ago. One is that the list is fixed (and I think it would be nice if
people could add their own). Another one is that there is no "connecting
logic" (i.e., a dive is either Boat or Shore - those are kinda mutually
exclusive). I'm sure there are more things in there... this idea of tags
is really powerful (I think) and should be taken a lot further.

Please take a look at what I just pushed out to master. I think it could
use some TLC to make it into an even stronger feature. I'd love to have
someone look at the code in parse-xml/save-xml that I wrote to store
these tags as (non-translated!!!) text. The fact that Jozef wants to
make sure we have both "cave" and "cavern" makes the parsing a bit of a
pain...

I really want feedback on the list of tags that we have right now; since
the users can't edit them it would be nice to make sure we have most of
what they might want:

char *dtag_names[DTAG_NR] = {
	N_("invalid"), N_("boat"), N_("shore"), N_("drift"), N_("deep"), N_("cavern"),
	N_("ice"), N_("wreck"), N_("cave"), N_("altitude"), N_("pool")
};

And what would be really cool... Miika - can we map some of the data we
get from other formats into those tags? And maybe looking at what they
provide maybe will help us figure out any that we are missing?

I know there was another question that I had about the code... but I'm
blanking on it right now.

Please someone do some more code review :-)

/D


More information about the subsurface mailing list