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

View File

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