aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelplace.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:11 -0500
committerJacek Antonelli2008-08-15 23:45:11 -0500
commit215f423cbe18fe9ca14a26caef918d303bad28ff (patch)
tree0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/newview/llpanelplace.cpp
parentSecond Life viewer sources 1.18.3.5-RC (diff)
downloadmeta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to 'linden/indra/newview/llpanelplace.cpp')
-rw-r--r--linden/indra/newview/llpanelplace.cpp38
1 files changed, 23 insertions, 15 deletions
diff --git a/linden/indra/newview/llpanelplace.cpp b/linden/indra/newview/llpanelplace.cpp
index a9f11cc..2176fdc 100644
--- a/linden/indra/newview/llpanelplace.cpp
+++ b/linden/indra/newview/llpanelplace.cpp
@@ -2,6 +2,8 @@
2 * @file llpanelplace.cpp 2 * @file llpanelplace.cpp
3 * @brief Display of a place in the Find directory. 3 * @brief Display of a place in the Find directory.
4 * 4 *
5 * $LicenseInfo:firstyear=2004&license=viewergpl$
6 *
5 * Copyright (c) 2004-2007, Linden Research, Inc. 7 * Copyright (c) 2004-2007, Linden Research, Inc.
6 * 8 *
7 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
@@ -24,6 +26,7 @@
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
27 */ 30 */
28 31
29#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
@@ -153,7 +156,6 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **)
153 F32 dwell; 156 F32 dwell;
154 S32 sale_price; 157 S32 sale_price;
155 S32 auction_id; 158 S32 auction_id;
156 char buffer[256]; /*Flawfinder: ignore*/
157 159
158 msg->getUUID("AgentData", "AgentID", agent_id ); 160 msg->getUUID("AgentData", "AgentID", agent_id );
159 msg->getUUID("Data", "ParcelID", parcel_id); 161 msg->getUUID("Data", "ParcelID", parcel_id);
@@ -188,29 +190,35 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **)
188 190
189 self->mSnapshotCtrl->setImageAssetID(snapshot_id); 191 self->mSnapshotCtrl->setImageAssetID(snapshot_id);
190 192
191 self->mNameEditor->setText(name); 193 self->mNameEditor->setText(LLString(name));
192 194
193 self->mDescEditor->setText(desc); 195 self->mDescEditor->setText(LLString(desc));
194 196
195 LLString info; 197 LLString info_text;
196 snprintf(buffer, sizeof(buffer), "Traffic: %.0f, Area: %d sq. m.", dwell, actual_area); /* Flawfinder: ignore */ 198 LLUIString traffic = self->childGetText("traffic_text");
197 info.append(buffer); 199 traffic.setArg("[TRAFFIC]", llformat("%.0f", dwell));
200 info_text = traffic;
201 LLUIString area = self->childGetText("area_text");
202 traffic.setArg("[AREA]", llformat("%d", actual_area));
203 info_text += area;
198 if (flags & DFQ_FOR_SALE) 204 if (flags & DFQ_FOR_SALE)
199 { 205 {
200 snprintf(buffer, sizeof(buffer), ", For Sale for L$%d", sale_price); /* Flawfinder: ignore */ 206 LLUIString forsale = self->childGetText("forsale_text");
201 info.append(buffer); 207 traffic.setArg("[PRICE]", llformat("%d", sale_price));
208 info_text += forsale;
202 } 209 }
203 if (auction_id != 0) 210 if (auction_id != 0)
204 { 211 {
205 snprintf(buffer, sizeof(buffer), ", Auction ID %010d", auction_id); /* Flawfinder: ignore */ 212 LLUIString auction = self->childGetText("auction_text");
206 info.append(buffer); 213 auction.setArg("[ID]", llformat("%010d", auction_id));
214 info_text += auction;
207 } 215 }
208 self->mInfoEditor->setText(info); 216 self->mInfoEditor->setText(info_text);
209 217
210 S32 region_x = llround(global_x) % REGION_WIDTH_UNITS; 218 S32 region_x = llround(global_x) % REGION_WIDTH_UNITS;
211 S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; 219 S32 region_y = llround(global_y) % REGION_WIDTH_UNITS;
212 S32 region_z = llround(global_z); 220 S32 region_z = llround(global_z);
213 221
214 // HACK: Flag 0x1 == mature region, otherwise assume PG 222 // HACK: Flag 0x1 == mature region, otherwise assume PG
215 const char* rating = LLViewerRegion::accessToString(SIM_ACCESS_PG); 223 const char* rating = LLViewerRegion::accessToString(SIM_ACCESS_PG);
216 if (flags & 0x1) 224 if (flags & 0x1)
@@ -218,9 +226,9 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **)
218 rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE); 226 rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE);
219 } 227 }
220 228
221 snprintf(buffer, sizeof(buffer), "%s %d, %d, %d (%s)", /* Flawfinder: ignore */ 229 LLString location = llformat("%s %d, %d, %d (%s)",
222 sim_name, region_x, region_y, region_z, rating); 230 sim_name, region_x, region_y, region_z, rating);
223 self->mLocationEditor->setText(buffer); 231 self->mLocationEditor->setText(location);
224 232
225 BOOL show_auction = (auction_id > 0); 233 BOOL show_auction = (auction_id > 0);
226 self->mAuctionBtn->setVisible(show_auction); 234 self->mAuctionBtn->setVisible(show_auction);