Ejemplo n.º 1
0
void LLViewChildren::setText(
	const std::string& id, const std::string& text, bool visible)
{
	LLTextBox* child = mParent.getChild<LLTextBox>(id);
	if (child)
	{
		child->setVisible(visible);
		child->setText(text);
	}
}
Ejemplo n.º 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);
}
Ejemplo n.º 3
0
void LLFloaterBuyCurrencyUI::updateUI()
{
	bool hasError = mManager.hasError();
	mManager.updateUI(!hasError && !mManager.buying());

	// hide most widgets - we'll turn them on as needed next
	getChildView("info_buying")->setVisible(FALSE);
	getChildView("info_cannot_buy")->setVisible(FALSE);
	getChildView("info_need_more")->setVisible(FALSE);	
	getChildView("purchase_warning_repurchase")->setVisible(FALSE);
	getChildView("purchase_warning_notenough")->setVisible(FALSE);
	getChildView("contacting")->setVisible(FALSE);
	getChildView("buy_action")->setVisible(FALSE);

	if (hasError)
	{
		// display an error from the server
		getChildView("normal_background")->setVisible(FALSE);
		getChildView("error_background")->setVisible(TRUE);
		getChildView("info_cannot_buy")->setVisible(TRUE);
		getChildView("cannot_buy_message")->setVisible(TRUE);
		getChildView("balance_label")->setVisible(FALSE);
		getChildView("balance_amount")->setVisible(FALSE);
		getChildView("buying_label")->setVisible(FALSE);
		getChildView("buying_amount")->setVisible(FALSE);
		getChildView("total_label")->setVisible(FALSE);
		getChildView("total_amount")->setVisible(FALSE);

        LLTextBox* message = getChild<LLTextBox>("cannot_buy_message");
        if (message)
		{
			message->setText(mManager.errorMessage());
		}

		getChildView("error_web")->setVisible( !mManager.errorURI().empty());
	}
	else
	{
		// display the main Buy L$ interface
		getChildView("normal_background")->setVisible(TRUE);
		getChildView("error_background")->setVisible(FALSE);
		getChildView("cannot_buy_message")->setVisible(FALSE);
		getChildView("error_web")->setVisible(FALSE);

		if (mHasTarget)
		{
			getChildView("info_need_more")->setVisible(TRUE);
		}
		else
		{
			getChildView("info_buying")->setVisible(TRUE);
		}

		if (mManager.buying())
		{
			getChildView("contacting")->setVisible( true);
		}
		else
		{
			if (mHasTarget)
			{
				getChildView("buy_action")->setVisible( true);
				getChild<LLUICtrl>("buy_action")->setTextArg("[ACTION]", mTargetName);
			}
		}
		
		S32 balance = gStatusBar->getBalance();
		getChildView("balance_label")->setVisible(TRUE);
		getChildView("balance_amount")->setVisible(TRUE);
		getChild<LLUICtrl>("balance_amount")->setTextArg("[AMT]", llformat("%d", balance));
		
		S32 buying = mManager.getAmount();
		getChildView("buying_label")->setVisible(TRUE);
		getChildView("buying_amount")->setVisible(TRUE);
		getChild<LLUICtrl>("buying_amount")->setTextArg("[AMT]", llformat("%d", buying));
		
		S32 total = balance + buying;
		getChildView("total_label")->setVisible(TRUE);
		getChildView("total_amount")->setVisible(TRUE);
		getChild<LLUICtrl>("total_amount")->setTextArg("[AMT]", llformat("%d", total));

		if (mHasTarget)
		{
			if (total >= mTargetPrice)
			{
				getChildView("purchase_warning_repurchase")->setVisible( true);
			}
			else
			{
				getChildView("purchase_warning_notenough")->setVisible( true);
			}
		}
	}

	getChildView("getting_data")->setVisible( !mManager.canBuy() && !hasError);
}
Ejemplo n.º 4
0
void LLFloaterBuyLandUI::updateFloaterEstateOwnerName(const std::string& name)
{
	LLTextBox* box = getChild<LLTextBox>("estate_owner_text");
	if (box) box->setText(name);
}
Ejemplo n.º 5
0
void LLFloaterBuyLandUI::updateFloaterLastModified(const std::string& text)
{
	LLTextBox* editor = getChild<LLTextBox>("covenant_timestamp_text");
	if (editor) editor->setText(text);
}
Ejemplo n.º 6
0
void LLFloaterBuyLandUI::updateFloaterEstateName(const std::string& name)
{
	LLTextBox* box = getChild<LLTextBox>("estate_name_text");
	box->setText(name);
	box->setToolTip(name);
}