aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatergodtools.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llfloatergodtools.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llfloatergodtools.cpp')
-rw-r--r--linden/indra/newview/llfloatergodtools.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/linden/indra/newview/llfloatergodtools.cpp b/linden/indra/newview/llfloatergodtools.cpp
index 3965c8b..9a78fff 100644
--- a/linden/indra/newview/llfloatergodtools.cpp
+++ b/linden/indra/newview/llfloatergodtools.cpp
@@ -115,7 +115,7 @@ void LLFloaterGodTools::refreshAll()
115 115
116 116
117LLFloaterGodTools::LLFloaterGodTools() 117LLFloaterGodTools::LLFloaterGodTools()
118: LLFloater("godtools floater"), 118: LLFloater(std::string("godtools floater")),
119 mCurrentHost(LLHost::invalid), 119 mCurrentHost(LLHost::invalid),
120 mUpdateTimer() 120 mUpdateTimer()
121{ 121{
@@ -224,7 +224,7 @@ void LLFloaterGodTools::show(void *)
224 } 224 }
225} 225}
226 226
227void LLFloaterGodTools::showPanel(const LLString& panel_name) 227void LLFloaterGodTools::showPanel(const std::string& panel_name)
228{ 228{
229 childShowTab("GodTools Tabs", panel_name); 229 childShowTab("GodTools Tabs", panel_name);
230 open(); /*Flawfinder: ignore*/ 230 open(); /*Flawfinder: ignore*/
@@ -258,7 +258,7 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
258 U32 region_flags; 258 U32 region_flags;
259 U8 sim_access; 259 U8 sim_access;
260 U8 agent_limit; 260 U8 agent_limit;
261 char sim_name[MAX_STRING]; /*Flawfinder: ignore*/ 261 std::string sim_name;
262 U32 estate_id; 262 U32 estate_id;
263 U32 parent_estate_id; 263 U32 parent_estate_id;
264 F32 water_height; 264 F32 water_height;
@@ -271,7 +271,7 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
271 S32 redirect_grid_y; 271 S32 redirect_grid_y;
272 LLUUID cache_id; 272 LLUUID cache_id;
273 273
274 msg->getStringFast(_PREHASH_RegionInfo, _PREHASH_SimName, MAX_STRING, sim_name); 274 msg->getStringFast(_PREHASH_RegionInfo, _PREHASH_SimName, sim_name);
275 msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_EstateID, estate_id); 275 msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_EstateID, estate_id);
276 msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_ParentEstateID, parent_estate_id); 276 msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_ParentEstateID, parent_estate_id);
277 msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_RegionFlags, region_flags); 277 msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_RegionFlags, region_flags);
@@ -375,7 +375,7 @@ void LLFloaterGodTools::sendGodUpdateRegionInfo()
375 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 375 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
376 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 376 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
377 msg->nextBlockFast(_PREHASH_RegionInfo); 377 msg->nextBlockFast(_PREHASH_RegionInfo);
378 msg->addStringFast(_PREHASH_SimName, rtool->getSimName().c_str()); 378 msg->addStringFast(_PREHASH_SimName, rtool->getSimName());
379 msg->addU32Fast(_PREHASH_EstateID, rtool->getEstateID()); 379 msg->addU32Fast(_PREHASH_EstateID, rtool->getEstateID());
380 msg->addU32Fast(_PREHASH_ParentEstateID, rtool->getParentEstateID()); 380 msg->addU32Fast(_PREHASH_ParentEstateID, rtool->getParentEstateID());
381 msg->addU32Fast(_PREHASH_RegionFlags, computeRegionFlags()); 381 msg->addU32Fast(_PREHASH_RegionFlags, computeRegionFlags());
@@ -707,7 +707,7 @@ S32 LLPanelRegionTools::getPricePerMeter() const
707 return childGetValue("land cost"); 707 return childGetValue("land cost");
708} 708}
709 709
710void LLPanelRegionTools::setSimName(char *name) 710void LLPanelRegionTools::setSimName(const std::string& name)
711{ 711{
712 childSetValue("region name", name); 712 childSetValue("region name", name);
713} 713}
@@ -924,13 +924,13 @@ void LLPanelGridTools::onClickKickAll(void* userdata)
924 gFloaterView->getNewFloaterPosition(&left, &top); 924 gFloaterView->getNewFloaterPosition(&left, &top);
925 LLRect rect(left, top, left+400, top-300); 925 LLRect rect(left, top, left+400, top-300);
926 926
927 gViewerWindow->alertXmlEditText("KickAllUsers", LLString::format_map_t(), 927 gViewerWindow->alertXmlEditText("KickAllUsers", LLStringUtil::format_map_t(),
928 NULL, NULL, 928 NULL, NULL,
929 LLPanelGridTools::confirmKick, self); 929 LLPanelGridTools::confirmKick, self);
930} 930}
931 931
932 932
933void LLPanelGridTools::confirmKick(S32 option, const LLString& text, void* userdata) 933void LLPanelGridTools::confirmKick(S32 option, const std::string& text, void* userdata)
934{ 934{
935 LLPanelGridTools* self = (LLPanelGridTools*) userdata; 935 LLPanelGridTools* self = (LLPanelGridTools*) userdata;
936 936
@@ -957,7 +957,7 @@ void LLPanelGridTools::finishKick(S32 option, void* userdata)
957 msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID()); 957 msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID());
958 msg->addUUIDFast(_PREHASH_AgentID, LL_UUID_ALL_AGENTS ); 958 msg->addUUIDFast(_PREHASH_AgentID, LL_UUID_ALL_AGENTS );
959 msg->addU32("KickFlags", KICK_FLAGS_DEFAULT ); 959 msg->addU32("KickFlags", KICK_FLAGS_DEFAULT );
960 msg->addStringFast(_PREHASH_Reason, self->mKickMessage.c_str() ); 960 msg->addStringFast(_PREHASH_Reason, self->mKickMessage );
961 gAgent.sendReliableMessage(); 961 gAgent.sendReliableMessage();
962 } 962 }
963} 963}
@@ -1182,7 +1182,7 @@ void LLPanelObjectTools::onClickDeletePublicOwnedBy(void* userdata)
1182 panelp->mSimWideDeletesFlags = 1182 panelp->mSimWideDeletesFlags =
1183 SWD_SCRIPTED_ONLY | SWD_OTHERS_LAND_ONLY; 1183 SWD_SCRIPTED_ONLY | SWD_OTHERS_LAND_ONLY;
1184 1184
1185 LLStringBase<char>::format_map_t args; 1185 LLStringUtil::format_map_t args;
1186 args["[AVATAR_NAME]"] = panelp->childGetValue("target_avatar_name").asString(); 1186 args["[AVATAR_NAME]"] = panelp->childGetValue("target_avatar_name").asString();
1187 1187
1188 gViewerWindow->alertXml( "GodDeleteAllScriptedPublicObjectsByUser", 1188 gViewerWindow->alertXml( "GodDeleteAllScriptedPublicObjectsByUser",
@@ -1201,7 +1201,7 @@ void LLPanelObjectTools::onClickDeleteAllScriptedOwnedBy(void* userdata)
1201 { 1201 {
1202 panelp->mSimWideDeletesFlags = SWD_SCRIPTED_ONLY; 1202 panelp->mSimWideDeletesFlags = SWD_SCRIPTED_ONLY;
1203 1203
1204 LLStringBase<char>::format_map_t args; 1204 LLStringUtil::format_map_t args;
1205 args["[AVATAR_NAME]"] = panelp->childGetValue("target_avatar_name").asString(); 1205 args["[AVATAR_NAME]"] = panelp->childGetValue("target_avatar_name").asString();
1206 1206
1207 gViewerWindow->alertXml( "GodDeleteAllScriptedObjectsByUser", 1207 gViewerWindow->alertXml( "GodDeleteAllScriptedObjectsByUser",
@@ -1220,7 +1220,7 @@ void LLPanelObjectTools::onClickDeleteAllOwnedBy(void* userdata)
1220 { 1220 {
1221 panelp->mSimWideDeletesFlags = 0; 1221 panelp->mSimWideDeletesFlags = 0;
1222 1222
1223 LLStringBase<char>::format_map_t args; 1223 LLStringUtil::format_map_t args;
1224 args["[AVATAR_NAME]"] = panelp->childGetValue("target_avatar_name").asString(); 1224 args["[AVATAR_NAME]"] = panelp->childGetValue("target_avatar_name").asString();
1225 1225
1226 gViewerWindow->alertXml( "GodDeleteAllObjectsByUser", 1226 gViewerWindow->alertXml( "GodDeleteAllObjectsByUser",
@@ -1260,12 +1260,12 @@ void LLPanelObjectTools::onClickSetBySelection(void* data)
1260 LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok); 1260 LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok);
1261 if (!node) return; 1261 if (!node) return;
1262 1262
1263 LLString owner_name; 1263 std::string owner_name;
1264 LLUUID owner_id; 1264 LLUUID owner_id;
1265 LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); 1265 LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
1266 1266
1267 panelp->mTargetAvatar = owner_id; 1267 panelp->mTargetAvatar = owner_id;
1268 LLString name = "Object " + node->mName + " owned by " + owner_name; 1268 std::string name = "Object " + node->mName + " owned by " + owner_name;
1269 panelp->childSetValue("target_avatar_name", name); 1269 panelp->childSetValue("target_avatar_name", name);
1270} 1270}
1271 1271
@@ -1314,8 +1314,8 @@ void LLPanelObjectTools::onApplyChanges(void* userdata)
1314// LLPanelRequestTools 1314// LLPanelRequestTools
1315// -------------------- 1315// --------------------
1316 1316
1317const char SELECTION[] = "Selection"; 1317const std::string SELECTION = "Selection";
1318const char AGENT_REGION[] = "Agent Region"; 1318const std::string AGENT_REGION = "Agent Region";
1319 1319
1320LLPanelRequestTools::LLPanelRequestTools(const std::string& name): 1320LLPanelRequestTools::LLPanelRequestTools(const std::string& name):
1321 LLPanel(name) 1321 LLPanel(name)
@@ -1348,7 +1348,7 @@ void LLPanelRequestTools::refresh()
1348 iter != LLWorld::getInstance()->mActiveRegionList.end(); ++iter) 1348 iter != LLWorld::getInstance()->mActiveRegionList.end(); ++iter)
1349 { 1349 {
1350 LLViewerRegion* regionp = *iter; 1350 LLViewerRegion* regionp = *iter;
1351 LLString name = regionp->getName(); 1351 std::string name = regionp->getName();
1352 if (!name.empty()) 1352 if (!name.empty())
1353 { 1353 {
1354 list->addSimpleElement(name); 1354 list->addSimpleElement(name);
@@ -1366,8 +1366,8 @@ void LLPanelRequestTools::refresh()
1366 1366
1367 1367
1368// static 1368// static
1369void LLPanelRequestTools::sendRequest(const char *request, 1369void LLPanelRequestTools::sendRequest(const std::string& request,
1370 const char *parameter, 1370 const std::string& parameter,
1371 const LLHost& host) 1371 const LLHost& host)
1372{ 1372{
1373 llinfos << "Sending request '" << request << "', '" 1373 llinfos << "Sending request '" << request << "', '"
@@ -1437,7 +1437,7 @@ void LLPanelRequestTools::sendRequest(const LLHost& host)
1437 std::string req = childGetValue("request"); 1437 std::string req = childGetValue("request");
1438 if (req == "terrain download") 1438 if (req == "terrain download")
1439 { 1439 {
1440 gXferManager->requestFile("terrain.raw", "terrain.raw", LL_PATH_NONE, 1440 gXferManager->requestFile(std::string("terrain.raw"), std::string("terrain.raw"), LL_PATH_NONE,
1441 host, 1441 host,
1442 FALSE, 1442 FALSE,
1443 terrain_download_done, 1443 terrain_download_done,
@@ -1446,7 +1446,7 @@ void LLPanelRequestTools::sendRequest(const LLHost& host)
1446 else 1446 else
1447 { 1447 {
1448 req = req.substr(0, req.find_first_of(" ")); 1448 req = req.substr(0, req.find_first_of(" "));
1449 sendRequest(req.c_str(), childGetValue("parameter").asString().c_str(), host); 1449 sendRequest(req, childGetValue("parameter").asString(), host);
1450 } 1450 }
1451} 1451}
1452 1452