BOOL LLPanelGroups::postBuild()
{
	setTexts();

	LLScrollListCtrl *list = getChild<LLScrollListCtrl>("group list");
	if (list)
	{
		init_group_list(list, gAgent.getGroupID());
		list->setCommitCallback(boost::bind(&LLPanelGroups::onGroupList, this));
		list->setSortChangedCallback(boost::bind(&LLPanelGroups::onGroupSortChanged,this)); //Force 'none' to always be first entry.
		list->setDoubleClickCallback(boost::bind(LLGroupActions::startIM, boost::bind(&LLScrollListCtrl::getCurrentID, list)));
	}

	getChild<LLUICtrl>("Activate")->setCommitCallback(boost::bind(LLGroupActions::activate, boost::bind(&LLScrollListCtrl::getCurrentID, list)));

	getChild<LLUICtrl>("Info")->setCommitCallback(boost::bind(LLGroupActions::show, boost::bind(&LLScrollListCtrl::getCurrentID, list)));

	getChild<LLUICtrl>("IM")->setCommitCallback(boost::bind(LLGroupActions::startIM, boost::bind(&LLScrollListCtrl::getCurrentID, list)));

	getChild<LLUICtrl>("Leave")->setCommitCallback(boost::bind(LLGroupActions::leave, boost::bind(&LLScrollListCtrl::getCurrentID, list)));

	getChild<LLUICtrl>("Create")->setCommitCallback(boost::bind(LLGroupActions::createGroup));

	getChild<LLUICtrl>("Search...")->setCommitCallback(boost::bind(LLGroupActions::search));

	childSetAction("Invite...", onBtnInvite, this);

	getChild<LLUICtrl>("Titles...")->setCommitCallback(boost::bind(HBFloaterGroupTitles::toggle));

	setDefaultBtn("IM");

	reset();

	return TRUE;
}
BOOL LLPanelDirLand::postBuild()
{
	LLPanelDirBrowser::postBuild();

	childSetValue("type", gSavedSettings.getString("FindLandType"));

	bool adult_enabled = gAgent.canAccessAdult();
	bool mature_enabled = gAgent.canAccessMature();
	childSetVisible("incpg", true);
	if (!mature_enabled)
	{
		childSetValue("incmature", FALSE);
		childDisable("incmature");
	}
	if (!adult_enabled)
	{
		childSetValue("incadult", FALSE);
		childDisable("incadult");
	}

	childSetCommitCallback("pricecheck", onCommitPrice, this);
	childSetCommitCallback("areacheck", onCommitArea, this);

	childSetValue("priceedit", gStatusBar->getBalance());
	childSetEnabled("priceedit", gSavedSettings.getBOOL("FindLandPrice"));
	childSetPrevalidate("priceedit", LLLineEditor::prevalidateNonNegativeS32);
	
	childSetEnabled("areaedit", gSavedSettings.getBOOL("FindLandArea"));
	childSetPrevalidate("areaedit", LLLineEditor::prevalidateNonNegativeS32);

	childSetAction("Search", onClickSearchCore, this);
	setDefaultBtn("Search");

	childSetTextArg("land", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
	childSetTextArg("pricecheck_symbol", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
	childSetLabelArg("pricecheck", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());

	mCurrentSortColumn = "per_meter";

	LLScrollListCtrl* results = getChild<LLScrollListCtrl>("results");
	if (results)
	{
		results->setSortChangedCallback(boost::bind(&LLPanelDirLand::onClickSort,this));
		results->sortByColumn(mCurrentSortColumn,mCurrentSortAscending);
		
		LLStringUtil::format_map_t args;
		args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
		int n = results->getNumColumns();
		for (int i=0; i<n; i++) {
			LLScrollListColumn *col = results->getColumn(i);
			std::string label = col->mLabel;
			LLStringUtil::format(label, args);
			results->setColumnLabel(col->mName, label);
		}
	}

	childSetVisible("filter_gaming", (gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_LAND));

	return TRUE;
}
Beispiel #3
0
BOOL LLPanelDirLand::postBuild()
{
	LLPanelDirBrowser::postBuild();

	childSetValue("type", gSavedSettings.getString("FindLandType"));

	bool adult_enabled = gAgent.canAccessAdult();
	bool mature_enabled = gAgent.canAccessMature();
	childSetVisible("incpg", true);
	if (!mature_enabled)
	{
		childSetValue("incmature", FALSE);
		childDisable("incmature");
	}
	if (!adult_enabled)
	{
		childSetValue("incadult", FALSE);
		childDisable("incadult");
	}

	childSetCommitCallback("pricecheck", onCommitPrice, this);
	childSetCommitCallback("areacheck", onCommitArea, this);

	childSetValue("priceedit", gStatusBar->getBalance());
	childSetEnabled("priceedit", gSavedSettings.getBOOL("FindLandPrice"));
	childSetPrevalidate("priceedit", LLLineEditor::prevalidateNonNegativeS32);
	
	childSetEnabled("areaedit", gSavedSettings.getBOOL("FindLandArea"));
	childSetPrevalidate("areaedit", LLLineEditor::prevalidateNonNegativeS32);

	childSetAction("Search", onClickSearchCore, this);
	setDefaultBtn("Search");

	mCurrentSortColumn = "per_meter";

	LLScrollListCtrl* results = getChild<LLScrollListCtrl>("results");
	if (results)
	{
		results->setSortChangedCallback(onClickSort);
		results->sortByColumn(mCurrentSortColumn,mCurrentSortAscending);
	}

	return TRUE;
}
Beispiel #4
0
BOOL LLPanelDirLand::postBuild()
{
	LLPanelDirBrowser::postBuild();

	childSetValue("type", gSavedSettings.getString("FindLandType"));

	if (gAgent.mAccess <= SIM_ACCESS_PG)
	{
		childSetValue("rating", PG_ONLY);
		childDisable("rating");
	}

	childSetCommitCallback("pricecheck", onCommitPrice, this);
	childSetCommitCallback("areacheck", onCommitArea, this);

	childSetValue("priceedit", gStatusBar->getBalance());
	childSetEnabled("priceedit", gSavedSettings.getBOOL("FindLandPrice"));
	childSetPrevalidate("priceedit", LLLineEditor::prevalidateNonNegativeS32);
	
	childSetEnabled("areaedit", gSavedSettings.getBOOL("FindLandArea"));
	childSetPrevalidate("areaedit", LLLineEditor::prevalidateNonNegativeS32);

	childSetAction("Search", onClickSearchCore, this);
	setDefaultBtn("Search");

	mCurrentSortColumn = "per_meter";

	LLScrollListCtrl* results = (LLScrollListCtrl*)getChildByName("results");
	if (results)
	{
		results->setSortChangedCallback(onClickSort);
		results->sortByColumn(mCurrentSortColumn,mCurrentSortAscending);
	}

	return TRUE;
}