diff --git a/dive.h b/dive.h
index 42b5f771d..e45d962ff 100644
--- a/dive.h
+++ b/dive.h
@@ -394,6 +394,8 @@ extern void show_dive_equipment(struct dive *, int w_idx);
extern void show_dive_stats(struct dive *);
+extern void show_yearly_stats(void);
+
extern void update_dive(struct dive *new_dive);
extern void save_dives(const char *filename);
@@ -462,4 +464,6 @@ extern const char *star_strings[];
#define AIR_PERMILLE 209
+#define FRACTION(n,x) ((unsigned)(n)/(x)),((unsigned)(n)%(x))
+
#endif /* DIVE_H */
diff --git a/gtk-gui.c b/gtk-gui.c
index 843f63e0c..7290e7857 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -758,6 +758,7 @@ static GtkActionEntry menu_items[] = {
{ "AddDive", GTK_STOCK_ADD, "Add Dive", NULL, NULL, G_CALLBACK(add_dive_cb) },
{ "Preferences", GTK_STOCK_PREFERENCES, "Preferences", PREFERENCE_ACCEL, NULL, G_CALLBACK(preferences_dialog) },
{ "Renumber", NULL, "Renumber", NULL, NULL, G_CALLBACK(renumber_dialog) },
+ { "YearlyStats", NULL, "Yearly Statistics", NULL, NULL, G_CALLBACK(show_yearly_stats) },
{ "SelectEvents", NULL, "SelectEvents", NULL, NULL, G_CALLBACK(selectevents_dialog) },
{ "Quit", GTK_STOCK_QUIT, NULL, CTRLCHAR "Q", NULL, G_CALLBACK(quit) },
{ "About", GTK_STOCK_ABOUT, NULL, NULL, NULL, G_CALLBACK(about_dialog) },
@@ -794,6 +795,7 @@ static const gchar* ui_string = " \
\
\
\
+ \