From aa8372c4865555519ceda8f355c49b231df81ae2 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Tue, 24 Aug 2010 18:32:59 +0000 Subject: [PATCH] * 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 --- headers/os/locale/TimeZone.h | 8 ++++---- src/kits/locale/TimeZone.cpp | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/headers/os/locale/TimeZone.h b/headers/os/locale/TimeZone.h index e2f1194d25..d20c0ce913 100644 --- a/headers/os/locale/TimeZone.h +++ b/headers/os/locale/TimeZone.h @@ -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; diff --git a/src/kits/locale/TimeZone.cpp b/src/kits/locale/TimeZone.cpp index 890c78a02e..27353429e7 100644 --- a/src/kits/locale/TimeZone.cpp +++ b/src/kits/locale/TimeZone.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include 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;