mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
78c5aa9f07
commit
a8fd77865c
5 changed files with 83 additions and 2 deletions
11
info.c
11
info.c
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue