Set the radiobuttons depending on the currency symbol position.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38336 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues 2010-08-24 16:39:29 +00:00
parent bca1690bfa
commit 9e7738992b
2 changed files with 10 additions and 4 deletions

View File

@ -234,10 +234,10 @@ FormatView::FormatView(const BLocale& locale)
BCheckBox* currencyLeadingZero = new BCheckBox("",
B_TRANSLATE("Leading 0"), new BMessage(kSettingsContentsModified));
BRadioButton* beforeRadioButton = new BRadioButton("",
fCurrencySymbolBefore = new BRadioButton("CurrencySymbolPosition",
B_TRANSLATE("Before"), new BMessage(kSettingsContentsModified));
BRadioButton* afterRadioButton = new BRadioButton("",
fCurrencySymbolAfter = new BRadioButton("CurrencySymbolPosition",
B_TRANSLATE("After"), new BMessage(kSettingsContentsModified));
fMonetaryView = new BStringView("", "");
@ -327,8 +327,8 @@ FormatView::FormatView(const BLocale& locale)
.Add(fCurrencySymbolView)
.AddGroup(B_HORIZONTAL, spacing)
.AddGlue()
.Add(beforeRadioButton)
.Add(afterRadioButton)
.Add(fCurrencySymbolBefore)
.Add(fCurrencySymbolAfter)
.End()
.Add(currencyNegative)
.Add(currencyDecimal)
@ -674,6 +674,10 @@ FormatView::_ParseCurrencyFormat()
switch (fieldID[i]) {
case B_NUMBER_ELEMENT_CURRENCY:
fCurrencySymbolView->SetText(currentSymbol);
if (i > fieldCount / 2)
fCurrencySymbolAfter->SetValue(1);
else
fCurrencySymbolBefore->SetValue(1);
break;
default:
break;

View File

@ -77,6 +77,8 @@ private:
BStringView* fMonetaryView;
BTextControl* fCurrencySymbolView;
BRadioButton* fCurrencySymbolBefore;
BRadioButton* fCurrencySymbolAfter;
bool f24HrClock;