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:
@@ -96,6 +96,8 @@ TTimeView::TTimeView(float maxWidth, float height, bool showSeconds,
|
|||||||
fLastTimeStr[0] = 0;
|
fLastTimeStr[0] = 0;
|
||||||
fLastDateStr[0] = 0;
|
fLastDateStr[0] = 0;
|
||||||
fNeedToUpdate = true;
|
fNeedToUpdate = true;
|
||||||
|
|
||||||
|
be_locale_roster->GetDefaultCountry(&fHere);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -109,6 +111,8 @@ TTimeView::TTimeView(BMessage* data)
|
|||||||
data->FindBool("eurodate", &fEuroDate);
|
data->FindBool("eurodate", &fEuroDate);
|
||||||
data->FindBool("interval", &fInterval);
|
data->FindBool("interval", &fInterval);
|
||||||
fShowingDate = false;
|
fShowingDate = false;
|
||||||
|
|
||||||
|
be_locale_roster->GetDefaultCountry(&fHere);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -317,11 +321,7 @@ TTimeView::GetCurrentTime()
|
|||||||
fMinute = time.tm_min;
|
fMinute = time.tm_min;
|
||||||
fHour = time.tm_hour;
|
fHour = time.tm_hour;
|
||||||
|
|
||||||
|
fHere->FormatTime(fTimeStr, 64, fTime, fShowSeconds);
|
||||||
BCountry* here;
|
|
||||||
be_locale_roster->GetDefaultCountry(&here);
|
|
||||||
|
|
||||||
here->FormatTime(fTimeStr, 64, fTime, fShowSeconds);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,12 +44,14 @@ const uint32 kShowSeconds = 'ShSc';
|
|||||||
const uint32 kFullDate = 'FDat';
|
const uint32 kFullDate = 'FDat';
|
||||||
const uint32 kEuroDate = 'EDat';
|
const uint32 kEuroDate = 'EDat';
|
||||||
|
|
||||||
|
class BCountry;
|
||||||
class BMessageRunner;
|
class BMessageRunner;
|
||||||
|
|
||||||
#ifdef AS_REPLICANT
|
#ifdef AS_REPLICANT
|
||||||
class _EXPORT TTimeView;
|
class _EXPORT TTimeView;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
class TTimeView : public BView {
|
class TTimeView : public BView {
|
||||||
public:
|
public:
|
||||||
TTimeView(float maxWidth, float height, bool showSeconds = false,
|
TTimeView(float maxWidth, float height, bool showSeconds = false,
|
||||||
@@ -130,6 +132,8 @@ class TTimeView : public BView {
|
|||||||
|
|
||||||
BMessenger fCalendarWindow;
|
BMessenger fCalendarWindow;
|
||||||
BMessageRunner* fLongClickMessageRunner;
|
BMessageRunner* fLongClickMessageRunner;
|
||||||
|
|
||||||
|
BCountry* fHere; // For date and time localizing purposes
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user