Introduced DataSource::InternalName(), which must be implemented by all

derived classes. This is now used for storing and restoring DataSources
in/from the ActivityView archive. Fixes replicant restoration after
switching the preferred system language.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41027 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2011-03-19 16:38:30 +00:00
parent e6c49e10f9
commit d1901581f4
3 changed files with 130 additions and 10 deletions
+2 -3
View File
@@ -643,9 +643,8 @@ ActivityView::_Init(const BMessage* settings)
fHistoryBackgroundColor = *color;
const char* name;
for (int32 i = 0; settings->FindString("source", i, &name) == B_OK; i++) {
for (int32 i = 0; settings->FindString("source", i, &name) == B_OK; i++)
AddDataSource(DataSource::FindSource(name), settings);
}
}
@@ -700,7 +699,7 @@ ActivityView::SaveState(BMessage& state) const
DataSource* source = fSources.ItemAt(i);
if (!source->PerCPU() || source->CPU() == 0)
status = state.AddString("source", source->Name());
status = state.AddString("source", source->InternalName());
if (status != B_OK)
return status;