From 798d367d54a6c6379ad355bd8345fa40e31e7fe9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 6 Sep 2008 18:24:57 -0500 Subject: Second Life viewer sources 1.21.0-RC --- linden/indra/newview/llfirstuse.cpp | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'linden/indra/newview/llfirstuse.cpp') diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp index b3d383d..fc469f1 100644 --- a/linden/indra/newview/llfirstuse.cpp +++ b/linden/indra/newview/llfirstuse.cpp @@ -42,12 +42,13 @@ #include "llviewercontrol.h" #include "llui.h" #include "llappviewer.h" +#include "lltracker.h" // static -std::set LLFirstUse::sConfigVariables; +std::set LLFirstUse::sConfigVariables; // static -void LLFirstUse::addConfigVariable(const LLString& var) +void LLFirstUse::addConfigVariable(const std::string& var) { //Don't add the warning, now that we're storing the default in the settings_default.xml file //gSavedSettings.addWarning(var); @@ -58,7 +59,7 @@ void LLFirstUse::addConfigVariable(const LLString& var) void LLFirstUse::disableFirstUse() { // Set all first-use warnings to disabled - for (std::set::iterator iter = sConfigVariables.begin(); + for (std::set::iterator iter = sConfigVariables.begin(); iter != sConfigVariables.end(); ++iter) { gSavedSettings.setWarning(*iter, FALSE); @@ -69,7 +70,7 @@ void LLFirstUse::disableFirstUse() void LLFirstUse::resetFirstUse() { // Set all first-use warnings to disabled - for (std::set::iterator iter = sConfigVariables.begin(); + for (std::set::iterator iter = sConfigVariables.begin(); iter != sConfigVariables.end(); ++iter) { gSavedSettings.setWarning(*iter, TRUE); @@ -84,7 +85,7 @@ void LLFirstUse::useBalanceIncrease(S32 delta) { gSavedSettings.setWarning("FirstBalanceIncrease", FALSE); - LLString::format_map_t args; + LLStringUtil::format_map_t args; args["[AMOUNT]"] = llformat("%d",delta); LLNotifyBox::showXml("FirstBalanceIncrease", args); } @@ -98,7 +99,7 @@ void LLFirstUse::useBalanceDecrease(S32 delta) { gSavedSettings.setWarning("FirstBalanceDecrease", FALSE); - LLString::format_map_t args; + LLStringUtil::format_map_t args; args["[AMOUNT]"] = llformat("%d",-delta); LLNotifyBox::showXml("FirstBalanceDecrease", args); } @@ -162,9 +163,13 @@ void LLFirstUse::useTeleport() { if (gSavedSettings.getWarning("FirstTeleport")) { - gSavedSettings.setWarning("FirstTeleport", FALSE); + LLVector3d teleportDestination = LLTracker::getTrackedPositionGlobal(); + if(teleportDestination != LLVector3d::zero) + { + gSavedSettings.setWarning("FirstTeleport", FALSE); - LLNotifyBox::showXml("FirstTeleport"); + LLNotifyBox::showXml("FirstTeleport"); + } } } @@ -220,7 +225,7 @@ void LLFirstUse::useSandbox() { gSavedSettings.setWarning("FirstSandbox", FALSE); - LLString::format_map_t args; + LLStringUtil::format_map_t args; args["[HOURS]"] = llformat("%d",SANDBOX_CLEAN_FREQ); args["[TIME]"] = llformat("%d",SANDBOX_FIRST_CLEAN_HOUR); LLNotifyBox::showXml("FirstSandbox", args); -- cgit v1.1