Some refactoring of the deskar localization code to be more effective.
There is a memory leak somewhere in deskbar, but it appears to be unrelated to the time localization change (stays even if clock is disabled), so I have no idea where it comes from. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37301 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
952d6c8cc4
commit
5b12845050
@ -96,6 +96,8 @@ TTimeView::TTimeView(float maxWidth, float height, bool showSeconds,
|
||||
fLastTimeStr[0] = 0;
|
||||
fLastDateStr[0] = 0;
|
||||
fNeedToUpdate = true;
|
||||
|
||||
be_locale_roster->GetDefaultCountry(&fHere);
|
||||
}
|
||||
|
||||
|
||||
@ -109,6 +111,8 @@ TTimeView::TTimeView(BMessage* data)
|
||||
data->FindBool("eurodate", &fEuroDate);
|
||||
data->FindBool("interval", &fInterval);
|
||||
fShowingDate = false;
|
||||
|
||||
be_locale_roster->GetDefaultCountry(&fHere);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -317,11 +321,7 @@ TTimeView::GetCurrentTime()
|
||||
fMinute = time.tm_min;
|
||||
fHour = time.tm_hour;
|
||||
|
||||
|
||||
BCountry* here;
|
||||
be_locale_roster->GetDefaultCountry(&here);
|
||||
|
||||
here->FormatTime(fTimeStr, 64, fTime, fShowSeconds);
|
||||
fHere->FormatTime(fTimeStr, 64, fTime, fShowSeconds);
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,12 +44,14 @@ const uint32 kShowSeconds = 'ShSc';
|
||||
const uint32 kFullDate = 'FDat';
|
||||
const uint32 kEuroDate = 'EDat';
|
||||
|
||||
class BCountry;
|
||||
class BMessageRunner;
|
||||
|
||||
#ifdef AS_REPLICANT
|
||||
class _EXPORT TTimeView;
|
||||
#endif
|
||||
|
||||
|
||||
class TTimeView : public BView {
|
||||
public:
|
||||
TTimeView(float maxWidth, float height, bool showSeconds = false,
|
||||
@ -130,6 +132,8 @@ class TTimeView : public BView {
|
||||
|
||||
BMessenger fCalendarWindow;
|
||||
BMessageRunner* fLongClickMessageRunner;
|
||||
|
||||
BCountry* fHere; // For date and time localizing purposes
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user