aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
AgeCommit message (Collapse)Author
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-04Remove the redundant frames in the notebook. Closes #9Gravatar Nathan Samson
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
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-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-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-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-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-01Add ability to 'save' divesGravatar Linus Torvalds
This just generates another xml file. Don't get me wrong: I still don't like xml, but this way we can save in the same format we load things from. Except the save-format is a *lot* cleaner than the abortion that is Suunto or libdivecomputer xml. Don't bother with some crazy xml library crap for saving. Just do it! Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Add some extended dive info fieldsGravatar Linus Torvalds
.. and tweak the basic info layout a bit. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Make the main display sanerGravatar Linus Torvalds
This tweaks: - packing to be what you'd kind of expect - makes the "summary info" always visible - the "extended info" is now on a notebook page of its own - dive profile the first notebook page, since the summary information is visible regardless. which all just seems a lot more logical. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Boiler-plate code for opening/saving a fileGravatar Linus Torvalds
All just copied from the gtk docs. No actual loading or saving is taking place, though. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Add a top 'File' menuGravatar Linus Torvalds
It doesn't actually *do* anything, but what else is new? Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Use a 'notebook' for Info vs ProfileGravatar Linus Torvalds
I dunno. This seems a better interface at least if we get more info for the dive, but I suspect I'll want to the add basic info to the profile page too. This makes the 'table' approach to layout be kind of pointless again, and the table has become a fancy vbox. Maybe I'll put the core info back, and use the notebook 'Info' page for extended information. I should just bite the bullet and start saving the dive data, and adding editing functions for adding information. But instead I'm playing around with random gtk widgets. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Add some more dive info - and actually update itGravatar Linus Torvalds
It's still the ugliest application ever, but now it at least gives you some basic dive info. I'd love to add a way to edit the dives to add new data (name, buddies, location etc), but that would also require the ability to save the end result. Maybe some day. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Add fake 'info' frame contentsGravatar Linus Torvalds
It should have depth, time, place etc information, but right now it only has a fake depth that doesn't even get updated. Just to show the idea of the table usage. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Use a gtk table instead of hboxGravatar Linus Torvalds
We'll want to add various dive statistics, so... Without them, it all looks pretty much the same, though. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Teach the thing to actually track the currently selected diveGravatar Linus Torvalds
.. and repaint the profile when the selection changes. Now, if it just wasn't so ugly, it might even be useful. Except it obviously needs to also show all the other dive information. And allow the user to fill in details. And save the end results. So no, it's not useful. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Split up divelist scroll window generation into its own fileGravatar Linus Torvalds
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Get rid of now unused 'show_dive()' functionGravatar Linus Torvalds
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Split up profile frame generation into its own file.Gravatar Linus Torvalds
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Draw some kind of profile for the (first) diveGravatar Linus Torvalds
This is all kinds of broken: it doesn't actually follow the selected dive, and the profile isn't scaled properly etc. But it shows something new, and not just text. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30Make the dive list scrollable (and put it in a vbox)Gravatar Linus Torvalds
This means you can actually see them all, and walk through them. It doesn't make any of this *useful*, but whatever. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30Show the dives as a gtk list/tree widgetGravatar Linus Torvalds
Ok, so I'm not very good at this. I'll need to enclose the dang thing in a scrollable window, and then make that scrollable thing just part of the whole window. But hey, it's pixels on the screen. Pixels that show the names of the dives we've parsed. At least as many as will fit on screen at one time ;) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30Create a gtk windowGravatar Linus Torvalds
It doesn't *do* anything, but some day it will. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30Start moving some of the non-parsing stuff out of 'parse.c'Gravatar Linus Torvalds
Create a 'main.c' with the main routine and argument "parsing" etc. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>