mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add nr of dives at the site to completion string
I'm not convinced that this is useful enough to keep, but let's give it a try and see what people think. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
021a151f03
commit
bd4629b293
3 changed files with 17 additions and 1 deletions
13
divesite.c
13
divesite.c
|
@ -108,6 +108,19 @@ struct dive_site *alloc_dive_site()
|
|||
return ds;
|
||||
}
|
||||
|
||||
int nr_of_dives_at_dive_site(uint32_t uuid, bool select_only)
|
||||
{
|
||||
int j;
|
||||
int nr = 0;
|
||||
struct dive *d;
|
||||
for_each_dive(j, d) {
|
||||
if (d->dive_site_uuid == uuid && (!select_only || d->selected)) {
|
||||
nr++;
|
||||
}
|
||||
}
|
||||
return nr;
|
||||
}
|
||||
|
||||
bool is_dive_site_used(uint32_t uuid, bool select_only)
|
||||
{
|
||||
int j;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue