Author: zooey Date: 2010-08-24 20:32:59 +0200 (Tue, 24 Aug 2010) New Revision: 38340 Changeset: http://dev.haiku-os.org/changeset/38340 Modified: haiku/trunk/headers/os/locale/TimeZone.h haiku/trunk/src/kits/locale/TimeZone.cpp Log: * changed BTimeZone to use BLanguage instead of BLocale, as that what represents the locale of messages (timezone names in this case) Modified: haiku/trunk/headers/os/locale/TimeZone.h =================================================================== --- haiku/trunk/headers/os/locale/TimeZone.h 2010-08-24 17:49:12 UTC (rev 38339) +++ haiku/trunk/headers/os/locale/TimeZone.h 2010-08-24 18:32:59 UTC (rev 38340) @@ -13,13 +13,13 @@ 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 @@ 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; Modified: haiku/trunk/src/kits/locale/TimeZone.cpp =================================================================== --- haiku/trunk/src/kits/locale/TimeZone.cpp 2010-08-24 17:49:12 UTC (rev 38339) +++ haiku/trunk/src/kits/locale/TimeZone.cpp 2010-08-24 18:32:59 UTC (rev 38340) @@ -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 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 @@ 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 @@ 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;