diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-04-09 13:06:30 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-09 13:06:30 -0700 |
commit | 9e4f9fad19bd4696bf08da67b60ed9d2eb29b446 (patch) | |
tree | 762d87bb965705c6d51b89c6abf594e6c5b6bba5 /info.c | |
parent | ed3f67bc33fbd9aac819687317d3066c22799f83 (diff) | |
download | subsurface-9e4f9fad19bd4696bf08da67b60ed9d2eb29b446.tar.gz |
Store the tag names instead of an opaque number
And as we need the names for that, simplify the way we show the tags in the
Dive Info tab (and mark them for translation while we are at it).
In the process I renamed the constants to DTAG_ from DTYPE_ (and made
their nature as being just bits more obvious).
Also mark the box on the Info tab "Dive Tags", not "Dive Type".
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'info.c')
-rw-r--r-- | info.c | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -893,55 +893,55 @@ static void dive_info_widget(GtkWidget *obox, struct dive *dive, struct dive_inf gtk_box_pack_start(GTK_BOX(framebox), sbox, TRUE, FALSE, 3); /* 1st line */ button = gtk_check_button_new_with_label(_("Boat Dive")); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTYPE_BOAT); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTAG_BOAT); 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 (DTYPE_BOAT)); + g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTAG_BOAT)); button = gtk_check_button_new_with_label(_("Shore Dive")); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTYPE_SHORE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTAG_SHORE); 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 (DTYPE_SHORE)); + g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTAG_SHORE)); button = gtk_check_button_new_with_label(_("Pool Dive")); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTYPE_POOL); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTAG_POOL); 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 (DTYPE_POOL)); + g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTAG_POOL)); 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(_("Drift Dive")); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTYPE_DRIFT); + 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); - g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTYPE_DRIFT)); + g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTAG_DRIFT)); button = gtk_check_button_new_with_label(_("Deep Dive")); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTYPE_DEEP); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTAG_DEEP); 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 (DTYPE_DEEP)); + g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTAG_DEEP)); button = gtk_check_button_new_with_label(_("Cavern Dive")); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTYPE_CAVERN); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTAG_CAVERN); 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 (DTYPE_CAVERN)); + g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTAG_CAVERN)); sbox = gtk_hbox_new(FALSE, 6); gtk_box_pack_start(GTK_BOX(framebox), sbox, TRUE, FALSE, 3); /* 3rd line */ button = gtk_check_button_new_with_label(_("Ice Dive")); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTYPE_ICE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTAG_ICE); 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 (DTYPE_ICE)); + g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTAG_ICE)); button = gtk_check_button_new_with_label(_("Wreck Dive")); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTYPE_WRECK); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTAG_WRECK); 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 (DTYPE_WRECK)); + g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTAG_WRECK)); button = gtk_check_button_new_with_label(_("Cave Dive")); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTYPE_CAVE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), dive->dive_tags & DTAG_CAVE); 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 (DTYPE_CAVE)); + g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(divetag_toggle_cb), GINT_TO_POINTER (DTAG_CAVE)); /* only show notes if editing a single dive */ if (multi) { |