コード例 #1
0
ファイル: fspanelprefs.cpp プロジェクト: gabeharms/firestorm
BOOL FSPanelPrefs::postBuild()
{
	// LGG's Color Beams
	refreshBeamLists();

	// Beam Colors
	getChild<LLUICtrl>("BeamColor_new")->setCommitCallback(boost::bind(&FSPanelPrefs::onBeamColorNew, this));
	getChild<LLUICtrl>("BeamColor_refresh")->setCommitCallback(boost::bind(&FSPanelPrefs::refreshBeamLists, this));
	getChild<LLUICtrl>("BeamColor_delete")->setCommitCallback(boost::bind(&FSPanelPrefs::onBeamColorDelete, this));

	// Beam Shapes
	getChild<LLUICtrl>("custom_beam_btn")->setCommitCallback(boost::bind(&FSPanelPrefs::onBeamNew, this));
	getChild<LLUICtrl>("refresh_beams")->setCommitCallback(boost::bind(&FSPanelPrefs::refreshBeamLists, this));
	getChild<LLUICtrl>("delete_beam")->setCommitCallback(boost::bind(&FSPanelPrefs::onBeamDelete, this));

	populateCloudCombo();
	
	LLTextureCtrl* tex_ctrl = getChild<LLTextureCtrl>("texture control");
	tex_ctrl->setCommitCallback(boost::bind(&FSPanelPrefs::onCommitTexture, this, _2));
	tex_ctrl->setDefaultImageAssetID(LLUUID(gSavedSettings.getString("DefaultObjectTexture")));

	mInvDropTarget = getChild<FSEmbeddedItemDropTarget>("embed_item");
	mInvDropTarget->setDADCallback(boost::bind(&FSPanelPrefs::onDADEmbeddedItem, this, _1));

	onCheckContactListColumnMode();

	return LLPanelPreference::postBuild();
}
コード例 #2
0
BOOL PanelPreferenceFirestorm::postBuild()
{
	
	// LGG's Color Beams
	refreshBeamLists();

	// Beam Colors
	getChild<LLUICtrl>("BeamColor_new")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::onBeamColor_new, this));
	getChild<LLUICtrl>("BeamColor_refresh")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::refreshBeamLists, this));
	getChild<LLUICtrl>("BeamColor_delete")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::onBeamColorDelete, this));

	// Beam Shapes
	getChild<LLUICtrl>("custom_beam_btn")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::onBeam_new, this));
	getChild<LLUICtrl>("refresh_beams")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::refreshBeamLists, this));
	getChild<LLUICtrl>("delete_beam")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::onBeamDelete, this));

	//WS: Set the combo_box vars and refresh/reload them
	m_UseLegacyClienttags = getChild<LLComboBox>("UseLegacyClienttags");		
	m_ColorClienttags = getChild<LLComboBox>("ColorClienttags");		
	m_ClientTagsVisibility = getChild<LLComboBox>("ClientTagsVisibility");	
	refreshTagCombos();

	// disable the prefs for features that are disabled by the global auto env being disabled
	getChild<LLUICtrl>("UseEnvironmentFromRegionAlways")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::onUseEnvironmentFromRegionAlways, this));
	// init the enable state of the related wl prefs
	onUseEnvironmentFromRegionAlways();

	return LLPanelPreference::postBuild();	
}
コード例 #3
0
ファイル: fspanelprefs.cpp プロジェクト: gabeharms/firestorm
void FSPanelPrefs::onBeamDelete()
{
	LLComboBox* comboBox = findChild<LLComboBox>("FSBeamShape_combo");

	if (comboBox)
	{
		std::string filename = comboBox->getValue().asString() + ".xml";
		std::string path_name1(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "beams", filename));
		std::string path_name2(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "beams", filename));
		
		if (gDirUtilp->fileExists(path_name1))
		{
			LLFile::remove(path_name1);
			gSavedSettings.setString("FSBeamShape", "");
		}
		if (gDirUtilp->fileExists(path_name2))
		{
			LLFile::remove(path_name2);
			gSavedSettings.setString("FSBeamShape", "");
		}
	}
	refreshBeamLists();
}
コード例 #4
0
void PanelPreferenceFirestorm::onBeamColorDelete()
{
	LLComboBox* comboBox = getChild<LLComboBox>("BeamColor_combo");

	if(comboBox != NULL) 
	{
		std::string filename = comboBox->getValue().asString()+".xml";
		std::string path_name1(gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS , "beamsColors", filename));
		std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "beamsColors", filename));

		if(gDirUtilp->fileExists(path_name1))
		{
			LLFile::remove(path_name1);
			gSavedSettings.setString("FSBeamColorFile","===OFF===");
		}
		if(gDirUtilp->fileExists(path_name2))
		{
			LLFile::remove(path_name2);
			gSavedSettings.setString("FSBeamColorFile","===OFF===");
		}
	}
	refreshBeamLists();
}