summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-08-16 10:46:30 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-08-16 10:46:30 -0700
commit9b72217f79f29313d30c87c55f533cc606da6a8f (patch)
treef3e9eb1d508b1873d20f22ddbbe9ecc0269a3149 /dive.h
parent91e7dcc555ada4fe43198327383e895e528c4cc7 (diff)
parente6ecddfa3d17901847474b67b6121c0c8f56f078 (diff)
downloadsubsurface-9b72217f79f29313d30c87c55f533cc606da6a8f.tar.gz
Merge branch 'tree2' of git://git.hohndel.org/subsurface
Pull dive-trip grouping from Dirk Hohndel: "This turned into an updated pull request for the tree2 branch where I implemented the date based grouping - but is actually a very different topic: this adds the ability to edit multiple dives (and fixes some issues with the dive editing overall). The reason for that is that it reuses some of the infrastructure that I implemented in the tree2 branch for tracking the selected dives. More details in the commit messages." * 'tree2' of git://git.hohndel.org/subsurface: Switch from date based to dive trip based grouping Redo dive editing Fix selecting and unselecting summary items Apply sort functions to the correct model, don't select summary entries Maintain selected rows when switching between list model and tree model Create duplicate list model so sorting by columns works again Improve tree model implementation Allow date based grouping
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/dive.h b/dive.h
index faed89ac9..eb9accb6f 100644
--- a/dive.h
+++ b/dive.h
@@ -228,6 +228,8 @@ struct event {
#define MAX_CYLINDERS (8)
#define MAX_WEIGHTSYSTEMS (4)
+#define W_IDX_PRIMARY 0
+#define W_IDX_SECONDARY 1
struct dive {
int number;
@@ -284,7 +286,7 @@ extern int selected_dive;
static inline struct dive *get_dive(unsigned int nr)
{
- if (nr >= dive_table.nr)
+ if (nr >= dive_table.nr || nr < 0)
return NULL;
return dive_table.dives[nr];
}
@@ -301,7 +303,7 @@ extern xmlDoc *test_xslt_transforms(xmlDoc *doc);
extern void show_dive_info(struct dive *);
-extern void show_dive_equipment(struct dive *);
+extern void show_dive_equipment(struct dive *, int w_idx);
extern void show_dive_stats(struct dive *);
@@ -349,6 +351,7 @@ extern void evn_foreach(void (*callback)(const char *, int *, void *), void *dat
extern int add_new_dive(struct dive *dive);
extern int edit_dive_info(struct dive *dive);
+extern int edit_multi_dive_info(int nr, int *indices);
extern void dive_list_update_dives(void);
extern void flush_divelist(struct dive *dive);