CC=gcc
CFLAGS=-Wall -Wno-pointer-sign -g
-OBJS=main.o profile.o divelist.o parse.o
+OBJS=main.o profile.o info.o divelist.o parse.o
parse: $(OBJS)
$(CC) $(LDLAGS) -o parse $(OBJS) `xml2-config --libs` \
profile.o: profile.c dive.h display.h
$(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0` -c profile.c
+info.o: info.c dive.h display.h
+ $(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0` -c info.c
+
divelist.o: divelist.c dive.h display.h
$(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0` -c divelist.c
extern int selected_dive;
extern GtkWidget *dive_profile_frame(void);
+extern GtkWidget *dive_info_frame(void);
extern GtkWidget *create_dive_list(void);
extern void repaint_dive(void);
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+
+#include "dive.h"
+#include "display.h"
+
+GtkWidget *dive_info_frame(void)
+{
+ GtkWidget *frame;
+ GtkWidget *hbox;
+ GtkWidget *depth;
+
+ frame = gtk_frame_new("Dive info");
+ gtk_widget_show(frame);
+
+ hbox = gtk_hbox_new(FALSE, 5);
+ gtk_container_add(GTK_CONTAINER(frame), hbox);
+
+ depth = gtk_entry_new();
+ gtk_entry_set_text(GTK_ENTRY(depth), "54 ft");
+ gtk_editable_set_editable(GTK_EDITABLE(depth), FALSE);
+
+ gtk_box_pack_start(GTK_BOX(hbox), depth, FALSE, FALSE, 0);
+
+ return frame;
+}
/* Frame for dive profile */
frame = dive_profile_frame();
gtk_table_attach_defaults(GTK_TABLE(table), frame, 1, 2, 1, 2);
-
dive_profile = frame;
+ /* Frame for dive info */
+ frame = dive_info_frame();
+ gtk_table_attach_defaults(GTK_TABLE(table), frame, 1, 2, 0, 1);
+
gtk_widget_set_app_paintable(win, TRUE);
gtk_widget_show_all(win);