diff options
Diffstat (limited to 'gtk-gui.c')
-rw-r--r-- | gtk-gui.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -816,10 +816,10 @@ static void about_dialog(GtkWidget *w, gpointer data) gtk_show_about_dialog(NULL, "program-name", "SubSurface", - "comments", "Half-arsed divelog software in C", + "comments", "Multi-platform divelog software in C", "license", "GPLv2", "version", VERSION_STRING, - "copyright", "Linus Torvalds 2011", + "copyright", "Linus Torvalds, Dirk Hohndel, and others, 2011, 2012", "logo-icon-name", "subsurface", /* Must be last: */ logo_property, logo, @@ -878,6 +878,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) }, @@ -915,6 +916,7 @@ static const gchar* ui_string = " \ <menuitem name=\"Renumber\" action=\"Renumber\" /> \ <menuitem name=\"Autogroup\" action=\"Autogroup\" /> \ <menuitem name=\"Toggle Zoom\" action=\"ToggleZoom\" /> \ + <menuitem name=\"YearlyStats\" action=\"YearlyStats\" /> \ <menu name=\"View\" action=\"ViewMenuAction\"> \ <menuitem name=\"List\" action=\"ViewList\" /> \ <menuitem name=\"Profile\" action=\"ViewProfile\" /> \ @@ -1094,7 +1096,7 @@ void exit_ui(void) } typedef struct { - cairo_rectangle_int_t rect; + cairo_rectangle_t rect; const char *text; } tooltip_record_t; @@ -1103,7 +1105,7 @@ static int tooltips; void attach_tooltip(int x, int y, int w, int h, const char *text) { - cairo_rectangle_int_t *rect; + cairo_rectangle_t *rect; tooltip_rects = realloc(tooltip_rects, (tooltips + 1) * sizeof(tooltip_record_t)); rect = &tooltip_rects[tooltips].rect; rect->x = x; @@ -1121,7 +1123,7 @@ static gboolean profile_tooltip (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer user_data) { int i; - cairo_rectangle_int_t *drawing_area = user_data; + cairo_rectangle_t *drawing_area = user_data; gint tx = x - drawing_area->x; /* get transformed coordinates */ gint ty = y - drawing_area->y; @@ -1139,7 +1141,7 @@ static gboolean expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer { struct dive *dive = current_dive; struct graphics_context gc = { .printer = 0 }; - static cairo_rectangle_int_t drawing_area; + static cairo_rectangle_t drawing_area; /* the drawing area gives TOTAL width * height - x,y is used as the topx/topy offset * so effective drawing area is width-2x * height-2y */ @@ -1160,7 +1162,7 @@ static gboolean expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer tooltip_rects = NULL; } tooltips = 0; - plot(&gc, &drawing_area, dive); + plot(&gc, &drawing_area, dive, SC_SCREEN); } cairo_destroy(gc.cr); |