* Remove GetLocaleName from BCountry

* Add GetName to BLocale instead


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37919 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues 2010-08-05 10:19:22 +00:00
parent 58fa4d5717
commit 4ebeabb639
5 changed files with 13 additions and 14 deletions

View File

@ -49,7 +49,6 @@ public:
~BCountry();
bool GetName(BString& name) const;
bool GetLocaleName(BString& name) const;
const char* Code() const;
status_t GetIcon(BBitmap* result) const;

View File

@ -27,6 +27,7 @@ public:
const BCountry* Country() const { return &fCountry; }
const BLanguage* Language() const { return &fLanguage; }
const char* Code() const;
bool GetName(BString& name) const;
void SetCountry(const BCountry& newCountry);
void SetCollator(const BCollator& newCollator);

View File

@ -79,17 +79,6 @@ BCountry::GetName(BString& name) const
}
bool
BCountry::GetLocaleName(BString& name) const
{
UnicodeString uString;
fICULocale->getDisplayName(uString);
BStringByteSink stringConverter(&name);
uString.toUTF8(stringConverter);
return true;
}
const char*
BCountry::Code() const
{

View File

@ -125,6 +125,16 @@ BLocale::Code() const
}
bool
BLocale::GetName(BString& name) const
{
UnicodeString uString;
fICULocale->getDisplayName(uString);
BStringByteSink stringConverter(&name);
uString.toUTF8(stringConverter);
return true;
}
// #pragma mark - Date

View File

@ -190,10 +190,10 @@ LocaleWindow::LocaleWindow()
LanguageListItem* currentItem = NULL;
for (int i = 0; countryList.FindString("langs", i, &countryCode) == B_OK;
i++) {
BCountry country(countryCode);
BLocale locale(countryCode);
BString countryName;
country.GetLocaleName(countryName);
locale.GetName(countryName);
LanguageListItem* item
= new LanguageListItem(countryName, countryCode,