summaryrefslogtreecommitdiffstats
path: root/divelist-gtk.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-09 13:06:30 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-09 13:06:30 -0700
commit9e4f9fad19bd4696bf08da67b60ed9d2eb29b446 (patch)
tree762d87bb965705c6d51b89c6abf594e6c5b6bba5 /divelist-gtk.c
parented3f67bc33fbd9aac819687317d3066c22799f83 (diff)
downloadsubsurface-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 'divelist-gtk.c')
-rw-r--r--divelist-gtk.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/divelist-gtk.c b/divelist-gtk.c
index c8ad1a6ca..e5702db97 100644
--- a/divelist-gtk.c
+++ b/divelist-gtk.c
@@ -716,7 +716,7 @@ static void fill_dive_list(void)
while (--i >= 0) {
struct dive *dive = get_dive(i);
dive_trip_t *trip;
- if ((dive->dive_tags & DTYPE_INVALID) && !prefs.display_invalid_dives)
+ if ((dive->dive_tags & DTAG_INVALID) && !prefs.display_invalid_dives)
continue;
trip = dive->divetrip;
@@ -1082,14 +1082,14 @@ static void invalid_dives_cb(GtkWidget *menuitem, GtkTreePath *path)
/* now swap the invalid tag if just 1 dive was selected
* otherwise set all to invalid */
if(amount_selected == 1) {
- if (dive->dive_tags & DTYPE_INVALID)
- dive->dive_tags &= ~DTYPE_INVALID;
+ if (dive->dive_tags & DTAG_INVALID)
+ dive->dive_tags &= ~DTAG_INVALID;
else
- dive->dive_tags |= DTYPE_INVALID;
+ dive->dive_tags |= DTAG_INVALID;
changed = 1;
} else {
- if (! dive->dive_tags & DTYPE_INVALID) {
- dive->dive_tags |= DTYPE_INVALID;
+ if (! dive->dive_tags & DTAG_INVALID) {
+ dive->dive_tags |= DTAG_INVALID;
changed = 1;
}
}
@@ -1682,7 +1682,7 @@ static void popup_divelist_menu(GtkTreeView *tree_view, GtkTreeModel *model, int
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
if (amount_selected == 1) {
- if (dive->dive_tags & DTYPE_INVALID)
+ if (dive->dive_tags & DTAG_INVALID)
menuitem = gtk_menu_item_new_with_label(_("Mark valid"));
else
menuitem = gtk_menu_item_new_with_label(_("Mark invalid"));