summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateropenobject.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-05-08 07:43:08 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-05-08 07:43:08 +0000
commita4000c3744e42fcbb638e742f3b63fa31a0dee15 (patch)
tree7f472c30e65bbfa04ee9bc06631a1af305cc31fb /indra/newview/llfloateropenobject.cpp
parent6c4cadbb04d633ad7b762058bdeba6e1f650dafd (diff)
merge trunk@116587 skinning-7@119389 -> viewer-2.0.0-skinning-7
Diffstat (limited to 'indra/newview/llfloateropenobject.cpp')
-rw-r--r--indra/newview/llfloateropenobject.cpp33
1 files changed, 14 insertions, 19 deletions
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index f4984df6d9..de6b8ad814 100644
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -58,24 +58,26 @@
LLFloaterOpenObject* LLFloaterOpenObject::sInstance = NULL;
LLFloaterOpenObject::LLFloaterOpenObject()
-: LLFloater(std::string("object_contents")),
+: LLFloater(),
mPanelInventory(NULL),
mDirty(TRUE)
{
- LLCallbackMap::map_t factory_map;
- factory_map["object_contents"] = LLCallbackMap(createPanelInventory, this);
- LLUICtrlFactory::getInstance()->buildFloater(this,"floater_openobject.xml",&factory_map);
-
- childSetAction("copy_to_inventory_button", onClickMoveToInventory, this);
- childSetAction("copy_and_wear_button", onClickMoveAndWear, this);
- childSetTextArg("object_name", "[DESC]", std::string("Object") ); // *Note: probably do not want to translate this
+ LLUICtrlFactory::getInstance()->buildFloater(this,"floater_openobject.xml");
}
LLFloaterOpenObject::~LLFloaterOpenObject()
{
sInstance = NULL;
}
-
+// virtual
+BOOL LLFloaterOpenObject::postBuild()
+{
+ childSetAction("copy_to_inventory_button", onClickMoveToInventory, this);
+ childSetAction("copy_and_wear_button", onClickMoveAndWear, this);
+ childSetTextArg("object_name", "[DESC]", std::string("Object") ); // *Note: probably do not want to translate this
+ mPanelInventory = getChild<LLPanelInventory>("object_contents");
+ return TRUE;
+}
void LLFloaterOpenObject::refresh()
{
mPanelInventory->refresh();
@@ -135,7 +137,7 @@ void LLFloaterOpenObject::show()
sInstance->center();
}
- sInstance->open(); /* Flawfinder: ignore */
+ sInstance->openFloater();
sInstance->setFocus(TRUE);
sInstance->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
@@ -215,7 +217,7 @@ void LLFloaterOpenObject::onClickMoveToInventory(void* data)
{
LLFloaterOpenObject* self = (LLFloaterOpenObject*)data;
self->moveToInventory(false);
- self->close();
+ self->closeFloater();
}
// static
@@ -223,13 +225,6 @@ void LLFloaterOpenObject::onClickMoveAndWear(void* data)
{
LLFloaterOpenObject* self = (LLFloaterOpenObject*)data;
self->moveToInventory(true);
- self->close();
+ self->closeFloater();
}
-//static
-void* LLFloaterOpenObject::createPanelInventory(void* data)
-{
- LLFloaterOpenObject* floater = (LLFloaterOpenObject*)data;
- floater->mPanelInventory = new LLPanelInventory(std::string("Object Contents"), LLRect());
- return floater->mPanelInventory;
-}