summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterreporter.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-07-01 14:40:05 +0300
committerandreykproductengine <akleshchev@productengine.com>2015-07-01 14:40:05 +0300
commit79ffc6569b8b0f4656c61f86b18e3bde22eb6dd5 (patch)
treeaa47a0b1f3f086ae884990107014ede35745fdd8 /indra/newview/llfloaterreporter.cpp
parent51aaed86dee3b45fa96fc7b4e8c1b9486c880b3b (diff)
parent4aa64b99dbe6cafdccf0c25501feaef5ba3445c4 (diff)
Merge from viewer-relese and become version 3.8.1
Diffstat (limited to 'indra/newview/llfloaterreporter.cpp')
-rwxr-xr-xindra/newview/llfloaterreporter.cpp49
1 files changed, 46 insertions, 3 deletions
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 21acfdbbd0..2f4d2a93b2 100755
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -81,6 +81,7 @@
#include "llagentui.h"
#include "lltrans.h"
+#include "llexperiencecache.h"
//-----------------------------------------------------------------------------
// Globals
@@ -207,6 +208,30 @@ void LLFloaterReporter::enableControls(BOOL enable)
getChildView("cancel_btn")->setEnabled(enable);
}
+void LLFloaterReporter::getExperienceInfo(const LLUUID& experience_id)
+{
+ mExperienceID = experience_id;
+
+ if (LLUUID::null != mExperienceID)
+ {
+ const LLSD& experience = LLExperienceCache::get(mExperienceID);
+ std::stringstream desc;
+
+ if(experience.isDefined())
+ {
+ setFromAvatarID(experience[LLExperienceCache::AGENT_ID]);
+ desc << "Experience id: " << mExperienceID;
+ }
+ else
+ {
+ desc << "Unable to retrieve details for id: "<< mExperienceID;
+ }
+
+ LLUICtrl* details = getChild<LLUICtrl>("details_edit");
+ details->setValue(desc.str());
+ }
+}
+
void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
{
// TODO --
@@ -452,7 +477,7 @@ void LLFloaterReporter::showFromMenu(EReportType report_type)
}
// static
-void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_name)
+void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_name, const LLUUID& experience_id)
{
LLFloaterReporter* f = LLFloaterReg::showTypedInstance<LLFloaterReporter>("reporter");
@@ -465,6 +490,23 @@ void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_
{
f->setFromAvatarID(object_id);
}
+ if(experience_id.notNull())
+ {
+ f->getExperienceInfo(experience_id);
+ }
+
+ // Need to deselect on close
+ f->mDeselectOnClose = TRUE;
+
+ f->openFloater();
+}
+
+
+
+void LLFloaterReporter::showFromExperience( const LLUUID& experience_id )
+{
+ LLFloaterReporter* f = LLFloaterReg::showTypedInstance<LLFloaterReporter>("reporter");
+ f->getExperienceInfo(experience_id);
// Need to deselect on close
f->mDeselectOnClose = TRUE;
@@ -474,9 +516,9 @@ void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_
// static
-void LLFloaterReporter::showFromObject(const LLUUID& object_id)
+void LLFloaterReporter::showFromObject(const LLUUID& object_id, const LLUUID& experience_id)
{
- show(object_id);
+ show(object_id, LLStringUtil::null, experience_id);
}
// static
@@ -836,6 +878,7 @@ void LLFloaterReporter::setPosBox(const LLVector3d &pos)
getChild<LLUICtrl>("pos_field")->setValue(pos_string);
}
+
// void LLFloaterReporter::setDescription(const std::string& description, LLMeanCollisionData *mcd)
// {
// LLFloaterReporter *self = LLFloaterReg::findTypedInstance<LLFloaterReporter>("reporter");