diff options
Diffstat (limited to 'indra/newview/llinspectremoteobject.cpp')
-rw-r--r-- | indra/newview/llinspectremoteobject.cpp | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp index e4d2eec242..66e4a1bf66 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 @@ -168,7 +167,8 @@ void LLInspectRemoteObject::nameCallback(const LLUUID& id, const std::string& fi 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; @@ -183,11 +183,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()); } ////////////////////////////////////////////////////////////////////////////// |