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
25
parse-xml.c
25
parse-xml.c
|
@ -129,29 +129,8 @@ static int match(const char *pattern, int plen,
|
|||
|
||||
|
||||
struct units input_units;
|
||||
|
||||
/*
|
||||
* We're going to default to SI units for input. Yes,
|
||||
* technically the SI unit for pressure is Pascal, but
|
||||
* we default to bar (10^5 pascal), which people
|
||||
* actually use. Similarly, C instead of Kelvin.
|
||||
* And kg instead of g.
|
||||
*/
|
||||
const struct units SI_units = {
|
||||
.length = METERS,
|
||||
.volume = LITER,
|
||||
.pressure = BAR,
|
||||
.temperature = CELSIUS,
|
||||
.weight = KG
|
||||
};
|
||||
|
||||
const struct units IMPERIAL_units = {
|
||||
.length = FEET,
|
||||
.volume = CUFT,
|
||||
.pressure = PSI,
|
||||
.temperature = FAHRENHEIT,
|
||||
.weight = LBS
|
||||
};
|
||||
const struct units SI_units = SI_UNITS;
|
||||
const struct units IMPERIAL_units = IMPERIAL_UNITS;
|
||||
|
||||
/*
|
||||
* Dive info as it is being built up..
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue