aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatertools.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloatertools.cpp56
1 files changed, 41 insertions, 15 deletions
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp
index 4aa817e..4f8ed08 100644
--- a/linden/indra/newview/llfloatertools.cpp
+++ b/linden/indra/newview/llfloatertools.cpp
@@ -2,6 +2,8 @@
2 * @file llfloatertools.cpp 2 * @file llfloatertools.cpp
3 * @brief The edit tools, including move, position, land, etc. 3 * @brief The edit tools, including move, position, land, etc.
4 * 4 *
5 * $LicenseInfo:firstyear=2002&license=viewergpl$
6 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 7 * Copyright (c) 2002-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"
@@ -314,6 +317,16 @@ BOOL LLFloaterTools::postBuild()
314 mTab->setBorderVisible(FALSE); 317 mTab->setBorderVisible(FALSE);
315 mTab->selectFirstTab(); 318 mTab->selectFirstTab();
316 } 319 }
320
321 mStatusText["rotate"] = childGetText("status_rotate");
322 mStatusText["scale"] = childGetText("status_scale");
323 mStatusText["move"] = childGetText("status_move");
324 mStatusText["modifyland"] = childGetText("status_modifyland");
325 mStatusText["camera"] = childGetText("status_camera");
326 mStatusText["grab"] = childGetText("status_grab");
327 mStatusText["place"] = childGetText("status_place");
328 mStatusText["selectland"] = childGetText("status_selectland");
329
317 return TRUE; 330 return TRUE;
318} 331}
319 332
@@ -415,9 +428,17 @@ LLFloaterTools::~LLFloaterTools()
415 // children automatically deleted 428 // children automatically deleted
416} 429}
417 430
418void LLFloaterTools::setStatusText(const LLString& text) 431void LLFloaterTools::setStatusText(const std::string& text)
419{ 432{
420 mTextStatus->setText(text); 433 std::map<std::string, std::string>::iterator iter = mStatusText.find(text);
434 if (iter != mStatusText.end())
435 {
436 mTextStatus->setText(iter->second);
437 }
438 else
439 {
440 mTextStatus->setText(text);
441 }
421} 442}
422 443
423void LLFloaterTools::refresh() 444void LLFloaterTools::refresh()
@@ -490,6 +511,11 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
490 { 511 {
491 return; 512 return;
492 } 513 }
514
515 if ( isMinimized() )
516 { // SL looks odd if we draw the tools while the window is minimized
517 return;
518 }
493 519
494 // Focus buttons 520 // Focus buttons
495 BOOL focus_visible = ( tool == gToolCamera ); 521 BOOL focus_visible = ( tool == gToolCamera );
@@ -579,27 +605,27 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
579 605
580 if (mComboGridMode) 606 if (mComboGridMode)
581 { 607 {
582 mComboGridMode ->setVisible( edit_visible ); 608 mComboGridMode->setVisible( edit_visible );
583 S32 index = mComboGridMode->getCurrentIndex(); 609 S32 index = mComboGridMode->getCurrentIndex();
584 mComboGridMode->removeall(); 610 mComboGridMode->removeall();
585 611
586 switch (mObjectSelection->getSelectType()) 612 switch (mObjectSelection->getSelectType())
587 { 613 {
588 case SELECT_TYPE_HUD: 614 case SELECT_TYPE_HUD:
589 mComboGridMode->add("Screen"); 615 mComboGridMode->add(childGetText("grid_screen_text"));
590 mComboGridMode->add("Local"); 616 mComboGridMode->add(childGetText("grid_local_text"));
591 //mComboGridMode->add("Reference"); 617 //mComboGridMode->add(childGetText("grid_reference_text"));
592 break; 618 break;
593 case SELECT_TYPE_WORLD: 619 case SELECT_TYPE_WORLD:
594 mComboGridMode->add("World"); 620 mComboGridMode->add(childGetText("grid_world_text"));
595 mComboGridMode->add("Local"); 621 mComboGridMode->add(childGetText("grid_local_text"));
596 mComboGridMode->add("Reference"); 622 mComboGridMode->add(childGetText("grid_reference_text"));
597 break; 623 break;
598 case SELECT_TYPE_ATTACHMENT: 624 case SELECT_TYPE_ATTACHMENT:
599 mComboGridMode->add("Attachment"); 625 mComboGridMode->add(childGetText("grid_attachment_text"));
600 mComboGridMode->add("Local"); 626 mComboGridMode->add(childGetText("grid_local_text"));
601 mComboGridMode->add("Reference"); 627 mComboGridMode->add(childGetText("grid_reference_text"));
602 break; 628 break;
603 } 629 }
604 630
605 mComboGridMode->setCurrentByIndex(index); 631 mComboGridMode->setCurrentByIndex(index);