summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-21 17:53:24 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-21 17:53:24 -0700
commitd5af4e2ff918d18e329b4753435728feae98b226 (patch)
treef35032d8ef9227a12d0396a85a35ae6338fe426c /gtk-gui.c
parent2aabcf398a5624c3ff75f7090b70e7038bbeb017 (diff)
downloadsubsurface-d5af4e2ff918d18e329b4753435728feae98b226.tar.gz
Simplistic filtering by tags
This only allows for a logical "AND" - so only dives that all of the selected tags are displayed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 89f1eca1f..d9ac9530b 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -46,7 +46,7 @@ const char *existing_filename;
typedef enum { PANE_INFO, PANE_PROFILE, PANE_LIST, PANE_THREE } pane_conf_t;
static pane_conf_t pane_conf;
-int dtag_shown[DTAG_NR];
+int dive_mask, dtag_shown[DTAG_NR];
static struct device_info *holdnicknames = NULL;
static GtkWidget *dive_profile_widget(void);
static void import_files(GtkWidget *, gpointer);
@@ -1159,6 +1159,11 @@ static void selecttags_dialog(GtkWidget *w, gpointer data)
repaint_dive();
}
gtk_widget_destroy(dialog);
+ dive_mask = 0;
+ for (i = 0; i < DTAG_NR; i++)
+ if (dtag_shown[i])
+ dive_mask |= (1 << i);
+ dive_list_update_dives();
}
static void selectevents_dialog(GtkWidget *w, gpointer data)