summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterauction.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
commit9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch)
tree4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/newview/llfloaterauction.cpp
parent351ebe9fcb76f3b99c2957004bb8493a904869ee (diff)
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/newview/llfloaterauction.cpp')
-rw-r--r--indra/newview/llfloaterauction.cpp40
1 files changed, 16 insertions, 24 deletions
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index 747431fb19..e1974bba84 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -41,6 +41,7 @@
#include "llparcel.h"
#include "llvfile.h"
#include "llvfs.h"
+#include "llwindow.h"
#include "llagent.h"
#include "llcombobox.h"
@@ -69,41 +70,32 @@ void auction_tga_upload_done(const LLUUID& asset_id,
/// Class llfloaterauction
///----------------------------------------------------------------------------
-LLFloaterAuction* LLFloaterAuction::sInstance = NULL;
-
// Default constructor
-LLFloaterAuction::LLFloaterAuction() :
- LLFloater(std::string("floater_auction")),
+LLFloaterAuction::LLFloaterAuction(const LLSD& key)
+ : LLFloater(),
mParcelID(-1)
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_auction.xml");
-
- childSetValue("fence_check",
- LLSD( gSavedSettings.getBOOL("AuctionShowFence") ) );
- childSetCommitCallback("fence_check",
- LLSavedSettingsGlue::setBOOL, (void*)"AuctionShowFence");
-
- childSetAction("snapshot_btn", onClickSnapshot, this);
- childSetAction("ok_btn", onClickOK, this);
}
// Destroys the object
LLFloaterAuction::~LLFloaterAuction()
{
- sInstance = NULL;
}
-// static
-void LLFloaterAuction::show()
+BOOL LLFloaterAuction::postBuild()
{
- if(!sInstance)
- {
- sInstance = new LLFloaterAuction();
- sInstance->center();
- sInstance->setFocus(TRUE);
- }
- sInstance->initialize();
- sInstance->open(); /*Flawfinder: ignore*/
+ childSetValue("fence_check", LLSD( gSavedSettings.getBOOL("AuctionShowFence") ) );
+ getChild<LLUICtrl>("fence_check")->setCommitCallback(boost::bind(LLSavedSettingsGlue::setBOOL, _1, "AuctionShowFence"));
+
+ childSetAction("snapshot_btn", onClickSnapshot, this);
+ childSetAction("ok_btn", onClickOK, this);
+ return TRUE;
+}
+
+void LLFloaterAuction::onOpen(const LLSD& key)
+{
+ initialize();
}
void LLFloaterAuction::initialize()
@@ -259,7 +251,7 @@ void LLFloaterAuction::onClickOK(void* data)
self->mImage = NULL;
self->mParcelID = -1;
self->mParcelHost.invalidate();
- self->close();
+ self->closeFloater();
}