summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterreporter.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2013-03-13 08:46:59 +0000
committerDon Kjer <don@lindenlab.com>2013-03-13 08:46:59 +0000
commit662d67e3b5f1cbf5e894f0e4af37a31faacd67e3 (patch)
tree93af533d9c1e9c027c5abc56a5de4ee207591b23 /indra/newview/llfloaterreporter.cpp
parentf945415210f0e18c2c6d941fda6b7d45cb0f06f1 (diff)
parent0ebcdce82bffae18459ed541f05906f625ef47e2 (diff)
Merging LLCURL::Responder changes with CHUI changes. Fixed gcc 4.6 compile failures
Diffstat (limited to 'indra/newview/llfloaterreporter.cpp')
-rw-r--r--indra/newview/llfloaterreporter.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index f7fca90ebd..cc4199a758 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -103,7 +103,8 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key)
mPicking( FALSE),
mPosition(),
mCopyrightWarningSeen( FALSE ),
- mResourceDatap(new LLResourceData())
+ mResourceDatap(new LLResourceData()),
+ mAvatarNameCacheConnection()
{
}
@@ -184,6 +185,11 @@ BOOL LLFloaterReporter::postBuild()
// virtual
LLFloaterReporter::~LLFloaterReporter()
{
+ if (mAvatarNameCacheConnection.connected())
+ {
+ mAvatarNameCacheConnection.disconnect();
+ }
+
// child views automatically deleted
mObjectID = LLUUID::null;
@@ -282,10 +288,13 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
void LLFloaterReporter::onClickSelectAbuser()
{
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE );
+ LLView * button = findChild<LLButton>("select_abuser", TRUE);
+
+ LLFloater * root_floater = gFloaterView->getParentFloater(this);
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE, FALSE, root_floater->getName(), button);
if (picker)
{
- gFloaterView->getParentFloater(this)->addDependentFloater(picker);
+ root_floater->addDependentFloater(picker);
}
}
@@ -307,11 +316,17 @@ void LLFloaterReporter::setFromAvatarID(const LLUUID& avatar_id)
std::string avatar_link = LLSLURL("agent", mObjectID, "inspect").getSLURLString();
getChild<LLUICtrl>("owner_name")->setValue(avatar_link);
- LLAvatarNameCache::get(avatar_id, boost::bind(&LLFloaterReporter::onAvatarNameCache, this, _1, _2));
+ if (mAvatarNameCacheConnection.connected())
+ {
+ mAvatarNameCacheConnection.disconnect();
+ }
+ mAvatarNameCacheConnection = LLAvatarNameCache::get(avatar_id, boost::bind(&LLFloaterReporter::onAvatarNameCache, this, _1, _2));
}
void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name)
{
+ mAvatarNameCacheConnection.disconnect();
+
if (mObjectID == avatar_id)
{
mOwnerName = av_name.getCompleteName();
@@ -767,7 +782,7 @@ void LLFloaterReporter::takeScreenshot()
// store in the image list so it doesn't try to fetch from the server
LLPointer<LLViewerFetchedTexture> image_in_list =
- LLViewerTextureManager::getFetchedTexture(mResourceDatap->mAssetInfo.mUuid, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::FETCHED_TEXTURE);
+ LLViewerTextureManager::getFetchedTexture(mResourceDatap->mAssetInfo.mUuid);
image_in_list->createGLTexture(0, raw, 0, TRUE, LLGLTexture::OTHER);
// the texture picker then uses that texture