diff options
author | Jake Simpson <jake@lindenlab.com> | 2007-06-29 01:24:26 +0000 |
---|---|---|
committer | Jake Simpson <jake@lindenlab.com> | 2007-06-29 01:24:26 +0000 |
commit | e3989d38486c4aaf4701d6239875ea4996d0963b (patch) | |
tree | 1ca0e7469ec20571aef3af85ae6622cd761a9ca4 /indra/newview/llstatusbar.cpp | |
parent | 010d40245600684fba056339f34dbdff0aa9a02d (diff) |
Changes to make Logitech code more LL Code Standards compliant, plus remove all the SDK code and instead just used headers and an included lib that we build ourselves from the Trunk directory.
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r-- | indra/newview/llstatusbar.cpp | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 72aca1999e..6990102d24 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -403,6 +403,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()) { location_name = region->getName() @@ -410,6 +414,43 @@ void LLStatusBar::refresh() pos_x, pos_y, pos_z, region->getSimAccessString(), parcel->getName()); + + // keep these around for the LCD to use + mRegionDetails.mRegionName = region->getName(); + mRegionDetails.mParcelName = (char *)parcel->getName(); + 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 { @@ -417,12 +458,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); |