aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelplace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpanelplace.cpp')
-rw-r--r--linden/indra/newview/llpanelplace.cpp48
1 files changed, 23 insertions, 25 deletions
diff --git a/linden/indra/newview/llpanelplace.cpp b/linden/indra/newview/llpanelplace.cpp
index e7dc08f..37ad05e 100644
--- a/linden/indra/newview/llpanelplace.cpp
+++ b/linden/indra/newview/llpanelplace.cpp
@@ -61,7 +61,7 @@
61std::list<LLPanelPlace*> LLPanelPlace::sAllPanels; 61std::list<LLPanelPlace*> LLPanelPlace::sAllPanels;
62 62
63LLPanelPlace::LLPanelPlace() 63LLPanelPlace::LLPanelPlace()
64: LLPanel("Places Panel"), 64: LLPanel(std::string("Places Panel")),
65 mParcelID(), 65 mParcelID(),
66 mRequestedID(), 66 mRequestedID(),
67 mRegionID(), 67 mRegionID(),
@@ -91,7 +91,7 @@ BOOL LLPanelPlace::postBuild()
91 mNameEditor = getChild<LLTextBox>("name_editor"); 91 mNameEditor = getChild<LLTextBox>("name_editor");
92 // Text boxes appear to have a " " in them by default. This breaks the 92 // Text boxes appear to have a " " in them by default. This breaks the
93 // emptiness test for filling in data from the network. Slam to empty. 93 // emptiness test for filling in data from the network. Slam to empty.
94 mNameEditor->setText( LLString::null ); 94 mNameEditor->setText( LLStringUtil::null );
95 95
96 mDescEditor = getChild<LLTextEditor>("desc_editor"); 96 mDescEditor = getChild<LLTextEditor>("desc_editor");
97 97
@@ -144,10 +144,10 @@ void LLPanelPlace::resetLocation()
144 mPosGlobal.clearVec(); 144 mPosGlobal.clearVec();
145 mPosRegion.clearVec(); 145 mPosRegion.clearVec();
146 mAuctionID = 0; 146 mAuctionID = 0;
147 mNameEditor->setText( LLString::null ); 147 mNameEditor->setText( LLStringUtil::null );
148 mDescEditor->setText( LLString::null ); 148 mDescEditor->setText( LLStringUtil::null );
149 mInfoEditor->setText( LLString::null ); 149 mInfoEditor->setText( LLStringUtil::null );
150 mLocationEditor->setText( LLString::null ); 150 mLocationEditor->setText( LLStringUtil::null );
151} 151}
152 152
153void LLPanelPlace::setParcelID(const LLUUID& parcel_id) 153void LLPanelPlace::setParcelID(const LLUUID& parcel_id)
@@ -187,7 +187,7 @@ void LLPanelPlace::sendParcelInfoRequest()
187void LLPanelPlace::setErrorStatus(U32 status, const std::string& reason) 187void LLPanelPlace::setErrorStatus(U32 status, const std::string& reason)
188{ 188{
189 // We only really handle 404 and 499 errors 189 // We only really handle 404 and 499 errors
190 LLString error_text; 190 std::string error_text;
191 if(status == 404) 191 if(status == 404)
192 { 192 {
193 error_text = getString("server_error_text"); 193 error_text = getString("server_error_text");
@@ -205,15 +205,15 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **)
205 LLUUID agent_id; 205 LLUUID agent_id;
206 LLUUID parcel_id; 206 LLUUID parcel_id;
207 LLUUID owner_id; 207 LLUUID owner_id;
208 char name[MAX_STRING]; /*Flawfinder: ignore*/ 208 std::string name;
209 char desc[MAX_STRING]; /*Flawfinder: ignore*/ 209 std::string desc;
210 S32 actual_area; 210 S32 actual_area;
211 S32 billable_area; 211 S32 billable_area;
212 U8 flags; 212 U8 flags;
213 F32 global_x; 213 F32 global_x;
214 F32 global_y; 214 F32 global_y;
215 F32 global_z; 215 F32 global_z;
216 char sim_name[MAX_STRING]; /*Flawfinder: ignore*/ 216 std::string sim_name;
217 LLUUID snapshot_id; 217 LLUUID snapshot_id;
218 F32 dwell; 218 F32 dwell;
219 S32 sale_price; 219 S32 sale_price;
@@ -232,15 +232,15 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **)
232 } 232 }
233 233
234 msg->getUUID ("Data", "OwnerID", owner_id); 234 msg->getUUID ("Data", "OwnerID", owner_id);
235 msg->getString ("Data", "Name", MAX_STRING, name); 235 msg->getString ("Data", "Name", name);
236 msg->getString ("Data", "Desc", MAX_STRING, desc); 236 msg->getString ("Data", "Desc", desc);
237 msg->getS32 ("Data", "ActualArea", actual_area); 237 msg->getS32 ("Data", "ActualArea", actual_area);
238 msg->getS32 ("Data", "BillableArea", billable_area); 238 msg->getS32 ("Data", "BillableArea", billable_area);
239 msg->getU8 ("Data", "Flags", flags); 239 msg->getU8 ("Data", "Flags", flags);
240 msg->getF32 ("Data", "GlobalX", global_x); 240 msg->getF32 ("Data", "GlobalX", global_x);
241 msg->getF32 ("Data", "GlobalY", global_y); 241 msg->getF32 ("Data", "GlobalY", global_y);
242 msg->getF32 ("Data", "GlobalZ", global_z); 242 msg->getF32 ("Data", "GlobalZ", global_z);
243 msg->getString ("Data", "SimName", MAX_STRING, sim_name); 243 msg->getString ("Data", "SimName", sim_name);
244 msg->getUUID ("Data", "SnapshotID", snapshot_id); 244 msg->getUUID ("Data", "SnapshotID", snapshot_id);
245 msg->getF32 ("Data", "Dwell", dwell); 245 msg->getF32 ("Data", "Dwell", dwell);
246 msg->getS32 ("Data", "SalePrice", sale_price); 246 msg->getS32 ("Data", "SalePrice", sale_price);
@@ -256,22 +256,20 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **)
256 256
257 // Only assign the name and description if they are not empty and there is not a 257 // Only assign the name and description if they are not empty and there is not a
258 // value present (passed in from a landmark, e.g.) 258 // value present (passed in from a landmark, e.g.)
259 std::string name_str(name);
260 std::string desc_str(desc);
261 259
262 if( !name_str.empty() 260 if( !name.empty()
263 && self->mNameEditor && self->mNameEditor->getText().empty()) 261 && self->mNameEditor && self->mNameEditor->getText().empty())
264 { 262 {
265 self->mNameEditor->setText(name_str); 263 self->mNameEditor->setText(name);
266 } 264 }
267 265
268 if( !desc_str.empty() 266 if( !desc.empty()
269 && self->mDescEditor && self->mDescEditor->getText().empty()) 267 && self->mDescEditor && self->mDescEditor->getText().empty())
270 { 268 {
271 self->mDescEditor->setText(desc_str); 269 self->mDescEditor->setText(desc);
272 } 270 }
273 271
274 LLString info_text; 272 std::string info_text;
275 LLUIString traffic = self->getUIString("traffic_text"); 273 LLUIString traffic = self->getUIString("traffic_text");
276 traffic.setArg("[TRAFFIC]", llformat("%d ", (int)dwell)); 274 traffic.setArg("[TRAFFIC]", llformat("%d ", (int)dwell));
277 info_text = traffic; 275 info_text = traffic;
@@ -296,7 +294,7 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **)
296 } 294 }
297 295
298 // HACK: Flag 0x1 == mature region, otherwise assume PG 296 // HACK: Flag 0x1 == mature region, otherwise assume PG
299 const char* rating = LLViewerRegion::accessToString(SIM_ACCESS_PG); 297 std::string rating = LLViewerRegion::accessToString(SIM_ACCESS_PG);
300 if (flags & 0x1) 298 if (flags & 0x1)
301 { 299 {
302 rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE); 300 rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE);
@@ -320,8 +318,8 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **)
320 self->mPosGlobal.setVec(global_x, global_y, global_z); 318 self->mPosGlobal.setVec(global_x, global_y, global_z);
321 } 319 }
322 320
323 LLString location = llformat("%s %d, %d, %d (%s)", 321 std::string location = llformat("%s %d, %d, %d (%s)",
324 sim_name, region_x, region_y, region_z, rating); 322 sim_name.c_str(), region_x, region_y, region_z, rating.c_str());
325 if (self->mLocationEditor) 323 if (self->mLocationEditor)
326 { 324 {
327 self->mLocationEditor->setText(location); 325 self->mLocationEditor->setText(location);
@@ -430,8 +428,8 @@ void LLPanelPlace::callbackAuctionWebPage(S32 option, void* data)
430 428
431 if (0 == option) 429 if (0 == option)
432 { 430 {
433 char url[256]; /*Flawfinder: ignore*/ 431 std::string url;
434 snprintf(url, sizeof(url), "%s%010d", AUCTION_URL, self->mAuctionID); /* Flawfinder: ignore */ 432 url = AUCTION_URL + llformat( "%010d", self->mAuctionID);
435 433
436 llinfos << "Loading auction page " << url << llendl; 434 llinfos << "Loading auction page " << url << llendl;
437 435