Update LLFloaterInspect, updates RLVa code, fixes inspect not always working at first
This commit is contained in:
@@ -32,32 +32,48 @@
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llavataractions.h"
|
||||
#include "llfloaterinspect.h"
|
||||
|
||||
#include "llfloatertools.h"
|
||||
#include "llcachename.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "lltoolcomp.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
|
||||
#include "rlvhandler.h"
|
||||
#include "llagent.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
|
||||
//LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
|
||||
|
||||
LLFloaterInspect::LLFloaterInspect(void) :
|
||||
LLFloater(std::string("Inspect Object")),
|
||||
LLFloaterInspect::LLFloaterInspect()
|
||||
: LLFloater(std::string("Inspect Object")),
|
||||
mDirty(FALSE)
|
||||
{
|
||||
sInstance = this;
|
||||
mCommitCallbackRegistrar.add("Inspect.OwnerProfile", boost::bind(&LLFloaterInspect::onClickOwnerProfile, this));
|
||||
mCommitCallbackRegistrar.add("Inspect.CreatorProfile", boost::bind(&LLFloaterInspect::onClickCreatorProfile, this));
|
||||
mCommitCallbackRegistrar.add("Inspect.SelectObject", boost::bind(&LLFloaterInspect::onSelectObject, this));
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inspect.xml");
|
||||
}
|
||||
|
||||
BOOL LLFloaterInspect::postBuild()
|
||||
{
|
||||
mObjectList = getChild<LLScrollListCtrl>("object_list");
|
||||
// childSetAction("button owner",onClickOwnerProfile, this);
|
||||
// childSetAction("button creator",onClickCreatorProfile, this);
|
||||
// childSetCommitCallback("object_list", onSelectObject, this);
|
||||
|
||||
refresh();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LLFloaterInspect::~LLFloaterInspect(void)
|
||||
{
|
||||
if(!gFloaterTools->getVisible())
|
||||
@@ -73,42 +89,30 @@ LLFloaterInspect::~LLFloaterInspect(void)
|
||||
{
|
||||
gFloaterTools->setFocus(TRUE);
|
||||
}
|
||||
sInstance = NULL;
|
||||
//sInstance = NULL;
|
||||
}
|
||||
|
||||
BOOL LLFloaterInspect::isVisible()
|
||||
// static
|
||||
void LLFloaterInspect::showInstance()
|
||||
{
|
||||
return (!!sInstance);
|
||||
getInstance()->open();
|
||||
}
|
||||
|
||||
void LLFloaterInspect::show(void* ignored)
|
||||
void LLFloaterInspect::onOpen()
|
||||
{
|
||||
// setForceSelection ensures that the pie menu does not deselect things when it
|
||||
// looses the focus (this can happen with "select own objects only" enabled
|
||||
// VWR-1471
|
||||
BOOL forcesel = LLSelectMgr::getInstance()->setForceSelection(TRUE);
|
||||
|
||||
if (!sInstance) // first use
|
||||
{
|
||||
sInstance = new LLFloaterInspect;
|
||||
}
|
||||
|
||||
sInstance->open();
|
||||
LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance());
|
||||
LLSelectMgr::getInstance()->setForceSelection(forcesel); // restore previouis value
|
||||
|
||||
sInstance->mObjectSelection = LLSelectMgr::getInstance()->getSelection();
|
||||
sInstance->refresh();
|
||||
mObjectSelection = LLSelectMgr::getInstance()->getSelection();
|
||||
refresh();
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onClickCreatorProfile(void* ctrl)
|
||||
void LLFloaterInspect::onClickCreatorProfile()
|
||||
{
|
||||
if(sInstance->mObjectList->getAllSelected().size() == 0)
|
||||
if(mObjectList->getAllSelected().size() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLScrollListItem* first_selected =
|
||||
sInstance->mObjectList->getFirstSelected();
|
||||
LLScrollListItem* first_selected =mObjectList->getFirstSelected();
|
||||
|
||||
if (first_selected)
|
||||
{
|
||||
@@ -121,19 +125,27 @@ void LLFloaterInspect::onClickCreatorProfile(void* ctrl)
|
||||
return (obj_id == node->getObject()->getID());
|
||||
}
|
||||
} func(first_selected->getUUID());
|
||||
LLSelectNode* node = sInstance->mObjectSelection->getFirstNode(&func);
|
||||
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
|
||||
if(node)
|
||||
{
|
||||
LLAvatarActions::showProfile(node->mPermissions->getCreator());
|
||||
// LLAvatarActions::showProfile(node->mPermissions->getCreator());
|
||||
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
|
||||
const LLUUID& idCreator = node->mPermissions->getCreator();
|
||||
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
|
||||
((node->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator))) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLAvatarActions::showProfile(idCreator);
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onClickOwnerProfile(void* ctrl)
|
||||
void LLFloaterInspect::onClickOwnerProfile()
|
||||
{
|
||||
if(sInstance->mObjectList->getAllSelected().size() == 0) return;
|
||||
LLScrollListItem* first_selected =
|
||||
sInstance->mObjectList->getFirstSelected();
|
||||
if(mObjectList->getAllSelected().size() == 0) return;
|
||||
LLScrollListItem* first_selected =mObjectList->getFirstSelected();
|
||||
|
||||
if (first_selected)
|
||||
{
|
||||
@@ -147,66 +159,62 @@ void LLFloaterInspect::onClickOwnerProfile(void* ctrl)
|
||||
return (obj_id == node->getObject()->getID());
|
||||
}
|
||||
} func(selected_id);
|
||||
LLSelectNode* node = sInstance->mObjectSelection->getFirstNode(&func);
|
||||
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
|
||||
if(node)
|
||||
{
|
||||
const LLUUID& owner_id = node->mPermissions->getOwner();
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
LLAvatarActions::showProfile(owner_id);
|
||||
}
|
||||
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
return;
|
||||
// [/RLVa:KB]
|
||||
// LLAvatarActions::showProfile(owner_id);
|
||||
LLAvatarActions::showProfile(owner_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLFloaterInspect::postBuild()
|
||||
{
|
||||
mObjectList = getChild<LLScrollListCtrl>("object_list");
|
||||
childSetAction("button owner",onClickOwnerProfile, this);
|
||||
childSetAction("button creator",onClickCreatorProfile, this);
|
||||
childSetCommitCallback("object_list", onSelectObject, this);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onSelectObject(LLUICtrl* ctrl, void* user_data)
|
||||
void LLFloaterInspect::onSelectObject()
|
||||
{
|
||||
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
|
||||
{
|
||||
//sInstance->childSetEnabled("button owner", true);
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e
|
||||
sInstance->childSetEnabled("button owner", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
|
||||
// getChildView("button owner")->setEnabled(true);
|
||||
// getChildView("button creator")->setEnabled(true);
|
||||
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
|
||||
getChildView("button owner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
|
||||
// TODO-RLVa: [RLVa-1.2.2] Is it worth checking the selected node just to selectively disable this button?
|
||||
getChildView("button creator")->setEnabled(true);
|
||||
// [/RLVa:KB]
|
||||
sInstance->childSetEnabled("button creator", true);
|
||||
}
|
||||
}
|
||||
|
||||
LLUUID LLFloaterInspect::getSelectedUUID()
|
||||
{
|
||||
if(sInstance)
|
||||
if(mObjectList->getAllSelected().size() > 0)
|
||||
{
|
||||
if(sInstance->mObjectList->getAllSelected().size() > 0)
|
||||
LLScrollListItem* first_selected =mObjectList->getFirstSelected();
|
||||
if (first_selected)
|
||||
{
|
||||
LLScrollListItem* first_selected =
|
||||
sInstance->mObjectList->getFirstSelected();
|
||||
if (first_selected)
|
||||
{
|
||||
return first_selected->getUUID();
|
||||
}
|
||||
return first_selected->getUUID();
|
||||
}
|
||||
}
|
||||
return LLUUID::null;
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr)
|
||||
{
|
||||
if (FloaterPtr)
|
||||
{
|
||||
LLFloaterInspect* floater = (LLFloaterInspect*)FloaterPtr;
|
||||
floater->dirty();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::refresh()
|
||||
{
|
||||
LLUUID creator_id;
|
||||
std::string creator_name;
|
||||
S32 pos = mObjectList->getScrollPos();
|
||||
childSetEnabled("button owner", false);
|
||||
childSetEnabled("button creator", false);
|
||||
getChildView("button owner")->setEnabled(false);
|
||||
getChildView("button creator")->setEnabled(false);
|
||||
LLUUID selected_uuid;
|
||||
S32 selected_index = mObjectList->getFirstSelectedIndex();
|
||||
if(selected_index > -1)
|
||||
@@ -235,18 +243,67 @@ void LLFloaterInspect::refresh()
|
||||
|
||||
time_t timestamp = (time_t) (obj->mCreationDate/1000000);
|
||||
timeToFormattedString(timestamp, gSavedSettings.getString("TimestampFormat"), time);
|
||||
gCacheName->getFullName(obj->mPermissions->getOwner(), owner_name);
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
// TODO-RLVa: shouldn't filter if this is a group-owned prim (will show "(nobody)")
|
||||
owner_name = RlvStrings::getAnonym(owner_name);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
gCacheName->getFullName(obj->mPermissions->getCreator(), creator_name);
|
||||
|
||||
const LLUUID& idOwner = obj->mPermissions->getOwner();
|
||||
const LLUUID& idCreator = obj->mPermissions->getCreator();
|
||||
// <edit>
|
||||
gCacheName->getFullName(obj->mPermissions->getLastOwner(), last_owner_name);
|
||||
const LLUUID& idLastOwner = obj->mPermissions->getLastOwner();
|
||||
// </edit>
|
||||
LLAvatarName av_name;
|
||||
|
||||
// Only work with the names if we actually get a result
|
||||
// from the name cache. If not, defer setting the
|
||||
// actual name and set a placeholder.
|
||||
if (LLAvatarNameCache::get(idOwner, &av_name))
|
||||
{
|
||||
// owner_name = av_name.getCompleteName();
|
||||
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
bool fRlvFilterOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (idOwner != gAgent.getID()) &&
|
||||
(!obj->mPermissions->isGroupOwned());
|
||||
owner_name = (!fRlvFilterOwner) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
else
|
||||
{
|
||||
owner_name = LLTrans::getString("RetrievingData");
|
||||
LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
|
||||
}
|
||||
|
||||
if (LLAvatarNameCache::get(idCreator, &av_name))
|
||||
{
|
||||
// creator_name = av_name.getCompleteName();
|
||||
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
const LLUUID& idCreator = obj->mPermissions->getCreator();
|
||||
LLAvatarNameCache::get(idCreator, &av_name);
|
||||
bool fRlvFilterCreator = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (idCreator != gAgent.getID()) &&
|
||||
( (obj->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator)) );
|
||||
creator_name = (!fRlvFilterCreator) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
else
|
||||
{
|
||||
creator_name = LLTrans::getString("RetrievingData");
|
||||
LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
|
||||
}
|
||||
|
||||
// <edit>
|
||||
if (LLAvatarNameCache::get(idLastOwner, &av_name))
|
||||
{
|
||||
// last_owner_name = av_name.getCompleteName();
|
||||
// [RLVa:LF] - Copied from the above creator check Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
LLAvatarNameCache::get(idLastOwner, &av_name);
|
||||
bool fRlvFilterLastOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (idLastOwner != gAgent.getID()) &&
|
||||
( (obj->mPermissions->getOwner() == idLastOwner) || (RlvUtil::isNearbyAgent(idLastOwner)) );
|
||||
last_owner_name = (!fRlvFilterLastOwner) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
|
||||
// [/RLVa:LF]
|
||||
}
|
||||
else
|
||||
{
|
||||
last_owner_name = LLTrans::getString("RetrievingData");
|
||||
LLAvatarNameCache::get(idLastOwner, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
|
||||
}
|
||||
// </edit>
|
||||
|
||||
row["id"] = obj->getObject()->getID();
|
||||
row["columns"][0]["column"] = "object_name";
|
||||
row["columns"][0]["type"] = "text";
|
||||
@@ -260,28 +317,25 @@ void LLFloaterInspect::refresh()
|
||||
{
|
||||
row["columns"][0]["value"] = obj->mName;
|
||||
}
|
||||
row["columns"][1]["column"] = "owner_name";
|
||||
row["columns"][1]["type"] = "text";
|
||||
row["columns"][1]["value"] = owner_name;
|
||||
// <edit>
|
||||
int i = 1;
|
||||
row["columns"][i]["column"] = "owner_name";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = owner_name;
|
||||
++i;
|
||||
row["columns"][i]["column"] = "last_owner_name";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = last_owner_name;
|
||||
++i;
|
||||
row["columns"][i]["column"] = "creator_name";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = creator_name;
|
||||
++i;
|
||||
row["columns"][i]["column"] = "face_num";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = llformat("%d",obj->getObject()->getNumFaces());
|
||||
++i;
|
||||
row["columns"][i]["column"] = "vertex_num";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = llformat("%d",obj->getObject()->getNumVertices());
|
||||
++i;
|
||||
row["columns"][2]["column"] = "last_owner_name";
|
||||
row["columns"][2]["type"] = "text";
|
||||
row["columns"][2]["value"] = last_owner_name;
|
||||
// </edit>
|
||||
row["columns"][3]["column"] = "creator_name";
|
||||
row["columns"][3]["type"] = "text";
|
||||
row["columns"][3]["value"] = creator_name;
|
||||
// <edit>
|
||||
row["columns"][4]["column"] = "face_num";
|
||||
row["columns"][4]["type"] = "text";
|
||||
row["columns"][4]["value"] = llformat("%d",obj->getObject()->getNumFaces());
|
||||
|
||||
row["columns"][5]["column"] = "vertex_num";
|
||||
row["columns"][5]["type"] = "text";
|
||||
row["columns"][5]["value"] = llformat("%d",obj->getObject()->getNumVertices());
|
||||
// inventory silliness
|
||||
S32 scripts,total_inv;
|
||||
std::map<LLUUID,std::pair<S32,S32> >::iterator itr = mInventoryNums.find(obj->getObject()->getID());
|
||||
@@ -301,18 +355,16 @@ void LLFloaterInspect::refresh()
|
||||
requestVOInventory();
|
||||
}
|
||||
}
|
||||
row["columns"][i]["column"] = "script_num";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = llformat("%d",scripts);
|
||||
++i;
|
||||
row["columns"][i]["column"] = "inv_num";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = llformat("%d",total_inv);
|
||||
++i;
|
||||
row["columns"][i]["column"] = "creation_date";
|
||||
row["columns"][i]["type"] = "text";
|
||||
row["columns"][i]["value"] = time;
|
||||
row["columns"][6]["column"] = "script_num";
|
||||
row["columns"][6]["type"] = "text";
|
||||
row["columns"][6]["value"] = llformat("%d",scripts);
|
||||
row["columns"][7]["column"] = "inv_num";
|
||||
row["columns"][7]["type"] = "text";
|
||||
row["columns"][7]["value"] = llformat("%d",total_inv);
|
||||
// </edit>
|
||||
row["columns"][8]["column"] = "creation_date";
|
||||
row["columns"][8]["type"] = "text";
|
||||
row["columns"][8]["value"] = time;
|
||||
mObjectList->addElement(row, ADD_TOP);
|
||||
}
|
||||
if(selected_index > -1 && mObjectList->getItemIndex(selected_uuid) == selected_index)
|
||||
@@ -323,26 +375,23 @@ void LLFloaterInspect::refresh()
|
||||
{
|
||||
mObjectList->selectNthItem(0);
|
||||
}
|
||||
onSelectObject(this, NULL);
|
||||
onSelectObject();
|
||||
mObjectList->setScrollPos(pos);
|
||||
}
|
||||
|
||||
// <edit>
|
||||
void LLFloaterInspect::inventoryChanged(LLViewerObject* viewer_object,
|
||||
LLInventoryObject::object_list_t* inv,
|
||||
S32,
|
||||
void* q_id)
|
||||
void LLFloaterInspect::inventoryChanged(LLViewerObject* viewer_object, LLInventoryObject::object_list_t* inv, S32, void* q_id)
|
||||
{
|
||||
S32 scripts = 0;
|
||||
std::vector<LLUUID>::iterator iter = std::find(mQueue.begin(),mQueue.end(),viewer_object->getID());
|
||||
if (viewer_object && inv && iter != mQueue.end() )
|
||||
{
|
||||
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
|
||||
S32 scripts = 0;
|
||||
LLInventoryObject::object_list_t::const_iterator end = inv->end();
|
||||
for ( ; it != end; ++it)
|
||||
for (LLInventoryObject::object_list_t::const_iterator it = inv->begin(); it != end; ++it)
|
||||
{
|
||||
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
|
||||
{
|
||||
scripts++;
|
||||
++scripts;
|
||||
}
|
||||
}
|
||||
mInventoryNums[viewer_object->getID()] = std::make_pair(scripts,inv->size());
|
||||
@@ -351,6 +400,7 @@ void LLFloaterInspect::inventoryChanged(LLViewerObject* viewer_object,
|
||||
}
|
||||
}
|
||||
// </edit>
|
||||
|
||||
void LLFloaterInspect::onFocusReceived()
|
||||
{
|
||||
LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance());
|
||||
@@ -359,13 +409,11 @@ void LLFloaterInspect::onFocusReceived()
|
||||
|
||||
void LLFloaterInspect::dirty()
|
||||
{
|
||||
if(sInstance)
|
||||
{
|
||||
// <edit>
|
||||
sInstance->mInventoryNums.clear();
|
||||
sInstance->mQueue.clear();
|
||||
sInstance->setDirty();
|
||||
}
|
||||
// <edit>
|
||||
mInventoryNums.clear();
|
||||
mQueue.clear();
|
||||
// </edit>
|
||||
setDirty();
|
||||
}
|
||||
|
||||
void LLFloaterInspect::draw()
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#ifndef LL_LLFLOATERINSPECT_H
|
||||
#define LL_LLFLOATERINSPECT_H
|
||||
|
||||
#include "llavatarname.h"
|
||||
#include "llfloater.h"
|
||||
#include "llvoinventorylistener.h"
|
||||
|
||||
@@ -43,41 +44,47 @@ class LLObjectSelection;
|
||||
class LLScrollListCtrl;
|
||||
class LLUICtrl;
|
||||
|
||||
class LLFloaterInspect : public LLFloater, public LLVOInventoryListener
|
||||
class LLFloaterInspect : public LLFloater, public LLSingleton<LLFloaterInspect>, public LLVOInventoryListener
|
||||
{
|
||||
friend class LLSingleton;
|
||||
public:
|
||||
virtual ~LLFloaterInspect(void);
|
||||
static void show(void* ignored = NULL);
|
||||
|
||||
static void showInstance();
|
||||
// static void show(void* ignored = NULL);
|
||||
void onOpen();
|
||||
virtual BOOL postBuild();
|
||||
static void dirty();
|
||||
static LLUUID getSelectedUUID();
|
||||
void dirty();
|
||||
LLUUID getSelectedUUID();
|
||||
virtual void draw();
|
||||
virtual void refresh();
|
||||
static BOOL isVisible();
|
||||
// static BOOL isVisible();
|
||||
virtual void onFocusReceived();
|
||||
static void onClickCreatorProfile(void* ctrl);
|
||||
static void onClickOwnerProfile(void* ctrl);
|
||||
static void onSelectObject(LLUICtrl* ctrl, void* user_data);
|
||||
void onClickCreatorProfile();
|
||||
void onClickOwnerProfile();
|
||||
void onSelectObject();
|
||||
|
||||
static void onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr);
|
||||
|
||||
LLScrollListCtrl* mObjectList;
|
||||
protected:
|
||||
// protected members
|
||||
LLFloaterInspect();
|
||||
void setDirty() { mDirty = TRUE; }
|
||||
bool mDirty;
|
||||
// <edit>
|
||||
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
|
||||
LLInventoryObject::object_list_t* inv,
|
||||
S32 serial_num,
|
||||
void* queue);
|
||||
/*virtual*/ void inventoryChanged(LLViewerObject* obj, LLInventoryObject::object_list_t* inv, S32, void* queue);
|
||||
// </edit>
|
||||
|
||||
private:
|
||||
LLFloaterInspect();
|
||||
virtual ~LLFloaterInspect(void);
|
||||
// static data
|
||||
static LLFloaterInspect* sInstance;
|
||||
// static LLFloaterInspect* sInstance;
|
||||
|
||||
LLSafeHandle<LLObjectSelection> mObjectSelection;
|
||||
// <edit>
|
||||
std::map<LLUUID,std::pair<S32,S32> > mInventoryNums; //<scripts,total>
|
||||
std::vector<LLUUID> mQueue;
|
||||
// </edit>
|
||||
};
|
||||
|
||||
#endif //LL_LLFLOATERINSPECT_H
|
||||
|
||||
@@ -3292,6 +3292,7 @@ void LLSelectMgr::selectDelete()
|
||||
return;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
S32 deleteable_count = 0;
|
||||
|
||||
BOOL locked_but_deleteable_object = FALSE;
|
||||
@@ -4069,7 +4070,6 @@ void LLSelectMgr::deselectUnused()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLSelectMgr::convertTransient()
|
||||
{
|
||||
LLObjectSelection::iterator node_it;
|
||||
@@ -4080,23 +4080,23 @@ void LLSelectMgr::convertTransient()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLSelectMgr::deselectAllIfTooFar()
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
|
||||
if ( (!mSelectedObjects->isEmpty()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_EDITOBJ))) )
|
||||
{
|
||||
struct NotTransientOrEditable : public LLSelectedNodeFunctor
|
||||
struct NotTransientOrFocusedMediaOrEditable : public LLSelectedNodeFunctor
|
||||
{
|
||||
bool apply(LLSelectNode* pNode)
|
||||
{
|
||||
const LLViewerObject* pObj = pNode->getObject();
|
||||
return (!pNode->isTransient()) && (pObj) && (!gRlvHandler.canEdit(pObj));
|
||||
}
|
||||
} f;
|
||||
if (mSelectedObjects->getFirstRootNode(&f, TRUE))
|
||||
deselectAll();
|
||||
}
|
||||
return (!pNode->isTransient()) && (pObj) && (!gRlvHandler.canEdit(pObj)) &&
|
||||
(pObj->getID() != LLViewerMediaFocus::getInstance()->getFocusedObjectID());
|
||||
}
|
||||
} f;
|
||||
if (mSelectedObjects->getFirstRootNode(&f, TRUE))
|
||||
deselectAll();
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (mSelectedObjects->isEmpty() || mSelectedObjects->mSelectType == SELECT_TYPE_HUD)
|
||||
@@ -4123,9 +4123,8 @@ void LLSelectMgr::deselectAllIfTooFar()
|
||||
}
|
||||
|
||||
LLVector3d selectionCenter = getSelectionCenterGlobal();
|
||||
|
||||
// if (gSavedSettings.getBOOL("LimitSelectDistance")
|
||||
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f
|
||||
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
|
||||
BOOL fRlvFartouch = gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH) && gFloaterTools->getVisible();
|
||||
if ( (gSavedSettings.getBOOL("LimitSelectDistance") || (fRlvFartouch) )
|
||||
// [/RLVa:KB]
|
||||
@@ -4135,7 +4134,7 @@ void LLSelectMgr::deselectAllIfTooFar()
|
||||
&& !selectionCenter.isExactlyZero())
|
||||
{
|
||||
// F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance");
|
||||
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f
|
||||
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
|
||||
F32 deselect_dist = (!fRlvFartouch) ? gSavedSettings.getF32("MaxSelectDistance") : 1.5f;
|
||||
// [/RLVa:KB]
|
||||
F32 deselect_dist_sq = deselect_dist * deselect_dist;
|
||||
@@ -4157,6 +4156,7 @@ void LLSelectMgr::deselectAllIfTooFar()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLSelectMgr::selectionSetObjectName(const std::string& name)
|
||||
{
|
||||
// we only work correctly if 1 object is selected.
|
||||
@@ -4334,6 +4334,7 @@ void LLSelectMgr::sendDelink()
|
||||
} sendfunc;
|
||||
getSelection()->applyToObjects(&sendfunc);
|
||||
|
||||
|
||||
// Delink needs to send individuals so you can unlink a single object from
|
||||
// a linked set.
|
||||
sendListToRegions(
|
||||
@@ -5047,6 +5048,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Iterate through nodes at end, since it can be on both the regular AND hover list
|
||||
struct f : public LLSelectedNodeFunctor
|
||||
{
|
||||
@@ -5059,7 +5061,11 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
|
||||
} func(id);
|
||||
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(&func);
|
||||
|
||||
if (node)
|
||||
if (!node)
|
||||
{
|
||||
llwarns << "Couldn't find object " << id << " selected." << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (node->mInventorySerial != inv_serial)
|
||||
{
|
||||
@@ -5570,13 +5576,18 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
|
||||
}
|
||||
if (mSelectedObjects->getNumNodes())
|
||||
{
|
||||
LLUUID inspect_item_id = LLFloaterInspect::getSelectedUUID();
|
||||
LLUUID inspect_item_id= LLUUID::null;
|
||||
LLFloaterInspect* inspect_instance = LLFloaterInspect::instanceExists() ? LLFloaterInspect::getInstance() : NULL;
|
||||
if(inspect_instance && inspect_instance->getVisible())
|
||||
{
|
||||
inspect_item_id = inspect_instance->getSelectedUUID();
|
||||
}
|
||||
|
||||
LLUUID focus_item_id = LLViewerMediaFocus::getInstance()->getFocusedObjectID();
|
||||
// <edit>
|
||||
//for (S32 pass = 0; pass < 2; pass++)
|
||||
//{
|
||||
// </edit>
|
||||
{
|
||||
for (LLObjectSelection::iterator iter = mSelectedObjects->begin();
|
||||
iter != mSelectedObjects->end(); iter++)
|
||||
{
|
||||
@@ -5612,9 +5623,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
|
||||
node->renderOneSilhouette(sSilhouetteChildColor);
|
||||
}
|
||||
}
|
||||
// <edit>
|
||||
//}
|
||||
// </edit>
|
||||
}
|
||||
}
|
||||
|
||||
if (mHighlightedObjects->getNumNodes())
|
||||
@@ -6271,7 +6280,6 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
|
||||
|
||||
// Update everyone who cares about the selection list
|
||||
void dialog_refresh_all()
|
||||
|
||||
{
|
||||
// This is the easiest place to fire the update signal, as it will
|
||||
// make cleaning up the functions below easier. Also, sometimes entities
|
||||
@@ -6300,7 +6308,12 @@ void dialog_refresh_all()
|
||||
}
|
||||
|
||||
LLFloaterProperties::dirtyAll();
|
||||
LLFloaterInspect::dirty();
|
||||
|
||||
LLFloaterInspect* inspect_instance = LLFloaterInspect::instanceExists() ? LLFloaterInspect::getInstance() : NULL;
|
||||
if(inspect_instance)
|
||||
{
|
||||
inspect_instance->dirty();
|
||||
}
|
||||
}
|
||||
|
||||
S32 get_family_count(LLViewerObject *parent)
|
||||
|
||||
@@ -2057,7 +2057,7 @@ class LLObjectInspect : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLFloaterInspect::show();
|
||||
LLFloaterInspect::showInstance();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,14 +16,22 @@
|
||||
<column label="Scripts" name="script_num" width="35" />
|
||||
<column label="Inv Total" name="inv_num" width="35" />
|
||||
<column label="Creation Date" name="creation_date" width="150" />
|
||||
<scroll_list.commit_callback
|
||||
function="Inspect.SelectObject" />
|
||||
</scroll_list>
|
||||
<button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
||||
label="See Owner Profile..." label_selected="" left="10"
|
||||
mouse_opaque="true" name="button owner"
|
||||
tool_tip="See profile of the highlighted object's owner" width="150" />
|
||||
tool_tip="See profile of the highlighted object's owner" width="150" >
|
||||
<button.commit_callback
|
||||
function="Inspect.OwnerProfile" />
|
||||
</button>
|
||||
<button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
||||
label="See Creator Profile..." label_selected="" left="170"
|
||||
mouse_opaque="true" name="button creator"
|
||||
tool_tip="See profile of the highlighted object's original creator"
|
||||
width="150" />
|
||||
width="150" >
|
||||
<button.commit_callback
|
||||
function="Inspect.CreatorProfile" />
|
||||
</button>
|
||||
</floater>
|
||||
|
||||
Reference in New Issue
Block a user