bool LLFloaterSidePanelContainer::canShowPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key)
{
	return mValidateSignal(floater_name, panel_name, key);
}
Example #2
0
//static
LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus) 
{
//	if( sBlockShowFloaters
//			// see EXT-7090
//			&& sAlwaysShowableList.find(name) == sAlwaysShowableList.end())
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.4.0a) | Modified: RLVa-1.2.0a
	if ( (sBlockShowFloaters && sAlwaysShowableList.find(name) == sAlwaysShowableList.end()) || (!mValidateSignal(name, key)) )
// [/RLVa:KB]
		return 0;//
	LLFloater* instance = getInstance(name, key); 
	if (instance) 
	{
		llinfos << "show instance for refreshing group ID: " << key.asString() << llendl;
		instance->openFloater(key);
		if (focus)
			instance->setFocus(TRUE);
	}
	return instance;
}
Example #3
0
//static
void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& key)
{
	//
	// Floaters controlled by the toolbar behave a bit differently from others.
	// Namely they have 3-4 states as defined in the design wiki page here:
	//   https://wiki.lindenlab.com/wiki/FUI_Button_states
	//
	// The basic idea is this:
	// * If the target floater is minimized, this button press will un-minimize it.
	// * Else if the target floater is closed open it.
	// * Else if the target floater does not have focus, give it focus.
	//       * Also, if it is not on top, bring it forward when focus is given.
	// * Else the target floater is open, close it.
	// 

	std::string name = sdname.asString();
	LLFloater* instance = getInstance(name, key); 

	if (!instance)
	{
		lldebugs << "Unable to get instance of floater '" << name << "'" << llendl;
	}
	else if (instance->isMinimized())
	{
		instance->setMinimized(FALSE);
		instance->setVisibleAndFrontmost();
	}
	else if (!instance->isShown())
	{
// [RLVa:KB] - Checked: 2011-12-17 (RLVa-1.4.5a) | Added: RLVa-1.4.5a
		// [See LLFloaterReg::showInstance()]
		if ( ((!sBlockShowFloaters) || (sAlwaysShowableList.find(name) != sAlwaysShowableList.end())) && (mValidateSignal(name, key)) )
		{
			instance->openFloater(key);
			instance->setVisibleAndFrontmost();
		}
// [/RLVa:KB]
//		instance->openFloater(key);
//		instance->setVisibleAndFrontmost();
	}
// [SL:KB] - Patch: Chat-NearbyChatBar | Checked: 2011-11-23 (Catznip-3.2.0b) | Modified: Catznip-3.2.0b
	else
	{
		// Give focus to, or close, the host rather than the floater when hosted
		LLFloater* floaterp = (!instance->getHost()) ? instance : instance->getHost();
		if (!floaterp->isFrontmost() || !floaterp->hasFocus())
			floaterp->setVisibleAndFrontmost();
		else
			floaterp->closeFloater();
	}
// [/SL:KB]
//	else if (!instance->isFrontmost())
//	{
//		instance->setVisibleAndFrontmost();
//	}
//	else
//	{
//		instance->closeFloater();
//	}
}
Example #4
0
// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
//static
bool LLFloaterReg::canShowInstance(const std::string& name, const LLSD& key)
{
	return mValidateSignal(name, key);
}