aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llimview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llimview.cpp')
-rw-r--r--linden/indra/newview/llimview.cpp43
1 files changed, 21 insertions, 22 deletions
diff --git a/linden/indra/newview/llimview.cpp b/linden/indra/newview/llimview.cpp
index 2f9c1eb..92e46b4 100644
--- a/linden/indra/newview/llimview.cpp
+++ b/linden/indra/newview/llimview.cpp
@@ -40,7 +40,6 @@
40#include "llhttpclient.h" 40#include "llhttpclient.h"
41#include "llsdutil.h" 41#include "llsdutil.h"
42#include "llstring.h" 42#include "llstring.h"
43#include "linked_lists.h"
44#include "llvieweruictrlfactory.h" 43#include "llvieweruictrlfactory.h"
45 44
46#include "llagent.h" 45#include "llagent.h"
@@ -158,7 +157,7 @@ LLFloaterIM::LLFloaterIM()
158 157
159BOOL LLFloaterIM::postBuild() 158BOOL LLFloaterIM::postBuild()
160{ 159{
161 sOnlyUserMessage = getFormattedUIString("only_user_message"); 160 sOnlyUserMessage = getString("only_user_message");
162 sOfflineMessage = getUIString("offline_message"); 161 sOfflineMessage = getUIString("offline_message");
163 162
164 sInviteMessage = getUIString("invite_message"); 163 sInviteMessage = getUIString("invite_message");
@@ -166,75 +165,75 @@ BOOL LLFloaterIM::postBuild()
166 if ( sErrorStringsMap.find("generic") == sErrorStringsMap.end() ) 165 if ( sErrorStringsMap.find("generic") == sErrorStringsMap.end() )
167 { 166 {
168 sErrorStringsMap["generic"] = 167 sErrorStringsMap["generic"] =
169 getFormattedUIString("generic_request_error"); 168 getString("generic_request_error");
170 } 169 }
171 170
172 if ( sErrorStringsMap.find("unverified") == 171 if ( sErrorStringsMap.find("unverified") ==
173 sErrorStringsMap.end() ) 172 sErrorStringsMap.end() )
174 { 173 {
175 sErrorStringsMap["unverified"] = 174 sErrorStringsMap["unverified"] =
176 getFormattedUIString("insufficient_perms_error"); 175 getString("insufficient_perms_error");
177 } 176 }
178 177
179 if ( sErrorStringsMap.end() == 178 if ( sErrorStringsMap.end() ==
180 sErrorStringsMap.find("no_ability") ) 179 sErrorStringsMap.find("no_ability") )
181 { 180 {
182 sErrorStringsMap["no_ability"] = 181 sErrorStringsMap["no_ability"] =
183 getFormattedUIString("no_ability_error"); 182 getString("no_ability_error");
184 } 183 }
185 184
186 if ( sErrorStringsMap.end() == 185 if ( sErrorStringsMap.end() ==
187 sErrorStringsMap.find("muted") ) 186 sErrorStringsMap.find("muted") )
188 { 187 {
189 sErrorStringsMap["muted"] = 188 sErrorStringsMap["muted"] =
190 getFormattedUIString("muted_error"); 189 getString("muted_error");
191 } 190 }
192 191
193 if ( sErrorStringsMap.end() == 192 if ( sErrorStringsMap.end() ==
194 sErrorStringsMap.find("not_a_moderator") ) 193 sErrorStringsMap.find("not_a_moderator") )
195 { 194 {
196 sErrorStringsMap["not_a_moderator"] = 195 sErrorStringsMap["not_a_moderator"] =
197 getFormattedUIString("not_a_mod_error"); 196 getString("not_a_mod_error");
198 } 197 }
199 198
200 if ( sErrorStringsMap.end() == 199 if ( sErrorStringsMap.end() ==
201 sErrorStringsMap.find("does not exist") ) 200 sErrorStringsMap.find("does not exist") )
202 { 201 {
203 sErrorStringsMap["does not exist"] = 202 sErrorStringsMap["does not exist"] =
204 getFormattedUIString("session_does_not_exist_error"); 203 getString("session_does_not_exist_error");
205 } 204 }
206 205
207 if ( sEventStringsMap.end() == sEventStringsMap.find("add") ) 206 if ( sEventStringsMap.end() == sEventStringsMap.find("add") )
208 { 207 {
209 sEventStringsMap["add"] = 208 sEventStringsMap["add"] =
210 getFormattedUIString("add_session_event"); 209 getString("add_session_event");
211 } 210 }
212 211
213 if ( sEventStringsMap.end() == sEventStringsMap.find("message") ) 212 if ( sEventStringsMap.end() == sEventStringsMap.find("message") )
214 { 213 {
215 sEventStringsMap["message"] = 214 sEventStringsMap["message"] =
216 getFormattedUIString("message_session_event"); 215 getString("message_session_event");
217 } 216 }
218 217
219 218
220 if ( sEventStringsMap.end() == sEventStringsMap.find("mute") ) 219 if ( sEventStringsMap.end() == sEventStringsMap.find("mute") )
221 { 220 {
222 sEventStringsMap["mute"] = getFormattedUIString( 221 sEventStringsMap["mute"] =
223 "mute_agent_event"); 222 getString("mute_agent_event");
224 } 223 }
225 224
226 if ( sForceCloseSessionMap.end() == 225 if ( sForceCloseSessionMap.end() ==
227 sForceCloseSessionMap.find("removed") ) 226 sForceCloseSessionMap.find("removed") )
228 { 227 {
229 sForceCloseSessionMap["removed"] = 228 sForceCloseSessionMap["removed"] =
230 getFormattedUIString("removed_from_group"); 229 getString("removed_from_group");
231 } 230 }
232 231
233 if ( sForceCloseSessionMap.end() == 232 if ( sForceCloseSessionMap.end() ==
234 sForceCloseSessionMap.find("no ability") ) 233 sForceCloseSessionMap.find("no ability") )
235 { 234 {
236 sForceCloseSessionMap["no ability"] = 235 sForceCloseSessionMap["no ability"] =
237 getFormattedUIString("close_on_no_ability"); 236 getString("close_on_no_ability");
238 } 237 }
239 238
240 return TRUE; 239 return TRUE;
@@ -1015,12 +1014,12 @@ BOOL LLIMMgr::getFloaterOpen()
1015void LLIMMgr::disconnectAllSessions() 1014void LLIMMgr::disconnectAllSessions()
1016{ 1015{
1017 LLFloaterIMPanel* floater = NULL; 1016 LLFloaterIMPanel* floater = NULL;
1018 std::set<LLViewHandle>::iterator handle_it; 1017 std::set<LLHandle<LLFloater> >::iterator handle_it;
1019 for(handle_it = mFloaters.begin(); 1018 for(handle_it = mFloaters.begin();
1020 handle_it != mFloaters.end(); 1019 handle_it != mFloaters.end();
1021 ) 1020 )
1022 { 1021 {
1023 floater = (LLFloaterIMPanel*)LLFloater::getFloaterByHandle(*handle_it); 1022 floater = (LLFloaterIMPanel*)handle_it->get();
1024 1023
1025 // MUST do this BEFORE calling floater->onClose() because that may remove the item from the set, causing the subsequent increment to crash. 1024 // MUST do this BEFORE calling floater->onClose() because that may remove the item from the set, causing the subsequent increment to crash.
1026 ++handle_it; 1025 ++handle_it;
@@ -1040,12 +1039,12 @@ void LLIMMgr::disconnectAllSessions()
1040LLFloaterIMPanel* LLIMMgr::findFloaterBySession(const LLUUID& session_id) 1039LLFloaterIMPanel* LLIMMgr::findFloaterBySession(const LLUUID& session_id)
1041{ 1040{
1042 LLFloaterIMPanel* rv = NULL; 1041 LLFloaterIMPanel* rv = NULL;
1043 std::set<LLViewHandle>::iterator handle_it; 1042 std::set<LLHandle<LLFloater> >::iterator handle_it;
1044 for(handle_it = mFloaters.begin(); 1043 for(handle_it = mFloaters.begin();
1045 handle_it != mFloaters.end(); 1044 handle_it != mFloaters.end();
1046 ++handle_it) 1045 ++handle_it)
1047 { 1046 {
1048 rv = (LLFloaterIMPanel*)LLFloater::getFloaterByHandle(*handle_it); 1047 rv = (LLFloaterIMPanel*)handle_it->get();
1049 if(rv && session_id == rv->getSessionID()) 1048 if(rv && session_id == rv->getSessionID())
1050 { 1049 {
1051 break; 1050 break;
@@ -1171,7 +1170,7 @@ LLFloaterIMPanel* LLIMMgr::createFloater(
1171 session_id, 1170 session_id,
1172 other_participant_id, 1171 other_participant_id,
1173 dialog); 1172 dialog);
1174 LLTabContainerCommon::eInsertionPoint i_pt = user_initiated ? LLTabContainerCommon::RIGHT_OF_CURRENT : LLTabContainerCommon::END; 1173 LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END;
1175 LLFloaterChatterBox::getInstance(LLSD())->addFloater(floater, FALSE, i_pt); 1174 LLFloaterChatterBox::getInstance(LLSD())->addFloater(floater, FALSE, i_pt);
1176 mFloaters.insert(floater->getHandle()); 1175 mFloaters.insert(floater->getHandle());
1177 return floater; 1176 return floater;
@@ -1197,7 +1196,7 @@ LLFloaterIMPanel* LLIMMgr::createFloater(
1197 other_participant_id, 1196 other_participant_id,
1198 ids, 1197 ids,
1199 dialog); 1198 dialog);
1200 LLTabContainerCommon::eInsertionPoint i_pt = user_initiated ? LLTabContainerCommon::RIGHT_OF_CURRENT : LLTabContainerCommon::END; 1199 LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END;
1201 LLFloaterChatterBox::getInstance(LLSD())->addFloater(floater, FALSE, i_pt); 1200 LLFloaterChatterBox::getInstance(LLSD())->addFloater(floater, FALSE, i_pt);
1202 mFloaters.insert(floater->getHandle()); 1201 mFloaters.insert(floater->getHandle());
1203 return floater; 1202 return floater;
@@ -1219,8 +1218,7 @@ void LLIMMgr::noteOfflineUsers(
1219 for(S32 i = 0; i < count; ++i) 1218 for(S32 i = 0; i < count; ++i)
1220 { 1219 {
1221 info = at.getBuddyInfo(ids.get(i)); 1220 info = at.getBuddyInfo(ids.get(i));
1222 char first[DB_FIRST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ 1221 std::string first, last;
1223 char last[DB_LAST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
1224 if(info && !info->isOnline() 1222 if(info && !info->isOnline()
1225 && gCacheName->getName(ids.get(i), first, last)) 1223 && gCacheName->getName(ids.get(i), first, last))
1226 { 1224 {
@@ -1628,3 +1626,4 @@ LLHTTPRegistration<LLViewerChatterBoxSessionUpdate>
1628LLHTTPRegistration<LLViewerChatterBoxInvitation> 1626LLHTTPRegistration<LLViewerChatterBoxInvitation>
1629 gHTTPRegistrationMessageChatterBoxInvitation( 1627 gHTTPRegistrationMessageChatterBoxInvitation(
1630 "/message/ChatterBoxInvitation"); 1628 "/message/ChatterBoxInvitation");
1629