* changed BTimeZone to use BLanguage instead of BLocale, as that what represents

the locale of messages (timezone names in this case)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38340 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe 2010-08-24 18:32:59 +00:00
parent 4f5f77e6e4
commit aa8372c486
2 changed files with 12 additions and 12 deletions

View File

@ -13,13 +13,13 @@ namespace icu_44 {
class Locale;
class TimeZone;
}
class BLocale;
class BLanguage;
class BTimeZone {
public:
BTimeZone(const char* zoneID = NULL,
const BLocale* locale = NULL);
const BLanguage* language = NULL);
BTimeZone(const BTimeZone& other);
~BTimeZone();
@ -36,9 +36,9 @@ public:
status_t InitCheck() const;
status_t SetTo(const char* zoneID,
const BLocale* locale = NULL);
const BLanguage* language = NULL);
status_t SetLocale(const BLocale* locale);
status_t SetLanguage(const BLanguage* language);
static const char* kNameOfGmtZone;

View File

@ -16,7 +16,7 @@
#include <unicode/timezone.h>
#include <ICUWrapper.h>
#include <Locale.h>
#include <Language.h>
const char* BTimeZone::kNameOfGmtZone = "GMT";
@ -36,14 +36,14 @@ static const uint32 skSupportsDaylightSavingField = 1U << 7;
static const uint32 skOffsetFromGMTField = 1U << 8;
BTimeZone::BTimeZone(const char* zoneID, const BLocale* locale)
BTimeZone::BTimeZone(const char* zoneID, const BLanguage* language)
:
fIcuTimeZone(NULL),
fIcuLocale(NULL),
fInitStatus(B_NO_INIT),
fInitializedFields(0)
{
SetTo(zoneID, locale);
SetTo(zoneID, language);
}
@ -232,14 +232,14 @@ BTimeZone::InitCheck() const
status_t
BTimeZone::SetLocale(const BLocale* locale)
BTimeZone::SetLanguage(const BLanguage* language)
{
return SetTo(fZoneID, locale);
return SetTo(fZoneID, language);
}
status_t
BTimeZone::SetTo(const char* zoneID, const BLocale* locale)
BTimeZone::SetTo(const char* zoneID, const BLanguage* language)
{
delete fIcuLocale;
fIcuLocale = NULL;
@ -256,8 +256,8 @@ BTimeZone::SetTo(const char* zoneID, const BLocale* locale)
return fInitStatus;
}
if (locale != NULL) {
fIcuLocale = new Locale(locale->Code());
if (language != NULL) {
fIcuLocale = new Locale(language->Code());
if (fIcuLocale == NULL) {
fInitStatus = B_NO_MEMORY;
return fInitStatus;