diff options
Diffstat (limited to 'linden/indra/newview/llfloaternewim.cpp')
-rw-r--r-- | linden/indra/newview/llfloaternewim.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/linden/indra/newview/llfloaternewim.cpp b/linden/indra/newview/llfloaternewim.cpp index 48920c1..272cb53 100644 --- a/linden/indra/newview/llfloaternewim.cpp +++ b/linden/indra/newview/llfloaternewim.cpp | |||
@@ -38,10 +38,9 @@ | |||
38 | #include "lltabcontainer.h" | 38 | #include "lltabcontainer.h" |
39 | #include "llimview.h" | 39 | #include "llimview.h" |
40 | 40 | ||
41 | S32 COL_1_WIDTH = 200; | 41 | S32 COL_1_WIDTH = 400; |
42 | 42 | ||
43 | static std::string sOnlineDescriptor = "*"; | 43 | static std::string sOnlineDescriptor = "*"; |
44 | static std::string sNameFormat = "[FIRST] [LAST]"; | ||
45 | 44 | ||
46 | LLFloaterNewIM::LLFloaterNewIM() | 45 | LLFloaterNewIM::LLFloaterNewIM() |
47 | { | 46 | { |
@@ -69,7 +68,6 @@ BOOL LLFloaterNewIM::postBuild() | |||
69 | llwarns << "LLUICtrlFactory::getNameListByName() returned NULL for 'user_list'" << llendl; | 68 | llwarns << "LLUICtrlFactory::getNameListByName() returned NULL for 'user_list'" << llendl; |
70 | } | 69 | } |
71 | sOnlineDescriptor = getString("online_descriptor"); | 70 | sOnlineDescriptor = getString("online_descriptor"); |
72 | sNameFormat = getString("name_format"); | ||
73 | setDefaultBtn("start_btn"); | 71 | setDefaultBtn("start_btn"); |
74 | return TRUE; | 72 | return TRUE; |
75 | } | 73 | } |
@@ -135,11 +133,8 @@ void LLFloaterNewIM::addGroup(const LLUUID& uuid, void* data, BOOL bold, BOOL on | |||
135 | 133 | ||
136 | void LLFloaterNewIM::addAgent(const LLUUID& uuid, void* data, BOOL online) | 134 | void LLFloaterNewIM::addAgent(const LLUUID& uuid, void* data, BOOL online) |
137 | { | 135 | { |
138 | std::string first, last; | 136 | std::string fullname; |
139 | gCacheName->getName(uuid, first, last); | 137 | gCacheName->getFullName(uuid, fullname); |
140 | LLUIString fullname = sNameFormat; | ||
141 | fullname.setArg("[FIRST]", first); | ||
142 | fullname.setArg("[LAST]", last); | ||
143 | 138 | ||
144 | LLSD row; | 139 | LLSD row; |
145 | row["id"] = uuid; | 140 | row["id"] = uuid; |
@@ -184,13 +179,20 @@ void LLFloaterNewIM::onStart(void* userdata) | |||
184 | const LLScrollListCell* cell = item->getColumn(0); | 179 | const LLScrollListCell* cell = item->getColumn(0); |
185 | std::string name(cell->getValue()); | 180 | std::string name(cell->getValue()); |
186 | 181 | ||
187 | // *NOTE: Do a live detrmination of what type of session it | 182 | // *NOTE: Do a live determination of what type of session it |
188 | // should be. If we restrict the new im panel to online users, | 183 | // should be. If we restrict the new im panel to online users, |
189 | // then we can remove some of this code. | 184 | // then we can remove some of this code. |
190 | EInstantMessage type; | 185 | EInstantMessage type; |
191 | EInstantMessage* t = (EInstantMessage*)item->getUserdata(); | 186 | EInstantMessage* t = (EInstantMessage*)item->getUserdata(); |
192 | if(t) type = (*t); | 187 | if(t) type = (*t); |
193 | else type = LLIMMgr::defaultIMTypeForAgent(item->getUUID()); | 188 | else type = LLIMMgr::defaultIMTypeForAgent(item->getUUID()); |
189 | if (type != IM_SESSION_GROUP_START) | ||
190 | { | ||
191 | // Needed to avoid catching a display name, which would | ||
192 | // make us use a wrong IM log file... | ||
193 | gCacheName->getFullName(item->getUUID(), name); | ||
194 | } | ||
195 | |||
194 | gIMMgr->addSession(name, type, item->getUUID()); | 196 | gIMMgr->addSession(name, type, item->getUUID()); |
195 | 197 | ||
196 | make_ui_sound("UISndStartIM"); | 198 | make_ui_sound("UISndStartIM"); |