* Actually set the 12/24hr clock selector depending on the date format when selecting a country.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37605 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues 2010-07-19 17:33:07 +00:00
parent 8d1485fa06
commit 66d288a959

View File

@ -188,7 +188,7 @@ FormatView::FormatView(BCountry* country)
BString timeFormat; BString timeFormat;
fCountry->TimeFormat(timeFormat, false); fCountry->TimeFormat(timeFormat, false);
if (timeFormat.FindFirst(" a")) if (timeFormat.FindFirst("a") != B_ERROR)
f12HrRadioButton->SetValue(1); f12HrRadioButton->SetValue(1);
else else
f24HrRadioButton->SetValue(1); f24HrRadioButton->SetValue(1);
@ -537,10 +537,14 @@ FormatView::SetCountry(BCountry* country)
delete fCountry; delete fCountry;
fCountry = country; fCountry = country;
/* BString timeFormat;
f24HrRadioButton->SetValue(settings.ClockIs24Hr()); fCountry->TimeFormat(timeFormat, false);
f12HrRadioButton->SetValue(!settings.ClockIs24Hr()); if (timeFormat.FindFirst("a") != B_ERROR)
f12HrRadioButton->SetValue(1);
else
f24HrRadioButton->SetValue(1);
/*
FormatSeparator separator = settings.TimeFormatSeparator(); FormatSeparator separator = settings.TimeFormatSeparator();
if (separator >= kNoSeparator && separator < kSeparatorsEnd) if (separator >= kNoSeparator && separator < kSeparatorsEnd)