diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-14 16:05:37 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-14 16:05:37 -0700 |
commit | 5f13a87cbd0494cd8edc94f4af9281ce9de89d6e (patch) | |
tree | c71d96106ca8b7b84dbe87a4ad880bfac7ab2d5a /main.c | |
parent | b35e1bad8e19b52f4a1da66118bea4e998fb84f6 (diff) | |
download | subsurface-5f13a87cbd0494cd8edc94f4af9281ce9de89d6e.tar.gz |
Flush any pending changes at notebook 'switch-page' time
Dirk points out that equipment changes (cylinder size etc) do not cause
a proper repaint of the dive profile with new SAC information. The
reason? We haven't flushed the changes when the notebook changes from
the equipment page to the dive profile page.
Reported-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -410,6 +410,11 @@ static GtkWidget *get_menubar_menu(GtkWidget *window) return menu; } +static void switch_page(GtkNotebook *notebook, gint arg1, gpointer user_data) +{ + repaint_dive(); +} + int main(int argc, char **argv) { int i; @@ -470,6 +475,7 @@ int main(int argc, char **argv) /* Notebook for dive info vs profile vs .. */ notebook = gtk_notebook_new(); + g_signal_connect(notebook, "switch-page", G_CALLBACK(switch_page), NULL); gtk_box_pack_start(GTK_BOX(info_box), notebook, TRUE, TRUE, 6); /* Frame for dive profile */ |