summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterautoreplacesettings.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-12-12 09:22:14 -0500
committerOz Linden <oz@lindenlab.com>2012-12-12 09:22:14 -0500
commit66fee67397d17f03ac5492a903735e2e6eef9f1f (patch)
treef699babcf13b21fbebc30ca1f9ea8e9ce837e786 /indra/newview/llfloaterautoreplacesettings.cpp
parenta9ada0cc6a1418da0908f995b1369912a270b22d (diff)
MAINT-2051: Implement replacement of an existing autoreplace list
Diffstat (limited to 'indra/newview/llfloaterautoreplacesettings.cpp')
-rw-r--r--indra/newview/llfloaterautoreplacesettings.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp
index 7d1bcba978..5dcdded744 100644
--- a/indra/newview/llfloaterautoreplacesettings.cpp
+++ b/indra/newview/llfloaterautoreplacesettings.cpp
@@ -478,14 +478,25 @@ bool LLFloaterAutoReplaceSettings::callbackNewListName(const LLSD& notification,
bool LLFloaterAutoReplaceSettings::callbackListNameConflict(const LLSD& notification, const LLSD& response)
{
LLSD newList = notification["payload"]["list"];
-
+ std::string listName = LLAutoReplaceSettings::getListName(newList);
+
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch ( option )
{
case 0:
// Replace current list
- LL_INFOS("AutoReplace")<<"option 'replace current list' selected"<<LL_ENDL;
-
+ if ( LLAutoReplaceSettings::AddListOk == mSettings.replaceList(newList) )
+ {
+ LL_INFOS("AutoReplace") << "replaced list '"<<listName<<"'"<<LL_ENDL;
+ mSelectedListName = listName;
+ updateListNames();
+ updateListNamesControls();
+ updateReplacementsList();
+ }
+ else
+ {
+ LL_WARNS("AutoReplace")<<"failed to replace list '"<<listName<<"'"<<LL_ENDL;
+ }
break;
case 1: