From 6d9c0fab8f2c19fa624e3c1f697ee9c7f08d9245 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 11 May 2012 14:31:45 -0400 Subject: remove author tracking, non-wordstyle option, and notifications --- .../newview/app_settings/settings_autoreplace.xml | 18 ------ indra/newview/llautoreplace.cpp | 71 ---------------------- indra/newview/llautoreplace.h | 2 - indra/newview/llautoreplacefloater.cpp | 5 -- .../skins/default/xui/en/floater_autoreplace.xml | 63 +------------------ .../newview/skins/default/xui/en/notifications.xml | 7 --- 6 files changed, 1 insertion(+), 165 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings_autoreplace.xml b/indra/newview/app_settings/settings_autoreplace.xml index 4669ba5822..790cd62a02 100644 --- a/indra/newview/app_settings/settings_autoreplace.xml +++ b/indra/newview/app_settings/settings_autoreplace.xml @@ -2,25 +2,15 @@ Custom - announce - 0 - author - You data enabled 1 priority 10 - wordStyle - 1 Abbreviations - announce - 0 - author - Wulf / TankMaster data afaic @@ -90,15 +80,9 @@ 1 priority 4 - wordStyle - 1 Spelling Corrections - announce - 0 - author - LordGregGreg / Wikipedia data Amercia @@ -8362,8 +8346,6 @@ 1 priority 5 - wordStyle - 1 diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp index a5683e4190..fa46f53e96 100644 --- a/indra/newview/llautoreplace.cpp +++ b/indra/newview/llautoreplace.cpp @@ -137,8 +137,6 @@ LLSD AutoReplace::exportList(std::string listName) { toReturn["listName"]=listName; toReturn["data"]=mAutoReplaces[listName]["data"]; - toReturn["author"]=mAutoReplaces[listName]["author"]; - toReturn["wordStyle"]=mAutoReplaces[listName]["wordStyle"]; toReturn["priority"]=mAutoReplaces[listName]["priority"]; } return toReturn; @@ -152,9 +150,6 @@ BOOL AutoReplace::addReplacementList(LLSD newList) LLSD newPart; newPart["data"]=newList["data"]; newPart["enabled"]=TRUE; - newPart["announce"]=FALSE; - newPart["author"]=newList["author"]; - newPart["wordStyle"]=newList["wordStyle"]; newPart["priority"]=newList["priority"].asInteger(); llinfos << "adding new list with settings priority "< " << replacement.c_str() << llendl; return replacement; } @@ -353,8 +297,6 @@ std::string AutoReplace::replaceWords(std::string words) { static LLCachedControl perform_autoreplace(gSavedSettings, "AutoReplace"); if(!(perform_autoreplace))return words; - //*TODO update this function to use the "wordStyle" thing, - //but so far this function is never used, so later boost_tokenizer tokens(words, boost::char_separator(" ")); for (boost_tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) @@ -369,16 +311,6 @@ std::string AutoReplace::replaceWords(std::string words) if((loc_map["data"].has(currentWord))&&(loc_map["enabled"].asBoolean())) { std::string replacement = loc_map["data"][currentWord]; - if(loc_map["announce"].asBoolean()) - { - LLSD args; - //"[Before]" has been auto replaced by "[Replacement]" - // based on your [ListName] list. - args["BEFORE"] = currentWord; - args["LISTNAME"]=location; - args["REPLACEMENT"]=replacement; - LLNotificationsUtil::add("AutoReplace",args); - } lldebugs << "found a word in list " << location.c_str() << " and it will replace " << currentWord.c_str() << " => " << replacement.c_str() << llendl; int wordStart = words.find(currentWord); words.replace(wordStart,currentWord.length(),replacement); @@ -399,12 +331,9 @@ BOOL AutoReplace::addEntryToList(std::string wrong, std::string right, std::stri } else if(listName == "Custom") { - mAutoReplaces[listName]["announce"] = 0; - mAutoReplaces[listName]["author"] = "You"; mAutoReplaces[listName]["data"][wrong] = right; mAutoReplaces[listName]["enabled"] = 1; mAutoReplaces[listName]["priority"] = 10; - mAutoReplaces[listName]["wordStyle"] = 1; return TRUE; } diff --git a/indra/newview/llautoreplace.h b/indra/newview/llautoreplace.h index b11c124a62..6c531d0040 100644 --- a/indra/newview/llautoreplace.h +++ b/indra/newview/llautoreplace.h @@ -33,9 +33,7 @@ public: BOOL addReplacementList(LLSD newList); BOOL removeReplacementList(std::string listName); BOOL setListEnabled(std::string listName, BOOL enabled); - BOOL setListAnnounceeState(std::string listName, BOOL announce); BOOL setListPriority(std::string listName, int priority); - BOOL setListStyle(std::string listName, BOOL announce); std::string replaceWords(std::string words); std::string replaceWord(std::string currentWord); BOOL addEntryToList(std::string wrong, std::string right, std::string listName); diff --git a/indra/newview/llautoreplacefloater.cpp b/indra/newview/llautoreplacefloater.cpp index 01950adb37..ab299aeffe 100644 --- a/indra/newview/llautoreplacefloater.cpp +++ b/indra/newview/llautoreplacefloater.cpp @@ -131,10 +131,7 @@ void AutoReplaceFloater::updateItemsList() LLSD listData = AutoReplace::getInstance()->getAutoReplaceEntries(listName); childSetValue("ac_list_enabled",listData["enabled"].asBoolean()); - childSetValue("ac_list_style",listData["wordStyle"].asBoolean()); - childSetValue("ac_list_show",listData["announce"].asBoolean()); childSetValue("ac_text_name",listName); - childSetValue("ac_text_author",listData["author"]); childSetValue("ac_priority",listData["priority"]); LLSD autoReplaces = listData["data"]; @@ -201,7 +198,6 @@ void AutoReplaceFloater::updateListControlsEnabled(BOOL selected) childSetEnabled("ac_text1",selected); childSetEnabled("ac_text2",selected); childSetEnabled("ac_text_name",selected); - childSetEnabled("ac_text_author",selected); childSetEnabled("ac_list_enabled",selected); childSetEnabled("ac_list_show",selected); childSetEnabled("ac_list_style",selected); @@ -256,7 +252,6 @@ void AutoReplaceFloater::onEntrySettingChange(LLUICtrl* caller, void* user_data) { std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); AutoReplace::getInstance()->setListEnabled(listName,self->childGetValue("ac_list_enabled").asBoolean()); - AutoReplace::getInstance()->setListAnnounceeState(listName,self->childGetValue("ac_list_show").asBoolean()); AutoReplace::getInstance()->setListStyle(listName,self->childGetValue("ac_list_style").asBoolean()); AutoReplace::getInstance()->setListPriority(listName,self->childGetValue("ac_priority").asInteger()); diff --git a/indra/newview/skins/default/xui/en/floater_autoreplace.xml b/indra/newview/skins/default/xui/en/floater_autoreplace.xml index 5f53e61fa2..f68aeacb97 100644 --- a/indra/newview/skins/default/xui/en/floater_autoreplace.xml +++ b/indra/newview/skins/default/xui/en/floater_autoreplace.xml @@ -126,39 +126,6 @@ name="ac_text_name"> List Name - - Author: - - - - Author Name - - -