Beispiel #1
0
// static
void LLPanelNetwork::onClickSetDiskCache(void* user_data)
{
	LLPanelNetwork* self = (LLPanelNetwork*)user_data;

	std::string cur_name(gSavedSettings.getString("CacheLocation"));
	std::string proposed_name(cur_name);
	
	LLDirPicker& picker = LLDirPicker::instance();
	if (! picker.getDir(&proposed_name ) )
	{
		return; //Canceled!
	}

	std::string dir_name = picker.getDirName();
	if (!dir_name.empty() && dir_name != cur_name)
	{
		self->childSetText("disk_cache_location", dir_name);
		LLNotifications::instance().add("CacheWillBeMoved");
		gSavedSettings.setString("NewCacheLocation", dir_name);
	}
	else
	{
		std::string cache_location = gDirUtilp->getCacheDir();
		self->childSetText("disk_cache_location", cache_location);
	}
}
Beispiel #2
0
//static
void LLPanelNetwork::onCommitSpeedRezCheckBox(LLUICtrl* ctrl, void* user_data)
{
	LLPanelNetwork* self = (LLPanelNetwork*)user_data;
	if (self)
	{
		self->refresh();
	}
}
Beispiel #3
0
// static
void LLPanelNetwork::onCommitPort(LLUICtrl* ctrl, void* data)
{
  LLPanelNetwork* self = (LLPanelNetwork*)data;
  LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl;

  if (!self || !check) return;
  self->childSetEnabled("connection_port", check->get());
  LLNotifications::instance().add("ChangeConnectionPort");
}
Beispiel #4
0
// static
void LLPanelNetwork::onCommitPort(LLUICtrl* ctrl, void* data)
{
  LLPanelNetwork* self = (LLPanelNetwork*)data;
  LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl;

  if (!self || !check) return;
  self->childSetEnabled("connection_port", check->get());
  gViewerWindow->alertXml("ChangeConnectionPort");
}
Beispiel #5
0
// static
void LLPanelNetwork::onCommitWebProxyEnabled(LLUICtrl* ctrl, void* data)
{
	LLPanelNetwork* self = (LLPanelNetwork*)data;
	LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl;

	if (!self || !check) return;
	self->childSetEnabled("web_proxy_editor", check->get());
	self->childSetEnabled("web_proxy_port", check->get());
	self->childSetEnabled("proxy_text_label", check->get());
}
Beispiel #6
0
// static
void LLPanelNetwork::onCommitSocks5ProxyEnabled(LLUICtrl* ctrl, void* data)
{
	LLPanelNetwork* self  = (LLPanelNetwork*)data;
	LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl;

	if (!self || !check) return;

	sSocksSettingsChanged = true;
	
	updateProxyEnabled(self, check->get(), self->childGetValue("socks5_auth"));
}
Beispiel #7
0
// static
void LLPanelNetwork::onClickResetDiskCache(void* user_data)
{
 	LLPanelNetwork* self = (LLPanelNetwork*)user_data;
	if (!gSavedSettings.getString("CacheLocation").empty())
	{
		gSavedSettings.setString("NewCacheLocation", "");
		LLNotifications::instance().add("CacheWillBeMoved");
	}
	std::string cache_location = gDirUtilp->getCacheDir(true);
	self->childSetText("disk_cache_location", cache_location);
}
Beispiel #8
0
// static
void LLPanelNetwork::onClickResetCache(void* user_data)
{
 	LLPanelNetwork* self = (LLPanelNetwork*)user_data;
	if (!gSavedSettings.getString("CacheLocation").empty())
	{
		gSavedSettings.setString("NewCacheLocation", "");
		gViewerWindow->alertXml("CacheWillBeMoved");
	}
	LLString cache_location = gDirUtilp->getCacheDir(true);
	self->childSetText("cache_location", cache_location);
}
Beispiel #9
0
// static
void LLPanelNetwork::onClickSearchDefault(void* user_data)
{
	LLPanelNetwork* self = (LLPanelNetwork*)user_data;
	LLControlVariable* controlp = 
		(gHippoGridManager->getConnectedGrid()->isSecondLife()) 
		? 
		gSavedSettings.getControl("SearchURLQuery")
		:
		gSavedSettings.getControl("SearchURLQueryOpenSim");

	if (controlp)
	{
		self->childSetValue("world_search_editor",controlp->getDefault().asString()) ;
	}
	else
	{
		llwarns << "SearchURLQuery or SearchURLQueryOpenSim missing from settings.xml - thats bad!" << llendl;
	}
}
// static
void LLPanelNetwork::onClickSetSoundCache(void* user_data)
{
	LLPanelNetwork* self = (LLPanelNetwork*)user_data;

	std::string cur_name(gSavedSettings.getString("Emeraldmm_sndcacheloc"));
	std::string proposed_name(cur_name);
	
	LLDirPicker& picker = LLDirPicker::instance();
	if (! picker.getDir(&proposed_name ) )
	{
		return; //Canceled!
	}

	std::string dir_name = picker.getDirName();
	if (!dir_name.empty() && dir_name != cur_name)
	{
		self->childSetText("sound_cache_location", dir_name);
		gSavedSettings.setString("Emeraldmm_sndcacheloc", dir_name);
	}
	else
	{
		self->childSetText("sound_cache_location",cur_name);
	}
}
Beispiel #11
0
// static
void LLPanelNetwork::onClickSearchClear(void* user_data)
{
	LLPanelNetwork* self = (LLPanelNetwork*)user_data;
	self->childSetValue("world_search_editor","") ;
}
// static
void LLPanelNetwork::onClickResetSoundCache(void* user_data)
{
	LLPanelNetwork* self = (LLPanelNetwork*)user_data;
 	gSavedSettings.setString("Emeraldmm_sndcacheloc","");
	self->childSetText("sound_cache_location",std::string("None"));
}