summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2011-09-04Zebra-color the divelistGravatar Linus Torvalds
..as suggested by Nathan: "I also wanted to "zebra" color the divelist by setting the rules-hint to TRUE. but I noticed it was already set explicitly to FALSE (even if this is the default). If this is just an accidental copy paste from some tutorial you can experiment (set it to TRUE) and see what you like most." It was indeed just copy-paste from some tutorial, and the zebra-coloring does look nicer, doesn't it? Suggested-by: Nathan Samson <nathansamson@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Merge branch 'more-divelist-goodness' of ↵Gravatar Linus Torvalds
https://github.com/nathansamson/diveclog * 'more-divelist-goodness' of https://github.com/nathansamson/diveclog: Right align the numbers
2011-09-04Save milli-units with variable precisionGravatar Linus Torvalds
Instead of always using three decimal digits, use 1-3 digits. But do use at least one, even for integer numbers, just because it makes it so much clearer that we're dealing with potential fractional values. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Use common helper for printing milli-unitsGravatar Linus Torvalds
I don't necessarily want to show three decimal digits when one or two would do. So prepare for that by using a helper. This doesn't actually change the printout yet. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Properly save/restore cylinder description stringGravatar Linus Torvalds
We saved it under the wrong name, and didn't restore it at all. Fix. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Parse uemis cylinder dataGravatar Linus Torvalds
This is some seriously crazy stuff. Instead of making sense as a divelog, the uemis xml makes more sense as a "dive computer settings dump". And I guess I can see why they'd do that. But it makes parsing it just incredibly annoying. The thing is more of a "these are the configurations I support as a dive computer thing" than a "this was the tank you were diving with". Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Right align the numbersGravatar Nathan Samson
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-04Merge branch 'ui-tweaks' of https://github.com/nathansamson/diveclogGravatar Linus Torvalds
* 'ui-tweaks' of https://github.com/nathansamson/diveclog: Some UI beauty patches:
2011-09-04Make a guess at the cylinder description from the size and pressureGravatar Linus Torvalds
I'll want to also add a way to override/set the cylinder type: both manually by just setting a size in liters, and by picking from some list of standard cylinder sizes. For example, it looks like most of my dives are marked as having 12-liter cylinders. That is probably some default from Suunto Dive Manager, or from whatever Dirk did. It's almost certainly not right for any of them: as far as I know, the standard cylinders for Lahaina Divers (which is likely most of the warm water dives) are AL72's for air, and AL80's for Nitrox. That would be a 10L and a 11.1L tank respectively, afaik. I don't know what a 12-liter tank would be or where that size comes from. Anyway, the LP85+ tank designation for some of the dives looks more likely: that's one of the common sizes I've used for local dives. So the size of that thing is much more probably correct. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Merge hbonse's UI tweaks, but fixing the compile warnings. Also bringing it ↵Gravatar Nathan Samson
up to date with the master (and my own UI improvements) Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-04Clean up 'fixup_dive()' a bitGravatar Linus Torvalds
We don't want to override potentially more exact values for water temperature etc either. The sample save interval may be longer than some internally kept state of key per-dive values like that. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Generate date string for the dive list dynamicallyGravatar Linus Torvalds
.. and sort based on the 'time_t' value itself. This allows us to use a more compact date format that doesn't need to sort alphabetically, because sorting by date is always based on the date value. So we can use just a two-digit year, and skip the seconds, to keep the column narrow, while still sorting correctly. Also, "Depth" is a nice header string, but it is wider than the column itself, which makes the whole column wider than necessary. So put the units in the header instead of in the string, keeping things narrow. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Merge branch 'ui-improvements' of https://github.com/nathansamson/diveclogGravatar Linus Torvalds
* 'ui-improvements' of https://github.com/nathansamson/diveclog: Split the dive list in columns. Columns are sortable now (name = date, depth, duration) Remove the redundant frames in the notebook. Closes #9 Use a pane so the dive list can be made wider or smaller to the users wishes
2011-09-04Merge branch 'compiler-warning' of https://github.com/nathansamson/diveclogGravatar Linus Torvalds
* 'compiler-warning' of https://github.com/nathansamson/diveclog: Removed the unused startemp and enttemp calculations. This fixes a compiler warning too. Fix up trivial conflict in dive.c due to the temperature simplification (commit 9961c7f89ce6: "Remove redundant temperature readings").
2011-09-04Add placeholder for cylinder type descriptionGravatar Linus Torvalds
So we don't want to save working pressure, but cylinder type knowledge would be lovely and useful. And we can probably make a good initial guess, or at least let people fill it in later. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Don't save cylinder working pressureGravatar Linus Torvalds
It was a mistake to save it - and I did it just because other dive managers did. It's a totally nonsensical measure, and nobody cares. The only thing that matters is the size of the cylinder, and the *actual* pressures. Those give actual air consumption numbers, and are meaningful and unambiguous. So the "working pressure" for a cylinder is pointless except for two things: - if you don't know the actual physical size, you need the "working pressure" along with the air size (eg "85 cuft") in order to compute the physical size. So we do use the working pressure on *input* from systems that report cylinder sizes that way. - People may well want to know what kind of cylinder they were diving, and again, you can make a good guess about this from the working pressure. So saving information like "HP100+" for the cylinder would be a good thing. But notice how in neither case do we actually want to save the working pressure itself. And in fact saving it actually makes the output format ambiguous: if we give both size and working pressure, what does 'size' mean? Is it physical size in liters, or air size in cu ft? So saving working pressure is just wrong. Get rid of it. I'm going to add some kind of "cylinder description" thing, which we can save instead (and perhaps guess standard cylinders from input like the working pressure from dive logs that don't do this sanely - which is all of them, as far as I can tell). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Remove redundant temperature readingsGravatar Linus Torvalds
I'm aiming to really differentiate in dive log software by making my XML export files be *clean*, dammit. That means that we don't have random names, we don't have crazy random units, and we don't have redundant information. So when the temperature doesn't change, just don't report it. That's already what "no sample" means, just clean things up. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Split the dive list in columns. Columns are sortable now (name = date, ↵Gravatar Nathan Samson
depth, duration) Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-04Some UI beauty patches:Gravatar Hylke Bons
Uppercase first letter for each label word Tweak the paddings for easier reading Rename File menu to Log menu Add a separator before Quit in the Log menu Remove frame in extended diving info and add 6px padding Signed-off-by: Hylke Bons <hylkebons@gmail.com>
2011-09-04Merge branch 'master' into ui-improvementsGravatar Nathan Samson
2011-09-04Fix typo in Makefile (LDLAGS -> LDFLAGS)Gravatar Linus Torvalds
Reported-by: Konrad Delong <https://github.com/konryd> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Remove the redundant frames in the notebook. Closes #9Gravatar Nathan Samson
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-04Merge branch 'fix-entries' of https://github.com/nathansamson/diveclogGravatar Linus Torvalds
* 'fix-entries' of https://github.com/nathansamson/diveclog: Word wrap the info textview. Also do not show the scrollbars if not necessary. Change location to a text entry instead of text view.
2011-09-04Use a pane so the dive list can be made wider or smaller to the users wishesGravatar Nathan Samson
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-04Update gitignore for the name-change of the executableGravatar Linus Torvalds
It's not called 'parse' any more. And I think I should rename 'divelog' too to something more unique. Right now the working name for the project is 'diveclog' (kind of like 'jdivelog') , but I'm not convinced that the "C implementation" part is really important enough to make a point of long-term. "subsurface"? I don't know. Maybe I should follow the "name all projects after myself" mantra. "divenut"? Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Oops. I forgot to 'fclose()' the file after saving the xmlGravatar Linus Torvalds
It never actually triggered anything for me, but any buffered data might be lost, especially if you force-exit the application after saving a dive log. This probably explains a corrupted (truncated) dive file report from Nathan Samson. Reported-by: Nathan Samson <https://github.com/nathansamson> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-04Removed the unused startemp and enttemp calculations. This fixes a compiler ↵Gravatar Nathan Samson
warning too. Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-04Word wrap the info textview. Also do not show the scrollbars if not necessary.Gravatar Nathan Samson
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-04Change location to a text entry instead of text view.Gravatar Nathan Samson
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-03Add 'Quit' menu item, and fix invisible "File" on gtk2Gravatar Linus Torvalds
I didn't even notice that the "File" part of the file menu no longer showed up, since the keyboard accelerator for ^S worked fine.. But apparently there's no default label associated with GTK_STOCK_FILE in gtk2, so the "File" text went away with the conversion to GtkUIManager in commit 4d62478e14fe ("Use the newer GtkUIManager for menu creation.") The addition of a Quit menu entry with the associated keyboard accelerator also makes ^Q "just work". Of course, if we actually tracked dirty state etc, we could perhaps ask the user whether they wanted to save or something. But I'm not exactly famous for my GUI chops, so .. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-03Merge https://github.com/mrjbq7/diveclogGravatar Linus Torvalds
* https://github.com/mrjbq7/diveclog: dive.c: Fix spelling.
2011-09-03Don't bother saving n2 percentageGravatar Linus Torvalds
It's all calculated anyway, and for the same reason we don't bother even parsing it at load time, we really shouldn't bother saving it either. The only thing you can do with that value is "check if the percentages add up to 100%", and so what? Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-03Improve the layout of the text entries in gtk3. For gtk2 this could also be ↵Gravatar Nathan Samson
useful Signed-off-by: Nathan Samson <nathansamson@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-03Use the newer GtkUIManager for menu creation.Gravatar Nathan Samson
Signed-off-by: Nathan Samson <nathansamson@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-03Do better cylinder information managementGravatar Linus Torvalds
Instead of just tracking gasmix, track the size and workng pressure of the cylinder too. And use "cylinder" instead of "tank" throughout. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-03dive.c: Fix spelling.Gravatar John Benediktsson
2011-09-03Add 'mean depth' marker on dive plotGravatar Linus Torvalds
Just because I can. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-03Only update mean/max depths with computed ones if they are way offGravatar Linus Torvalds
The computer may track "real" max depth more closely than it tracks samples. So we trust the non-computed mean/max depths more than the computed ones. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-03Add various dive fixups, and show pressure (if any) in the plotGravatar Linus Torvalds
Now the dive profile plot *really* needs some units. The pressure is just a random line otherwise. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-03Update README a bitGravatar Linus Torvalds
..since this is now on github, might as well tell people what they need to compile it, and warn them about the state of the project. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-02Add location note to the top bar too.Gravatar Linus Torvalds
I really don't understand the packing rules. This does not look like what I intended. Oh well. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-02Do a dive de-dup passGravatar Linus Torvalds
If given multiple dives at the same time, just de-dup the dives. This happens when you've dumped the whole dive-computer several times, and some dives show up in multiple dumps. When de-duping, try to avoid dropping data. So if one dive has notes attached to it, and the other one does not, pick the notes from the dive that does have them. Obvious stuff like that. The sample merge is also written so that it should be possible to merge two dives. Which we don't actually do yet. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-02Improve uemis xml parsing a bitGravatar Linus Torvalds
It looks like the "units.pressure" setting is only about the units that things are *shown* in on the wrist computer: the units in the file are always in bar (or rather, centi-bar). Which is definitely the right thing to do, and means that we shouldn't care about parsing the units setting. It's purely about how something is shown, not about parsing. That's probably true of the other units too, but let's see when I have more data to go on. Also, parse water temperatures and tank pressure. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-02Silently ignore zero pressureGravatar Linus Torvalds
Don't complain about them, they're just missing values Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-02Use 'units' value instead of guessing based on integer/FPGravatar Linus Torvalds
We still end up guessing based on magnitude of the value, though: it might be 'bar' or 'mbar', we end up picking one or the other based on just how big the value is. I should make it look at any possible explicit units too, since at least with good xml, they exist. Of course, the only good xml I've seen so far is the one we generate ourselves ;) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-02Hack up some very rudimentary support for the Uemis xml formatGravatar Linus Torvalds
I think I'll need to re-organize the handling of per-format code, but for now we just mix it all up. The uemis conversion is also questionable even for just the small parts I do. Does it really do "centiPSI"? That sounds crazy. I'm waiting for Dirk to send me some actual human-readable output from the dives, right now some of it is just rough guesses. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-01Show temperature in the info summaryGravatar Linus Torvalds
If it exists, it really does help identify the dive. At least it does for me: "local or Maui"? Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-01Generate 'watertemp' field from samples if requiredGravatar Linus Torvalds
Sure, it's redundant, but it's convenient for the general dive info. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-01Fix wrongly nested watertemp xml entryGravatar Linus Torvalds
Too much cut-and-paste: the ending tag said "airtemp". Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-01We can't save escape characters.Gravatar Linus Torvalds
I think it should be legal xml, but whatever. libxml2 is very unhappy, and complains when loading - even if I escape them. So let's just replace the low escape characters with '?'. The only thing to ever care was my test-case, I suspect. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>