summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-08-31 11:07:31 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-08-31 11:07:31 -0700
commit2044dabc81062c22c7f95a2e0e57f931cee0205f (patch)
tree0897e4c399904053da87fa0eb4113b5ee88bf4a6 /main.c
parent23e831a6ed61878240897cd6a7b276526a3f4ba4 (diff)
downloadsubsurface-2044dabc81062c22c7f95a2e0e57f931cee0205f.tar.gz
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>
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 8 insertions, 0 deletions
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);