示例#1
0
void LLInspectObject::updateSecureBrowsing()
{
	bool is_secure_browsing = false;
	
	if(mMediaImpl.notNull() 
	   && mMediaImpl->hasMedia())
	{
		LLPluginClassMedia* media_plugin = NULL;
		std::string current_url = "";
		media_plugin = mMediaImpl->getMediaPlugin();
		if(media_plugin)
		{
			if(media_plugin->pluginSupportsMediaTime())
			{
				current_url = mMediaImpl->getMediaURL();
			}
			else
			{
				current_url =  media_plugin->getLocation();
			}
		}
		
		std::string prefix =  std::string("https://");
		std::string test_prefix = current_url.substr(0, prefix.length());
		LLStringUtil::toLower(test_prefix);	
		if(test_prefix == prefix)
		{
			is_secure_browsing = true;
		}
	}
	getChild<LLUICtrl>("secure_browsing")->setVisible(is_secure_browsing);
}
示例#2
0
void LLInspectObject::updateMediaCurrentURL()
{	
	if(!mMediaEntry)
		return;
	LLTextBox* textbox = getChild<LLTextBox>("object_media_url");
	std::string media_url = "";
	textbox->setValue(media_url);
	textbox->setToolTip(media_url);
	LLStringUtil::format_map_t args;
	
	if(mMediaImpl.notNull() && mMediaImpl->hasMedia())
	{
		
		LLPluginClassMedia* media_plugin = NULL;
		media_plugin = mMediaImpl->getMediaPlugin();
		if(media_plugin)
		{
			if(media_plugin->pluginSupportsMediaTime())
			{
				args["[CurrentURL]"] =  mMediaImpl->getMediaURL();
			}
			else
			{
				args["[CurrentURL]"] =  media_plugin->getLocation();
			}
			media_url = LLTrans::getString("CurrentURL", args);

		}
	}
	else if(mMediaEntry->getCurrentURL() != "")
	{
		args["[CurrentURL]"] = mMediaEntry->getCurrentURL();
		media_url = LLTrans::getString("CurrentURL", args);
	}

	textbox->setText(media_url);
	textbox->setToolTip(media_url);
}