Author: pulkomandy Date: 2010-07-19 19:33:07 +0200 (Mon, 19 Jul 2010) New Revision: 37605 Changeset: http://dev.haiku-os.org/changeset/37605 Modified: haiku/trunk/src/preferences/locale/TimeFormatSettingsView.cpp Log: * Actually set the 12/24hr clock selector depending on the date format when selecting a country. Modified: haiku/trunk/src/preferences/locale/TimeFormatSettingsView.cpp =================================================================== --- haiku/trunk/src/preferences/locale/TimeFormatSettingsView.cpp 2010-07-19 16:55:55 UTC (rev 37604) +++ haiku/trunk/src/preferences/locale/TimeFormatSettingsView.cpp 2010-07-19 17:33:07 UTC (rev 37605) @@ -188,7 +188,7 @@ BString timeFormat; fCountry->TimeFormat(timeFormat, false); - if (timeFormat.FindFirst(" a")) + if (timeFormat.FindFirst("a") != B_ERROR) f12HrRadioButton->SetValue(1); else f24HrRadioButton->SetValue(1); @@ -537,10 +537,14 @@ delete fCountry; fCountry = country; + BString timeFormat; + fCountry->TimeFormat(timeFormat, false); + if (timeFormat.FindFirst("a") != B_ERROR) + f12HrRadioButton->SetValue(1); + else + f24HrRadioButton->SetValue(1); + /* - f24HrRadioButton->SetValue(settings.ClockIs24Hr()); - f12HrRadioButton->SetValue(!settings.ClockIs24Hr()); - FormatSeparator separator = settings.TimeFormatSeparator(); if (separator >= kNoSeparator && separator < kSeparatorsEnd)