aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llstatusbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llstatusbar.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp
index 2471e18..9bbb25f 100644
--- a/linden/indra/newview/llstatusbar.cpp
+++ b/linden/indra/newview/llstatusbar.cpp
@@ -2,6 +2,8 @@
2 * @file llstatusbar.cpp 2 * @file llstatusbar.cpp
3 * @brief LLStatusBar class implementation 3 * @brief LLStatusBar class implementation
4 * 4 *
5 * $LicenseInfo:firstyear=2002&license=viewergpl$
6 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 7 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 8 *
7 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
@@ -24,6 +26,7 @@
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
27 */ 30 */
28 31
29#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
@@ -249,6 +252,8 @@ void LLStatusBar::refresh()
249 mSGBandwidth->setThreshold(1, bwtotal); 252 mSGBandwidth->setThreshold(1, bwtotal);
250 mSGBandwidth->setThreshold(2, bwtotal); 253 mSGBandwidth->setThreshold(2, bwtotal);
251 254
255 // *TODO: Localize / translate time
256
252 // Get current UTC time, adjusted for the user's clock 257 // Get current UTC time, adjusted for the user's clock
253 // being off. 258 // being off.
254 U32 utc_time; 259 U32 utc_time;
@@ -282,7 +287,7 @@ void LLStatusBar::refresh()
282 t << std::setfill(' ') << std::setw(2) << hour << ":" 287 t << std::setfill(' ') << std::setw(2) << hour << ":"
283 << std::setfill('0') << std::setw(2) << min 288 << std::setfill('0') << std::setw(2) << min
284 << " " << am_pm << " " << tz; 289 << " " << am_pm << " " << tz;
285 mTextTime->setText(t.str().c_str()); 290 mTextTime->setText(t.str());
286 291
287 // Year starts at 1900, set the tooltip to have the date 292 // Year starts at 1900, set the tooltip to have the date
288 std::ostringstream date; 293 std::ostringstream date;
@@ -459,13 +464,13 @@ void LLStatusBar::refresh()
459 pos_y -= pos_y % 2; 464 pos_y -= pos_y % 2;
460 } 465 }
461 466
462 if (parcel && parcel->getName()) 467 if (parcel && !parcel->getName().empty())
463 { 468 {
464 location_name = region->getName() 469 location_name = region->getName()
465 + llformat(" %d, %d, %d (%s) - %s", 470 + llformat(" %d, %d, %d (%s) - %s",
466 pos_x, pos_y, pos_z, 471 pos_x, pos_y, pos_z,
467 region->getSimAccessString(), 472 region->getSimAccessString(),
468 parcel->getName()); 473 parcel->getName().c_str());
469 } 474 }
470 else 475 else
471 { 476 {
@@ -534,10 +539,8 @@ void LLStatusBar::setBalance(S32 balance)
534 539
535void LLStatusBar::setHealth(S32 health) 540void LLStatusBar::setHealth(S32 health)
536{ 541{
537 char buffer[MAX_STRING]; /* Flawfinder: ignore */
538 snprintf(buffer, MAX_STRING, "%d%%", health); /* Flawfinder: ignore */
539 //llinfos << "Setting health to: " << buffer << llendl; 542 //llinfos << "Setting health to: " << buffer << llendl;
540 mTextHealth->setText(buffer); 543 mTextHealth->setText(llformat("%d%%", health));
541 544
542 if( mHealth > health ) 545 if( mHealth > health )
543 { 546 {