summaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-10 09:20:57 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-10 10:26:06 -0800
commit92c0d8c5160232642571b52b66176594c796f21d (patch)
treed3b78a6deba3af0119b493dbfd0a8ec8c4a13304 /print.c
parent54919c1c4ec94cd21150c5320fa0956d13df5904 (diff)
downloadsubsurface-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.c4
1 files changed, 2 insertions, 2 deletions
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"),