diff options
author | Pierre-Yves Chibon <pingou@pingoured.fr> | 2013-04-09 22:40:16 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-09 13:56:33 -0700 |
commit | 7cacbdf76222018c7287efd401b4e37a20af3ce4 (patch) | |
tree | 222157c38a6f0eb2320b6f77c9cade4b54435c1f | |
parent | 5f03a6f63134ea82ea2713563868d3b6b0d0db23 (diff) | |
download | subsurface-7cacbdf76222018c7287efd401b4e37a20af3ce4.tar.gz |
Add lake and river to the list of supported tags
[Dirk Hohndel: minor cleanups]
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | dive.h | 4 | ||||
-rw-r--r-- | info.c | 10 | ||||
-rw-r--r-- | statistics.c | 3 |
3 files changed, 15 insertions, 2 deletions
@@ -40,7 +40,9 @@ #define DTAG_CAVE (1 << 8) #define DTAG_ALTITUDE (1 << 9) #define DTAG_POOL (1 << 10) -#define DTAG_NR 11 +#define DTAG_LAKE (1 << 11) +#define DTAG_RIVER (1 << 12) +#define DTAG_NR 13 /* defined in statistics.c */ extern char *dtag_names[DTAG_NR]; @@ -907,9 +907,19 @@ static void dive_info_widget(GtkWidget *obox, struct dive *dive, struct dive_inf gtk_box_pack_start(GTK_BOX(sbox), button, FALSE, FALSE, 6); g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTAG_POOL)); + button = gtk_check_button_new_with_label(_("Lake Dive")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTAG_LAKE); + gtk_box_pack_start(GTK_BOX(sbox), button, FALSE, FALSE, 6); + g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTAG_LAKE)); + sbox = gtk_hbox_new(FALSE, 6); gtk_box_pack_start(GTK_BOX(framebox), sbox, TRUE, FALSE, 3); /* 2nd line */ + button = gtk_check_button_new_with_label(_("River Dive")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTAG_RIVER); + gtk_box_pack_start(GTK_BOX(sbox), button, FALSE, FALSE, 6); + g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTAG_RIVER)); + button = gtk_check_button_new_with_label(_("Drift Dive")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTAG_DRIFT); gtk_box_pack_start(GTK_BOX(sbox), button, FALSE, FALSE, 6); diff --git a/statistics.c b/statistics.c index acb9ee3d8..0413941cd 100644 --- a/statistics.c +++ b/statistics.c @@ -19,7 +19,8 @@ * in save-xml.c */ char *dtag_names[DTAG_NR] = { N_("invalid"), N_("boat"), N_("shore"), N_("drift"), N_("deep"), N_("cavern"), - N_("ice"), N_("wreck"), N_("cave"), N_("altitude"), N_("pool") + N_("ice"), N_("wreck"), N_("cave"), N_("altitude"), N_("pool"), N_("lake"), + N_("river") }; typedef struct { |