From 2044dabc81062c22c7f95a2e0e57f931cee0205f Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 31 Aug 2011 11:07:31 -0700 Subject: 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 --- main.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index e567ee118..af1348986 100644 --- a/main.c +++ b/main.c @@ -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); -- cgit v1.2.3-70-g09d2