If the message didn't already contain the short/long time format, they would never get added to the update message since ReplaceString won't add if the name specified doesn't already exist. Fixes locale settings for time format not propagating properly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37675 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2010-07-22 01:11:43 +00:00
parent 8ab6671aad
commit 18d379a812
1 changed files with 4 additions and 2 deletions

View File

@ -97,12 +97,14 @@ LocaleSettings::UpdateFrom(BMessage* message)
} }
if (message->FindString("shortTimeFormat", &messageContent) == B_OK) { if (message->FindString("shortTimeFormat", &messageContent) == B_OK) {
fMessage.ReplaceString("shortTimeFormat", messageContent); fMessage.RemoveName("shortTimeFormat");
fMessage.AddString("shortTimeFormat", messageContent);
fSaved = false; fSaved = false;
} }
if (message->FindString("longTimeFormat", &messageContent) == B_OK) { if (message->FindString("longTimeFormat", &messageContent) == B_OK) {
fMessage.ReplaceString("longTimeFormat", messageContent); fMessage.RemoveName("longTimeFormat");
fMessage.AddString("longTimeFormat", messageContent);
fSaved = false; fSaved = false;
} }