summaryrefslogtreecommitdiffstats
path: root/info.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-11-19 11:47:04 -0800
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-11-19 11:47:04 -0800
commit9f500ec8dc29187a95dd6e363bae160ed68a8f40 (patch)
treeaaf49a74f10b7be79b1b0558a218e7fd84017397 /info.c
parent6f81b3636b57bac8c7c08b6ca28b794b14f5d11f (diff)
downloadsubsurface-9f500ec8dc29187a95dd6e363bae160ed68a8f40.tar.gz
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>
Diffstat (limited to 'info.c')
-rw-r--r--info.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/info.c b/info.c
index 890061b12..7e94a2204 100644
--- a/info.c
+++ b/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)