Partially reverting fix for FIRE-10178 (1f33a208e62b) because of problems with Growl, restoring old behaviour for it in Keyword Alerts
Moving back gGrowlManager->notify to llviewerchat.cpp; "FSKeywords::notify" is now used only for triggering sound
parent
0f50ea367a
commit
f441613e79
|
|
@ -4,7 +4,6 @@
|
|||
#include "fskeywords.h"
|
||||
#include "llui.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "growlmanager.h" // <FS:PP> FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
//#include <boost/algorithm/string/find.hpp> //for boost::ifind_first
|
||||
|
|
@ -62,18 +61,5 @@ void FSKeywords::notify(const LLChat& chat)
|
|||
static LLCachedControl<bool> PlayModeUISndFSKeywordSound(gSavedSettings, "PlayModeUISndFSKeywordSound");
|
||||
if(PlayModeUISndFSKeywordSound)
|
||||
LLUI::sAudioCallback(LLUUID(gSavedSettings.getString("UISndFSKeywordSound")));
|
||||
|
||||
std::string msg = chat.mFromName;
|
||||
std::string prefix = chat.mText.substr(0, 4);
|
||||
if(prefix == "/me " || prefix == "/me'" || prefix == "/ME " || prefix == "/ME'")
|
||||
{
|
||||
msg = msg + chat.mText.substr(3);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = msg + ": " + chat.mText;
|
||||
}
|
||||
|
||||
gGrowlManager->notify("Keyword Alert", msg, "Keyword Alert");
|
||||
}
|
||||
// </FS:PP>
|
||||
|
|
|
|||
|
|
@ -133,6 +133,22 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color, bool is_l
|
|||
//Keyword alerts -KC
|
||||
if ((gAgentID != chat.mFromID || chat.mFromName == SYSTEM_FROM) && FSKeywords::getInstance()->chatContainsKeyword(chat, is_local))
|
||||
{
|
||||
static LLCachedControl<bool> FSEnableGrowl(gSavedSettings, "FSEnableGrowl");
|
||||
if (FSEnableGrowl)
|
||||
{
|
||||
std::string msg = chat.mFromName;
|
||||
std::string prefix = chat.mText.substr(0, 4);
|
||||
if(prefix == "/me " || prefix == "/me'" || prefix == "/ME " || prefix == "/ME'")
|
||||
{
|
||||
msg = msg + chat.mText.substr(3);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = msg + ": " + chat.mText;
|
||||
}
|
||||
gGrowlManager->notify("Keyword Alert", msg, "Keyword Alert");
|
||||
}
|
||||
|
||||
static LLCachedControl<bool> sFSKeywordChangeColor(gSavedPerAccountSettings, "FSKeywordChangeColor");
|
||||
if (sFSKeywordChangeColor)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue