diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-09 08:33:13 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-09 08:33:13 -0800 |
commit | 04b076cf40e0a4643493ee4671157ef4055f7fed (patch) | |
tree | 62680f0c6f14ab72a7736e3302978fdf27ec80f9 /equipment.c | |
parent | 049b895d9beb33cba7d53985c4c382ab66d41cc3 (diff) | |
download | subsurface-04b076cf40e0a4643493ee4671157ef4055f7fed.tar.gz |
equipment: clean up cylinder pressure spinbutton setup
This is just in case I end up doing the graying out of implicit pressure
information: I wanted to clean things up a bit first.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'equipment.c')
-rw-r--r-- | equipment.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/equipment.c b/equipment.c index be544ab08..c2d05d2ba 100644 --- a/equipment.c +++ b/equipment.c @@ -98,13 +98,13 @@ static void set_cylinder_type_spinbuttons(struct cylinder_widget *cylinder, int gtk_spin_button_set_value(cylinder->pressure, pressure); } -static void set_cylinder_pressure_spinbuttons(struct cylinder_widget *cylinder, int start, int end) +static void set_cylinder_pressure_spinbuttons(struct cylinder_widget *cylinder, cylinder_t *cyl) { double pressure; - convert_pressure(start, &pressure); + convert_pressure(cyl->start.mbar, &pressure); gtk_spin_button_set_value(cylinder->start, pressure); - convert_pressure(end, &pressure); + convert_pressure(cyl->end.mbar, &pressure); gtk_spin_button_set_value(cylinder->end, pressure); } @@ -266,8 +266,7 @@ static void show_cylinder(cylinder_t *cyl, struct cylinder_widget *cylinder) set_cylinder_type_spinbuttons(cylinder, cyl->type.size.mliter, cyl->type.workingpressure.mbar); - set_cylinder_pressure_spinbuttons(cylinder, - cyl->start.mbar, cyl->end.mbar); + set_cylinder_pressure_spinbuttons(cylinder, cyl); o2 = cyl->gasmix.o2.permille / 10.0; gtk_widget_set_sensitive(cylinder->o2, !!o2); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cylinder->gasmix_button), !!o2); |