- internal : removed dead code relating to the "notify behaviour" extension
-> hasn't been functional since we moved to viewer 2 and seems of limited use now --HG-- branch : RLVameow-7.2.2
parent
c80812fb9f
commit
5dba034963
|
|
@ -37,22 +37,6 @@
|
|||
// RlvNotifications
|
||||
//
|
||||
|
||||
#ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
||||
// Checked: 2009-12-05 (RLVa-1.1.0h) | Added: RLVa-1.1.0h
|
||||
/*
|
||||
void RlvNotifications::notifyBehaviour(ERlvBehaviour eBhvr, ERlvParamType eType)
|
||||
{
|
||||
const std::string& strMsg = RlvStrings::getBehaviourNotificationString(eBhvr, eType);
|
||||
if (!strMsg.empty())
|
||||
{
|
||||
LLSD argsNotify;
|
||||
argsNotify["MESSAGE"] = strMsg;
|
||||
LLNotifications::instance().add("SystemMessageTip", argsNotify);
|
||||
}
|
||||
}
|
||||
*/
|
||||
#endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
||||
|
||||
// Checked: 2009-11-13 (RLVa-1.1.0b) | Modified: RLVa-1.1.0b
|
||||
/*
|
||||
void RlvNotifications::warnGiveToRLV()
|
||||
|
|
@ -151,10 +135,6 @@ bool RlvSettings::onChangedSettingBOOL(const LLSD& sdValue, bool* pfSetting)
|
|||
|
||||
std::vector<std::string> RlvStrings::m_Anonyms;
|
||||
std::map<std::string, std::string> RlvStrings::m_StringMap;
|
||||
#ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
||||
std::map<ERlvBehaviour, std::string> RlvStrings::m_BhvrAddMap;
|
||||
std::map<ERlvBehaviour, std::string> RlvStrings::m_BhvrRemMap;
|
||||
#endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
||||
|
||||
// Checked: 2010-03-09 (RLVa-1.2.0a) | Added: RLVa-1.1.0h
|
||||
void RlvStrings::initClass()
|
||||
|
|
@ -190,25 +170,6 @@ void RlvStrings::initClass()
|
|||
m_Anonyms.push_back(pAnonymNode->getTextContents());
|
||||
}
|
||||
}
|
||||
#ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
||||
else if (pNode->hasName("behaviour-notifications"))
|
||||
{
|
||||
std::string strBhvr, strType; ERlvBehaviour eBhvr;
|
||||
for (LLXMLNode* pNotifyNode = pNode->getFirstChild(); pNotifyNode != NULL; pNotifyNode = pNotifyNode->getNextSibling())
|
||||
{
|
||||
if ( (!pNotifyNode->hasName("notification")) || (!pNotifyNode->getAttributeString("type", strType)) ||
|
||||
(!pNotifyNode->getAttributeString("behaviour", strBhvr)) ||
|
||||
((eBhvr = RlvCommand::getBehaviourFromString(strBhvr)) == RLV_BHVR_UNKNOWN) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if ("add" == strType)
|
||||
m_BhvrAddMap.insert(std::pair<ERlvBehaviour, std::string>(eBhvr, pNotifyNode->getTextContents()));
|
||||
else if ("rem" == strType)
|
||||
m_BhvrRemMap.insert(std::pair<ERlvBehaviour, std::string>(eBhvr, pNotifyNode->getTextContents()));
|
||||
}
|
||||
}
|
||||
#endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
||||
}
|
||||
|
||||
if ( (m_StringMap.empty()) || (m_Anonyms.empty()) )
|
||||
|
|
@ -233,24 +194,6 @@ const std::string& RlvStrings::getAnonym(const std::string& strName)
|
|||
return m_Anonyms[nHash % m_Anonyms.size()];
|
||||
}
|
||||
|
||||
#ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
||||
// Checked: 2009-12-05 (RLVa-1.1.0h) | Added: RLVa-1.1.0h
|
||||
const std::string& RlvStrings::getBehaviourNotificationString(ERlvBehaviour eBhvr, ERlvParamType eType)
|
||||
{
|
||||
if (RLV_TYPE_ADD == eType)
|
||||
{
|
||||
std::map<ERlvBehaviour, std::string>::const_iterator itString = m_BhvrAddMap.find(eBhvr);
|
||||
return (itString != m_BhvrAddMap.end()) ? itString->second : LLStringUtil::null;
|
||||
}
|
||||
else if (RLV_TYPE_REMOVE == eType)
|
||||
{
|
||||
std::map<ERlvBehaviour, std::string>::const_iterator itString = m_BhvrRemMap.find(eBhvr);
|
||||
return (itString != m_BhvrRemMap.end()) ? itString->second : LLStringUtil::null;
|
||||
}
|
||||
return LLStringUtil::null;
|
||||
}
|
||||
#endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
||||
|
||||
// Checked: 2009-11-11 (RLVa-1.1.0a) | Added: RLVa-1.1.0a
|
||||
const std::string& RlvStrings::getString(const std::string& strStringName)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ template<typename T> inline T rlvGetSetting(const std::string& strSetting, const
|
|||
return (gSavedSettings.controlExists(strSetting)) ? gSavedSettings.get<T>(strSetting) : defaultValue;
|
||||
}
|
||||
|
||||
template<typename T> inline T rlvGetPerUserSettings(const std::string& strSetting, const T& defaultValue)
|
||||
template<typename T> inline T rlvGetPerUserSetting(const std::string& strSetting, const T& defaultValue)
|
||||
{
|
||||
RLV_ASSERT_DBG(gSavedPerAccountSettings.controlExists(strSetting));
|
||||
return (gSavedPerAccountSettings.controlExists(strSetting)) ? gSavedPerAccountSettings.get<T>(strSetting) : defaultValue;
|
||||
|
|
@ -97,7 +97,7 @@ public:
|
|||
static bool getShowNameTags() { return fShowNameTags; }
|
||||
|
||||
#ifdef RLV_EXTENSION_STARTLOCATION
|
||||
static bool getLoginLastLocation() { return rlvGetPerUserSettings<bool>(RLV_SETTING_LOGINLASTLOCATION, true); }
|
||||
static bool getLoginLastLocation() { return rlvGetPerUserSetting<bool>(RLV_SETTING_LOGINLASTLOCATION, true); }
|
||||
static void updateLoginLastLocation();
|
||||
#endif // RLV_EXTENSION_STARTLOCATION
|
||||
|
||||
|
|
@ -136,10 +136,6 @@ public:
|
|||
protected:
|
||||
static std::vector<std::string> m_Anonyms;
|
||||
static std::map<std::string, std::string> m_StringMap;
|
||||
#ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
||||
static std::map<ERlvBehaviour, std::string> m_BhvrAddMap;
|
||||
static std::map<ERlvBehaviour, std::string> m_BhvrRemMap;
|
||||
#endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#define RLV_EXTENSION_CMD_GETSETDEBUG_EX // Extends the debug variables accessible through @getdebug_xxx/@setdebug_xxx
|
||||
#define RLV_EXTENSION_CMD_FINDFOLDERS // @findfolders:<option>=<channel> - @findfolder with multiple results
|
||||
#define RLV_EXTENSION_FORCEWEAR_GESTURES // @attach*/detach* commands also (de)activate gestures
|
||||
#define RLV_EXTENSION_NOTIFY_BEHAVIOUR // Provides the option to show a customizable notification whenever a behaviour gets (un)set
|
||||
#define RLV_EXTENSION_STARTLOCATION // Reenables "Start Location" at login if not @tploc=n or @unsit=n restricted at last logoff
|
||||
#define RLV_EXPERIMENTAL // Enables/disables experimental features en masse
|
||||
#define RLV_EXPERIMENTAL_CMDS // Enables/disables experimental commands en masse
|
||||
|
|
|
|||
|
|
@ -1375,16 +1375,6 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
|
|||
}
|
||||
|
||||
m_OnBehaviour(eBhvr, eType);
|
||||
|
||||
// Show an - optional - notification on every global behaviour change
|
||||
#ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
||||
/*
|
||||
if ( ((RLV_TYPE_ADD == eType) && (1 == m_Behaviours[eBhvr])) || (0 == m_Behaviours[eBhvr]) )
|
||||
{
|
||||
RlvNotifications::notifyBehaviour(eBhvr, eType);
|
||||
}
|
||||
*/
|
||||
#endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
||||
}
|
||||
|
||||
return eRet;
|
||||
|
|
|
|||
Loading…
Reference in New Issue