diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-30 06:22:35 +1100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-30 06:22:35 +1100 |
commit | 3ab3e4e892d6a904639d9dc97264a52b0aa5ea8d (patch) | |
tree | 9e6447f4d9f09d1d89a4e7a1b71de6ea04faa679 /gtk-gui.c | |
parent | 3aa41635f0d1e17acc39d0356f7f1ff06d093251 (diff) | |
download | subsurface-3ab3e4e892d6a904639d9dc97264a52b0aa5ea8d.tar.gz |
Show Gradient Factors in plot when showing calculated ceilings
This adds the GFlow/high values used to calculate the ceiling (if any).
Right now it shows those numbers even if at no point of the dive there was
an actual ceiling (but only if showing the ceiling itself is enabled).
This should make it easier to for the user to make sense of the calculated
ceiling, especially if posting screen shots.
As an aside - for some dive computers like the OSTC and the Shearwaters we
should be able to also plot the GF used by its calculation which might be
interesting for comparison purposes, as both of them also give us the
ceiling (lowest deco stop) calculated during the dive..
See #13
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r-- | gtk-gui.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -526,7 +526,8 @@ static gboolean gflow_edit(GtkWidget *w, GdkEvent *event, gpointer _data) if (event->type == GDK_FOCUS_CHANGE) { buf = gtk_entry_get_text(GTK_ENTRY(w)); sscanf(buf, "%lf", &gflow); - set_gf(gflow / 100.0, -1.0); + prefs.gflow = gflow / 100.0; + set_gf(prefs.gflow, -1.0); update_screen(); } return FALSE; @@ -539,7 +540,8 @@ static gboolean gfhigh_edit(GtkWidget *w, GdkEvent *event, gpointer _data) if (event->type == GDK_FOCUS_CHANGE) { buf = gtk_entry_get_text(GTK_ENTRY(w)); sscanf(buf, "%lf", &gfhigh); - set_gf(-1.0, gfhigh / 100.0); + prefs.gfhigh = gfhigh / 100.0; + set_gf(-1.0, prefs.gfhigh); update_screen(); } return FALSE; |