aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llhoverview.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llhoverview.cpp79
1 files changed, 43 insertions, 36 deletions
diff --git a/linden/indra/newview/llhoverview.cpp b/linden/indra/newview/llhoverview.cpp
index 6cc3873..082f413 100644
--- a/linden/indra/newview/llhoverview.cpp
+++ b/linden/indra/newview/llhoverview.cpp
@@ -38,7 +38,7 @@
38#include "llfontgl.h" 38#include "llfontgl.h"
39#include "message.h" 39#include "message.h"
40#include "llgl.h" 40#include "llgl.h"
41#include "llglimmediate.h" 41#include "llrender.h"
42#include "llfontgl.h" 42#include "llfontgl.h"
43#include "llparcel.h" 43#include "llparcel.h"
44#include "lldbstrings.h" 44#include "lldbstrings.h"
@@ -52,6 +52,7 @@
52#include "llpermissions.h" 52#include "llpermissions.h"
53#include "llresmgr.h" 53#include "llresmgr.h"
54#include "llselectmgr.h" 54#include "llselectmgr.h"
55#include "lltrans.h"
55#include "lltoolmgr.h" 56#include "lltoolmgr.h"
56#include "lltoolpie.h" 57#include "lltoolpie.h"
57#include "lltoolselectland.h" 58#include "lltoolselectland.h"
@@ -254,7 +255,7 @@ void LLHoverView::updateText()
254 } 255 }
255 else 256 else
256 { 257 {
257 line.append("Person"); 258 line.append(LLTrans::getString("TooltipPerson"));
258 } 259 }
259 mText.push_back(line); 260 mText.push_back(line);
260 } 261 }
@@ -275,7 +276,7 @@ void LLHoverView::updateText()
275 line.clear(); 276 line.clear();
276 if (nodep->mName.empty()) 277 if (nodep->mName.empty())
277 { 278 {
278 line.append("(no name)"); 279 line.append(LLTrans::getString("TooltipNoName"));
279 } 280 }
280 else 281 else
281 { 282 {
@@ -291,7 +292,7 @@ void LLHoverView::updateText()
291 292
292 // Line: "Owner: James Linden" 293 // Line: "Owner: James Linden"
293 line.clear(); 294 line.clear();
294 line.append("Owner: "); 295 line.append(LLTrans::getString("TooltipOwner") + " ");
295 296
296 if (nodep->mValid) 297 if (nodep->mValid)
297 { 298 {
@@ -302,7 +303,7 @@ void LLHoverView::updateText()
302 owner = nodep->mPermissions->getOwner(); 303 owner = nodep->mPermissions->getOwner();
303 if (LLUUID::null == owner) 304 if (LLUUID::null == owner)
304 { 305 {
305 line.append("Public"); 306 line.append(LLTrans::getString("TooltipPublic"));
306 } 307 }
307 else if(gCacheName->getFullName(owner, name)) 308 else if(gCacheName->getFullName(owner, name))
308 { 309 {
@@ -310,7 +311,7 @@ void LLHoverView::updateText()
310 } 311 }
311 else 312 else
312 { 313 {
313 line.append("Retrieving..."); 314 line.append(LLTrans::getString("RetrievingData"));
314 } 315 }
315 } 316 }
316 else 317 else
@@ -320,17 +321,17 @@ void LLHoverView::updateText()
320 if (gCacheName->getGroupName(owner, name)) 321 if (gCacheName->getGroupName(owner, name))
321 { 322 {
322 line.append(name); 323 line.append(name);
323 line.append("(Group)"); 324 line.append(LLTrans::getString("TooltipIsGroup"));
324 } 325 }
325 else 326 else
326 { 327 {
327 line.append("Retrieving..."); 328 line.append(LLTrans::getString("RetrievingData"));
328 } 329 }
329 } 330 }
330 } 331 }
331 else 332 else
332 { 333 {
333 line.append("Retrieving..."); 334 line.append(LLTrans::getString("RetrievingData"));
334 } 335 }
335 mText.push_back(line); 336 mText.push_back(line);
336 337
@@ -350,47 +351,48 @@ void LLHoverView::updateText()
350 line.clear(); 351 line.clear();
351 if (object->flagScripted()) 352 if (object->flagScripted())
352 { 353 {
353 line.append("Script "); 354
355 line.append(LLTrans::getString("TooltipFlagScript") + " ");
354 } 356 }
355 357
356 if (object->usePhysics()) 358 if (object->usePhysics())
357 { 359 {
358 line.append("Physics "); 360 line.append(LLTrans::getString("TooltipFlagPhysics") + " ");
359 } 361 }
360 362
361 if (object->flagHandleTouch() || (parent && parent->flagHandleTouch()) ) 363 if (object->flagHandleTouch() || (parent && parent->flagHandleTouch()) )
362 { 364 {
363 line.append("Touch "); 365 line.append(LLTrans::getString("TooltipFlagTouch") + " ");
364 suppressObjectHoverDisplay = FALSE; // Show tip 366 suppressObjectHoverDisplay = FALSE; // Show tip
365 } 367 }
366 368
367 if (object->flagTakesMoney() || (parent && parent->flagTakesMoney()) ) 369 if (object->flagTakesMoney() || (parent && parent->flagTakesMoney()) )
368 { 370 {
369 line.append("L$ "); 371 line.append(LLTrans::getString("TooltipFlagL$") + " ");
370 suppressObjectHoverDisplay = FALSE; // Show tip 372 suppressObjectHoverDisplay = FALSE; // Show tip
371 } 373 }
372 374
373 if (object->flagAllowInventoryAdd()) 375 if (object->flagAllowInventoryAdd())
374 { 376 {
375 line.append("Drop Inventory "); 377 line.append(LLTrans::getString("TooltipFlagDropInventory") + " ");
376 suppressObjectHoverDisplay = FALSE; // Show tip 378 suppressObjectHoverDisplay = FALSE; // Show tip
377 } 379 }
378 380
379 if (object->flagPhantom()) 381 if (object->flagPhantom())
380 { 382 {
381 line.append("Phantom "); 383 line.append(LLTrans::getString("TooltipFlagPhantom") + " ");
382 } 384 }
383 385
384 if (object->flagTemporary()) 386 if (object->flagTemporary())
385 { 387 {
386 line.append("Temporary "); 388 line.append(LLTrans::getString("TooltipFlagTemporary") + " ");
387 } 389 }
388 390
389 if (object->usePhysics() || 391 if (object->usePhysics() ||
390 object->flagHandleTouch() || 392 object->flagHandleTouch() ||
391 (parent && parent->flagHandleTouch()) ) 393 (parent && parent->flagHandleTouch()) )
392 { 394 {
393 line.append("(Right-click for menu) "); 395 line.append(LLTrans::getString("TooltipFlagRightClickMenu") + " ");
394 } 396 }
395 mText.push_back(line); 397 mText.push_back(line);
396 } 398 }
@@ -406,12 +408,14 @@ void LLHoverView::updateText()
406 nodep->mSaleInfo.getSaleType() != LLSaleInfo::FS_COPY); 408 nodep->mSaleInfo.getSaleType() != LLSaleInfo::FS_COPY);
407 if (for_copy) 409 if (for_copy)
408 { 410 {
409 line.append("Free to copy"); 411 line.append(LLTrans::getString("TooltipFreeToCopy"));
410 suppressObjectHoverDisplay = FALSE; // Show tip 412 suppressObjectHoverDisplay = FALSE; // Show tip
411 } 413 }
412 else if (for_sale) 414 else if (for_sale)
413 { 415 {
414 line.append(llformat("For Sale: L$%d", nodep->mSaleInfo.getSalePrice())); 416 LLString::format_map_t args;
417 args["[AMOUNT]"] = nodep->mSaleInfo.getSalePrice();
418 line.append(LLTrans::getString("TooltipForSaleL$", args));
415 suppressObjectHoverDisplay = FALSE; // Show tip 419 suppressObjectHoverDisplay = FALSE; // Show tip
416 } 420 }
417 else 421 else
@@ -422,7 +426,9 @@ void LLHoverView::updateText()
422 } 426 }
423 else 427 else
424 { 428 {
425 line.append("For Sale: Retrieving..."); 429 LLString::format_map_t args;
430 args["[MESSAGE]"] = LLTrans::getString("RetrievingData");
431 line.append(LLTrans::getString("TooltipForSaleMsg", args));
426 } 432 }
427 mText.push_back(line); 433 mText.push_back(line);
428 } 434 }
@@ -459,7 +465,7 @@ void LLHoverView::updateText()
459 465
460 // Line: "Land" 466 // Line: "Land"
461 line.clear(); 467 line.clear();
462 line.append("Land: "); 468 line.append(LLTrans::getString("TooltipLand"));
463 if (hover_parcel) 469 if (hover_parcel)
464 { 470 {
465 line.append(hover_parcel->getName()); 471 line.append(hover_parcel->getName());
@@ -468,25 +474,25 @@ void LLHoverView::updateText()
468 474
469 // Line: "Owner: James Linden" 475 // Line: "Owner: James Linden"
470 line.clear(); 476 line.clear();
471 line.append("Owner: "); 477 line.append(LLTrans::getString("TooltipOwner") + " ");
472 478
473 if ( hover_parcel ) 479 if ( hover_parcel )
474 { 480 {
475 std::string name; 481 std::string name;
476 if (LLUUID::null == owner) 482 if (LLUUID::null == owner)
477 { 483 {
478 line.append("Public"); 484 line.append(LLTrans::getString("TooltipPublic"));
479 } 485 }
480 else if (hover_parcel->getIsGroupOwned()) 486 else if (hover_parcel->getIsGroupOwned())
481 { 487 {
482 if (gCacheName->getGroupName(owner, name)) 488 if (gCacheName->getGroupName(owner, name))
483 { 489 {
484 line.append(name); 490 line.append(name);
485 line.append("(Group)"); 491 line.append(LLTrans::getString("TooltipIsGroup"));
486 } 492 }
487 else 493 else
488 { 494 {
489 line.append("Retrieving..."); 495 line.append(LLTrans::getString("RetrievingData"));
490 } 496 }
491 } 497 }
492 else if(gCacheName->getFullName(owner, name)) 498 else if(gCacheName->getFullName(owner, name))
@@ -495,12 +501,12 @@ void LLHoverView::updateText()
495 } 501 }
496 else 502 else
497 { 503 {
498 line.append("Retrieving..."); 504 line.append(LLTrans::getString("RetrievingData"));
499 } 505 }
500 } 506 }
501 else 507 else
502 { 508 {
503 line.append("Retrieving..."); 509 line.append(LLTrans::getString("RetrievingData"));
504 } 510 }
505 mText.push_back(line); 511 mText.push_back(line);
506 512
@@ -519,27 +525,26 @@ void LLHoverView::updateText()
519 { 525 {
520 if ( hover_parcel->getAllowGroupModify() ) 526 if ( hover_parcel->getAllowGroupModify() )
521 { 527 {
522 line.append("Group Build"); 528 line.append(LLTrans::getString("TooltipFlagGroupBuild"));
523 } 529 }
524 else 530 else
525 { 531 {
526 line.append("No Build"); 532 line.append(LLTrans::getString("TooltipFlagNoBuild"));
527 } 533 }
528
529 words++; 534 words++;
530 } 535 }
531 536
532 if ( !hover_parcel->getAllowTerraform() ) 537 if ( !hover_parcel->getAllowTerraform() )
533 { 538 {
534 if (words) line.append(", "); 539 if (words) line.append(", ");
535 line.append("No Edit"); 540 line.append(LLTrans::getString("TooltipFlagNoEdit"));
536 words++; 541 words++;
537 } 542 }
538 543
539 if ( hover_parcel->getAllowDamage() ) 544 if ( hover_parcel->getAllowDamage() )
540 { 545 {
541 if (words) line.append(", "); 546 if (words) line.append(", ");
542 line.append("Not Safe"); 547 line.append(LLTrans::getString("TooltipFlagNotSafe"));
543 words++; 548 words++;
544 } 549 }
545 550
@@ -547,7 +552,7 @@ void LLHoverView::updateText()
547 if ( !hover_parcel->getAllowFly() ) 552 if ( !hover_parcel->getAllowFly() )
548 { 553 {
549 if (words) line.append(", "); 554 if (words) line.append(", ");
550 line.append("No Fly"); 555 line.append(LLTrans::getString("TooltipFlagNoFly"));
551 words++; 556 words++;
552 } 557 }
553 558
@@ -556,11 +561,11 @@ void LLHoverView::updateText()
556 if (words) line.append(", "); 561 if (words) line.append(", ");
557 if ( hover_parcel->getAllowGroupScripts() ) 562 if ( hover_parcel->getAllowGroupScripts() )
558 { 563 {
559 line.append("Group Scripts"); 564 line.append(LLTrans::getString("TooltipFlagGroupScripts"));
560 } 565 }
561 else 566 else
562 { 567 {
563 line.append("No Scripts"); 568 line.append(LLTrans::getString("TooltipFlagNoScripts"));
564 } 569 }
565 570
566 words++; 571 words++;
@@ -583,7 +588,9 @@ void LLHoverView::updateText()
583 */ 588 */
584 if (hover_parcel && hover_parcel->getParcelFlag(PF_FOR_SALE)) 589 if (hover_parcel && hover_parcel->getParcelFlag(PF_FOR_SALE))
585 { 590 {
586 line = llformat("For Sale: L$%d", hover_parcel->getSalePrice() ); 591 LLString::format_map_t args;
592 args["[AMOUNT]"] = hover_parcel->getSalePrice();
593 line = LLTrans::getString("TooltipForSaleL$", args);
587 mText.push_back(line); 594 mText.push_back(line);
588 } 595 }
589 } 596 }