Ejemplo n.º 1
0
void LLFloaterPostcard::missingSubjMsgAlertCallback(S32 option, void* data)
{
	if(data)
	{
		LLFloaterPostcard* self = static_cast<LLFloaterPostcard*>(data);
		if(0 == option)
		{
			// User clicked OK
			if((self->childGetValue("subject_form").asString()).empty())
			{
				// Stuff the subject back into the form.
				self->childSetValue("subject_form", self->childGetText("default_subject"));
			}

			if(!self->mHasFirstMsgFocus)
			{
				// The user never switched focus to the messagee window. 
				// Using the default string.
				self->childSetValue("msg_form", self->childGetText("default_message"));
			}

			self->sendPostcard();
		}
	}
}
Ejemplo n.º 2
0
// static
void LLFloaterPostcard::updateUserInfo(const std::string& email)
{
	for (instance_list_t::iterator iter = sInstances.begin();
		 iter != sInstances.end(); ++iter)
	{
		LLFloaterPostcard *instance = *iter;
		const std::string& text = instance->childGetValue("from_form").asString();
		if (text.empty())
		{
			// there's no text in this field yet, pre-populate
			instance->childSetValue("from_form", LLSD(email));
		}
	}
}
Ejemplo n.º 3
0
// static
void LLFloaterPostcard::updateUserInfo(const char *email)
{
	LLFloaterPostcard *instance;

	sInstances.resetList();
	while ((instance = sInstances.getNextData()))
	{
		const LLString& text = instance->childGetValue("from_form").asString();
		if (text.empty())
		{
			// there's no text in this field yet, pre-populate
			instance->childSetValue("from_form", LLSD(email));
		}
	}
}