diff options
author | rubidium <rubidium@openttd.org> | 2009-04-25 20:16:56 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-04-25 20:16:56 +0000 |
commit | 802d31aab683d1e6baeafd8f53bbe7187b39e69a (patch) | |
tree | c5ab4701130437738a9e223bcf1189a270a322b9 /src/settings_gui.cpp | |
parent | 4ec6456feb28f3530573b1452f714bf0b7d589fd (diff) | |
download | openttd-802d31aab683d1e6baeafd8f53bbe7187b39e69a.tar.xz |
(svn r16144) -Fix (r16129): setting the custom digit grouping separator required to restart OpenTTD to take effect. Now also support non 1 ASCII character custom grouping separators.
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r-- | src/settings_gui.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index ac3af105a..d52ed96c6 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1587,13 +1587,10 @@ enum CustomCurrencyWidgets { }; struct CustomCurrencyWindow : Window { - char separator[2]; int query_widget; CustomCurrencyWindow(const WindowDesc *desc) : Window(desc) { - this->separator[0] = _custom_currency.separator; - this->separator[1] = '\0'; this->FindWindowPlacementAndResize(desc); SetButtonState(); @@ -1611,7 +1608,7 @@ struct CustomCurrencyWindow : Window { { SetDParam(0, 1); SetDParam(1, 1); - SetDParamStr(2, this->separator); + SetDParamStr(2, _custom_currency.separator); SetDParamStr(3, _custom_currency.prefix); SetDParamStr(4, _custom_currency.suffix); SetDParam(5, _custom_currency.to_euro); @@ -1650,7 +1647,7 @@ struct CustomCurrencyWindow : Window { case CUSTCURR_SEPARATOR_EDIT: case CUSTCURR_SEPARATOR: - SetDParamStr(0, this->separator); + SetDParamStr(0, _custom_currency.separator); str = STR_JUST_RAW_STRING; len = 1; line = CUSTCURR_SEPARATOR; @@ -1712,8 +1709,7 @@ struct CustomCurrencyWindow : Window { break; case CUSTCURR_SEPARATOR: // Thousands seperator - _custom_currency.separator = StrEmpty(str) ? ' ' : str[0]; - strecpy(this->separator, str, lastof(this->separator)); + strecpy(_custom_currency.separator, str, lastof(_custom_currency.separator)); break; case CUSTCURR_PREFIX: |