Update rlva (mainly in llviewermessage.cpp)
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
* Copyright (c) 2009-2011, Kitty Barnett
|
||||
*
|
||||
* The source code in this file is provided to you under the terms of the
|
||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
||||
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
|
||||
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
|
||||
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge that
|
||||
* you have read and understood your obligations described above, and agree to
|
||||
@@ -28,15 +28,13 @@
|
||||
#include "llviewerstats.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llworld.h"
|
||||
#include "llnotifications.h"
|
||||
|
||||
#include "../lscript/lscript_byteformat.h" //Need LSCRIPTRunTimePermissionBits and SCRIPT_PERMISSION_*
|
||||
|
||||
#include "rlvcommon.h"
|
||||
#include "rlvhelper.h"
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvlocks.h"
|
||||
|
||||
#include "../lscript/lscript_byteformat.h" //Need LSCRIPTRunTimePermissionBits and SCRIPT_PERMISSION_*
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
using namespace LLOldEvents;
|
||||
@@ -72,14 +70,17 @@ using namespace LLOldEvents;
|
||||
}
|
||||
*/
|
||||
// Checked: 2009-11-13 (RLVa-1.1.0b) | Modified: RLVa-1.1.0b
|
||||
void RlvUtil::warnGiveToRLV()
|
||||
/*
|
||||
void RlvNotifications::warnGiveToRLV()
|
||||
{
|
||||
if ( (gSavedSettings.getWarning(RLV_SETTING_FIRSTUSE_GIVETORLV)) && (RlvSettings::getForbidGiveToRLV()) )
|
||||
LLNotifications::instance().add(RLV_SETTING_FIRSTUSE_GIVETORLV, LLSD(), LLSD(), &RlvUtil::onGiveToRLVConfirmation);
|
||||
}
|
||||
*/
|
||||
|
||||
// Checked: 2009-11-13 (RLVa-1.1.0b) | Modified: RLVa-1.1.0b
|
||||
void RlvUtil::onGiveToRLVConfirmation(const LLSD& notification, const LLSD& response)
|
||||
/*
|
||||
void RlvNotifications::onGiveToRLVConfirmation(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
gSavedSettings.setWarning(RLV_SETTING_FIRSTUSE_GIVETORLV, FALSE);
|
||||
|
||||
@@ -87,6 +88,7 @@ void RlvUtil::onGiveToRLVConfirmation(const LLSD& notification, const LLSD& resp
|
||||
if ( (0 == idxOption) || (1 == idxOption) )
|
||||
gSavedSettings.setBOOL(RLV_SETTING_FORBIDGIVETORLV, (idxOption == 1));
|
||||
}
|
||||
*/
|
||||
|
||||
// =========================================================================
|
||||
// RlvSettings
|
||||
@@ -100,7 +102,7 @@ bool RlvSettings::fLegacyNaming = true;
|
||||
bool RlvSettings::fNoSetEnv = false;
|
||||
bool RlvSettings::fShowNameTags = false;
|
||||
|
||||
// Checked: 2009-12-18 (RLVa-1.1.0k) | Modified: RLVa-1.1.0i
|
||||
// Checked: 2010-02-27 (RLVa-1.2.0a) | Modified: RLVa-1.1.0i
|
||||
void RlvSettings::initClass()
|
||||
{
|
||||
static bool fInitialized = false;
|
||||
@@ -134,6 +136,7 @@ void RlvSettings::initClass()
|
||||
|
||||
if (gSavedSettings.controlExists(RLV_SETTING_TOPLEVELMENU))
|
||||
gSavedSettings.getControl(RLV_SETTING_TOPLEVELMENU)->getSignal()->connect(boost::bind(&onChangedMenuLevel));
|
||||
|
||||
fInitialized = true;
|
||||
}
|
||||
}
|
||||
@@ -163,6 +166,7 @@ bool RlvSettings::onChangedAvatarOffset(const LLSD& sdValue)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Checked: 2011-08-16 (RLVa-1.4.0b) | Added: RLVa-1.4.0b
|
||||
bool RlvSettings::onChangedMenuLevel()
|
||||
{
|
||||
@@ -288,7 +292,7 @@ const std::string& RlvStrings::getAnonym(const std::string& strName)
|
||||
const std::string& RlvStrings::getString(const std::string& strStringName)
|
||||
{
|
||||
static const std::string strMissing = "(Missing RLVa string)";
|
||||
std::map<std::string, std::string>::const_iterator itString = m_StringMap.find(strStringName);
|
||||
string_map_t::const_iterator itString = m_StringMap.find(strStringName);
|
||||
return (itString != m_StringMap.end()) ? itString->second : strMissing;
|
||||
}
|
||||
|
||||
@@ -333,7 +337,7 @@ const char* RlvStrings::getStringFromReturnCode(ERlvCmdRet eRet)
|
||||
}
|
||||
|
||||
// Checked: 2012-02-25 (RLVa-1.4.5) | Modified: RLVa-1.4.5
|
||||
std::string RlvStrings::getVersion(bool fLegacy /*=false*/)
|
||||
std::string RlvStrings::getVersion(bool fLegacy)
|
||||
{
|
||||
return llformat("%s viewer v%d.%d.%d (RLVa %d.%d.%d)",
|
||||
( (!fLegacy) ? "RestrainedLove" : "RestrainedLife" ),
|
||||
@@ -341,7 +345,7 @@ std::string RlvStrings::getVersion(bool fLegacy /*=false*/)
|
||||
RLVa_VERSION_MAJOR, RLVa_VERSION_MINOR, RLVa_VERSION_PATCH);
|
||||
}
|
||||
|
||||
// Checked: 2010-04-18 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
|
||||
// Checked: 2010-04-18 (RLVa-1.4.0a) | Added: RLVa-1.2.0e
|
||||
std::string RlvStrings::getVersionAbout()
|
||||
{
|
||||
return llformat("RLV v%d.%d.%d / RLVa v%d.%d.%d%c" ,
|
||||
@@ -349,7 +353,7 @@ std::string RlvStrings::getVersionAbout()
|
||||
RLVa_VERSION_MAJOR, RLVa_VERSION_MINOR, RLVa_VERSION_PATCH, 'a' + RLVa_VERSION_BUILD);
|
||||
}
|
||||
|
||||
// Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.1.0a
|
||||
// Checked: 2010-03-27 (RLVa-1.4.0a) | Modified: RLVa-1.1.0a
|
||||
std::string RlvStrings::getVersionNum()
|
||||
{
|
||||
return llformat("%d%02d%02d%02d", RLV_VERSION_MAJOR, RLV_VERSION_MINOR, RLV_VERSION_PATCH, RLV_VERSION_BUILD);
|
||||
@@ -370,9 +374,6 @@ bool RlvUtil::m_fForceTp = false;
|
||||
// Checked: 2009-07-04 (RLVa-1.0.0a) | Modified: RLVa-1.0.0a
|
||||
void RlvUtil::filterLocation(std::string& strUTF8Text)
|
||||
{
|
||||
// TODO-RLVa: if either the region or parcel name is a simple word such as "a" or "the" then confusion will ensue?
|
||||
// -> not sure how you would go about preventing this though :|...
|
||||
|
||||
// Filter any mention of the surrounding region names
|
||||
LLWorld::region_list_t regions = LLWorld::getInstance()->getRegionList();
|
||||
const std::string& strHiddenRegion = RlvStrings::getString(RLV_STRING_HIDDEN_REGION);
|
||||
@@ -510,7 +511,7 @@ void RlvUtil::notifyFailedAssertion(const std::string& strAssert, const std::str
|
||||
LLNotificationsUtil::add("SystemMessageTip", argsNotify);
|
||||
}
|
||||
|
||||
// Checked: 2010-03-27 (RLVa-1.1.3a) | Modified: RLVa-1.2.0b
|
||||
// Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b
|
||||
void RlvUtil::sendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession)
|
||||
{
|
||||
// [See process_improved_im()]
|
||||
@@ -596,15 +597,16 @@ void rlvMenuToggleVisible()
|
||||
}*/
|
||||
}
|
||||
|
||||
bool RlvEnableIfNot::handleEvent(LLPointer<LLEvent>, const LLSD& userdata)
|
||||
// Checked: 2010-04-23 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
|
||||
bool RlvEnableIfNot::handleEvent(LLPointer<LLEvent>, const LLSD& sdParam)
|
||||
{
|
||||
bool fEnable = true;
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
ERlvBehaviour eBhvr = RlvCommand::getBehaviourFromString(userdata["data"].asString());
|
||||
ERlvBehaviour eBhvr = RlvCommand::getBehaviourFromString(sdParam["data"].asString());
|
||||
fEnable = (eBhvr != RLV_BHVR_UNKNOWN) ? !gRlvHandler.hasBehaviour(eBhvr) : true;
|
||||
}
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(fEnable);
|
||||
gMenuHolder->findControl(sdParam["control"].asString())->setValue(fEnable);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user