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>
This commit is contained in:
Linus Torvalds 2011-08-31 11:07:31 -07:00
parent 23e831a6ed
commit 2044dabc81
4 changed files with 17 additions and 4 deletions

8
main.c
View file

@ -47,6 +47,13 @@ static void on_destroy(GtkWidget* w, gpointer data)
gtk_main_quit();
}
static GtkWidget *dive_profile;
void repaint_dive(void)
{
gtk_widget_queue_draw(dive_profile);
}
int main(int argc, char **argv)
{
int i;
@ -87,6 +94,7 @@ int main(int argc, char **argv)
/* Frame for dive profile */
frame = dive_profile_frame();
gtk_container_add(GTK_CONTAINER(vbox), frame);
dive_profile = frame;
gtk_widget_set_app_paintable(win, TRUE);
gtk_widget_show_all(win);