summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterreporter.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-07-01 08:47:50 -0700
committerRider Linden <rider@lindenlab.com>2015-07-01 08:47:50 -0700
commit9f2302bdffde0c82a0cfab730a250aaee9b7059c (patch)
tree942b1e99701fa70993515d706bdedc836157ef30 /indra/newview/llfloaterreporter.cpp
parentf25179f148415763e310b0dd7f91a37dcf4c58c0 (diff)
parent4aa64b99dbe6cafdccf0c25501feaef5ba3445c4 (diff)
Merge
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 ae330211db..5e028e6d43 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
@@ -225,6 +226,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 --
@@ -470,7 +495,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");
@@ -483,6 +508,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;
@@ -492,9 +534,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
@@ -854,6 +896,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");