aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-06-09 01:34:48 -0700
committerMcCabe Maxsted2009-06-09 01:34:48 -0700
commitb582d1a9b804f47b65bca09dc320808338d7e302 (patch)
treeff1d2997d0c0644d65cc3505dda55e50452f7723 /linden/indra
parent'IM Received' button to '__ New IMs' (diff)
downloadmeta-impy-b582d1a9b804f47b65bca09dc320808338d7e302.zip
meta-impy-b582d1a9b804f47b65bca09dc320808338d7e302.tar.gz
meta-impy-b582d1a9b804f47b65bca09dc320808338d7e302.tar.bz2
meta-impy-b582d1a9b804f47b65bca09dc320808338d7e302.tar.xz
Backported LL's version of VWR-2681 from 1.23
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/newview/app_settings/settings.xml13
-rw-r--r--linden/indra/newview/llfloateravatarpicker.cpp386
-rw-r--r--linden/indra/newview/llfloateravatarpicker.h44
-rw-r--r--linden/indra/newview/llfloatergodtools.cpp8
-rw-r--r--linden/indra/newview/llglsandbox.cpp2
-rw-r--r--linden/indra/newview/llnetmap.cpp8
-rw-r--r--linden/indra/newview/llviewerobjectlist.cpp2
-rw-r--r--linden/indra/newview/llworld.cpp66
-rw-r--r--linden/indra/newview/llworld.h19
-rw-r--r--linden/indra/newview/pipeline.cpp20
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml128
11 files changed, 457 insertions, 239 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 9a6749b..cce09e2 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -4982,7 +4982,18 @@
4982 <string>Boolean</string> 4982 <string>Boolean</string>
4983 <key>Value</key> 4983 <key>Value</key>
4984 <integer>1</integer> 4984 <integer>1</integer>
4985 </map> 4985 </map>
4986 <key>NearMeRange</key>
4987 <map>
4988 <key>Comment</key>
4989 <string>Search radius for nearby avatars</string>
4990 <key>Persist</key>
4991 <integer>1</integer>
4992 <key>Type</key>
4993 <string>F32</string>
4994 <key>Value</key>
4995 <integer>20</integer>
4996 </map>
4986 <key>NewCacheLocation</key> 4997 <key>NewCacheLocation</key>
4987 <map> 4998 <map>
4988 <key>Comment</key> 4999 <key>Comment</key>
diff --git a/linden/indra/newview/llfloateravatarpicker.cpp b/linden/indra/newview/llfloateravatarpicker.cpp
index 97d2de9..0bdabdd 100644
--- a/linden/indra/newview/llfloateravatarpicker.cpp
+++ b/linden/indra/newview/llfloateravatarpicker.cpp
@@ -34,6 +34,7 @@
34 34
35#include "message.h" 35#include "message.h"
36 36
37#include "llagent.h"
37#include "llbutton.h" 38#include "llbutton.h"
38#include "llfocusmgr.h" 39#include "llfocusmgr.h"
39#include "llinventoryview.h" 40#include "llinventoryview.h"
@@ -42,7 +43,8 @@
42#include "llscrolllistctrl.h" 43#include "llscrolllistctrl.h"
43#include "lltextbox.h" 44#include "lltextbox.h"
44#include "lluictrlfactory.h" 45#include "lluictrlfactory.h"
45#include "llagent.h" 46#include "llviewercontrol.h"
47#include "llworld.h"
46 48
47const S32 MIN_WIDTH = 200; 49const S32 MIN_WIDTH = 200;
48const S32 MIN_HEIGHT = 340; 50const S32 MIN_HEIGHT = 340;
@@ -58,6 +60,8 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(callback_t callback,
58 BOOL allow_multiple, 60 BOOL allow_multiple,
59 BOOL closeOnSelect) 61 BOOL closeOnSelect)
60{ 62{
63 // TODO: This class should not be a singleton as it's used in multiple places
64 // and therefore can't be used simultaneously. -MG
61 if (!sInstance) 65 if (!sInstance)
62 { 66 {
63 sInstance = new LLFloaterAvatarPicker(); 67 sInstance = new LLFloaterAvatarPicker();
@@ -77,6 +81,7 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(callback_t callback,
77 sInstance->setAllowMultiple(allow_multiple); 81 sInstance->setAllowMultiple(allow_multiple);
78 } 82 }
79 83
84 sInstance->mNearMeListComplete = FALSE;
80 sInstance->mCloseOnSelect = closeOnSelect; 85 sInstance->mCloseOnSelect = closeOnSelect;
81 return sInstance; 86 return sInstance;
82} 87}
@@ -97,39 +102,58 @@ BOOL LLFloaterAvatarPicker::postBuild()
97 102
98 childSetAction("Find", onBtnFind, this); 103 childSetAction("Find", onBtnFind, this);
99 childDisable("Find"); 104 childDisable("Find");
105 childSetAction("Refresh", onBtnRefresh, this);
106 childSetCommitCallback("near_me_range", onRangeAdjust, this);
100 107
101 mListNames = getChild<LLScrollListCtrl>("Names"); 108 childSetDoubleClickCallback("SearchResults", onBtnSelect);
102 childSetDoubleClickCallback("Names",onBtnAdd); 109 childSetDoubleClickCallback("NearMe", onBtnSelect);
103 childSetCommitCallback("Names", onList, this); 110 childSetCommitCallback("SearchResults", onList, this);
104 childDisable("Names"); 111 childSetCommitCallback("NearMe", onList, this);
112 childDisable("SearchResults");
105 113
106 childSetAction("Select", onBtnAdd, this); 114 childSetAction("Select", onBtnSelect, this);
107 childDisable("Select"); 115 childDisable("Select");
108 116
109 childSetAction("Close", onBtnClose, this); 117 childSetAction("Cancel", onBtnClose, this);
110 118
111 childSetFocus("Edit"); 119 childSetFocus("Edit");
112 120
113 if (mListNames) 121 LLPanel* search_panel = getChild<LLPanel>("SearchPanel");
122 if (search_panel)
114 { 123 {
115 mListNames->addCommentText(std::string("No results")); // *TODO: Translate 124 // Start searching when Return is pressed in the line editor.
125 search_panel->setDefaultBtn("Find");
116 } 126 }
117 127
118 mInventoryPanel = getChild<LLInventoryPanel>("Inventory Panel"); 128 getChild<LLScrollListCtrl>("SearchResults")->addCommentText(getString("no_results"));
119 if(mInventoryPanel) 129
120 { 130 LLInventoryPanel* inventory_panel = getChild<LLInventoryPanel>("InventoryPanel");
121 mInventoryPanel->setFilterTypes(LLInventoryType::NIT_CALLCARD); 131 inventory_panel->setFilterTypes(0x1 << LLInventoryType::IT_CALLINGCARD);
122 mInventoryPanel->setFollowsAll(); 132 inventory_panel->setFollowsAll();
123 mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); 133 inventory_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
124 mInventoryPanel->openDefaultFolderForType(LLAssetType::AT_CALLINGCARD); 134 inventory_panel->openDefaultFolderForType(LLAssetType::AT_CALLINGCARD);
125 mInventoryPanel->setSelectCallback(LLFloaterAvatarPicker::onSelectionChange, this); 135 inventory_panel->setSelectCallback(LLFloaterAvatarPicker::onCallingCardSelectionChange, this);
126 } 136
127 137 childSetTabChangeCallback("ResidentChooserTabs", "SearchPanel", onTabChanged, this);
138 childSetTabChangeCallback("ResidentChooserTabs", "CallingCardsPanel", onTabChanged, this);
139 childSetTabChangeCallback("ResidentChooserTabs", "NearMePanel", onTabChanged, this);
140
128 setAllowMultiple(FALSE); 141 setAllowMultiple(FALSE);
129 142
130 return TRUE; 143 return TRUE;
131} 144}
132 145
146void LLFloaterAvatarPicker::onTabChanged(void* userdata, bool from_click)
147{
148 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;
149 if (!self)
150 {
151 return;
152 }
153
154 self->childSetEnabled("Select", self->visibleItemsSelected());
155}
156
133// Destroys the object 157// Destroys the object
134LLFloaterAvatarPicker::~LLFloaterAvatarPicker() 158LLFloaterAvatarPicker::~LLFloaterAvatarPicker()
135{ 159{
@@ -144,22 +168,50 @@ void LLFloaterAvatarPicker::onBtnFind(void* userdata)
144 if(self) self->find(); 168 if(self) self->find();
145} 169}
146 170
147void LLFloaterAvatarPicker::onBtnAdd(void* userdata) 171static void getSelectedAvatarData(const LLScrollListCtrl* from, std::vector<std::string>& avatar_names, std::vector<LLUUID>& avatar_ids)
172{
173 std::vector<LLScrollListItem*> items = from->getAllSelected();
174 for (std::vector<LLScrollListItem*>::iterator iter = items.begin(); iter != items.end(); ++iter)
175 {
176 LLScrollListItem* item = *iter;
177 if (item->getUUID().notNull())
178 {
179 avatar_names.push_back(item->getColumn(0)->getValue().asString());
180 avatar_ids.push_back(item->getUUID());
181 }
182 }
183}
184
185void LLFloaterAvatarPicker::onBtnSelect(void* userdata)
148{ 186{
149 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata; 187 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;
150 188
151 if(self->mCallback) 189 if(self->mCallback)
152 { 190 {
153 self->mCallback(self->mAvatarNames, self->mAvatarIDs, self->mCallbackUserdata); 191 LLPanel* active_panel = self->childGetVisibleTab("ResidentChooserTabs");
154 } 192
155 if (self->mInventoryPanel) 193 if(active_panel == self->getChild<LLPanel>("CallingCardsPanel"))
156 { 194 {
157 self->mInventoryPanel->setSelection(LLUUID::null, FALSE); 195 self->mCallback(self->mSelectedInventoryAvatarNames, self->mSelectedInventoryAvatarIDs, self->mCallbackUserdata);
158 } 196 }
159 if (self->mListNames) 197 else if(active_panel == self->getChild<LLPanel>("SearchPanel"))
160 { 198 {
161 self->mListNames->deselectAllItems(TRUE); 199 std::vector<std::string> avatar_names;
200 std::vector<LLUUID> avatar_ids;
201 getSelectedAvatarData(self->getChild<LLScrollListCtrl>("SearchResults"), avatar_names, avatar_ids);
202 self->mCallback(avatar_names, avatar_ids, self->mCallbackUserdata);
203 }
204 else if(active_panel == self->getChild<LLPanel>("NearMePanel"))
205 {
206 std::vector<std::string> avatar_names;
207 std::vector<LLUUID> avatar_ids;
208 getSelectedAvatarData(self->getChild<LLScrollListCtrl>("NearMe"), avatar_names, avatar_ids);
209 self->mCallback(avatar_names, avatar_ids, self->mCallbackUserdata);
210 }
162 } 211 }
212 self->getChild<LLInventoryPanel>("InventoryPanel")->setSelection(LLUUID::null, FALSE);
213 self->getChild<LLScrollListCtrl>("SearchResults")->deselectAllItems(TRUE);
214 self->getChild<LLScrollListCtrl>("NearMe")->deselectAllItems(TRUE);
163 if(self->mCloseOnSelect) 215 if(self->mCloseOnSelect)
164 { 216 {
165 self->mCloseOnSelect = FALSE; 217 self->mCloseOnSelect = FALSE;
@@ -167,68 +219,61 @@ void LLFloaterAvatarPicker::onBtnAdd(void* userdata)
167 } 219 }
168} 220}
169 221
222void LLFloaterAvatarPicker::onBtnRefresh(void* userdata)
223{
224 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;
225 if (!self)
226 {
227 return;
228 }
229
230 self->getChild<LLScrollListCtrl>("NearMe")->deleteAllItems();
231 self->getChild<LLScrollListCtrl>("NearMe")->addCommentText(self->getString("searching"));
232 self->mNearMeListComplete = FALSE;
233}
234
170void LLFloaterAvatarPicker::onBtnClose(void* userdata) 235void LLFloaterAvatarPicker::onBtnClose(void* userdata)
171{ 236{
172 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata; 237 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;
173 if(self) self->close(); 238 if(self) self->close();
174} 239}
175 240
241void LLFloaterAvatarPicker::onRangeAdjust(LLUICtrl* source, void* data)
242{
243 LLFloaterAvatarPicker::onBtnRefresh(data);
244}
245
176void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata) 246void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata)
177{ 247{
178 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata; 248 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;
179 if (!self) 249 if (self)
180 {
181 return;
182 }
183
184 self->mAvatarIDs.clear();
185 self->mAvatarNames.clear();
186
187 if (!self->mListNames)
188 {
189 return;
190 }
191
192 std::vector<LLScrollListItem*> items =
193 self->mListNames->getAllSelected();
194 for (
195 std::vector<LLScrollListItem*>::iterator iter = items.begin();
196 iter != items.end();
197 ++iter)
198 { 250 {
199 LLScrollListItem* item = *iter; 251 self->childSetEnabled("Select", self->visibleItemsSelected());
200 self->mAvatarNames.push_back(item->getColumn(0)->getValue().asString());
201 self->mAvatarIDs.push_back(item->getUUID());
202 self->childSetEnabled("Select", TRUE);
203 } 252 }
204} 253}
205 254
206// static callback for inventory picker (select from calling cards) 255// static callback for inventory picker (select from calling cards)
207void LLFloaterAvatarPicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data) 256void LLFloaterAvatarPicker::onCallingCardSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
208{ 257{
209 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)data; 258 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)data;
210 if (self) 259 if (self)
211 { 260 {
212 self->doSelectionChange( items, user_action, data ); 261 self->doCallingCardSelectionChange( items, user_action, data );
213 } 262 }
214} 263}
215 264
216// Callback for inventory picker (select from calling cards) 265// Callback for inventory picker (select from calling cards)
217void LLFloaterAvatarPicker::doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data) 266void LLFloaterAvatarPicker::doCallingCardSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
218{ 267{
219 if (!mListNames) 268 bool panel_active = (childGetVisibleTab("ResidentChooserTabs") == getChild<LLPanel>("CallingCardsPanel"));
269
270 mSelectedInventoryAvatarIDs.clear();
271 mSelectedInventoryAvatarNames.clear();
272
273 if (panel_active)
220 { 274 {
221 return;
222 }
223
224 std::vector<LLScrollListItem*> search_items = mListNames->getAllSelected();
225 if ( search_items.size() == 0 )
226 { // Nothing selected in the search results
227 mAvatarIDs.clear();
228 mAvatarNames.clear();
229 childSetEnabled("Select", FALSE); 275 childSetEnabled("Select", FALSE);
230 } 276 }
231 BOOL first_calling_card = TRUE;
232 277
233 std::deque<LLFolderViewItem*>::const_iterator item_it; 278 std::deque<LLFolderViewItem*>::const_iterator item_it;
234 for (item_it = items.begin(); item_it != items.end(); ++item_it) 279 for (item_it = items.begin(); item_it != items.end(); ++item_it)
@@ -237,26 +282,97 @@ void LLFloaterAvatarPicker::doSelectionChange(const std::deque<LLFolderViewItem*
237 if (listenerp->getInventoryType() == LLInventoryType::IT_CALLINGCARD) 282 if (listenerp->getInventoryType() == LLInventoryType::IT_CALLINGCARD)
238 { 283 {
239 LLInventoryItem* item = gInventory.getItem(listenerp->getUUID()); 284 LLInventoryItem* item = gInventory.getItem(listenerp->getUUID());
240
241 if (item) 285 if (item)
242 { 286 {
243 if ( first_calling_card ) 287 mSelectedInventoryAvatarIDs.push_back(item->getCreatorUUID());
244 { // Have a calling card selected, so clear anything from the search panel 288 mSelectedInventoryAvatarNames.push_back(listenerp->getName());
245 first_calling_card = FALSE;
246 mAvatarIDs.clear();
247 mAvatarNames.clear();
248 mListNames->deselectAllItems();
249 }
250
251 // Add calling card info to the selected avatars
252 mAvatarIDs.push_back(item->getCreatorUUID());
253 mAvatarNames.push_back(listenerp->getName());
254 childSetEnabled("Select", TRUE);
255 } 289 }
256 } 290 }
257 } 291 }
292
293 if (panel_active)
294 {
295 childSetEnabled("Select", visibleItemsSelected());
296 }
258} 297}
259 298
299void LLFloaterAvatarPicker::populateNearMe()
300{
301 BOOL all_loaded = TRUE;
302 BOOL empty = TRUE;
303 LLScrollListCtrl* near_me_scroller = getChild<LLScrollListCtrl>("NearMe");
304 near_me_scroller->deleteAllItems();
305
306 std::vector<LLUUID> avatar_ids;
307 LLWorld::getInstance()->getAvatars(&avatar_ids, NULL, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange"));
308 for(U32 i=0; i<avatar_ids.size(); i++)
309 {
310 LLUUID& av = avatar_ids[i];
311 if(av == gAgent.getID()) continue;
312 LLSD element;
313 element["id"] = av; // value
314 std::string fullname;
315 if(!gCacheName->getFullName(av, fullname))
316 {
317 element["columns"][0]["value"] = LLCacheName::getDefaultName();
318 all_loaded = FALSE;
319 }
320 else
321 {
322 element["columns"][0]["value"] = fullname;
323 }
324 near_me_scroller->addElement(element);
325 empty = FALSE;
326 }
327
328 if (empty)
329 {
330 childDisable("NearMe");
331 childDisable("Select");
332 near_me_scroller->addCommentText(getString("no_one_near"));
333 }
334 else
335 {
336 childEnable("NearMe");
337 childEnable("Select");
338 near_me_scroller->selectFirstItem();
339 onList(near_me_scroller, this);
340 near_me_scroller->setFocus(TRUE);
341 }
342
343 if (all_loaded)
344 {
345 mNearMeListComplete = TRUE;
346 }
347}
348
349void LLFloaterAvatarPicker::draw()
350{
351 LLFloater::draw();
352 if (!mNearMeListComplete && childGetVisibleTab("ResidentChooserTabs") == getChild<LLPanel>("NearMePanel"))
353 {
354 populateNearMe();
355 }
356}
357
358BOOL LLFloaterAvatarPicker::visibleItemsSelected() const
359{
360 LLPanel* active_panel = childGetVisibleTab("ResidentChooserTabs");
361
362 if(active_panel == getChild<LLPanel>("SearchPanel"))
363 {
364 return getChild<LLScrollListCtrl>("SearchResults")->getFirstSelectedIndex() >= 0;
365 }
366 else if(active_panel == getChild<LLPanel>("CallingCardsPanel"))
367 {
368 return mSelectedInventoryAvatarIDs.size() > 0;
369 }
370 else if(active_panel == getChild<LLPanel>("NearMePanel"))
371 {
372 return getChild<LLScrollListCtrl>("NearMe")->getFirstSelectedIndex() >= 0;
373 }
374 return FALSE;
375}
260 376
261void LLFloaterAvatarPicker::find() 377void LLFloaterAvatarPicker::find()
262{ 378{
@@ -276,11 +392,8 @@ void LLFloaterAvatarPicker::find()
276 392
277 gAgent.sendReliableMessage(); 393 gAgent.sendReliableMessage();
278 394
279 if (mListNames) 395 getChild<LLScrollListCtrl>("SearchResults")->deleteAllItems();
280 { 396 getChild<LLScrollListCtrl>("SearchResults")->addCommentText(getString("searching"));
281 mListNames->deleteAllItems();
282 mListNames->addCommentText(std::string("Searching...")); // *TODO: Translate
283 }
284 397
285 childSetEnabled("Select", FALSE); 398 childSetEnabled("Select", FALSE);
286 mResultsReturned = FALSE; 399 mResultsReturned = FALSE;
@@ -288,15 +401,9 @@ void LLFloaterAvatarPicker::find()
288 401
289void LLFloaterAvatarPicker::setAllowMultiple(BOOL allow_multiple) 402void LLFloaterAvatarPicker::setAllowMultiple(BOOL allow_multiple)
290{ 403{
291 mAllowMultiple = allow_multiple; 404 getChild<LLScrollListCtrl>("SearchResults")->setAllowMultipleSelection(allow_multiple);
292 if (mInventoryPanel) 405 getChild<LLInventoryPanel>("InventoryPanel")->setAllowMultiSelect(allow_multiple);
293 { 406 getChild<LLScrollListCtrl>("NearMe")->setAllowMultipleSelection(allow_multiple);
294 mInventoryPanel->setAllowMultiSelect(mAllowMultiple);
295 }
296 if (mListNames)
297 {
298 mListNames->setAllowMultipleSelection(mAllowMultiple);
299 }
300} 407}
301 408
302// static 409// static
@@ -324,52 +431,48 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
324 return; 431 return;
325 } 432 }
326 433
327 if (!self->mResultsReturned) 434 LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("SearchResults");
328 { 435
329 // clear "Searching" label on first results 436 // clear "Searching" label on first results
330 if (self->mListNames) 437 search_results->deleteAllItems();
331 { 438
332 self->mListNames->deleteAllItems();
333 }
334 }
335 self->mResultsReturned = TRUE; 439 self->mResultsReturned = TRUE;
336 440
337 if (self->mListNames) 441 BOOL found_one = FALSE;
338 { 442 S32 num_new_rows = msg->getNumberOfBlocks("Data");
339 BOOL found_one = FALSE; 443 for (S32 i = 0; i < num_new_rows; i++)
340 S32 num_new_rows = msg->getNumberOfBlocks("Data"); 444 {
341 for (S32 i = 0; i < num_new_rows; i++) 445 msg->getUUIDFast( _PREHASH_Data,_PREHASH_AvatarID, avatar_id, i);
342 { 446 msg->getStringFast(_PREHASH_Data,_PREHASH_FirstName, first_name, i);
343 msg->getUUIDFast( _PREHASH_Data,_PREHASH_AvatarID, avatar_id, i); 447 msg->getStringFast(_PREHASH_Data,_PREHASH_LastName, last_name, i);
344 msg->getStringFast(_PREHASH_Data,_PREHASH_FirstName, first_name, i);
345 msg->getStringFast(_PREHASH_Data,_PREHASH_LastName, last_name, i);
346
347 std::string avatar_name;
348 if (avatar_id.isNull())
349 {
350 LLStringUtil::format_map_t map;
351 map["[TEXT]"] = self->childGetText("Edit");
352 avatar_name = self->getString("NotFound", map);
353 self->mListNames->setEnabled(FALSE);
354 }
355 else
356 {
357 avatar_name = first_name + " " + last_name;
358 self->mListNames->setEnabled(TRUE);
359 found_one = TRUE;
360 }
361 LLSD element;
362 element["id"] = avatar_id; // value
363 element["columns"][0]["value"] = avatar_name;
364 self->mListNames->addElement(element);
365 }
366 448
367 if (found_one) 449 std::string avatar_name;
450 if (avatar_id.isNull())
368 { 451 {
369 self->mListNames->selectFirstItem(); 452 LLStringUtil::format_map_t map;
370 self->onList(self->mListNames, self); 453 map["[TEXT]"] = self->childGetText("Edit");
371 self->mListNames->setFocus(TRUE); 454 avatar_name = self->getString("not_found", map);
455 search_results->setEnabled(FALSE);
456 self->childDisable("Select");
372 } 457 }
458 else
459 {
460 avatar_name = first_name + " " + last_name;
461 search_results->setEnabled(TRUE);
462 found_one = TRUE;
463 }
464 LLSD element;
465 element["id"] = avatar_id; // value
466 element["columns"][0]["value"] = avatar_name;
467 search_results->addElement(element);
468 }
469
470 if (found_one)
471 {
472 self->childEnable("Select");
473 search_results->selectFirstItem();
474 self->onList(search_results, self);
475 search_results->setFocus(TRUE);
373 } 476 }
374} 477}
375 478
@@ -377,32 +480,23 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
377void LLFloaterAvatarPicker::editKeystroke(LLLineEditor* caller, void* user_data) 480void LLFloaterAvatarPicker::editKeystroke(LLLineEditor* caller, void* user_data)
378{ 481{
379 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)user_data; 482 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)user_data;
380 if (caller->getText().size() >= 3) 483 self->childSetEnabled("Find", caller->getText().size() >= 3);
381 {
382 self->childSetEnabled("Find",TRUE);
383 }
384 else
385 {
386 self->childSetEnabled("Find",FALSE);
387 }
388} 484}
389 485
390// virtual 486// virtual
391BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask) 487BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask)
392{ 488{
393 if (key == KEY_RETURN 489 if (key == KEY_RETURN && mask == MASK_NONE)
394 && mask == MASK_NONE)
395 { 490 {
396 if (childHasFocus("Edit")) 491 if (childHasFocus("Edit"))
397 { 492 {
398 onBtnFind(this); 493 onBtnFind(this);
399 return TRUE;
400 } 494 }
401 else 495 else
402 { 496 {
403 onBtnAdd(this); 497 onBtnSelect(this);
404 return TRUE;
405 } 498 }
499 return TRUE;
406 } 500 }
407 else if (key == KEY_ESCAPE && mask == MASK_NONE) 501 else if (key == KEY_ESCAPE && mask == MASK_NONE)
408 { 502 {
diff --git a/linden/indra/newview/llfloateravatarpicker.h b/linden/indra/newview/llfloateravatarpicker.h
index 005eff0..1ab0f7c 100644
--- a/linden/indra/newview/llfloateravatarpicker.h
+++ b/linden/indra/newview/llfloateravatarpicker.h
@@ -36,14 +36,6 @@
36 36
37#include <vector> 37#include <vector>
38 38
39class LLUICtrl;
40class LLTextBox;
41class LLLineEditor;
42class LLButton;
43class LLScrollListCtrl;
44class LLMessageSystem;
45class LLInventoryPanel;
46class LLFolderViewItem;
47 39
48class LLFloaterAvatarPicker : public LLFloater 40class LLFloaterAvatarPicker : public LLFloater
49{ 41{
@@ -57,47 +49,47 @@ public:
57 BOOL closeOnSelect = FALSE); 49 BOOL closeOnSelect = FALSE);
58 virtual BOOL postBuild(); 50 virtual BOOL postBuild();
59 51
60 static void processAvatarPickerReply(LLMessageSystem* msg, void**); 52 static void processAvatarPickerReply(class LLMessageSystem* msg, void**);
61 static void editKeystroke(LLLineEditor* caller, void* user_data);
62 53
63protected: 54private:
64 static void* createInventoryPanel(void* userdata); 55
56 static void editKeystroke(class LLLineEditor* caller, void* user_data);
65 57
66 static void onBtnFind(void* userdata); 58 static void onBtnFind(void* userdata);
67 static void onBtnAdd(void* userdata); 59 static void onBtnSelect(void* userdata);
60 static void onBtnRefresh(void* userdata);
61 static void onRangeAdjust(LLUICtrl* source, void* data);
68 static void onBtnClose(void* userdata); 62 static void onBtnClose(void* userdata);
69 static void onList(LLUICtrl* ctrl, void* userdata); 63 static void onList(class LLUICtrl* ctrl, void* userdata);
64 static void onTabChanged(void* userdata, bool from_click);
70 65
71 void doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data); 66 void doCallingCardSelectionChange(const std::deque<class LLFolderViewItem*> &items, BOOL user_action, void* data);
72 static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data); 67 static void onCallingCardSelectionChange(const std::deque<class LLFolderViewItem*> &items, BOOL user_action, void* data);
68
69 void populateNearMe();
70 BOOL visibleItemsSelected() const; // Returns true if any items in the current tab are selected.
73 71
74 void find(); 72 void find();
75 void setAllowMultiple(BOOL allow_multiple); 73 void setAllowMultiple(BOOL allow_multiple);
76 74
75 virtual void draw();
77 virtual BOOL handleKeyHere(KEY key, MASK mask); 76 virtual BOOL handleKeyHere(KEY key, MASK mask);
78 77
79protected: 78 std::vector<LLUUID> mSelectedInventoryAvatarIDs;
80 LLScrollListCtrl* mListNames; 79 std::vector<std::string> mSelectedInventoryAvatarNames;
81 LLInventoryPanel* mInventoryPanel;
82
83 std::vector<LLUUID> mAvatarIDs;
84 std::vector<std::string> mAvatarNames;
85 BOOL mAllowMultiple;
86 LLUUID mQueryID; 80 LLUUID mQueryID;
87 BOOL mResultsReturned; 81 BOOL mResultsReturned;
82 BOOL mNearMeListComplete;
88 BOOL mCloseOnSelect; 83 BOOL mCloseOnSelect;
89 84
90 void (*mCallback)(const std::vector<std::string>& name, const std::vector<LLUUID>& id, void* userdata); 85 void (*mCallback)(const std::vector<std::string>& name, const std::vector<LLUUID>& id, void* userdata);
91 void* mCallbackUserdata; 86 void* mCallbackUserdata;
92 87
93protected:
94 static LLFloaterAvatarPicker* sInstance; 88 static LLFloaterAvatarPicker* sInstance;
95 89
96protected:
97 // do not call these directly 90 // do not call these directly
98 LLFloaterAvatarPicker(); 91 LLFloaterAvatarPicker();
99 virtual ~LLFloaterAvatarPicker(); 92 virtual ~LLFloaterAvatarPicker();
100}; 93};
101 94
102
103#endif 95#endif
diff --git a/linden/indra/newview/llfloatergodtools.cpp b/linden/indra/newview/llfloatergodtools.cpp
index 7d54ecf..4b44793 100644
--- a/linden/indra/newview/llfloatergodtools.cpp
+++ b/linden/indra/newview/llfloatergodtools.cpp
@@ -1344,8 +1344,8 @@ void LLPanelRequestTools::refresh()
1344 list->operateOnAll(LLCtrlListInterface::OP_DELETE); 1344 list->operateOnAll(LLCtrlListInterface::OP_DELETE);
1345 list->addSimpleElement(SELECTION); 1345 list->addSimpleElement(SELECTION);
1346 list->addSimpleElement(AGENT_REGION); 1346 list->addSimpleElement(AGENT_REGION);
1347 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->mActiveRegionList.begin(); 1347 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
1348 iter != LLWorld::getInstance()->mActiveRegionList.end(); ++iter) 1348 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
1349 { 1349 {
1350 LLViewerRegion* regionp = *iter; 1350 LLViewerRegion* regionp = *iter;
1351 std::string name = regionp->getName(); 1351 std::string name = regionp->getName();
@@ -1405,8 +1405,8 @@ void LLPanelRequestTools::onClickRequest(void* data)
1405 else 1405 else
1406 { 1406 {
1407 // find region by name 1407 // find region by name
1408 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->mActiveRegionList.begin(); 1408 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
1409 iter != LLWorld::getInstance()->mActiveRegionList.end(); ++iter) 1409 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
1410 { 1410 {
1411 LLViewerRegion* regionp = *iter; 1411 LLViewerRegion* regionp = *iter;
1412 if(dest == regionp->getName()) 1412 if(dest == regionp->getName())
diff --git a/linden/indra/newview/llglsandbox.cpp b/linden/indra/newview/llglsandbox.cpp
index 7506004..2b51948 100644
--- a/linden/indra/newview/llglsandbox.cpp
+++ b/linden/indra/newview/llglsandbox.cpp
@@ -271,7 +271,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
271 { 271 {
272 std::vector<LLDrawable*> potentials; 272 std::vector<LLDrawable*> potentials;
273 273
274 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 274 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
275 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 275 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
276 { 276 {
277 LLViewerRegion* region = *iter; 277 LLViewerRegion* region = *iter;
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp
index 9d92576..cedabf7 100644
--- a/linden/indra/newview/llnetmap.cpp
+++ b/linden/indra/newview/llnetmap.cpp
@@ -257,8 +257,8 @@ void LLNetMap::draw()
257 // figure out where agent is 257 // figure out where agent is
258 S32 region_width = llround(LLWorld::getInstance()->getRegionWidthInMeters()); 258 S32 region_width = llround(LLWorld::getInstance()->getRegionWidthInMeters());
259 259
260 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->mActiveRegionList.begin(); 260 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
261 iter != LLWorld::getInstance()->mActiveRegionList.end(); ++iter) 261 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
262 { 262 {
263 LLViewerRegion* regionp = *iter; 263 LLViewerRegion* regionp = *iter;
264 // Find x and y position relative to camera's center. 264 // Find x and y position relative to camera's center.
@@ -374,8 +374,8 @@ void LLNetMap::draw()
374 LLVector3 pos_map; 374 LLVector3 pos_map;
375 375
376 // Draw avatars 376 // Draw avatars
377 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->mActiveRegionList.begin(); 377 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
378 iter != LLWorld::getInstance()->mActiveRegionList.end(); ++iter) 378 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
379 { 379 {
380 LLViewerRegion* regionp = *iter; 380 LLViewerRegion* regionp = *iter;
381 const LLVector3d& origin_global = regionp->getOriginGlobal(); 381 const LLVector3d& origin_global = regionp->getOriginGlobal();
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp
index 9b85fec..78398bb 100644
--- a/linden/indra/newview/llviewerobjectlist.cpp
+++ b/linden/indra/newview/llviewerobjectlist.cpp
@@ -1115,7 +1115,7 @@ void LLViewerObjectList::generatePickList(LLCamera &camera)
1115 1115
1116 std::vector<LLDrawable*> pick_drawables; 1116 std::vector<LLDrawable*> pick_drawables;
1117 1117
1118 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 1118 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
1119 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 1119 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
1120 { 1120 {
1121 LLViewerRegion* region = *iter; 1121 LLViewerRegion* region = *iter;
diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp
index 04f9e25..9ee789a 100644
--- a/linden/indra/newview/llworld.cpp
+++ b/linden/indra/newview/llworld.cpp
@@ -951,7 +951,7 @@ void LLWorld::updateWaterObjects()
951 951
952void LLWorld::shiftRegions(const LLVector3& offset) 952void LLWorld::shiftRegions(const LLVector3& offset)
953{ 953{
954 for (region_list_t::iterator i = getRegionList().begin(); i != getRegionList().end(); ++i) 954 for (region_list_t::const_iterator i = getRegionList().begin(); i != getRegionList().end(); ++i)
955 { 955 {
956 LLViewerRegion* region = *i; 956 LLViewerRegion* region = *i;
957 region->updateRenderMatrix(); 957 region->updateRenderMatrix();
@@ -1137,8 +1137,8 @@ void send_agent_pause()
1137 gAgentPauseSerialNum++; 1137 gAgentPauseSerialNum++;
1138 gMessageSystem->addU32Fast(_PREHASH_SerialNum, gAgentPauseSerialNum); 1138 gMessageSystem->addU32Fast(_PREHASH_SerialNum, gAgentPauseSerialNum);
1139 1139
1140 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->mActiveRegionList.begin(); 1140 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
1141 iter != LLWorld::getInstance()->mActiveRegionList.end(); ++iter) 1141 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
1142 { 1142 {
1143 LLViewerRegion* regionp = *iter; 1143 LLViewerRegion* regionp = *iter;
1144 gMessageSystem->sendReliable(regionp->getHost()); 1144 gMessageSystem->sendReliable(regionp->getHost());
@@ -1167,8 +1167,8 @@ void send_agent_resume()
1167 gMessageSystem->addU32Fast(_PREHASH_SerialNum, gAgentPauseSerialNum); 1167 gMessageSystem->addU32Fast(_PREHASH_SerialNum, gAgentPauseSerialNum);
1168 1168
1169 1169
1170 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->mActiveRegionList.begin(); 1170 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
1171 iter != LLWorld::getInstance()->mActiveRegionList.end(); ++iter) 1171 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
1172 { 1172 {
1173 LLViewerRegion* regionp = *iter; 1173 LLViewerRegion* regionp = *iter;
1174 gMessageSystem->sendReliable(regionp->getHost()); 1174 gMessageSystem->sendReliable(regionp->getHost());
@@ -1180,6 +1180,62 @@ void send_agent_resume()
1180 LLAppViewer::instance()->resumeMainloopTimeout(); 1180 LLAppViewer::instance()->resumeMainloopTimeout();
1181} 1181}
1182 1182
1183static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3d& region_origin)
1184{
1185 LLVector3d pos_global;
1186 LLVector3 pos_local;
1187 U8 bits;
1188
1189 bits = compact_local & 0xFF;
1190 pos_local.mV[VZ] = F32(bits) * 4.f;
1191 compact_local >>= 8;
1192
1193 bits = compact_local & 0xFF;
1194 pos_local.mV[VY] = (F32)bits;
1195 compact_local >>= 8;
1196
1197 bits = compact_local & 0xFF;
1198 pos_local.mV[VX] = (F32)bits;
1199
1200 pos_global.setVec( pos_local );
1201 pos_global += region_origin;
1202 return pos_global;
1203}
1204
1205void LLWorld::getAvatars(std::vector<LLUUID>* avatar_ids, std::vector<LLVector3d>* positions, const LLVector3d& relative_to, F32 radius) const
1206{
1207 if(avatar_ids != NULL)
1208 {
1209 avatar_ids->clear();
1210 }
1211 if(positions != NULL)
1212 {
1213 positions->clear();
1214 }
1215 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
1216 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
1217 {
1218 LLViewerRegion* regionp = *iter;
1219 const LLVector3d& origin_global = regionp->getOriginGlobal();
1220 S32 count = regionp->mMapAvatars.count();
1221 for (S32 i = 0; i < count; i++)
1222 {
1223 LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.get(i), origin_global);
1224 if(dist_vec(pos_global, relative_to) <= radius)
1225 {
1226 if(positions != NULL)
1227 {
1228 positions->push_back(pos_global);
1229 }
1230 if(avatar_ids != NULL)
1231 {
1232 avatar_ids->push_back(regionp->mMapAvatarIDs.get(i));
1233 }
1234 }
1235 }
1236 }
1237}
1238
1183 1239
1184LLHTTPRegistration<LLEstablishAgentCommunication> 1240LLHTTPRegistration<LLEstablishAgentCommunication>
1185 gHTTPRegistrationEstablishAgentCommunication( 1241 gHTTPRegistrationEstablishAgentCommunication(
diff --git a/linden/indra/newview/llworld.h b/linden/indra/newview/llworld.h
index 7e50bc4..460809a 100644
--- a/linden/indra/newview/llworld.h
+++ b/linden/indra/newview/llworld.h
@@ -1,6 +1,11 @@
1/** 1/**
2 * @file llworld.h 2 * @file llworld.h
3 * @brief Initial test structure to organize viewer regions 3 * @brief Collection of viewer regions in the vacinity of the user.
4 *
5 * Represents the whole world, so far as 3D functionality is conserned.
6 * Always contains the region that the user's avatar is in along with
7 * neighboring regions. As the user crosses region boundaries, new
8 * regions are added to the world and distant ones are rolled up.
4 * 9 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$ 10 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 * 11 *
@@ -146,12 +151,18 @@ public:
146 151
147public: 152public:
148 typedef std::list<LLViewerRegion*> region_list_t; 153 typedef std::list<LLViewerRegion*> region_list_t;
149 154 const region_list_t& getRegionList() const { return mActiveRegionList; }
150 region_list_t mActiveRegionList;
151 155
152 region_list_t& getRegionList() { return mActiveRegionList; } 156 // Returns lists of avatar IDs and their world-space positions within a given distance of a point.
157 // All arguments are optional. Given containers will be emptied and then filled.
158 // Not supplying origin or radius input returns data on all avatars in the known regions.
159 void getAvatars(
160 std::vector<LLUUID>* avatar_ids = NULL,
161 std::vector<LLVector3d>* positions = NULL,
162 const LLVector3d& relative_to = LLVector3d(), F32 radius = FLT_MAX) const;
153 163
154private: 164private:
165 region_list_t mActiveRegionList;
155 region_list_t mRegionList; 166 region_list_t mRegionList;
156 region_list_t mVisibleRegionList; 167 region_list_t mVisibleRegionList;
157 region_list_t mCulledRegionList; 168 region_list_t mCulledRegionList;
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp
index 0406520..87b810c 100644
--- a/linden/indra/newview/pipeline.cpp
+++ b/linden/indra/newview/pipeline.cpp
@@ -608,7 +608,7 @@ void LLPipeline::restoreGL()
608 LLViewerShaderMgr::instance()->setShaders(); 608 LLViewerShaderMgr::instance()->setShaders();
609 } 609 }
610 610
611 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 611 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
612 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 612 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
613 { 613 {
614 LLViewerRegion* region = *iter; 614 LLViewerRegion* region = *iter;
@@ -758,7 +758,7 @@ void LLPipeline::dirtyPoolObjectTextures(const std::set<LLViewerImage*>& texture
758 } 758 }
759 759
760 LLOctreeDirtyTexture dirty(textures); 760 LLOctreeDirtyTexture dirty(textures);
761 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 761 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
762 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 762 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
763 { 763 {
764 LLViewerRegion* region = *iter; 764 LLViewerRegion* region = *iter;
@@ -1149,7 +1149,7 @@ void LLPipeline::updateMove()
1149 { 1149 {
1150 LLFastTimer ot(LLFastTimer::FTM_OCTREE_BALANCE); 1150 LLFastTimer ot(LLFastTimer::FTM_OCTREE_BALANCE);
1151 1151
1152 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 1152 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
1153 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 1153 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
1154 { 1154 {
1155 LLViewerRegion* region = *iter; 1155 LLViewerRegion* region = *iter;
@@ -1226,7 +1226,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
1226 gGL.setColorMask(false, false); 1226 gGL.setColorMask(false, false);
1227 LLGLDepthTest depth(GL_TRUE, GL_FALSE); 1227 LLGLDepthTest depth(GL_TRUE, GL_FALSE);
1228 1228
1229 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 1229 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
1230 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 1230 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
1231 { 1231 {
1232 LLViewerRegion* region = *iter; 1232 LLViewerRegion* region = *iter;
@@ -1609,7 +1609,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
1609 } 1609 }
1610 mShiftList.resize(0); 1610 mShiftList.resize(0);
1611 1611
1612 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 1612 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
1613 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 1613 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
1614 { 1614 {
1615 LLViewerRegion* region = *iter; 1615 LLViewerRegion* region = *iter;
@@ -2591,7 +2591,7 @@ void LLPipeline::renderDebug()
2591 gGL.setColorMask(true, false); 2591 gGL.setColorMask(true, false);
2592 2592
2593 // Debug stuff. 2593 // Debug stuff.
2594 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 2594 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
2595 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 2595 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
2596 { 2596 {
2597 LLViewerRegion* region = *iter; 2597 LLViewerRegion* region = *iter;
@@ -4037,7 +4037,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector3& start,
4037 4037
4038 sPickAvatar = FALSE; //LLToolMgr::getInstance()->inBuildMode() ? FALSE : TRUE; 4038 sPickAvatar = FALSE; //LLToolMgr::getInstance()->inBuildMode() ? FALSE : TRUE;
4039 4039
4040 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 4040 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
4041 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 4041 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
4042 { 4042 {
4043 LLViewerRegion* region = *iter; 4043 LLViewerRegion* region = *iter;
@@ -4094,7 +4094,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector3& start,
4094 4094
4095 //check against avatars 4095 //check against avatars
4096 sPickAvatar = TRUE; 4096 sPickAvatar = TRUE;
4097 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 4097 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
4098 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 4098 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
4099 { 4099 {
4100 LLViewerRegion* region = *iter; 4100 LLViewerRegion* region = *iter;
@@ -4171,7 +4171,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector3& start, co
4171{ 4171{
4172 LLDrawable* drawable = NULL; 4172 LLDrawable* drawable = NULL;
4173 4173
4174 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 4174 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
4175 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 4175 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
4176 { 4176 {
4177 LLViewerRegion* region = *iter; 4177 LLViewerRegion* region = *iter;
@@ -4234,7 +4234,7 @@ void LLPipeline::resetVertexBuffers()
4234{ 4234{
4235 sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); 4235 sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
4236 4236
4237 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 4237 for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
4238 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 4238 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
4239 { 4239 {
4240 LLViewerRegion* region = *iter; 4240 LLViewerRegion* region = *iter;
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml b/linden/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml
index 8e3f822..49b7cb5 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml
@@ -1,42 +1,96 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater bottom="-380" can_close="true" can_drag_on_left="false" can_minimize="true" 2<floater bottom="-380" can_close="true" can_drag_on_left="false" can_minimize="true"
3 can_resize="true" height="380" left="400" min_height="340" min_width="200" 3 can_resize="true" height="350" left="400" min_height="200" min_width="250"
4 mouse_opaque="true" name="avatarpicker" title="Choose Resident" width="240"> 4 mouse_opaque="true" name="avatarpicker" title="Choose Resident" width="250">
5 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 5
6 bottom="-40" drop_shadow_visible="true" follows="left|top" 6 <tab_container bottom="30" follows="left|right|top|bottom" height="300" left="4"
7 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="12" 7 name="ResidentChooserTabs" tab_position="top" tab_width="65" width="240">
8 mouse_opaque="true" name="instruct_search_resident_name" v_pad="0" 8 <panel name="SearchPanel" label="Search"
9 width="220"> 9 border="true" bottom="0" height="150" left="6" width="120"
10 Type part of the resident&apos;s name: 10 mouse_opaque="true">
11 </text> 11 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
12 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-16" 12 bottom="-24" drop_shadow_visible="true" follows="left|top"
13 follows="left|top|right" font="SansSerifSmall" height="16" left="12" 13 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
14 max_length="254" mouse_opaque="true" name="Edit" select_on_focus="false" 14 mouse_opaque="true" name="InstructSearchResidentName" v_pad="0"
15 width="132" /> 15 width="220">
16 <button bottom_delta="-3" follows="top|right" font="SansSerif" halign="center" 16 Type part of the resident&apos;s name:
17 height="20" label="Find" label_selected="Find" left_delta="140" 17 </text>
18 mouse_opaque="true" name="Find" scale_image="TRUE" width="80" /> 18 <line_editor bevel_style="in" border_style="line"
19 <scroll_list background_visible="true" bottom_delta="-164" column_padding="5" 19 border_thickness="1" bottom_delta="-20" enabled="true" follows="left|top|right"
20 draw_border="true" draw_heading="false" draw_stripes="true" 20 font="SansSerifSmall" height="16" left="10" right="-120"
21 follows="left|top|right" height="156" left="12" mouse_opaque="true" 21 max_length="254" mouse_opaque="true" name="Edit"
22 multi_select="false" name="Names" width="220" /> 22 width="132" />
23 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 23 <button bottom_delta="-3" follows="top|right" font="SansSerif" halign="center"
24 bottom_delta="-24" drop_shadow_visible="true" follows="left|top" 24 height="20" label="Find" label_selected="Find" left_delta="20" right="-10"
25 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="12" 25 mouse_opaque="true" name="Find" scale_image="TRUE" width="80" />
26 mouse_opaque="true" name="Or select their calling card:" v_pad="0" 26 <scroll_list background_visible="true" bottom_delta="-95" column_padding="5"
27 width="220"> 27 draw_border="true" draw_heading="false" draw_stripes="true"
28 Or select a calling card: 28 follows="left|top|right|bottom" height="90" left="10" mouse_opaque="true"
29 </text> 29 multi_select="false" name="SearchResults" width="100" />
30 <inventory_panel allow_multi_select="false" border="true" bottom_delta="-100" 30 </panel>
31 follows="left|top|right|bottom" height="100" left="12" mouse_opaque="true" 31
32 name="Inventory Panel" sort_order="AvatarPickerSortOrder" width="220" /> 32 <panel name="CallingCardsPanel" label="Calling Cards"
33 <button bottom_delta="-28" follows="left|bottom" font="SansSerif" halign="center" 33 border="true" bottom="0" height="150" left="0" width="120"
34 height="20" label="Close" label_selected="Close" mouse_opaque="true" 34 mouse_opaque="true">
35 name="Close" right="230" scale_image="TRUE" width="105" /> 35 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
36 <button bottom_delta="0" follows="left|bottom" font="SansSerif" halign="center" 36 bottom="-24" drop_shadow_visible="true" follows="left|top"
37 height="20" label="Select" label_selected="Select" mouse_opaque="true" 37 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
38 name="Select" right="119" scale_image="TRUE" width="105" /> 38 mouse_opaque="true" name="InstructSelectCallingCard" v_pad="0"
39 <string name="NotFound"> 39 width="220">
40 Select a calling card:
41 </text>
42 <inventory_panel allow_multi_select="false" border="true" bottom_delta="-117"
43 follows="left|top|right|bottom" height="110" left="10" mouse_opaque="true"
44 name="InventoryPanel" sort_order="AvatarPickerSortOrder" width="100" />
45 </panel>
46
47 <panel name="NearMePanel" label="Near Me"
48 border="true" bottom="0" height="240" left="6" width="120" mouse_opaque="true">
49 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
50 bottom="-24" drop_shadow_visible="true" follows="left|top"
51 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
52 mouse_opaque="true" name="InstructSelectResident" v_pad="0"
53 width="220">
54 Select nearby resident:
55 </text>
56 <button bottom_delta="-3" left_delta="10" width="90" height="20" follows="top|right"
57 label="Refresh List" label_selected="Refresh List" halign="center"
58 font="SansSerif" mouse_opaque="true" name="Refresh" scale_image="TRUE" />
59 <slider bottom_delta="-20" left="10" follows="left|top" width="175" height="15"
60 name="near_me_range" label="Range" control_name="NearMeRange"
61 min_val="5" max_val="40" increment="1" initial_val="20" decimal_digits="0" />
62 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
63 bottom_delta="0" left="185" drop_shadow_visible="true" follows="left|top"
64 font="SansSerifSmall" h_pad="0" halign="left" height="15"
65 mouse_opaque="true" name="meters" v_pad="0"
66 width="40">
67 Meters
68 </text>
69 <scroll_list bottom_delta="-185" width="100" height="175" left="10"
70 follows="left|top|right|bottom" draw_border="true" draw_heading="false"
71 draw_stripes="true" column_padding="5" sort_column="0" mouse_opaque="true"
72 background_visible="true" multi_select="false" name="NearMe" />
73 </panel>
74
75 </tab_container>
76
77 <button bottom="6" left="10" follows="left|bottom" font="SansSerif" halign="center"
78 width="75" height="20" label="Select" label_selected="Select" mouse_opaque="true"
79 name="Select" scale_image="TRUE" />
80 <button bottom_delta="0" right="230" follows="left|bottom" font="SansSerif" halign="center"
81 width="75" height="20" label="Cancel" label_selected="Cancel" mouse_opaque="true"
82 name="Cancel" scale_image="TRUE" />
83
84 <string name="not_found">
40 &apos;[TEXT]&apos; not found 85 &apos;[TEXT]&apos; not found
41 </string> 86 </string>
87 <string name="no_one_near">
88 No-one near
89 </string>
90 <string name="no_results">
91 No results
92 </string>
93 <string name="searching">
94 Searching...
95 </string>
42</floater> 96</floater>