DD-71 : Implement a new item properties floater, calls the same code as the sidepanel in the inventory but with the back button hidden
parent
250f05861e
commit
cda6ac9e9b
|
|
@ -39,6 +39,7 @@
|
|||
#include "llnotificationhandler.h"
|
||||
#include "llnotificationmanager.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llsidepaneliteminfo.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
|
|
@ -629,7 +630,33 @@ void LLFloaterMarketplaceValidation::appendMessage(std::string& message)
|
|||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLFloaterItemProperties
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
LLFloaterItemProperties::LLFloaterItemProperties(const LLSD& key)
|
||||
: LLFloater(key)
|
||||
{
|
||||
}
|
||||
|
||||
LLFloaterItemProperties::~LLFloaterItemProperties()
|
||||
{
|
||||
}
|
||||
|
||||
BOOL LLFloaterItemProperties::postBuild()
|
||||
{
|
||||
// On the standalone properties floater, we have no need for a back button...
|
||||
LLSidepanelItemInfo* panel = getChild<LLSidepanelItemInfo>("item_panel");
|
||||
LLButton* back_btn = panel->getChild<LLButton>("back_btn");
|
||||
back_btn->setVisible(FALSE);
|
||||
|
||||
return LLFloater::postBuild();
|
||||
}
|
||||
|
||||
void LLFloaterItemProperties::onOpen(const LLSD& key)
|
||||
{
|
||||
// Tell the panel which item it needs to visualize
|
||||
LLSidepanelItemInfo* panel = getChild<LLSidepanelItemInfo>("item_panel");
|
||||
panel->setItemID(key["id"].asUUID());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -171,4 +171,20 @@ private:
|
|||
LLTextEditor* mEditor;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLFloaterItemProperties
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class LLFloaterItemProperties : public LLFloater
|
||||
{
|
||||
public:
|
||||
LLFloaterItemProperties(const LLSD& key);
|
||||
virtual ~LLFloaterItemProperties();
|
||||
|
||||
BOOL postBuild();
|
||||
virtual void onOpen(const LLSD& key);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATERMARKETPLACELISTINGS_H
|
||||
|
|
|
|||
|
|
@ -290,7 +290,15 @@ BOOL LLInvFVBridge::copyToClipboard() const
|
|||
// *TODO: make sure this does the right thing
|
||||
void LLInvFVBridge::showProperties()
|
||||
{
|
||||
show_item_profile(mUUID);
|
||||
LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, true);
|
||||
if (gInventory.isObjectDescendentOf(mUUID, marketplacelistings_id))
|
||||
{
|
||||
LLFloaterReg::showInstance("item_properties", LLSD().with("id",mUUID));
|
||||
}
|
||||
else
|
||||
{
|
||||
show_item_profile(mUUID);
|
||||
}
|
||||
|
||||
// Disable old properties floater; this is replaced by the sidepanel.
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIncomingCallDialog>);
|
||||
LLFloaterReg::add("inventory", "floater_my_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
|
||||
LLFloaterReg::add("inspect", "floater_inspect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInspect>);
|
||||
LLFloaterReg::add("item_properties", "floater_item_properties.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterItemProperties>);
|
||||
LLInspectAvatarUtil::registerFloater();
|
||||
LLInspectGroupUtil::registerFloater();
|
||||
LLInspectObjectUtil::registerFloater();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
legacy_header_height="18"
|
||||
height="570"
|
||||
layout="topleft"
|
||||
name="Item Properties"
|
||||
help_topic="item+properties"
|
||||
title="ITEM PROPERTIES"
|
||||
width="330">
|
||||
<panel
|
||||
follows="all"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
class="sidepanel_item_info"
|
||||
filename="sidepanel_item_info.xml"
|
||||
name="item_panel"
|
||||
top="20"
|
||||
label=""
|
||||
height="570"
|
||||
visible="true"
|
||||
width="330">
|
||||
</panel>
|
||||
</floater>
|
||||
Loading…
Reference in New Issue