aboutsummaryrefslogtreecommitdiffstats
path: root/core/divelist.h
AgeCommit message (Collapse)Author
2018-01-10Unused code: remove trip_has_selected_dives()Gravatar Jan Mulder
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-01-04Turn dive_list_changed into boolGravatar Berthold Stoeger
All callers of mark_divelist_changed() were passing a bool. Therefore, let mark_divelist_changed() take a bool and make dive_list_changed a bool. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-25Localize global planner stateGravatar Robert C. Helling
For UI responsiveness, we need to be able to run the planner in the background. This needs the planner state to be localized (and we need to pass a pointer around). In order to not let too many lines overrun (and to save typing in the future) I have renamed instances of struct deco_state to ds. Yes this should have gone to a separate commit but I accidentally commit --amend'ed it. Computing of planner variations is temporarily disabled. Unlock the planner when returning early So we don't deadlock in add dive and recreational mode (which use the planner without actually planning). Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-10-18init_deco correctly identify previous dives and report overlapping divesGravatar Stefan Fuchs
When changing the date/time of a dive in the planner the dive may end up in a totaly new position in respect to date/time of other dives in dive list table. It can be moved to the past or the future before or after other existing dives. It also could overlap with an existing dive. This change enables identification of a new "virtual" dive list position and based on this starts looking for previous dives. Then it (as before the change) does init the deco calculation with any applicable previous dive and surface interval. If some of these applicable dives overlap it returns a neg. surface time which is then used in the planner notes to prohibit display of results. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-29Add SPDX header to core C filesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-03Display surface interval in diveplanGravatar Robert C. Helling
...instead of just stating "repetitive dive". As requested by a user. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-12-26Indicate a repetitive dive in the diveplanGravatar Robert C. Helling
Fixes #1095 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14Add helper to find the dive closest to a given timeGravatar Dirk Hohndel
If we want to keep the selected dive "close" to where it was before an operation (whether a delete, or a reload, or something like that), then the most intuitive thing to do appears to be to select either the same dive again (if it still exists), or one very close to it in time. This helper allows us to identify the dive in the current dive list that is closest to the given time. We do this in the C code to ensure that we look at all dives in the dive_table - based on the id that is returned the UI can then figure out where this dive is currently shown. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>