* 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:
parent
58fa4d5717
commit
4ebeabb639
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user