LLFloaterAvatarInfo::LLFloaterAvatarInfo(const std::string& name, const LLRect &rect, const LLUUID &avatar_id)
:	LLPreview(name, rect, FLOATER_TITLE, LLUUID::null, LLUUID::null),
	mAvatarID( avatar_id ),
	mSuggestedOnlineStatus(ONLINE_STATUS_NO)
{
	setAutoFocus(TRUE);

	LLCallbackMap::map_t factory_map;

	factory_map["Panel Avatar"] = LLCallbackMap(createPanelAvatar, this);
	
	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_profile.xml", &factory_map);

	if(mPanelAvatarp)
	{
		mPanelAvatarp->selectTab(0);
	}

	gAvatarInfoInstances.addData(avatar_id, this); // must be done before callback below is called.
	//gCacheName->get(avatar_id, FALSE, callbackLoadAvatarName);
	LLAvatarNameCache::get(avatar_id, boost::bind(&LLFloaterAvatarInfo::callbackLoadAvatarName, _1, _2));
}
示例#2
0
LLFloaterAvatarInfo::LLFloaterAvatarInfo(const std::string& name, const LLRect &rect, const LLUUID &avatar_id)
:	LLPreview(name, rect, FLOATER_TITLE, LLUUID::null, LLUUID::null),
	mAvatarID( avatar_id ),
	mSuggestedOnlineStatus(ONLINE_STATUS_NO)
{
	mAutoFocus = TRUE;

	LLCallbackMap::map_t factory_map;

	factory_map["Panel Avatar"] = LLCallbackMap(createPanelAvatar, this);
	
	gUICtrlFactory->buildFloater(this, "floater_profile.xml", &factory_map);


	if(mPanelAvatarp)
	{
		mPanelAvatarp->selectTab(0);
	}

	gAvatarInfoInstances.addData(avatar_id, this);

	
}
示例#3
0
void LLPanelDirBrowser::setupNewSearch()
{
	LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results");

	gDirBrowserInstances.removeData(mSearchID);
	// Make a new query ID
	mSearchID.generate();

	gDirBrowserInstances.addData(mSearchID, this);

	// ready the list for results
	list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	list->addCommentText(std::string("Searching...")); // *TODO: Translate
	childDisable("results");

	mResultsReceived = 0;
	mHaveSearchResults = FALSE;

	// Set all panels to be invisible
	mFloaterDirectory->hideAllDetailPanels();

	updateResultCount();
}
void LLPanelDirBrowser::setupNewSearch()
{
	gDirBrowserInstances.removeData(mSearchID);
	// Make a new query ID
	mSearchID.generate();

	gDirBrowserInstances.addData(mSearchID, this);

	// ready the list for results
	if (LLScrollListCtrl* list = findChild<LLScrollListCtrl>("results"))
	{
		list->operateOnAll(LLCtrlListInterface::OP_DELETE);
		list->setCommentText(LLTrans::getString("Searching"));
		list->setEnabled(false);
	}

	mResultsReceived = 0;
	mHaveSearchResults = FALSE;

	// Set all panels to be invisible
	mFloaterDirectory->hideAllDetailPanels();

	updateResultCount();
}
//-----------------------------------------------------------------------------
// Member functions
//-----------------------------------------------------------------------------
LLFloaterReporter::LLFloaterReporter(
	const std::string& name,
	const LLRect& rect, 
	const std::string& title, 
	EReportType report_type)
	:	
	LLFloater(name, rect, title),
	mReportType(report_type),
	mObjectID(),
	mScreenID(),
	mAbuserID(),
	mDeselectOnClose( FALSE ),
	mPicking( FALSE), 
	mPosition(),
	mCopyrightWarningSeen( FALSE ),
	mResourceDatap(new LLResourceData())
{
	if (report_type == BUG_REPORT)
	{
		LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_bug.xml");
	}
	else
	{
		LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_abuse.xml");
	}

	childSetText("abuse_location_edit", gAgent.getSLURL() );

// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0a
	if (rlv_handler_t::isEnabled())
	{
		// Can't filter these since they get sent as part of the report so just hide them instead
		if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
		{
			childSetVisible("abuse_location_edit", false);
			childSetVisible("pos_field", false);
		}
		if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
		{
			childSetVisible("owner_name", false);
			childSetVisible("abuser_name_edit", false);
		}
	}
// [/RLVa:KB]

	LLButton* pick_btn = getChild<LLButton>("pick_btn");
	if (pick_btn)
	{
		// XUI: Why aren't these in viewerart.ini?
		pick_btn->setImages( std::string("UIImgFaceUUID"),
							std::string("UIImgFaceSelectedUUID") );
		childSetAction("pick_btn", onClickObjPicker, this);
	}

	if (report_type != BUG_REPORT)
	{
		// abuser name is selected from a list
		LLLineEditor* le = getChild<LLLineEditor>("abuser_name_edit");
		le->setEnabled( FALSE );
	}

	childSetAction("select_abuser", onClickSelectAbuser, this);

	childSetAction("send_btn", onClickSend, this);
	childSetAction("cancel_btn", onClickCancel, this);

	enableControls(TRUE);

	// convert the position to a string
	LLVector3d pos = gAgent.getPositionGlobal();
	LLViewerRegion *regionp = gAgent.getRegion();
	if (regionp)
	{
		pos -= regionp->getOriginGlobal();
	}
	setPosBox(pos);

	gReporterInstances.addData(report_type, this);

	// Take a screenshot, but don't draw this floater.
	setVisible(FALSE);
	takeScreenshot();
	setVisible(TRUE);

	// Default text to be blank
	childSetText("object_name", LLStringUtil::null);
	childSetText("owner_name", LLStringUtil::null);

	childSetFocus("summary_edit");

	mDefaultSummary = childGetText("details_edit");

	gDialogVisible = TRUE;

	// only request details for abuse reports (not BUG reports)
	if (report_type != BUG_REPORT)
	{
		// send a message and ask for information about this region - 
		// result comes back in processRegionInfo(..)
		LLMessageSystem* msg = gMessageSystem;
		msg->newMessage("RequestRegionInfo");
		msg->nextBlock("AgentData");
		msg->addUUID("AgentID", gAgent.getID());
		msg->addUUID("SessionID", gAgent.getSessionID());
		gAgent.sendReliableMessage();
	};
}