diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llpanelpick.cpp | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-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/llpanelpick.cpp')
-rw-r--r-- | linden/indra/newview/llpanelpick.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/linden/indra/newview/llpanelpick.cpp b/linden/indra/newview/llpanelpick.cpp index 32894ce..8c2b175 100644 --- a/linden/indra/newview/llpanelpick.cpp +++ b/linden/indra/newview/llpanelpick.cpp | |||
@@ -63,7 +63,7 @@ | |||
63 | std::list<LLPanelPick*> LLPanelPick::sAllPanels; | 63 | std::list<LLPanelPick*> LLPanelPick::sAllPanels; |
64 | 64 | ||
65 | LLPanelPick::LLPanelPick(BOOL top_pick) | 65 | LLPanelPick::LLPanelPick(BOOL top_pick) |
66 | : LLPanel("Top Picks Panel"), | 66 | : LLPanel(std::string("Top Picks Panel")), |
67 | mTopPick(top_pick), | 67 | mTopPick(top_pick), |
68 | mPickID(), | 68 | mPickID(), |
69 | mCreatorID(), | 69 | mCreatorID(), |
@@ -292,33 +292,33 @@ void LLPanelPick::processPickInfoReply(LLMessageSystem *msg, void **) | |||
292 | LLUUID parcel_id; | 292 | LLUUID parcel_id; |
293 | msg->getUUID("Data", "ParcelID", parcel_id); | 293 | msg->getUUID("Data", "ParcelID", parcel_id); |
294 | 294 | ||
295 | char name[DB_PARCEL_NAME_SIZE]; /*Flawfinder: ignore*/ | 295 | std::string name; |
296 | msg->getString("Data", "Name", DB_PARCEL_NAME_SIZE, name); | 296 | msg->getString("Data", "Name", name); |
297 | 297 | ||
298 | char desc[DB_PICK_DESC_SIZE]; /*Flawfinder: ignore*/ | 298 | std::string desc; |
299 | msg->getString("Data", "Desc", DB_PICK_DESC_SIZE, desc); | 299 | msg->getString("Data", "Desc", desc); |
300 | 300 | ||
301 | LLUUID snapshot_id; | 301 | LLUUID snapshot_id; |
302 | msg->getUUID("Data", "SnapshotID", snapshot_id); | 302 | msg->getUUID("Data", "SnapshotID", snapshot_id); |
303 | 303 | ||
304 | // "Location text" is actually the owner name, the original | 304 | // "Location text" is actually the owner name, the original |
305 | // name that owner gave the parcel, and the location. | 305 | // name that owner gave the parcel, and the location. |
306 | char buffer[256]; /*Flawfinder: ignore*/ | 306 | std::string location_text; |
307 | LLString location_text; | 307 | msg->getString("Data", "User", location_text); |
308 | |||
309 | msg->getString("Data", "User", 256, buffer); | ||
310 | location_text.assign(buffer); | ||
311 | location_text.append(", "); | 308 | location_text.append(", "); |
312 | 309 | ||
313 | msg->getString("Data", "OriginalName", 256, buffer); | 310 | std::string original_name; |
314 | if (buffer[0] != '\0') | 311 | msg->getString("Data", "OriginalName", original_name); |
312 | if (!original_name.empty()) | ||
315 | { | 313 | { |
316 | location_text.append(buffer); | 314 | location_text.append(original_name); |
317 | location_text.append(", "); | 315 | location_text.append(", "); |
318 | } | 316 | } |
319 | 317 | ||
320 | char sim_name[256]; /*Flawfinder: ignore*/ | 318 | std::string sim_name; |
321 | msg->getString("Data", "SimName", 256, sim_name); | 319 | msg->getString("Data", "SimName", sim_name); |
320 | location_text.append(sim_name); | ||
321 | location_text.append(" "); | ||
322 | 322 | ||
323 | LLVector3d pos_global; | 323 | LLVector3d pos_global; |
324 | msg->getVector3d("Data", "PosGlobal", pos_global); | 324 | msg->getVector3d("Data", "PosGlobal", pos_global); |
@@ -327,7 +327,7 @@ void LLPanelPick::processPickInfoReply(LLMessageSystem *msg, void **) | |||
327 | S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS; | 327 | S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS; |
328 | S32 region_z = llround((F32)pos_global.mdV[VZ]); | 328 | S32 region_z = llround((F32)pos_global.mdV[VZ]); |
329 | 329 | ||
330 | location_text.append(llformat("%s (%d, %d, %d)", sim_name, region_x, region_y, region_z)); | 330 | location_text.append(llformat("(%d, %d, %d)", region_x, region_y, region_z)); |
331 | 331 | ||
332 | S32 sort_order; | 332 | S32 sort_order; |
333 | msg->getS32("Data", "SortOrder", sort_order); | 333 | msg->getS32("Data", "SortOrder", sort_order); |
@@ -355,8 +355,8 @@ void LLPanelPick::processPickInfoReply(LLMessageSystem *msg, void **) | |||
355 | self->mPosGlobal = pos_global; | 355 | self->mPosGlobal = pos_global; |
356 | 356 | ||
357 | // Update UI controls | 357 | // Update UI controls |
358 | self->mNameEditor->setText(LLString(name)); | 358 | self->mNameEditor->setText(std::string(name)); |
359 | self->mDescEditor->setText(LLString(desc)); | 359 | self->mDescEditor->setText(std::string(desc)); |
360 | self->mSnapshotCtrl->setImageAssetID(snapshot_id); | 360 | self->mSnapshotCtrl->setImageAssetID(snapshot_id); |
361 | self->mLocationEditor->setText(location_text); | 361 | self->mLocationEditor->setText(location_text); |
362 | self->mEnabledCheck->set(enabled); | 362 | self->mEnabledCheck->set(enabled); |
@@ -448,7 +448,7 @@ void LLPanelPick::onClickMap(void* data) | |||
448 | void LLPanelPick::onClickLandmark(void* data) | 448 | void LLPanelPick::onClickLandmark(void* data) |
449 | { | 449 | { |
450 | LLPanelPick* self = (LLPanelPick*)data; | 450 | LLPanelPick* self = (LLPanelPick*)data; |
451 | create_landmark(self->mNameEditor->getText().c_str(), "", self->mPosGlobal); | 451 | create_landmark(self->mNameEditor->getText(), "", self->mPosGlobal); |
452 | } | 452 | } |
453 | */ | 453 | */ |
454 | 454 | ||
@@ -460,7 +460,7 @@ void LLPanelPick::onClickSet(void* data) | |||
460 | // Save location for later. | 460 | // Save location for later. |
461 | self->mPosGlobal = gAgent.getPositionGlobal(); | 461 | self->mPosGlobal = gAgent.getPositionGlobal(); |
462 | 462 | ||
463 | LLString location_text; | 463 | std::string location_text; |
464 | location_text.assign("(will update after save)"); | 464 | location_text.assign("(will update after save)"); |
465 | location_text.append(", "); | 465 | location_text.append(", "); |
466 | 466 | ||
@@ -500,7 +500,7 @@ void LLPanelPick::onCommitAny(LLUICtrl* ctrl, void* data) | |||
500 | /*if (self->mTopPick) | 500 | /*if (self->mTopPick) |
501 | { | 501 | { |
502 | LLPanelDirPicks* panel = (LLPanelDirPicks*)self->getParent(); | 502 | LLPanelDirPicks* panel = (LLPanelDirPicks*)self->getParent(); |
503 | panel->renamePick(self->mPickID, self->mNameEditor->getText().c_str()); | 503 | panel->renamePick(self->mPickID, self->mNameEditor->getText()); |
504 | } | 504 | } |
505 | else | 505 | else |
506 | {*/ | 506 | {*/ |