summaryrefslogtreecommitdiffstats
path: root/divelist.h
AgeCommit message (Collapse)Author
2012-09-02Add autogen menu commandGravatar Dirk Hohndel
This adds the ability to auto create trips from the menu. It's a toggle entry (and while at it, we made the zoom toggle a toggle entry as well). We can therfore switch back and forth between auto generated trips. There is one bug. Assume you have no trips. You manually create a trip from some dives out of a group of trips that autogen would turn into a trip. Now you turn on autogen and this trip gets expanded with all the dives that would normally be grouped together. If you turn off autogen again, all those dives are still part of the remaining (initially manually created) trip. Working around this issue seemed a lot more work than the likelihood of anyone running into it seemed worth. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-13Make sure SAC and OTU get recalculated after cylinder info was changedGravatar Dirk Hohndel
Also fixed minor coding style issues (prevent useless code from being executed). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-09-27Add preference option to chose if SAC and/or OTU should be in divelistGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-09-21Simplistic first attempt to get changes saved when quitting subsurfaceGravatar Dirk Hohndel
Track whether things changed in the global dive_list So far this actually works if changing dive info (but only if dive selected was changed after the dive info was changed). We are not tracking changes to the cylinder information, yet. also remove the duplicate static dive_list Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-09-20Separate out the UI from the program logicGravatar Dirk Hohndel
The following are UI toolkit specific: gtk-gui.c - overall layout, main window of the UI divelist.c - list of dives subsurface maintains equipment.c - equipment / tank information for each dive info.c - detailed dive info print.c - printing The rest is independent of the UI: main.c i - program frame dive.c i - creates and maintaines the internal dive list structure libdivecomputer.c uemis.c parse-xml.c save-xml.c - interface with dive computers and the XML files profile.c - creates the data for the profile and draws it using cairo This commit should contain NO functional changes, just moving code around and a couple of minor abstractions. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-09-20Make 'struct DiveList' entirely internal to divelist.cGravatar Linus Torvalds
Passing it around is just annoying, and we only ever have one. Let's not burden all the users with the silly thing. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-19Make helper function for creating TreeView columns in the dive listGravatar Linus Torvalds
Let's not repeat the boiler-plate code more than necessary. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-19Update the divelist when dive info changesGravatar Linus Torvalds
This flushes the dive changes to the dive list, the way the old dive info frame would update as you update dive fields. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-19Add location to divelist tooGravatar Linus Torvalds
Sure, it's visible elsewhere, but this way you can search and sort for it, and see several entries at once. So again, having it visible in the dive list is a good thing. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-19Add temp/nitrox/sac entries to divelistGravatar Linus Torvalds
This doesn't really fill them, it just adds them to the possible entries. I'll get to it later. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-12Libdivecomputer: start actually importing the dive dataGravatar Linus Torvalds
So this actually reports the dive data that libdivecomputer generates. It doesn't import special events etc, but neither do we for the xml importer. It is also slow as heck, since it doesn't try to do the "hey, I already have this dive" logic and always imports everything, but the basics are definitely there. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-11Be more careful about unit changesGravatar Linus Torvalds
When we change units, we need to flush any currently active dive information in the old units, and then carefully reload it in the new units. Otherwise crazy stuff happens - like having current cylinder working pressure values that are in PSI because that *used* to be the output unit, but then interpreting those values as BAR, because we changed the units. Also, since we now properly import working pressure from Diving Log, stop importing the (useless) cylinder description. The Diving Log cylinder descriptions are things like "Alu" or "Steel". We're better off just making up our own. Finally, since Diving Log has cylinder size in metric, make sure that we do the "match standard cylinder sizes" *after* we've done all the cylinder size conversions to proper units. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-07Update the dive units without destroyng and rebuilding the dive listGravatar Linus Torvalds
Just iterate over the dive list entries, updating them one by one. This avoids the "selection destroyed" when the dive units are changed. And it's cleaner anyway. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-07Add GtkTreeViewColumn information to 'struct DiveList'Gravatar Linus Torvalds
We will need the column information in order to update the naming when the units change. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-05Open File works. I refactored the code and introduced a new type. I never ↵Gravatar Nathan Samson
used it as a pointer (their was no real reason), but I'm not really satisfied. Signed-off-by: Nathan Samson <nathansamson@gmail.com>