summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterreporter.cpp
diff options
context:
space:
mode:
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");