diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2011-09-27 10:16:40 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2011-09-27 10:16:40 -0700 |
commit | 0aad4d6094173fd3c10e435be05bde541062232d (patch) | |
tree | eecc5b550701ffc7b056220a5717409439fcfabe /divelist.c | |
parent | dc2a0c1909727a1557b8f03e6b6ac3e427ebe4b7 (diff) | |
download | subsurface-0aad4d6094173fd3c10e435be05bde541062232d.tar.gz |
Add preference option to chose if SAC and/or OTU should be in divelist
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r-- | divelist.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/divelist.c b/divelist.c index bb2a3e3a1..b43adfd0c 100644 --- a/divelist.c +++ b/divelist.c @@ -26,7 +26,7 @@ struct DiveList { GtkWidget *container_widget; GtkListStore *model; GtkTreeViewColumn *date, *depth, *duration, *location; - GtkTreeViewColumn *temperature, *cylinder, *nitrox, *sac; + GtkTreeViewColumn *temperature, *cylinder, *nitrox, *sac, *otu; int changed; }; @@ -422,6 +422,13 @@ void update_dive_list_units(void) gtk_tree_model_foreach(model, set_one_dive, NULL); } +void update_dive_list_col_visibility(void) +{ + gtk_tree_view_column_set_visible(dive_list.sac, visible_cols.sac); + gtk_tree_view_column_set_visible(dive_list.otu, visible_cols.otu); + return; +} + static void fill_dive_list(void) { int i; @@ -543,8 +550,8 @@ GtkWidget *dive_list_create(void) dive_list.temperature = divelist_column(&dive_list, DIVE_TEMPERATURE, UTF8_DEGREE "F", temperature_data_func, PANGO_ALIGN_RIGHT, TRUE); dive_list.cylinder = divelist_column(&dive_list, DIVE_CYLINDER, "Cyl", NULL, PANGO_ALIGN_CENTER, TRUE); dive_list.nitrox = divelist_column(&dive_list, DIVE_NITROX, "O" UTF8_SUBSCRIPT_2 "%", nitrox_data_func, PANGO_ALIGN_CENTER, TRUE); - dive_list.sac = divelist_column(&dive_list, DIVE_SAC, "SAC", sac_data_func, PANGO_ALIGN_CENTER, TRUE); - dive_list.sac = divelist_column(&dive_list, DIVE_OTU, "OTU", otu_data_func, PANGO_ALIGN_CENTER, FALSE); + dive_list.sac = divelist_column(&dive_list, DIVE_SAC, "SAC", sac_data_func, PANGO_ALIGN_CENTER, visible_cols.sac); + dive_list.otu = divelist_column(&dive_list, DIVE_OTU, "OTU", otu_data_func, PANGO_ALIGN_CENTER, visible_cols.otu); dive_list.location = divelist_column(&dive_list, DIVE_LOCATION, "Location", NULL, PANGO_ALIGN_LEFT, TRUE); fill_dive_list(); |