diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-12-10 21:18:48 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-12-10 21:18:48 -0800 |
commit | 39f80a1e0f38720addc66315aa1235731ba03418 (patch) | |
tree | 7bd4dd93eb49b3f16e2d9c4b1d14c5c5cd2ce0b5 /gtk-gui.c | |
parent | 9463e7895be21befc6fbcdb02572d73ed2c188b2 (diff) | |
download | subsurface-39f80a1e0f38720addc66315aa1235731ba03418.tar.gz |
Display maximum CNS in the divelist
We either pick the CNS reported by the dive computer at the end of the
dive, or the maximum of that and the CNS values in the samples, if any.
As usual, this column in the dive list defaults to off and it is
controlled by a setting in the tec page of the preferences.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r-- | gtk-gui.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -477,6 +477,7 @@ static void name(GtkWidget *w, gpointer data) \ } OPTIONCALLBACK(otu_toggle, visible_cols.otu) +OPTIONCALLBACK(maxcns_toggle, visible_cols.maxcns) OPTIONCALLBACK(sac_toggle, visible_cols.sac) OPTIONCALLBACK(nitrox_toggle, visible_cols.nitrox) OPTIONCALLBACK(temperature_toggle, visible_cols.temperature) @@ -683,6 +684,11 @@ static void preferences_dialog(GtkWidget *w, gpointer data) gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 6); g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(otu_toggle), NULL); + button = gtk_check_button_new_with_label(_("maxCNS")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), visible_cols.maxcns); + gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 6); + g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(maxcns_toggle), NULL); + frame = gtk_frame_new(_("Profile Settings")); gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 5); @@ -782,6 +788,7 @@ static void preferences_dialog(GtkWidget *w, gpointer data) subsurface_set_conf("NITROX", PREF_BOOL, BOOL_TO_PTR(visible_cols.nitrox)); subsurface_set_conf("SAC", PREF_BOOL, BOOL_TO_PTR(visible_cols.sac)); subsurface_set_conf("OTU", PREF_BOOL, BOOL_TO_PTR(visible_cols.otu)); + subsurface_set_conf("MAXCNS", PREF_BOOL, BOOL_TO_PTR(visible_cols.maxcns)); subsurface_set_conf("divelist_font", PREF_STRING, divelist_font); subsurface_set_conf("autogroup", PREF_BOOL, BOOL_TO_PTR(autogroup)); @@ -1139,6 +1146,7 @@ void init_ui(int *argcp, char ***argvp) visible_cols.suit = PTR_TO_BOOL(subsurface_get_conf("SUIT", PREF_BOOL)); visible_cols.nitrox = PTR_TO_BOOL(subsurface_get_conf("NITROX", PREF_BOOL)); visible_cols.otu = PTR_TO_BOOL(subsurface_get_conf("OTU", PREF_BOOL)); + visible_cols.maxcns = PTR_TO_BOOL(subsurface_get_conf("MAXCNS", PREF_BOOL)); visible_cols.sac = PTR_TO_BOOL(subsurface_get_conf("SAC", PREF_BOOL)); partial_pressure_graphs.po2 = PTR_TO_BOOL(subsurface_get_conf("po2graph", PREF_BOOL)); |