Remove obsolete time update checking code.
This was put into OpenDeskbar a long long time ago (2001): http://opentracker.cvs.sourceforge.net/viewvc/opentracker/opentracker/deskbar/TimeView.cpp?r1=1.2&r2=1.3 However, this trick will no longer work because we use a localized time string from the Locale Kit that might not have a ':' as a time separator anymore. Also with day of week we don't know the position of the time separator either.
This commit is contained in:
@@ -252,12 +252,7 @@ TTimeView::Pulse()
|
|||||||
GetCurrentDate();
|
GetCurrentDate();
|
||||||
if (strcmp(fCurrentTimeStr, fLastTimeStr) != 0) {
|
if (strcmp(fCurrentTimeStr, fLastTimeStr) != 0) {
|
||||||
// Update bounds when the size of the strings has changed
|
// Update bounds when the size of the strings has changed
|
||||||
// For dates, Update() could be called two times in a row,
|
Update();
|
||||||
// but that should only happen very rarely
|
|
||||||
if ((fLastTimeStr[1] != fCurrentTimeStr[1]
|
|
||||||
&& (fLastTimeStr[1] == ':' || fCurrentTimeStr[1] == ':'))
|
|
||||||
|| !fLastTimeStr[0])
|
|
||||||
Update();
|
|
||||||
|
|
||||||
strlcpy(fLastTimeStr, fCurrentTimeStr, sizeof(fLastTimeStr));
|
strlcpy(fLastTimeStr, fCurrentTimeStr, sizeof(fLastTimeStr));
|
||||||
fNeedToUpdate = true;
|
fNeedToUpdate = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user