summaryrefslogtreecommitdiff
path: root/indra/newview/llstatusbar.cpp
diff options
context:
space:
mode:
authorChristian Goetze <cg@lindenlab.com>2007-10-17 22:09:27 +0000
committerChristian Goetze <cg@lindenlab.com>2007-10-17 22:09:27 +0000
commitaa8b0cbe690eef9ed4fb7f6f9e8cc75a0a073d76 (patch)
tree38f24f3ca670cdf3bb232b7bd9b134d606037614 /indra/newview/llstatusbar.cpp
parent788c18c00db8dabdbcdc0ab1af2cf35c24eec8e9 (diff)
QAR-25 svn merge -r71797:71803 svn+ssh://svn/svn/linden/branches/logitech_lcd_4
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r--indra/newview/llstatusbar.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 9bbb25fd2b..df9b370dc4 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -464,6 +464,10 @@ void LLStatusBar::refresh()
pos_y -= pos_y % 2;
}
+ mRegionDetails.mTime = mTextTime->getText();
+ mRegionDetails.mBalance = mBalance;
+ mRegionDetails.mAccesString = (char *)region->getSimAccessString();
+ mRegionDetails.mPing = region->getNetDetailsForLCD();
if (parcel && !parcel->getName().empty())
{
location_name = region->getName()
@@ -471,6 +475,43 @@ void LLStatusBar::refresh()
pos_x, pos_y, pos_z,
region->getSimAccessString(),
parcel->getName().c_str());
+
+ // keep these around for the LCD to use
+ mRegionDetails.mRegionName = region->getName();
+ mRegionDetails.mParcelName = (char *)parcel->getName().c_str();
+ mRegionDetails.mX = pos_x;
+ mRegionDetails.mY = pos_y;
+ mRegionDetails.mZ = pos_z;
+ mRegionDetails.mArea = parcel->getArea();
+ mRegionDetails.mForSale = parcel->getForSale();
+ mRegionDetails.mTraffic = gParcelMgr->getDwelling();
+
+ if (parcel->isPublic())
+ {
+ snprintf(mRegionDetails.mOwner, MAX_STRING, "Public");
+ }
+ else
+ {
+ if (parcel->getIsGroupOwned())
+ {
+ if(!parcel->getGroupID().isNull())
+ {
+ gCacheName->getGroupName(parcel->getGroupID(), mRegionDetails.mOwner);
+ }
+ else
+ {
+ snprintf(mRegionDetails.mOwner, MAX_STRING, "Group Owned");
+ }
+ }
+ else
+ {
+ // Figure out the owner's name
+ char owner_first[MAX_STRING]; /*Flawfinder: ignore*/
+ char owner_last[MAX_STRING]; /*Flawfinder: ignore*/
+ gCacheName->getName(parcel->getOwnerID(), owner_first, owner_last);
+ snprintf(mRegionDetails.mOwner, MAX_STRING, "%s %s", owner_first, owner_last); /* Flawfinder: ignore */
+ }
+ }
}
else
{
@@ -478,12 +519,34 @@ void LLStatusBar::refresh()
+ llformat(" %d, %d, %d (%s)",
pos_x, pos_y, pos_z,
region->getSimAccessString());
+ // keep these around for the LCD to use
+ mRegionDetails.mRegionName = region->getName();
+ mRegionDetails.mParcelName = "Unknown";
+
+ mRegionDetails.mX = pos_x;
+ mRegionDetails.mY = pos_y;
+ mRegionDetails.mZ = pos_z;
+ mRegionDetails.mArea = 0;
+ mRegionDetails.mForSale = FALSE;
+ snprintf(mRegionDetails.mOwner, MAX_STRING, "Unknown");
+ mRegionDetails.mTraffic = 0.0f;
}
}
else
{
// no region
location_name = "(Unknown)";
+ // keep these around for the LCD to use
+ mRegionDetails.mRegionName = LLString("Unknown");
+ mRegionDetails.mParcelName = "Unknown";
+ mRegionDetails.mAccesString = "Unknown";
+ mRegionDetails.mX = 0;
+ mRegionDetails.mY = 0;
+ mRegionDetails.mZ = 0;
+ mRegionDetails.mArea = 0;
+ mRegionDetails.mForSale = FALSE;
+ snprintf(mRegionDetails.mOwner, MAX_STRING, "Unknown");
+ mRegionDetails.mTraffic = 0.0f;
}
mTextParcelName->setText(location_name);