Commit graph

15 commits

Author SHA1 Message Date
Linus Torvalds
3d01a5f71a Boiler-plate code for opening/saving a file
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-31 18:04:25 -07:00
Linus Torvalds
1c010afc88 Add a top 'File' menu
It doesn't actually *do* anything, but what else is new?

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31 16:54:13 -07:00
Linus Torvalds
c17300cfaa Use a 'notebook' for Info vs Profile
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-31 16:10:11 -07:00
Linus Torvalds
a39b2ee220 Add some more dive info - and actually update it
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-31 15:35:28 -07:00
Linus Torvalds
a11dbbdb18 Add fake 'info' frame contents
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-31 12:09:19 -07:00
Linus Torvalds
7017d17562 Use a gtk table instead of hbox
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-31 11:52:16 -07:00
Linus Torvalds
2044dabc81 Teach the thing to actually track the currently selected dive
.. 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-31 11:07:31 -07:00
Linus Torvalds
77cfe07c52 Split up divelist scroll window generation into its own file
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31 10:27:58 -07:00
Linus Torvalds
1d69524a78 Get rid of now unused 'show_dive()' function
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31 10:22:08 -07:00
Linus Torvalds
8e95ded57b Split up profile frame generation into its own file.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31 10:20:46 -07:00
Linus Torvalds
3aa54e206a Draw some kind of profile for the (first) dive
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-31 08:47:13 -07:00
Linus Torvalds
5625b31873 Make the dive list scrollable (and put it in a vbox)
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-30 21:18:47 -07:00
Linus Torvalds
d1ae1c4830 Show the dives as a gtk list/tree widget
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-30 20:56:01 -07:00
Linus Torvalds
0ca546b31e Create a gtk window
It doesn't *do* anything, but some day it will.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30 19:48:00 -07:00
Linus Torvalds
5c4cc39c56 Start moving some of the non-parsing stuff out of 'parse.c'
Create a 'main.c' with the main routine and argument "parsing" etc.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-30 18:40:25 -07:00