Пример #1
0
static void cacheNameUpdateRefreshesBuyLand(const LLUUID& id, const std::string& full_name, bool is_group)
{
	LLFloaterBuyLandUI* ui = LLFloaterBuyLandUI::soleInstance(false);
	if (ui)
	{
		ui->updateNames();
	}
}
// static
void LLFloaterBuyLand::updateEstateOwnerName(const std::string& name)
{
	LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::instanceExists() ? LLFloaterBuyLandUI::getInstance() : NULL;
	if (floater)
	{
		floater->updateFloaterEstateOwnerName(name);
	}
}
Пример #3
0
// static
void LLFloaterBuyLand::updateLastModified(const std::string& text)
{
	LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::soleInstance(FALSE);
	if (floater)
	{
		floater->updateLastModified(text);
	}
}
Пример #4
0
// static
void LLFloaterBuyLandUI::onChangeAgreeCovenant(LLUICtrl* ctrl, void* user_data)
{
	LLFloaterBuyLandUI* self = (LLFloaterBuyLandUI*)user_data;
	if(self)
	{
		self->refreshUI();
	}
}
// static
void LLFloaterBuyLand::updateCovenantText(const std::string& string, const LLUUID &asset_id)
{
	LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::instanceExists() ? LLFloaterBuyLandUI::getInstance() : NULL;
	if (floater)
	{
		floater->updateFloaterCovenantText(string, asset_id);
	}
}
Пример #6
0
// static
void LLFloaterBuyLand::updateLastModified(const std::string& text)
{
	LLFloaterBuyLandUI* floater = LLFloaterReg::findTypedInstance<LLFloaterBuyLandUI>("buy_land");
	if (floater)
	{
		floater->updateFloaterLastModified(text);
	}
}
Пример #7
0
// static
void LLFloaterBuyLand::updateEstateOwnerName(const std::string& name)
{
	LLFloaterBuyLandUI* floater = LLFloaterReg::findTypedInstance<LLFloaterBuyLandUI>("buy_land");
	if (floater)
	{
		floater->updateFloaterEstateOwnerName(name);
	}
}
Пример #8
0
// static
void LLFloaterBuyLand::updateEstateOwnerName(const std::string& name)
{
	LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::soleInstance(FALSE);
	if (floater)
	{
		floater->updateEstateOwnerName(name);
	}
}
Пример #9
0
// static
void LLFloaterBuyLand::updateCovenantText(const std::string& string, const LLUUID &asset_id)
{
	LLFloaterBuyLandUI* floater = LLFloaterReg::findTypedInstance<LLFloaterBuyLandUI>("buy_land");
	if (floater)
	{
		floater->updateFloaterCovenantText(string, asset_id);
	}
}
Пример #10
0
// static
void LLFloaterBuyLand::updateCovenantText(const std::string& string, const LLUUID &asset_id)
{
	LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::soleInstance(FALSE);
	if (floater)
	{
		floater->updateCovenantText(string, asset_id);
	}
}
// static
void LLFloaterBuyLand::updateLastModified(const std::string& text)
{
	LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::instanceExists() ? LLFloaterBuyLandUI::getInstance() : NULL;
	if (floater)
	{
		floater->updateFloaterLastModified(text);
	}
}
Пример #12
0
// static
BOOL LLFloaterBuyLand::isOpen()
{
	LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::soleInstance(FALSE);
	if (floater)
	{
		return floater->getVisible();
	}
	return FALSE;
}
Пример #13
0
static void cacheNameUpdateRefreshesBuyLand(const LLUUID&,
	const std::string&, const std::string&, BOOL, void* data)
{
	LLFloaterBuyLandUI* ui = LLFloaterBuyLandUI::soleInstance(false);
	if (ui)
	{
		ui->updateNames();
	}
}
Пример #14
0
// static
void LLFloaterBuyLand::buyLand(
	LLViewerRegion* region, LLParcelSelectionHandle parcel, bool is_for_group)
{
	if(is_for_group && !gAgent.hasPowerInActiveGroup(GP_LAND_DEED))
	{
		LLNotifications::instance().add("OnlyOfficerCanBuyLand");
		return;
	}

	LLFloaterBuyLandUI* ui = LLFloaterBuyLandUI::soleInstance(true);
	ui->setForGroup(is_for_group);
	ui->setParcel(region, parcel);
	ui->open();	/*Flawfinder: ignore*/
}
Пример #15
0
// static
void LLFloaterBuyLand::buyLand(
	LLViewerRegion* region, LLParcelSelectionHandle parcel, bool is_for_group)
{
	if(is_for_group && !gAgent.hasPowerInActiveGroup(GP_LAND_DEED))
	{
		LLNotificationsUtil::add("OnlyOfficerCanBuyLand");
		return;
	}

	LLFloaterBuyLandUI* ui = LLFloaterReg::showTypedInstance<LLFloaterBuyLandUI>("buy_land");
	if (ui)
	{
		ui->setForGroup(is_for_group);
		ui->setParcel(region, parcel);
	}
}
Пример #16
0
void LLFloaterBuyLandUI::SelectionObserver::changed()
{
	LLFloaterBuyLandUI* ui = LLFloaterBuyLandUI::soleInstance(false);
	if (ui)
	{
		if (LLViewerParcelMgr::getInstance()->selectionEmpty())
		{
			ui->close();
		}
		else {
			ui->setParcel(
				LLViewerParcelMgr::getInstance()->getSelectionRegion(),
				LLViewerParcelMgr::getInstance()->getParcelSelection());
		}
	}
}
Пример #17
0
// static
LLFloaterBuyLandUI* LLFloaterBuyLandUI::soleInstance(bool createIfNeeded)
{
#if !LL_RELEASE_FOR_DOWNLOAD
	if (createIfNeeded)
	{
		delete sInstance;
		sInstance = NULL;
	}
#endif
	if (!sInstance  &&  createIfNeeded)
	{
		sInstance = new LLFloaterBuyLandUI();

		LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_buy_land.xml");
		sInstance->center();

		static bool observingCacheName = false;
		if (!observingCacheName)
		{
			gCacheName->addObserver(cacheNameUpdateRefreshesBuyLand);
			observingCacheName = true;
		}

		static SelectionObserver* parcelSelectionObserver = NULL;
		if (!parcelSelectionObserver)
		{
			parcelSelectionObserver = new SelectionObserver;
			LLViewerParcelMgr::getInstance()->addObserver(parcelSelectionObserver);
		}
	}
	
	return sInstance;
}
Пример #18
0
// static
void LLFloaterBuyLandUI::onClickErrorWeb(void* data)
{
	LLFloaterBuyLandUI* self = (LLFloaterBuyLandUI*)data;
	LLWeb::loadURLExternal(self->mCannotBuyURI);
	self->close();
}
Пример #19
0
// static
void LLFloaterBuyLandUI::onClickCancel(void* data)
{
	LLFloaterBuyLandUI* self = (LLFloaterBuyLandUI*)data;
	self->close();
}
Пример #20
0
// static
void LLFloaterBuyLandUI::onClickBuy(void* data)
{
	LLFloaterBuyLandUI* self = (LLFloaterBuyLandUI*)data;
	self->startBuyPreConfirm();
}