Improved the Time preflet (still not working properly, though)
* basically rewrote TimeZone to sport a nicer to use interface * adjusted all users of TimeZone accordingly * changed TZDisplay to show the Date next to the label, in order to avoid that long timezone names draw all over it * the timezone listview is now properly sorted according to the current language (using BCollator) * fixed a couple of bugs (overflows, etc.) that caused incorrect GMT offsets to be used during computations git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37813 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,31 +1,34 @@
|
||||
/*
|
||||
Copyright 2010, Haiku, Inc.
|
||||
Distributed under the terms of the MIT License.
|
||||
*/
|
||||
* Copyright 2010, Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _TIME_ZONE_H
|
||||
#define _TIME_ZONE_H
|
||||
|
||||
|
||||
#ifndef __TIMEZONE_H__
|
||||
#define __TIMEZONE_H__
|
||||
|
||||
|
||||
class BString;
|
||||
namespace icu_44 {
|
||||
class TimeZone;
|
||||
}
|
||||
#include <String.h>
|
||||
|
||||
|
||||
class BTimeZone {
|
||||
public:
|
||||
BTimeZone(const char* zoneCode);
|
||||
~BTimeZone();
|
||||
public:
|
||||
BTimeZone(const char* zoneCode = NULL);
|
||||
~BTimeZone();
|
||||
|
||||
void GetName(BString& name);
|
||||
void GetCode(char* buffer, int size);
|
||||
int OffsetFromGMT();
|
||||
const BString& Code() const;
|
||||
const BString& Name() const;
|
||||
int OffsetFromGMT() const;
|
||||
|
||||
private:
|
||||
icu_44::TimeZone* fICUTimeZone;
|
||||
status_t InitCheck() const;
|
||||
|
||||
private:
|
||||
void _Init(const char* zoneCode);
|
||||
|
||||
BString fCode;
|
||||
BString fName;
|
||||
int fOffsetFromGMT;
|
||||
|
||||
status_t fInitStatus;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif // _TIME_ZONE_H
|
||||
|
||||
Reference in New Issue
Block a user