mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
54919c1c4e
commit
92c0d8c516
10 changed files with 191 additions and 176 deletions
4
print.c
4
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"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue