diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-09-10 14:32:55 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-09-10 14:32:55 -0700 |
commit | a8fd77865c3e3e0a547b8e06a047c44732fe92f2 (patch) | |
tree | ed7c615537b766a7c3376937df3fe9060b9a5454 /info.c | |
parent | 78c5aa9f071ab56e56bf760e3e7fc7f0f0d1b1ff (diff) | |
download | subsurface-a8fd77865c3e3e0a547b8e06a047c44732fe92f2.tar.gz |
Implement Close menu option that allows closing the data file
This requires some helper routines that allow us to clear out all the
widgets.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'info.c')
-rw-r--r-- | info.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -113,6 +113,17 @@ void show_dive_info(struct dive *dive) const char *text; char buffer[80]; + if (!dive) { + gtk_window_set_title(GTK_WINDOW(main_window), "Subsurface"); + SET_TEXT_VALUE(divemaster); + SET_TEXT_VALUE(buddy); + SET_TEXT_VALUE(location); + SET_TEXT_VALUE(suit); + gtk_entry_set_text(rating, star_strings[0]); + gtk_text_buffer_set_text(gtk_text_view_get_buffer(notes), "", -1); + return; + } + /* dive number and location (or lacking that, the date) go in the window title */ text = dive->location; if (!text) |