X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=divelist.c;h=b43adfd0cd4728e6b50fefdcf6e46611ae10b015;hb=912ce7941fcc522d208b92fafd51b64816151bdc;hp=bb2a3e3a101a44017b28a7a6640a7d350e74218e;hpb=2a8f7ab78f8d00b699b683b122ad2cf0ddc094b6;p=ext%2Fsubsurface.git diff --git a/divelist.c b/divelist.c index bb2a3e3..b43adfd 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();