From 39fc4895d2d003b9c63ff8e0181c864862d82795 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 30 Oct 2020 13:20:02 +0800 Subject: [PATCH] Fix to work with saner new behaviour --- ryzom/client/src/interface_v3/chat_window.cpp | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/ryzom/client/src/interface_v3/chat_window.cpp b/ryzom/client/src/interface_v3/chat_window.cpp index 3b3063879..8d7551803 100644 --- a/ryzom/client/src/interface_v3/chat_window.cpp +++ b/ryzom/client/src/interface_v3/chat_window.cpp @@ -1093,10 +1093,7 @@ CChatWindow *CChatWindowManager::createChatWindow(const CChatWindowDesc &desc) if (desc.Id.empty()) _WindowID++; - if (desc.Localize) - _ChatWindowMap[CI18N::get(desc.Title.toString())] = w; - else - _ChatWindowMap[desc.Title] = w; + _ChatWindowMap[desc.Title] = w; w->setAHOnActive(desc.AHOnActive); w->setAHOnActiveParams(desc.AHOnActiveParams); @@ -1135,10 +1132,7 @@ CChatWindow *CChatWindowManager::createChatGroupWindow(const CChatWindowDesc &de if (desc.Id.empty()) _WindowID++; - if (desc.Localize) - _ChatWindowMap[CI18N::get(desc.Title.toString())] = w; - else - _ChatWindowMap[desc.Title] = w; + _ChatWindowMap[desc.Title] = w; w->setAHOnActive(desc.AHOnActive); w->setAHOnActiveParams(desc.AHOnActiveParams); @@ -1185,7 +1179,7 @@ void CChatWindowManager::removeChatWindow(const ucstring &title) TChatWindowMap::iterator it = _ChatWindowMap.find(title); if (it == _ChatWindowMap.end()) { - nlwarning("unknwown window %s", title.toString().c_str()); + nlwarning("Unknown chat window '%s'", title.toUtf8().c_str()); return; } it->second->deleteContainer(); @@ -1225,18 +1219,9 @@ bool CChatWindowManager::rename(const ucstring &oldName, const ucstring &newName if (newWin != NULL) return false; // target window exists TChatWindowMap::iterator it = _ChatWindowMap.find(oldName); if (it == _ChatWindowMap.end()) return false; - if (newNameLocalize) - { - _ChatWindowMap[CI18N::get(newName.toString())] = it->second; - it->second->getContainer()->setLocalize(true); - it->second->getContainer()->setTitle(newName.toString()); - } - else - { - _ChatWindowMap[newName] = it->second; - it->second->getContainer()->setLocalize(false); - it->second->getContainer()->setUCTitle(newName); - } + _ChatWindowMap[newName] = it->second; + it->second->getContainer()->setLocalize(false); + it->second->getContainer()->setTitle(newName.toUtf8()); _ChatWindowMap.erase(it); return true; }