// static
LLFloaterClassifiedInfo* LLFloaterClassifiedInfo::show(const LLUUID &classified_id)
{
	if (classified_id.isNull())
	{
		return NULL;
	}

	LLFloaterClassifiedInfo *floater;
	if (gClassifiedInfoInstances.checkData(classified_id))
	{
		// ...bring that window to front
		floater = gClassifiedInfoInstances.getData(classified_id);
		floater->open();	/*Flawfinder: ignore*/
		floater->setFrontmost(true);
	}
	else
	{
		floater =  new LLFloaterClassifiedInfo("calssifiedinfo", classified_id );
		floater->center();
		floater->open();	/*Flawfinder: ignore*/
		floater->displayClassifiedInfo(classified_id);
		floater->setFrontmost(true);
	}

	return floater;
}
// static
void LLFloaterAvatarInfo::showFromProfile(const LLUUID &avatar_id, LLRect rect)
{
	if (avatar_id.isNull())
	{
		return;
	}

	LLFloaterAvatarInfo *floater;
	if (gAvatarInfoInstances.checkData(avatar_id))
	{
		// ...bring that window to front
		floater = gAvatarInfoInstances.getData(avatar_id);
	}
	else
	{
		floater =  new LLFloaterAvatarInfo("avatarinfo", FAI_RECT, 
										   avatar_id);
		floater->translate(rect.mLeft - floater->getRect().mLeft + 16,
						   rect.mTop - floater->getRect().mTop - 16);
		floater->mPanelAvatarp->setAvatarID(avatar_id, LLStringUtil::null, ONLINE_STATUS_NO);
	}
	if (floater)
	{
		floater->open();
	}
}
// static
LLFloaterParcelInfo* LLFloaterParcelInfo::show(const LLUUID &parcel_id)
{
	if (parcel_id.isNull())
	{
		return NULL;
	}

	LLFloaterParcelInfo *floater;
	if (gPlaceInfoInstances.checkData(parcel_id))
	{
		// ...bring that window to front
		floater = gPlaceInfoInstances.getData(parcel_id);
		floater->open();	/*Flawfinder: ignore*/
		floater->setFrontmost(true);
	}
	else
	{
		floater =  new LLFloaterParcelInfo("parcelinfo", parcel_id );
		floater->center();
		floater->open();	/*Flawfinder: ignore*/
		floater->displayParcelInfo(parcel_id);
		floater->setFrontmost(true);
	}

	return floater;
}
// static 
LLFloaterReporter* LLFloaterReporter::getReporter(EReportType report_type)
{
	LLFloaterReporter *self = NULL;
	if (gReporterInstances.checkData(report_type))
	{
		// ...bring that window to front
		self = gReporterInstances.getData(report_type);
	}
	return self;
}
// static
void LLFloaterReporter::showFromMenu(EReportType report_type)
{
	if (gReporterInstances.checkData(report_type))
	{
		// ...bring that window to front
		LLFloaterReporter *f = gReporterInstances.getData(report_type);
		f->open();		/* Flawfinder: ignore */
	}
	else
	{
		LLFloaterReporter *f;
		if (BUG_REPORT == report_type)
		{
			f = LLFloaterReporter::createNewBugReporter();
		}
		else if (COMPLAINT_REPORT == report_type)
		{
			f = LLFloaterReporter::createNewAbuseReporter();
		}
		else
		{
			llwarns << "Unknown LLViewerReporter type : " << report_type << llendl;
			return;
		}

		f->center();

		if (report_type == BUG_REPORT)
		{
 			LLNotifications::instance().add("HelpReportBug");
		}
		else
		{
			// popup for abuse reports is triggered elsewhere
		}

		// grab the user's name
		std::string fullname;
		gAgent.buildFullname(fullname);
		f->childSetText("reporter_field", fullname);
	}
}
示例#6
0
// static
LLFloaterEventInfo* LLFloaterEventInfo::show(const U32 event_id)
{
	LLFloaterEventInfo *floater;
	if (gEventInfoInstances.checkData(event_id))
	{
		// ...bring that window to front
		floater = gEventInfoInstances.getData(event_id);
		floater->open();	/*Flawfinder: ignore*/
		floater->setFrontmost(true);
	}
	else
	{
		floater =  new LLFloaterEventInfo("eventinfo", event_id );
		floater->center();
		floater->open();	/*Flawfinder: ignore*/
		floater->displayEventInfo(event_id);
		floater->setFrontmost(true);
	}

	return floater;
}
// static
LLFloaterAvatarInfo* LLFloaterAvatarInfo::show(const LLUUID &avatar_id)
{
	if (avatar_id.isNull())
	{
		return NULL;
	}

	LLFloaterAvatarInfo *floater;
	if (gAvatarInfoInstances.checkData(avatar_id))
	{
		// ...bring that window to front
		floater = gAvatarInfoInstances.getData(avatar_id);
		floater->open();	/*Flawfinder: ignore*/
	}
	else
	{
		floater =  new LLFloaterAvatarInfo("avatarinfo", FAI_RECT, 
			avatar_id );
		floater->center();
		floater->open();	/*Flawfinder: ignore*/
	}
	return floater;
}