diff --git a/src/apps/deskbar/TimeView.cpp b/src/apps/deskbar/TimeView.cpp
index 5a2c43e..96a7936 100644
a
|
b
|
Except as contained in this notice, the name of Be Incorporated shall not be
|
26 | 26 | used in advertising or otherwise to promote the sale, use or other dealings in |
27 | 27 | this Software without prior written authorization from Be Incorporated. |
28 | 28 | |
29 | | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks |
30 | | of Be Incorporated in the United States and other countries. Other brand product |
31 | | names are registered trademarks or trademarks of their respective holders. |
| 29 | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered |
| 30 | trademarks of Be Incorporated in the United States and other countries. Other |
| 31 | brand product names are registered trademarks or trademarks of their respective |
| 32 | holders. |
32 | 33 | All rights reserved. |
33 | 34 | */ |
34 | 35 | |
… |
… |
TTimeView::GetPreferredSize(float* width, float* height)
|
154 | 155 | |
155 | 156 | GetCurrentTime(); |
156 | 157 | |
157 | | // TODO: SetOrientation never gets called, fix that |
158 | | // When in vertical mode, we want to limit the width so that it can't |
159 | | // overlap the bevels in the parent view. |
| 158 | // TODO: SetOrientation never gets called, fix that when in vertical mode, |
| 159 | // we want to limit the width so that it can't overlap the bevels in the |
| 160 | // parent view. |
160 | 161 | *width = fOrientation ? |
161 | 162 | min_c(fMaxWidth - kHMargin, kHMargin + StringWidth(fTimeStr)) |
162 | 163 | : kHMargin + StringWidth(fTimeStr); |
… |
… |
TTimeView::MessageReceived(BMessage* message)
|
217 | 218 | |
218 | 219 | default: |
219 | 220 | BView::MessageReceived(message); |
| 221 | break; |
220 | 222 | } |
221 | 223 | } |
222 | 224 | |
… |
… |
TTimeView::GetCurrentDate()
|
262 | 264 | |
263 | 265 | fLocale.FormatDate(tmp, 64, fTime, B_FULL_DATE_FORMAT); |
264 | 266 | |
265 | | // remove leading 0 from date when month is less than 10 (MM/DD/YY) |
266 | | // or remove leading 0 from date when day is less than 10 (DD/MM/YY) |
| 267 | // remove leading 0 from date when month is less than 10 (MM/DD/YY) |
| 268 | // or remove leading 0 from date when day is less than 10 (DD/MM/YY) |
267 | 269 | const char* str = tmp; |
268 | 270 | if (str[0] == '0') |
269 | 271 | str++; |
… |
… |
TTimeView::Pulse()
|
325 | 327 | // For dates, Update() could be called two times in a row, |
326 | 328 | // but that should only happen very rarely |
327 | 329 | if ((fLastTimeStr[1] != fTimeStr[1] |
328 | | && (fLastTimeStr[1] == ':' || fTimeStr[1] == ':')) |
| 330 | && (fLastTimeStr[1] == ':' || fTimeStr[1] == ':')) |
329 | 331 | || !fLastTimeStr[0]) |
330 | 332 | Update(); |
331 | 333 | |
… |
… |
TTimeView::Update()
|
360 | 362 | GetCurrentTime(); |
361 | 363 | GetCurrentDate(); |
362 | 364 | |
363 | | |
364 | 365 | SetToolTip(fDateStr); |
365 | 366 | |
366 | 367 | ResizeToPreferred(); |