mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add the cylinder list to the dive info edit dialog
This way, when you have a new dive that you just imported from your dive computer, you can just double-click on the dive and fill out all the relevant information: location, notes, buddies and cylinder info. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
6f81b3636b
commit
9f500ec8dc
3 changed files with 50 additions and 38 deletions
7
info.c
7
info.c
|
@ -298,7 +298,7 @@ static void save_dive_info_changes(struct dive *dive, struct dive_info *info)
|
|||
|
||||
static void dive_info_widget(GtkWidget *box, struct dive *dive, struct dive_info *info)
|
||||
{
|
||||
GtkWidget *hbox, *label;
|
||||
GtkWidget *hbox, *label, *cylinder, *frame;
|
||||
char buffer[80];
|
||||
|
||||
divename(buffer, sizeof(buffer), dive);
|
||||
|
@ -316,6 +316,11 @@ static void dive_info_widget(GtkWidget *box, struct dive *dive, struct dive_info
|
|||
info->notes = text_view(box, "Notes", READ_WRITE);
|
||||
if (dive->notes && *dive->notes)
|
||||
gtk_text_buffer_set_text(gtk_text_view_get_buffer(info->notes), dive->notes, -1);
|
||||
|
||||
frame = gtk_frame_new("Cylinder");
|
||||
cylinder = cylinder_list_widget();
|
||||
gtk_container_add(GTK_CONTAINER(frame), cylinder);
|
||||
gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0);
|
||||
}
|
||||
|
||||
int edit_dive_info(struct dive *dive)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue