summaryrefslogtreecommitdiff
path: root/indra/newview/llinspectremoteobject.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-02-03 14:13:56 -0800
committerJames Cook <james@lindenlab.com>2010-02-03 14:13:56 -0800
commit88350edbcbec615f3b15fc82bd5ce4005621ac6f (patch)
treec244f41159cf32f3e03c6c311e1453bbd383bad5 /indra/newview/llinspectremoteobject.cpp
parentd489216b6ef41f0d22f3a9062ba6daacc67bc038 (diff)
parent0bee31de32cb5999e7ec06d74f55d34ce0ac052b (diff)
merge
Diffstat (limited to 'indra/newview/llinspectremoteobject.cpp')
-rw-r--r--indra/newview/llinspectremoteobject.cpp28
1 files changed, 21 insertions, 7 deletions
diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp
index 31f69d21d9..e91f68f0c9 100644
--- a/indra/newview/llinspectremoteobject.cpp
+++ b/indra/newview/llinspectremoteobject.cpp
@@ -31,17 +31,16 @@
#include "llviewerprecompiledheaders.h"
+#include "llfloaterreg.h"
#include "llinspectremoteobject.h"
#include "llinspect.h"
-#include "llslurl.h"
#include "llmutelist.h"
-#include "llurlaction.h"
#include "llpanelblockedlist.h"
-#include "llfloaterreg.h"
+#include "llslurl.h"
+#include "lltrans.h"
#include "llui.h"
#include "lluictrl.h"
-
-class LLViewerObject;
+#include "llurlaction.h"
//////////////////////////////////////////////////////////////////////////////
// LLInspectRemoteObject
@@ -163,7 +162,8 @@ void LLInspectRemoteObject::onNameCache(const LLUUID& id, const std::string& nam
void LLInspectRemoteObject::update()
{
// show the object name as the inspector's title
- getChild<LLUICtrl>("object_name")->setValue(mName);
+ // (don't hyperlink URLs in object names)
+ getChild<LLUICtrl>("object_name")->setValue("<nolink>" + mName + "</nolink>");
// show the object's owner - click it to show profile
std::string owner = mOwner;
@@ -178,11 +178,25 @@ void LLInspectRemoteObject::update()
owner = LLSLURL::buildCommand("agent", mOwnerID, "about");
}
}
+ else
+ {
+ owner = LLTrans::getString("Unknown");
+ }
getChild<LLUICtrl>("object_owner")->setValue(owner);
// display the object's SLurl - click it to teleport
- std::string url = "secondlife:///app/teleport/" + mSLurl;
+ std::string url;
+ if (! mSLurl.empty())
+ {
+ url = "secondlife:///app/teleport/" + mSLurl;
+ }
getChild<LLUICtrl>("object_slurl")->setValue(url);
+
+ // disable the Map button if we don't have a SLurl
+ getChild<LLUICtrl>("map_btn")->setEnabled(! mSLurl.empty());
+
+ // disable the Block button if we don't have the owner ID
+ getChild<LLUICtrl>("block_btn")->setEnabled(! mOwnerID.isNull());
}
//////////////////////////////////////////////////////////////////////////////