summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-11-25 18:53:15 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-26 09:27:24 -0800
commitba3e6bcc5185b0427f5591c4fc8566f5d66ffb7d (patch)
treeefa5c02ed30c32ab426f3c00a7c3b38860a0d31f /dive.h
parent2f82ec39b89b782d1aeb2433a44d102fed5af7de (diff)
downloadsubsurface-ba3e6bcc5185b0427f5591c4fc8566f5d66ffb7d.tar.gz
Associate each dive trip with the dives in that trip
We already kept a count of dives per trip in order to figure out when there are no more dives left and the trip needs to be freed. Now we explicitly keep track of the list of dives associated with the trip too, which simplifies the "find the time of the trip" logic. We may want to sort it in time, but for now this is mainly about trying to keep track of the divetrip relationships explicitly. I want to move away from the whole "use the gtk tree model to keep track of things" approach. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index 44023b705..43b7b8d59 100644
--- a/dive.h
+++ b/dive.h
@@ -278,6 +278,7 @@ typedef struct dive_trip {
timestamp_t when_from_file;
char *location;
char *notes;
+ struct dive *dives;
int nrdives;
int expanded:1, selected:1;
} dive_trip_t;
@@ -286,6 +287,7 @@ struct dive {
int number;
tripflag_t tripflag;
dive_trip_t *divetrip;
+ struct dive *next, **pprev;
int selected;
gboolean downloaded;
int start, end;