void LLFloaterLandHoldings::buttonCore(S32 which) { LLScrollListCtrl *list = getChild<LLScrollListCtrl>("parcel list"); if (!list) return; S32 index = list->getFirstSelectedIndex(); if (index < 0) return; // hidden is always last column std::string location = list->getSelectedItemLabel(list->getNumColumns()-1); F32 global_x = 0.f; F32 global_y = 0.f; sscanf(location.c_str(), "%f %f", &global_x, &global_y); // Hack: Use the agent's z-height F64 global_z = gAgent.getPositionGlobal().mdV[VZ]; LLVector3d pos_global(global_x, global_y, global_z); switch(which) { case 0: gAgent.teleportViaLocation(pos_global); gFloaterWorldMap->trackLocation(pos_global); break; case 1: gFloaterWorldMap->trackLocation(pos_global); LLFloaterWorldMap::show(NULL, TRUE); break; default: break; } }
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; }
BOOL LLPanelScriptLimitsRegionMemory::postBuild() { childSetAction("refresh_list_btn", onClickRefresh, this); childSetAction("highlight_btn", onClickHighlight, this); childSetAction("return_btn", onClickReturn, this); std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting"); childSetValue("loading_text", LLSD(msg_waiting)); LLScrollListCtrl *list = getChild<LLScrollListCtrl>("scripts_list"); if(!list) { return FALSE; } //set all columns to resizable mode even if some columns will be empty for(S32 column = 0; column < list->getNumColumns(); column++) { LLScrollListColumn* columnp = list->getColumn(column); columnp->mHeader->setHasResizableElement(TRUE); } return StartRequestChain(); }