From 92c0d8c5160232642571b52b66176594c796f21d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 10 Dec 2012 09:20:57 -0800 Subject: Move global variables covered by Preferences into one structure Now we can simply remember the state of all the preferences at the beginning of preferences_dialog() and restore them if the user presses 'Cancel'. Fixes #21 Signed-off-by: Dirk Hohndel --- print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'print.c') diff --git a/print.c b/print.c index 7d879cecb..368ab9475 100644 --- a/print.c +++ b/print.c @@ -237,7 +237,7 @@ static void show_dive_tanks(struct dive *dive, cairo_t *cr, double w, while ( i < 3 ) { cairo_move_to(cr, curwidth / (double) PANGO_SCALE, 0); switch(i) { - case 0 : if (output_units.volume == CUFT) { + case 0 : if (prefs.output_units.volume == CUFT) { cyl_cap *= cyl_wp / 14.7 ; } snprintf(buffer, sizeof(buffer), _("%.*f %s"), @@ -256,7 +256,7 @@ static void show_dive_tanks(struct dive *dive, cairo_t *cr, double w, } break; case 2 : cairo_move_to(cr, curwidth / (double) PANGO_SCALE, 0); - if (output_units.volume == CUFT) { + if (prefs.output_units.volume == CUFT) { cyl_cons_gas /= 14.7 ; } snprintf(buffer, sizeof(buffer), _("%.*f %s\n"), -- cgit v1.2.3-70-g09d2