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:
Linus Torvalds 2011-11-19 11:47:04 -08:00
parent 6f81b3636b
commit 9f500ec8dc
3 changed files with 50 additions and 38 deletions

7
info.c
View file

@ -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)