diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-12-10 09:20:57 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-12-10 10:26:06 -0800 |
commit | 92c0d8c5160232642571b52b66176594c796f21d (patch) | |
tree | d3b78a6deba3af0119b493dbfd0a8ec8c4a13304 /print.c | |
parent | 54919c1c4ec94cd21150c5320fa0956d13df5904 (diff) | |
download | subsurface-92c0d8c5160232642571b52b66176594c796f21d.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'print.c')
-rw-r--r-- | print.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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"), |