summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterreporter.cpp
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2014-03-13 15:10:51 -0700
committerdolphin <dolphin@lindenlab.com>2014-03-13 15:10:51 -0700
commite10ae3ba960cf030582378c454937dd326fcd436 (patch)
tree9e081186dd2ba82f8c151992eb75c930de6a3040 /indra/newview/llfloaterreporter.cpp
parenta0b8c3e029be9265152cb8919ebe9c2bc328b766 (diff)
Added a Report Abuse button to the experience profile
Diffstat (limited to 'indra/newview/llfloaterreporter.cpp')
-rwxr-xr-xindra/newview/llfloaterreporter.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 35b63c5480..1b9fc8c6d0 100755
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -81,6 +81,7 @@
#include "llagentui.h"
#include "lltrans.h"
+#include "llexperiencecache.h"
const U32 INCLUDE_SCREENSHOT = 0x01 << 0;
@@ -227,6 +228,28 @@ void LLFloaterReporter::enableControls(BOOL enable)
getChildView("cancel_btn")->setEnabled(enable);
}
+void LLFloaterReporter::getExperienceInfo(const LLUUID& experience_id)
+{
+ mExperienceID = experience_id;
+
+ if (LLUUID::null != mExperienceID)
+ {
+ LLSD experience;
+ stringstream desc;
+ if(LLExperienceCache::get(mExperienceID, experience)){
+ setFromAvatarID(experience[LLExperienceCache::AGENT_ID]);
+ desc << "\nExperience 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 --
@@ -493,6 +516,19 @@ void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_
}
+
+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;
+
+ f->openFloater();
+}
+
+
// static
void LLFloaterReporter::showFromObject(const LLUUID& object_id)
{
@@ -854,6 +890,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");