aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:29 -0500
committerJacek Antonelli2008-08-15 23:45:29 -0500
commit7bdb4845afdd157f95281293803567090e3f992a (patch)
treefbcada1c227d7407f9f37ccba360bfe6326d9c5e /linden
parentSecond Life viewer sources 1.19.0.0 (diff)
downloadmeta-impy-7bdb4845afdd157f95281293803567090e3f992a.zip
meta-impy-7bdb4845afdd157f95281293803567090e3f992a.tar.gz
meta-impy-7bdb4845afdd157f95281293803567090e3f992a.tar.bz2
meta-impy-7bdb4845afdd157f95281293803567090e3f992a.tar.xz
Second Life viewer sources 1.19.0.2
Diffstat (limited to 'linden')
-rw-r--r--linden/doc/contributions.txt3
-rw-r--r--linden/indra/llcommon/indra_constants.h2
-rw-r--r--linden/indra/llcommon/llapr.cpp4
-rw-r--r--linden/indra/llcommon/llfasttimer.h2
-rw-r--r--linden/indra/llcommon/llversionviewer.h2
-rwxr-xr-xlinden/indra/llcrashlogger/llcrashlogger.cpp16
-rw-r--r--linden/indra/llmedia/llmediaengine.h6
-rw-r--r--linden/indra/llui/llcombobox.cpp6
-rw-r--r--linden/indra/llui/llcombobox.h1
-rw-r--r--linden/indra/llui/llctrlselectioninterface.h1
-rw-r--r--linden/indra/llui/llfloater.cpp5
-rw-r--r--linden/indra/llui/llpanel.cpp29
-rw-r--r--linden/indra/llui/llradiogroup.h1
-rw-r--r--linden/indra/llui/llscrolllistctrl.cpp175
-rw-r--r--linden/indra/llui/llscrolllistctrl.h14
-rw-r--r--linden/indra/llui/llview.cpp35
-rw-r--r--linden/indra/llwindow/llwindowwin32.cpp11
-rw-r--r--linden/indra/llxml/llcontrol.cpp21
-rw-r--r--linden/indra/newview/English.lproj/InfoPlist.strings4
-rw-r--r--linden/indra/newview/Info-SecondLife.plist2
-rw-r--r--linden/indra/newview/llappviewer.cpp152
-rw-r--r--linden/indra/newview/llappviewer.h18
-rw-r--r--linden/indra/newview/llcontroldef.cpp7
-rw-r--r--linden/indra/newview/llfasttimerview.cpp20
-rw-r--r--linden/indra/newview/llfilepicker.cpp2
-rw-r--r--linden/indra/newview/llfloateractivespeakers.cpp328
-rw-r--r--linden/indra/newview/llfloateractivespeakers.h61
-rw-r--r--linden/indra/newview/llfloaterfriends.cpp2
-rw-r--r--linden/indra/newview/llfloaterworldmap.cpp33
-rw-r--r--linden/indra/newview/llgroupmgr.cpp167
-rw-r--r--linden/indra/newview/llgroupmgr.h41
-rw-r--r--linden/indra/newview/llimpanel.cpp6
-rw-r--r--linden/indra/newview/llmediaremotectrl.cpp4
-rw-r--r--linden/indra/newview/llnamelistctrl.cpp5
-rw-r--r--linden/indra/newview/lloverlaybar.cpp5
-rw-r--r--linden/indra/newview/lloverlaybar.h4
-rw-r--r--linden/indra/newview/llpanelavatar.cpp6
-rw-r--r--linden/indra/newview/llpanelclassified.cpp38
-rw-r--r--linden/indra/newview/llpanelclassified.h1
-rw-r--r--linden/indra/newview/llpanelgroupgeneral.cpp5
-rw-r--r--linden/indra/newview/llpanelgroupgeneral.h2
-rw-r--r--linden/indra/newview/llpanelgroupinvite.cpp6
-rw-r--r--linden/indra/newview/llpanelgrouproles.cpp109
-rw-r--r--linden/indra/newview/llpanelgrouproles.h3
-rw-r--r--linden/indra/newview/llpanellogin.cpp6
-rw-r--r--linden/indra/newview/llselectmgr.cpp19
-rw-r--r--linden/indra/newview/llstartup.cpp6
-rw-r--r--linden/indra/newview/lltoolbar.cpp4
-rw-r--r--linden/indra/newview/llurlsimstring.cpp4
-rw-r--r--linden/indra/newview/llviewercontrol.cpp11
-rw-r--r--linden/indra/newview/llviewerimagelist.cpp6
-rw-r--r--linden/indra/newview/llviewermessage.cpp3
-rw-r--r--linden/indra/newview/llviewerparcelmgr.cpp13
-rw-r--r--linden/indra/newview/llviewerwindow.cpp16
-rw-r--r--linden/indra/newview/newview_vc8.vcproj2
-rw-r--r--linden/indra/newview/releasenotes.txt39
-rw-r--r--linden/indra/newview/res/newViewRes.rc8
-rw-r--r--linden/indra/newview/skins/xui/de/panel_preferences_general.xml2
-rw-r--r--linden/indra/newview/skins/xui/en-us/floater_active_speakers.xml1
-rw-r--r--linden/indra/newview/skins/xui/en-us/floater_test.xml47
-rw-r--r--linden/indra/newview/skins/xui/en-us/panel_avatar.xml1
-rw-r--r--linden/indra/newview/skins/xui/en-us/panel_bars.xml6
-rw-r--r--linden/indra/newview/skins/xui/en-us/panel_speaker_controls.xml2
63 files changed, 905 insertions, 656 deletions
diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt
index 03a76a9..3bbdb92 100644
--- a/linden/doc/contributions.txt
+++ b/linden/doc/contributions.txt
@@ -38,6 +38,8 @@ Angus Boyd
38 VWR-592 38 VWR-592
39Argent Stonecutter 39Argent Stonecutter
40 VWR-68 40 VWR-68
41Balp Allen
42 VWR-4157
41Benja Kepler 43Benja Kepler
42 VWR-746 44 VWR-746
43Blakar Ogre 45Blakar Ogre
@@ -124,6 +126,7 @@ Hamncheese Omlet
124 VWR-333 126 VWR-333
125Henri Beauchamp 127Henri Beauchamp
126 VWR-1406 128 VWR-1406
129 VWR-4157
127Hikkoshi Sakai 130Hikkoshi Sakai
128 VWR-429 131 VWR-429
129Hiro Sommambulist 132Hiro Sommambulist
diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h
index 6cb2e29..16e471d 100644
--- a/linden/indra/llcommon/indra_constants.h
+++ b/linden/indra/llcommon/indra_constants.h
@@ -336,7 +336,7 @@ const U32 MAP_ITEM_CLASSIFIED = 0x08;
336 336
337// Crash reporter behavior 337// Crash reporter behavior
338const char* const CRASH_SETTINGS_FILE = "crash_settings.xml"; 338const char* const CRASH_SETTINGS_FILE = "crash_settings.xml";
339const char* const CRASH_BEHAVIOR_SETTING = "CrashLogBehavior"; 339const char* const CRASH_BEHAVIOR_SETTING = "CrashSubmitBehavior";
340const S32 CRASH_BEHAVIOR_ASK = 0; 340const S32 CRASH_BEHAVIOR_ASK = 0;
341const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1; 341const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1;
342const S32 CRASH_BEHAVIOR_NEVER_SEND = 2; 342const S32 CRASH_BEHAVIOR_NEVER_SEND = 2;
diff --git a/linden/indra/llcommon/llapr.cpp b/linden/indra/llcommon/llapr.cpp
index a577cc7..2a81e5e 100644
--- a/linden/indra/llcommon/llapr.cpp
+++ b/linden/indra/llcommon/llapr.cpp
@@ -293,6 +293,7 @@ bool ll_apr_file_remove(const LLString& filename, apr_pool_t* pool)
293 if (s != APR_SUCCESS) 293 if (s != APR_SUCCESS)
294 { 294 {
295 llwarns << "ll_apr_file_remove failed on file: " << filename << llendl; 295 llwarns << "ll_apr_file_remove failed on file: " << filename << llendl;
296 ll_apr_warn_status(s);
296 return false; 297 return false;
297 } 298 }
298 return true; 299 return true;
@@ -306,6 +307,7 @@ bool ll_apr_file_rename(const LLString& filename, const LLString& newname, apr_p
306 if (s != APR_SUCCESS) 307 if (s != APR_SUCCESS)
307 { 308 {
308 llwarns << "ll_apr_file_rename failed on file: " << filename << llendl; 309 llwarns << "ll_apr_file_rename failed on file: " << filename << llendl;
310 ll_apr_warn_status(s);
309 return false; 311 return false;
310 } 312 }
311 return true; 313 return true;
@@ -362,6 +364,7 @@ bool ll_apr_dir_make(const LLString& dirname, apr_pool_t* pool)
362 if (s != APR_SUCCESS) 364 if (s != APR_SUCCESS)
363 { 365 {
364 llwarns << "ll_apr_file_remove failed on file: " << dirname << llendl; 366 llwarns << "ll_apr_file_remove failed on file: " << dirname << llendl;
367 ll_apr_warn_status(s);
365 return false; 368 return false;
366 } 369 }
367 return true; 370 return true;
@@ -375,6 +378,7 @@ bool ll_apr_dir_remove(const LLString& dirname, apr_pool_t* pool)
375 if (s != APR_SUCCESS) 378 if (s != APR_SUCCESS)
376 { 379 {
377 llwarns << "ll_apr_file_remove failed on file: " << dirname << llendl; 380 llwarns << "ll_apr_file_remove failed on file: " << dirname << llendl;
381 ll_apr_warn_status(s);
378 return false; 382 return false;
379 } 383 }
380 return true; 384 return true;
diff --git a/linden/indra/llcommon/llfasttimer.h b/linden/indra/llcommon/llfasttimer.h
index b953960..3ecf176 100644
--- a/linden/indra/llcommon/llfasttimer.h
+++ b/linden/indra/llcommon/llfasttimer.h
@@ -92,6 +92,8 @@ public:
92 92
93 // newview specific 93 // newview specific
94 FTM_MESSAGES, 94 FTM_MESSAGES,
95 FTM_MOUSEHANDLER,
96 FTM_KEYHANDLER,
95 FTM_REBUILD, 97 FTM_REBUILD,
96 FTM_STATESORT, 98 FTM_STATESORT,
97 FTM_STATESORT_DRAWABLE, 99 FTM_STATESORT_DRAWABLE,
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h
index 6c5a1ce..e85fa5d 100644
--- a/linden/indra/llcommon/llversionviewer.h
+++ b/linden/indra/llcommon/llversionviewer.h
@@ -35,7 +35,7 @@
35const S32 LL_VERSION_MAJOR = 1; 35const S32 LL_VERSION_MAJOR = 1;
36const S32 LL_VERSION_MINOR = 19; 36const S32 LL_VERSION_MINOR = 19;
37const S32 LL_VERSION_PATCH = 0; 37const S32 LL_VERSION_PATCH = 0;
38const S32 LL_VERSION_BUILD = 0; 38const S32 LL_VERSION_BUILD = 2;
39 39
40const char * const LL_CHANNEL = "Second Life Release"; 40const char * const LL_CHANNEL = "Second Life Release";
41 41
diff --git a/linden/indra/llcrashlogger/llcrashlogger.cpp b/linden/indra/llcrashlogger/llcrashlogger.cpp
index 3823abf..8b1fffa 100755
--- a/linden/indra/llcrashlogger/llcrashlogger.cpp
+++ b/linden/indra/llcrashlogger/llcrashlogger.cpp
@@ -204,8 +204,7 @@ S32 LLCrashLogger::loadCrashBehaviorSetting()
204 204
205bool LLCrashLogger::saveCrashBehaviorSetting(S32 crash_behavior) 205bool LLCrashLogger::saveCrashBehaviorSetting(S32 crash_behavior)
206{ 206{
207 if (crash_behavior < CRASH_BEHAVIOR_ASK) return false; 207 if (crash_behavior != CRASH_BEHAVIOR_ASK && crash_behavior != CRASH_BEHAVIOR_ALWAYS_SEND) return false;
208 if (crash_behavior > CRASH_BEHAVIOR_NEVER_SEND) return false;
209 208
210 mCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior); 209 mCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior);
211 std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); 210 std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
@@ -288,18 +287,7 @@ bool LLCrashLogger::init()
288 llinfos << "Show the user dialog" << llendl; 287 llinfos << "Show the user dialog" << llendl;
289 mCrashBehavior = CRASH_BEHAVIOR_ASK; 288 mCrashBehavior = CRASH_BEHAVIOR_ASK;
290 } 289 }
291 290
292 LLSD server = getOption("user");
293 if(server.isDefined())
294 {
295 mGridName = server.asString();
296 llinfos << "Got userserver " << mGridName << llendl;
297 }
298 else
299 {
300 mGridName = "agni";
301 }
302
303 LLSD name = getOption("name"); 291 LLSD name = getOption("name");
304 if(name.isDefined()) 292 if(name.isDefined())
305 { 293 {
diff --git a/linden/indra/llmedia/llmediaengine.h b/linden/indra/llmedia/llmediaengine.h
index 264060a..4cae070 100644
--- a/linden/indra/llmedia/llmediaengine.h
+++ b/linden/indra/llmedia/llmediaengine.h
@@ -43,8 +43,10 @@
43#include "message.h" 43#include "message.h"
44 44
45// older: after a 7.3.1 update version is 120684544 (dec) and 7318000 (hex) 45// older: after a 7.3.1 update version is 120684544 (dec) and 7318000 (hex)
46// current version on my Windows system after a 7.4 update version is 121667584 (dec) and 7408000 (hex) 46// older: current version on my Windows system after a 7.4 update version is 121667584 (dec) and 7408000 (hex)
47#define LL_MIN_QUICKTIME_VERSION ( 121667584 ) // QT 7.4 47// current version on my Windows system after a 7.4.1 update version is 121733120 (dec) and 7418000 (hex)
48
49#define LL_MIN_QUICKTIME_VERSION ( 0x7418000 ) // QT 7.4.1
48 50
49////////////////////////////////////////////////////////////////////////////// 51//////////////////////////////////////////////////////////////////////////////
50// media engine singleton 52// media engine singleton
diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp
index 22b5033..96092b4 100644
--- a/linden/indra/llui/llcombobox.cpp
+++ b/linden/indra/llui/llcombobox.cpp
@@ -648,12 +648,16 @@ void LLComboBox::showList()
648 } 648 }
649 mList->setFocus(TRUE); 649 mList->setFocus(TRUE);
650 650
651 // register ourselves as a "top" control
652 // effectively putting us into a special draw layer
653 // and not affecting the bounding rectangle calculation
654 gFocusMgr.setTopCtrl(this);
655
651 // Show the list and push the button down 656 // Show the list and push the button down
652 mButton->setToggleState(TRUE); 657 mButton->setToggleState(TRUE);
653 mList->setVisible(TRUE); 658 mList->setVisible(TRUE);
654 659
655 setUseBoundingRect(TRUE); 660 setUseBoundingRect(TRUE);
656 gFocusMgr.setTopCtrl(this);
657} 661}
658 662
659void LLComboBox::hideList() 663void LLComboBox::hideList()
diff --git a/linden/indra/llui/llcombobox.h b/linden/indra/llui/llcombobox.h
index 2a70db2..7511449 100644
--- a/linden/indra/llui/llcombobox.h
+++ b/linden/indra/llui/llcombobox.h
@@ -156,6 +156,7 @@ public:
156 virtual BOOL getCanSelect() const { return TRUE; } 156 virtual BOOL getCanSelect() const { return TRUE; }
157 virtual BOOL selectFirstItem() { return setCurrentByIndex(0); } 157 virtual BOOL selectFirstItem() { return setCurrentByIndex(0); }
158 virtual BOOL selectNthItem( S32 index ) { return setCurrentByIndex(index); } 158 virtual BOOL selectNthItem( S32 index ) { return setCurrentByIndex(index); }
159 virtual BOOL selectItemRange( S32 first, S32 last ) { return setCurrentByIndex(first); }
159 virtual S32 getFirstSelectedIndex() const { return getCurrentIndex(); } 160 virtual S32 getFirstSelectedIndex() const { return getCurrentIndex(); }
160 virtual BOOL setCurrentByID( const LLUUID& id ); 161 virtual BOOL setCurrentByID( const LLUUID& id );
161 virtual LLUUID getCurrentID(); // LLUUID::null if no items in menu 162 virtual LLUUID getCurrentID(); // LLUUID::null if no items in menu
diff --git a/linden/indra/llui/llctrlselectioninterface.h b/linden/indra/llui/llctrlselectioninterface.h
index 121d971..b4d3fc0 100644
--- a/linden/indra/llui/llctrlselectioninterface.h
+++ b/linden/indra/llui/llctrlselectioninterface.h
@@ -58,6 +58,7 @@ public:
58 58
59 virtual BOOL selectFirstItem() = 0; 59 virtual BOOL selectFirstItem() = 0;
60 virtual BOOL selectNthItem( S32 index ) = 0; 60 virtual BOOL selectNthItem( S32 index ) = 0;
61 virtual BOOL selectItemRange( S32 first, S32 last ) = 0;
61 62
62 virtual S32 getFirstSelectedIndex() const = 0; 63 virtual S32 getFirstSelectedIndex() const = 0;
63 64
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp
index 1500f9f..496b67f 100644
--- a/linden/indra/llui/llfloater.cpp
+++ b/linden/indra/llui/llfloater.cpp
@@ -2735,6 +2735,11 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater,
2735 { 2735 {
2736 mTabContainer->selectTabPanel(floaterp); 2736 mTabContainer->selectTabPanel(floaterp);
2737 } 2737 }
2738 else
2739 {
2740 // reassert visible tab (hiding new floater if necessary)
2741 mTabContainer->selectTab(mTabContainer->getCurrentPanelIndex());
2742 }
2738 2743
2739 floaterp->setHost(this); 2744 floaterp->setHost(this);
2740 if (mMinimized) 2745 if (mMinimized)
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp
index af8aa21..7430e50 100644
--- a/linden/indra/llui/llpanel.cpp
+++ b/linden/indra/llui/llpanel.cpp
@@ -356,6 +356,13 @@ BOOL LLPanel::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent )
356 if( getVisible() && getEnabled() && 356 if( getVisible() && getEnabled() &&
357 gFocusMgr.childHasKeyboardFocus(this) && !called_from_parent ) 357 gFocusMgr.childHasKeyboardFocus(this) && !called_from_parent )
358 { 358 {
359 // handle user hitting ESC to defocus
360 if (key == KEY_ESCAPE)
361 {
362 gFocusMgr.setKeyboardFocus(NULL);
363 return TRUE;
364 }
365
359 LLUICtrl* cur_focus = gFocusMgr.getKeyboardFocus(); 366 LLUICtrl* cur_focus = gFocusMgr.getKeyboardFocus();
360 // If we have a default button, click it when 367 // If we have a default button, click it when
361 // return is pressed, unless current focus is a return-capturing button 368 // return is pressed, unless current focus is a return-capturing button
@@ -1322,6 +1329,7 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor
1322 } 1329 }
1323 } 1330 }
1324 } 1331 }
1332 layout_stackp->updateLayout();
1325 1333
1326 return layout_stackp; 1334 return layout_stackp;
1327} 1335}
@@ -1442,10 +1450,14 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
1442 { 1450 {
1443 // panels that are not fully visible do not count towards shrink headroom 1451 // panels that are not fully visible do not count towards shrink headroom
1444 if ((*panel_it)->mVisibleAmt < 1.f) 1452 if ((*panel_it)->mVisibleAmt < 1.f)
1453 {
1445 continue; 1454 continue;
1455 }
1446 // if currently resizing a panel or the panel is flagged as not automatically resizing 1456 // if currently resizing a panel or the panel is flagged as not automatically resizing
1447 // only track total available headroom, but don't use it for automatic resize logic 1457 // only track total available headroom, but don't use it for automatic resize logic
1448 if ((*panel_it)->mResizeBar->hasMouseCapture() || (!(*panel_it)->mAutoResize && !force_resize)) 1458 if ((*panel_it)->mResizeBar->hasMouseCapture()
1459 || (!(*panel_it)->mAutoResize
1460 && !force_resize))
1449 { 1461 {
1450 if (mOrientation == HORIZONTAL) 1462 if (mOrientation == HORIZONTAL)
1451 { 1463 {
@@ -1498,7 +1510,9 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
1498 S32 delta_size = 0; 1510 S32 delta_size = 0;
1499 1511
1500 // if panel can automatically resize (not animating, and resize flag set)... 1512 // if panel can automatically resize (not animating, and resize flag set)...
1501 if ((*panel_it)->mVisibleAmt == 1.f && (force_resize || (*panel_it)->mAutoResize) && !(*panel_it)->mResizeBar->hasMouseCapture()) 1513 if ((*panel_it)->mVisibleAmt == 1.f
1514 && (force_resize || (*panel_it)->mAutoResize)
1515 && !(*panel_it)->mResizeBar->hasMouseCapture())
1502 { 1516 {
1503 if (mOrientation == HORIZONTAL) 1517 if (mOrientation == HORIZONTAL)
1504 { 1518 {
@@ -1506,7 +1520,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
1506 if (pixels_to_distribute < 0) 1520 if (pixels_to_distribute < 0)
1507 { 1521 {
1508 // shrink proportionally to amount over minimum 1522 // shrink proportionally to amount over minimum
1509 delta_size = llround((F32)pixels_to_distribute * (F32)(cur_width - (*panel_it)->mMinWidth) / (F32)shrink_headroom_available); 1523 delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * (F32)(cur_width - (*panel_it)->mMinWidth) / (F32)shrink_headroom_available) : 0;
1510 } 1524 }
1511 else 1525 else
1512 { 1526 {
@@ -1525,7 +1539,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
1525 if (pixels_to_distribute < 0) 1539 if (pixels_to_distribute < 0)
1526 { 1540 {
1527 // shrink proportionally to amount over minimum 1541 // shrink proportionally to amount over minimum
1528 delta_size = llround((F32)pixels_to_distribute * (F32)(cur_height - (*panel_it)->mMinHeight) / (F32)shrink_headroom_available); 1542 delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * (F32)(cur_height - (*panel_it)->mMinHeight) / (F32)shrink_headroom_available) : 0;
1529 } 1543 }
1530 else 1544 else
1531 { 1545 {
@@ -1617,9 +1631,10 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
1617 } 1631 }
1618 1632
1619 // not enough room to fit existing contents 1633 // not enough room to fit existing contents
1620 if (!force_resize 1634 if (force_resize == FALSE
1621 && ((cur_y != -mPanelSpacing) 1635 // layout did not complete by reaching target position
1622 || (cur_x != mRect.getWidth() + mPanelSpacing))) 1636 && ((mOrientation == VERTICAL && cur_y != -mPanelSpacing)
1637 || (mOrientation == HORIZONTAL && cur_x != mRect.getWidth() + mPanelSpacing)))
1623 { 1638 {
1624 // do another layout pass with all stacked elements contributing 1639 // do another layout pass with all stacked elements contributing
1625 // even those that don't usually resize 1640 // even those that don't usually resize
diff --git a/linden/indra/llui/llradiogroup.h b/linden/indra/llui/llradiogroup.h
index e0a4168..aed8de2 100644
--- a/linden/indra/llui/llradiogroup.h
+++ b/linden/indra/llui/llradiogroup.h
@@ -118,6 +118,7 @@ public:
118 /*virtual*/ BOOL getCanSelect() const { return TRUE; } 118 /*virtual*/ BOOL getCanSelect() const { return TRUE; }
119 /*virtual*/ BOOL selectFirstItem() { return setSelectedIndex(0); } 119 /*virtual*/ BOOL selectFirstItem() { return setSelectedIndex(0); }
120 /*virtual*/ BOOL selectNthItem( S32 index ) { return setSelectedIndex(index); } 120 /*virtual*/ BOOL selectNthItem( S32 index ) { return setSelectedIndex(index); }
121 /*virtual*/ BOOL selectItemRange( S32 first, S32 last ) { return setSelectedIndex(first); }
121 /*virtual*/ S32 getFirstSelectedIndex() const { return getSelectedIndex(); } 122 /*virtual*/ S32 getFirstSelectedIndex() const { return getSelectedIndex(); }
122 /*virtual*/ BOOL setCurrentByID( const LLUUID& id ); 123 /*virtual*/ BOOL setCurrentByID( const LLUUID& id );
123 /*virtual*/ LLUUID getCurrentID(); // LLUUID::null if no items in menu 124 /*virtual*/ LLUUID getCurrentID(); // LLUUID::null if no items in menu
diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp
index d65ebd2..36a7b00 100644
--- a/linden/indra/llui/llscrolllistctrl.cpp
+++ b/linden/indra/llui/llscrolllistctrl.cpp
@@ -518,6 +518,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect,
518 mNeedsScroll(FALSE), 518 mNeedsScroll(FALSE),
519 mCanSelect(TRUE), 519 mCanSelect(TRUE),
520 mDisplayColumnHeaders(FALSE), 520 mDisplayColumnHeaders(FALSE),
521 mColumnsDirty(FALSE),
521 mMaxItemCount(INT_MAX), 522 mMaxItemCount(INT_MAX),
522 mMaxContentWidth(0), 523 mMaxContentWidth(0),
523 mBackgroundVisible( TRUE ), 524 mBackgroundVisible( TRUE ),
@@ -630,7 +631,6 @@ void LLScrollListCtrl::clearRows()
630 631
631 mScrollLines = 0; 632 mScrollLines = 0;
632 mLastSelected = NULL; 633 mLastSelected = NULL;
633 calcMaxContentWidth(NULL);
634 updateLayout(); 634 updateLayout();
635 mDirty = FALSE; 635 mDirty = FALSE;
636} 636}
@@ -762,7 +762,7 @@ void LLScrollListCtrl::updateLayout()
762 mScrollbar->setDocSize( getItemCount() ); 762 mScrollbar->setDocSize( getItemCount() );
763 mScrollbar->setVisible(scrollbar_visible); 763 mScrollbar->setVisible(scrollbar_visible);
764 764
765 updateColumns(); 765 dirtyColumns();
766} 766}
767 767
768// Attempt to size the control to show all items. 768// Attempt to size the control to show all items.
@@ -840,7 +840,6 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r
840 } 840 }
841 841
842 updateLineHeightInsert(item); 842 updateLineHeightInsert(item);
843 calcMaxContentWidth(item);
844 843
845 updateLayout(); 844 updateLayout();
846 } 845 }
@@ -848,17 +847,14 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r
848 return not_too_big; 847 return not_too_big;
849} 848}
850 849
851void LLScrollListCtrl::calcMaxContentWidth(LLScrollListItem* added_item) 850void LLScrollListCtrl::calcColumnWidths()
852{ 851{
853 const S32 HEADING_TEXT_PADDING = 30; 852 const S32 HEADING_TEXT_PADDING = 30;
854 const S32 COLUMN_TEXT_PADDING = 20; 853 const S32 COLUMN_TEXT_PADDING = 20;
855 854
856 if (added_item == NULL) 855 mMaxContentWidth = 0;
857 {
858 mMaxContentWidth = 0;
859 }
860 856
861 S32 item_content_width = 0; 857 S32 max_item_width = 0;
862 858
863 ordered_columns_t::iterator column_itor; 859 ordered_columns_t::iterator column_itor;
864 for (column_itor = mColumnsIndexed.begin(); column_itor != mColumnsIndexed.end(); ++column_itor) 860 for (column_itor = mColumnsIndexed.begin(); column_itor != mColumnsIndexed.end(); ++column_itor)
@@ -866,31 +862,37 @@ void LLScrollListCtrl::calcMaxContentWidth(LLScrollListItem* added_item)
866 LLScrollListColumn* column = *column_itor; 862 LLScrollListColumn* column = *column_itor;
867 if (!column) continue; 863 if (!column) continue;
868 864
869 if (!added_item) 865 // update column width
866 S32 new_width = column->mWidth;
867 if (column->mRelWidth >= 0)
870 { 868 {
871 // update on all items 869 new_width = (S32)llround(column->mRelWidth*mItemListRect.getWidth());
872 column->mMaxContentWidth = column->mHeader ? LLFontGL::sSansSerifSmall->getWidth(column->mLabel) + mColumnPadding + HEADING_TEXT_PADDING : 0; 870 }
873 item_list::iterator iter; 871 else if (column->mDynamicWidth)
874 for (iter = mItemList.begin(); iter != mItemList.end(); iter++) 872 {
875 { 873 new_width = (mItemListRect.getWidth() - mTotalStaticColumnWidth) / mNumDynamicWidthColumns;
876 LLScrollListCell* cellp = (*iter)->getColumn(column->mIndex); 874 }
877 if (!cellp) continue;
878 875
879 column->mMaxContentWidth = llmax(LLFontGL::sSansSerifSmall->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth); 876 if (new_width != column->mWidth)
880 } 877 {
878 column->mWidth = new_width;
881 } 879 }
882 else 880
881 // update max content width for this column, by looking at all items
882 column->mMaxContentWidth = column->mHeader ? LLFontGL::sSansSerifSmall->getWidth(column->mLabel) + mColumnPadding + HEADING_TEXT_PADDING : 0;
883 item_list::iterator iter;
884 for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
883 { 885 {
884 LLScrollListCell* cellp = added_item->getColumn(column->mIndex); 886 LLScrollListCell* cellp = (*iter)->getColumn(column->mIndex);
885 if (!cellp) continue; 887 if (!cellp) continue;
886 888
887 column->mMaxContentWidth = llmax(LLFontGL::sSansSerifSmall->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth); 889 column->mMaxContentWidth = llmax(LLFontGL::sSansSerifSmall->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth);
888 } 890 }
889 891
890 item_content_width += column->mMaxContentWidth; 892 max_item_width += column->mMaxContentWidth;
891 } 893 }
892 894
893 mMaxContentWidth = llmax(mMaxContentWidth, item_content_width); 895 mMaxContentWidth = max_item_width;
894} 896}
895 897
896const S32 SCROLL_LIST_ROW_PAD = 2; 898const S32 SCROLL_LIST_ROW_PAD = 2;
@@ -926,29 +928,9 @@ void LLScrollListCtrl::updateLineHeightInsert(LLScrollListItem* itemp)
926 928
927void LLScrollListCtrl::updateColumns() 929void LLScrollListCtrl::updateColumns()
928{ 930{
929 mColumnsIndexed.resize(mColumns.size()); 931 calcColumnWidths();
930
931 std::map<LLString, LLScrollListColumn>::iterator column_itor;
932 for (column_itor = mColumns.begin(); column_itor != mColumns.end(); ++column_itor)
933 {
934 LLScrollListColumn *column = &column_itor->second;
935 S32 new_width = column->mWidth;
936 if (column->mRelWidth >= 0)
937 {
938 new_width = (S32)llround(column->mRelWidth*mItemListRect.getWidth());
939 }
940 else if (column->mDynamicWidth)
941 {
942 new_width = (mItemListRect.getWidth() - mTotalStaticColumnWidth) / mNumDynamicWidthColumns;
943 }
944
945 if (new_width != column->mWidth)
946 {
947 column->mWidth = new_width;
948 }
949 mColumnsIndexed[column_itor->second.mIndex] = column;
950 }
951 932
933 // propagate column widths to individual cells
952 item_list::iterator iter; 934 item_list::iterator iter;
953 for (iter = mItemList.begin(); iter != mItemList.end(); iter++) 935 for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
954 { 936 {
@@ -963,7 +945,7 @@ void LLScrollListCtrl::updateColumns()
963 } 945 }
964 } 946 }
965 947
966 // update headers 948 // update column headers
967 std::vector<LLScrollListColumn*>::iterator column_ordered_it; 949 std::vector<LLScrollListColumn*>::iterator column_ordered_it;
968 S32 left = mItemListRect.mLeft; 950 S32 left = mItemListRect.mLeft;
969 LLColumnHeader* last_header = NULL; 951 LLColumnHeader* last_header = NULL;
@@ -998,6 +980,7 @@ void LLScrollListCtrl::updateColumns()
998 } 980 }
999 } 981 }
1000 982
983 //FIXME: stretch the entire last column if it is resizable (gestures windows shows truncated text in last column)
1001 // expand last column header we encountered to full list width 984 // expand last column header we encountered to full list width
1002 if (last_header) 985 if (last_header)
1003 { 986 {
@@ -1055,28 +1038,42 @@ BOOL LLScrollListCtrl::selectFirstItem()
1055 return success; 1038 return success;
1056} 1039}
1057 1040
1058 1041// Deselects all other items
1042// virtual
1059BOOL LLScrollListCtrl::selectNthItem( S32 target_index ) 1043BOOL LLScrollListCtrl::selectNthItem( S32 target_index )
1060{ 1044{
1061 if (mItemList.empty()) return FALSE; 1045 return selectItemRange(target_index, target_index);
1046}
1062 1047
1063 // Deselects all other items 1048// virtual
1064 BOOL success = FALSE; 1049BOOL LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index )
1065 S32 index = 0; 1050{
1051 if (mItemList.empty())
1052 {
1053 return FALSE;
1054 }
1066 1055
1067 target_index = llclamp(target_index, 0, (S32)mItemList.size() - 1); 1056 S32 listlen = (S32)mItemList.size();
1057 first_index = llclamp(first_index, 0, listlen-1);
1058
1059 if (last_index < 0)
1060 last_index = listlen-1;
1061 else
1062 last_index = llclamp(last_index, first_index, listlen-1);
1068 1063
1069 item_list::iterator iter; 1064 BOOL success = FALSE;
1070 for (iter = mItemList.begin(); iter != mItemList.end(); iter++) 1065 S32 index = 0;
1066 for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); iter++)
1071 { 1067 {
1072 LLScrollListItem *itemp = *iter; 1068 LLScrollListItem *itemp = *iter;
1073 if( target_index == index ) 1069 if( index >= first_index && index <= last_index )
1074 { 1070 {
1075 if( itemp->getEnabled() ) 1071 if( itemp->getEnabled() )
1076 { 1072 {
1077 selectItem(itemp); 1073 selectItem(itemp);
1078 success = TRUE; 1074 success = TRUE;
1079 mOriginalSelection = target_index; 1075 if (!success)
1076 mOriginalSelection = first_index;
1080 } 1077 }
1081 } 1078 }
1082 else 1079 else
@@ -1125,7 +1122,7 @@ void LLScrollListCtrl::swapWithPrevious(S32 index)
1125 1122
1126void LLScrollListCtrl::deleteSingleItem(S32 target_index) 1123void LLScrollListCtrl::deleteSingleItem(S32 target_index)
1127{ 1124{
1128 if (target_index >= (S32)mItemList.size()) 1125 if (target_index < 0 || target_index >= (S32)mItemList.size())
1129 { 1126 {
1130 return; 1127 return;
1131 } 1128 }
@@ -1138,7 +1135,7 @@ void LLScrollListCtrl::deleteSingleItem(S32 target_index)
1138 } 1135 }
1139 delete itemp; 1136 delete itemp;
1140 mItemList.erase(mItemList.begin() + target_index); 1137 mItemList.erase(mItemList.begin() + target_index);
1141 calcMaxContentWidth(NULL); 1138 dirtyColumns();
1142} 1139}
1143 1140
1144//FIXME: refactor item deletion 1141//FIXME: refactor item deletion
@@ -1163,7 +1160,7 @@ void LLScrollListCtrl::deleteItems(const LLSD& sd)
1163 } 1160 }
1164 } 1161 }
1165 1162
1166 calcMaxContentWidth(NULL); 1163 dirtyColumns();
1167} 1164}
1168 1165
1169void LLScrollListCtrl::deleteSelectedItems() 1166void LLScrollListCtrl::deleteSelectedItems()
@@ -1183,7 +1180,7 @@ void LLScrollListCtrl::deleteSelectedItems()
1183 } 1180 }
1184 } 1181 }
1185 mLastSelected = NULL; 1182 mLastSelected = NULL;
1186 calcMaxContentWidth(NULL); 1183 dirtyColumns();
1187} 1184}
1188 1185
1189void LLScrollListCtrl::highlightNthItem(S32 target_index) 1186void LLScrollListCtrl::highlightNthItem(S32 target_index)
@@ -1237,7 +1234,7 @@ S32 LLScrollListCtrl::getItemIndex( LLScrollListItem* target_item )
1237 return -1; 1234 return -1;
1238} 1235}
1239 1236
1240S32 LLScrollListCtrl::getItemIndex( LLUUID& target_id ) 1237S32 LLScrollListCtrl::getItemIndex( const LLUUID& target_id )
1241{ 1238{
1242 S32 index = 0; 1239 S32 index = 0;
1243 item_list::iterator iter; 1240 item_list::iterator iter;
@@ -1722,6 +1719,12 @@ void LLScrollListCtrl::draw()
1722 gl_rect_2d(background); 1719 gl_rect_2d(background);
1723 } 1720 }
1724 1721
1722 if (mColumnsDirty)
1723 {
1724 updateColumns();
1725 mColumnsDirty = FALSE;
1726 }
1727
1725 drawItems(); 1728 drawItems();
1726 1729
1727 if (mBorder) 1730 if (mBorder)
@@ -1989,9 +1992,8 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
1989 gFocusMgr.setMouseCapture(this); 1992 gFocusMgr.setMouseCapture(this);
1990 mNeedsScroll = TRUE; 1993 mNeedsScroll = TRUE;
1991 } 1994 }
1992 // otherwise we already have this item selected 1995
1993 // so propagate state of cell to rest of selected column 1996 // propagate state of cell to rest of selected column
1994 else
1995 { 1997 {
1996 // propagate value of this cell to other selected items 1998 // propagate value of this cell to other selected items
1997 // and commit the respective widgets 1999 // and commit the respective widgets
@@ -2537,6 +2539,23 @@ void LLScrollListCtrl::sortItems()
2537 setSorted(TRUE); 2539 setSorted(TRUE);
2538} 2540}
2539 2541
2542void LLScrollListCtrl::dirtyColumns()
2543{
2544 mColumnsDirty = TRUE;
2545
2546 // need to keep mColumnsIndexed up to date
2547 // just in case someone indexes into it immediately
2548 mColumnsIndexed.resize(mColumns.size());
2549
2550 std::map<LLString, LLScrollListColumn>::iterator column_itor;
2551 for (column_itor = mColumns.begin(); column_itor != mColumns.end(); ++column_itor)
2552 {
2553 LLScrollListColumn *column = &column_itor->second;
2554 mColumnsIndexed[column_itor->second.mIndex] = column;
2555 }
2556}
2557
2558
2540S32 LLScrollListCtrl::getScrollPos() 2559S32 LLScrollListCtrl::getScrollPos()
2541{ 2560{
2542 return mScrollbar->getDocPos(); 2561 return mScrollbar->getDocPos();
@@ -2727,6 +2746,12 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
2727 S32 search_column = 0; 2746 S32 search_column = 0;
2728 node->getAttributeS32("search_column", search_column); 2747 node->getAttributeS32("search_column", search_column);
2729 2748
2749 S32 sort_column = -1;
2750 node->getAttributeS32("sort_column", sort_column);
2751
2752 BOOL sort_ascending = TRUE;
2753 node->getAttributeBOOL("sort_ascending", sort_ascending);
2754
2730 LLUICtrlCallback callback = NULL; 2755 LLUICtrlCallback callback = NULL;
2731 2756
2732 LLScrollListCtrl* scroll_list = new LLScrollListCtrl( 2757 LLScrollListCtrl* scroll_list = new LLScrollListCtrl(
@@ -2751,6 +2776,11 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
2751 2776
2752 scroll_list->setSearchColumn(search_column); 2777 scroll_list->setSearchColumn(search_column);
2753 2778
2779 if (sort_column >= 0)
2780 {
2781 scroll_list->sortByColumn(sort_column, sort_ascending);
2782 }
2783
2754 LLSD columns; 2784 LLSD columns;
2755 S32 index = 0; 2785 S32 index = 0;
2756 LLXMLNodePtr child; 2786 LLXMLNodePtr child;
@@ -3026,7 +3056,7 @@ void LLScrollListCtrl::addColumn(const LLSD& column, EAddPosition pos)
3026 } 3056 }
3027 } 3057 }
3028 3058
3029 updateColumns(); 3059 dirtyColumns();
3030} 3060}
3031 3061
3032// static 3062// static
@@ -3257,13 +3287,14 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& value, EAddPosition p
3257 col_index++; 3287 col_index++;
3258 } 3288 }
3259 3289
3260 S32 num_columns = mColumns.size(); 3290 // add dummy cells for missing columns
3261 for (S32 column = 0; column < num_columns; ++column) 3291 for (column_map_t::iterator column_it = mColumns.begin(); column_it != mColumns.end(); ++column_it)
3262 { 3292 {
3263 if (new_item->getColumn(column) == NULL) 3293 S32 column_idx = column_it->second.mIndex;
3294 if (new_item->getColumn(column_idx) == NULL)
3264 { 3295 {
3265 LLScrollListColumn* column_ptr = mColumnsIndexed[column]; 3296 LLScrollListColumn* column_ptr = &column_it->second;
3266 new_item->setColumn(column, new LLScrollListText("", gResMgr->getRes( LLFONT_SANSSERIF_SMALL ), column_ptr->mWidth, LLFontGL::NORMAL)); 3297 new_item->setColumn(column_idx, new LLScrollListText("", gResMgr->getRes( LLFONT_SANSSERIF_SMALL ), column_ptr->mWidth, LLFontGL::NORMAL));
3267 } 3298 }
3268 } 3299 }
3269 3300
@@ -3665,7 +3696,7 @@ LLView* LLColumnHeader::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_d
3665void LLColumnHeader::userSetShape(const LLRect& new_rect) 3696void LLColumnHeader::userSetShape(const LLRect& new_rect)
3666{ 3697{
3667 S32 new_width = new_rect.getWidth(); 3698 S32 new_width = new_rect.getWidth();
3668 S32 delta_width = new_width - (mRect.getWidth() + mColumn->mParentCtrl->getColumnPadding()); 3699 S32 delta_width = new_width - (mRect.getWidth() /*+ mColumn->mParentCtrl->getColumnPadding()*/);
3669 3700
3670 if (delta_width != 0) 3701 if (delta_width != 0)
3671 { 3702 {
@@ -3737,6 +3768,8 @@ void LLColumnHeader::userSetShape(const LLRect& new_rect)
3737 } 3768 }
3738 3769
3739 // tell scroll list to layout columns again 3770 // tell scroll list to layout columns again
3771 // do immediate update to get proper feedback to resize handle
3772 // which needs to know how far the resize actually went
3740 mColumn->mParentCtrl->updateColumns(); 3773 mColumn->mParentCtrl->updateColumns();
3741 } 3774 }
3742} 3775}
diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h
index ada4f9b..71ba63d 100644
--- a/linden/indra/llui/llscrolllistctrl.h
+++ b/linden/indra/llui/llscrolllistctrl.h
@@ -97,6 +97,7 @@ public:
97 virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; 97 virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const;
98 virtual S32 getContentWidth() const; 98 virtual S32 getContentWidth() const;
99 virtual S32 getHeight() const { return llround(mFont->getLineHeight()); } 99 virtual S32 getHeight() const { return llround(mFont->getLineHeight()); }
100 virtual void setValue(LLSD value) { setText(value.asString()); }
100 virtual const LLSD getValue() const { return LLSD(mText.getString()); } 101 virtual const LLSD getValue() const { return LLSD(mText.getString()); }
101 virtual BOOL getVisible() const { return mVisible; } 102 virtual BOOL getVisible() const { return mVisible; }
102 virtual void highlightText(S32 offset, S32 num_chars) {mHighlightOffset = offset; mHighlightCount = num_chars;} 103 virtual void highlightText(S32 offset, S32 num_chars) {mHighlightOffset = offset; mHighlightCount = num_chars;}
@@ -440,6 +441,7 @@ public:
440 BOOL handleClick(S32 x, S32 y, MASK mask); 441 BOOL handleClick(S32 x, S32 y, MASK mask);
441 BOOL selectFirstItem(); 442 BOOL selectFirstItem();
442 BOOL selectNthItem( S32 index ); 443 BOOL selectNthItem( S32 index );
444 BOOL selectItemRange( S32 first, S32 last );
443 BOOL selectItemAt(S32 x, S32 y, MASK mask); 445 BOOL selectItemAt(S32 x, S32 y, MASK mask);
444 446
445 void deleteSingleItem( S32 index ); 447 void deleteSingleItem( S32 index );
@@ -459,7 +461,7 @@ public:
459 virtual BOOL getCanSelect() const { return mCanSelect; } 461 virtual BOOL getCanSelect() const { return mCanSelect; }
460 462
461 S32 getItemIndex( LLScrollListItem* item ); 463 S32 getItemIndex( LLScrollListItem* item );
462 S32 getItemIndex( LLUUID& item_id ); 464 S32 getItemIndex( const LLUUID& item_id );
463 465
464 LLScrollListItem* addCommentText( const LLString& comment_text, EAddPosition pos = ADD_BOTTOM); 466 LLScrollListItem* addCommentText( const LLString& comment_text, EAddPosition pos = ADD_BOTTOM);
465 LLScrollListItem* addSeparator(EAddPosition pos); 467 LLScrollListItem* addSeparator(EAddPosition pos);
@@ -561,7 +563,7 @@ public:
561 static void onClickColumn(void *userdata); 563 static void onClickColumn(void *userdata);
562 564
563 void updateColumns(); 565 void updateColumns();
564 void calcMaxContentWidth(LLScrollListItem* changed_item); 566 void calcColumnWidths();
565 S32 getMaxContentWidth() { return mMaxContentWidth; } 567 S32 getMaxContentWidth() { return mMaxContentWidth; }
566 568
567 void setDisplayHeading(BOOL display); 569 void setDisplayHeading(BOOL display);
@@ -596,6 +598,9 @@ public:
596 598
597 S32 selectMultiple( LLDynamicArray<LLUUID> ids ); 599 S32 selectMultiple( LLDynamicArray<LLUUID> ids );
598 void sortItems(); 600 void sortItems();
601 // manually call this whenever editing list items in place to flag need for resorting
602 void setSorted(BOOL sorted);
603 void dirtyColumns(); // some operation has potentially affected column layout or ordering
599 604
600protected: 605protected:
601 // "Full" interface: use this when you're creating a list that has one or more of the following: 606 // "Full" interface: use this when you're creating a list that has one or more of the following:
@@ -624,7 +629,6 @@ protected:
624 void selectItem(LLScrollListItem* itemp, BOOL single_select = TRUE); 629 void selectItem(LLScrollListItem* itemp, BOOL single_select = TRUE);
625 void deselectItem(LLScrollListItem* itemp); 630 void deselectItem(LLScrollListItem* itemp);
626 void commitIfChanged(); 631 void commitIfChanged();
627 void setSorted(BOOL sorted);
628 BOOL setSort(S32 column, BOOL ascending); 632 BOOL setSort(S32 column, BOOL ascending);
629 633
630protected: 634protected:
@@ -645,6 +649,7 @@ protected:
645 BOOL mNeedsScroll; 649 BOOL mNeedsScroll;
646 BOOL mCanSelect; 650 BOOL mCanSelect;
647 BOOL mDisplayColumnHeaders; 651 BOOL mDisplayColumnHeaders;
652 BOOL mColumnsDirty;
648 653
649 typedef std::deque<LLScrollListItem *> item_list; 654 typedef std::deque<LLScrollListItem *> item_list;
650 item_list mItemList; 655 item_list mItemList;
@@ -686,7 +691,8 @@ protected:
686 691
687 BOOL mSorted; 692 BOOL mSorted;
688 693
689 std::map<LLString, LLScrollListColumn> mColumns; 694 typedef std::map<LLString, LLScrollListColumn> column_map_t;
695 column_map_t mColumns;
690 696
691 BOOL mDirty; 697 BOOL mDirty;
692 S32 mOriginalSelection; 698 S32 mOriginalSelection;
diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp
index 04d33a6..39398b0 100644
--- a/linden/indra/llui/llview.cpp
+++ b/linden/indra/llui/llview.cpp
@@ -973,18 +973,10 @@ BOOL LLView::handleKey(KEY key, MASK mask, BOOL called_from_parent)
973 } 973 }
974 } 974 }
975 975
976 if( !handled && !called_from_parent) 976 if( !handled && !called_from_parent && mParentView)
977 { 977 {
978 if (mIsFocusRoot) 978 // Upward traversal
979 { 979 handled = mParentView->handleKey( key, mask, FALSE );
980 // stop processing at focus root
981 handled = FALSE;
982 }
983 else if (mParentView)
984 {
985 // Upward traversal
986 handled = mParentView->handleKey( key, mask, FALSE );
987 }
988 } 980 }
989 return handled; 981 return handled;
990} 982}
@@ -1019,18 +1011,10 @@ BOOL LLView::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent)
1019 } 1011 }
1020 1012
1021 1013
1022 if (!handled && !called_from_parent) 1014 if (!handled && !called_from_parent && mParentView)
1023 { 1015 {
1024 if (mIsFocusRoot) 1016 // Upward traversal
1025 { 1017 handled = mParentView->handleUnicodeChar(uni_char, FALSE);
1026 // stop processing at focus root
1027 handled = FALSE;
1028 }
1029 else if(mParentView)
1030 {
1031 // Upward traversal
1032 handled = mParentView->handleUnicodeChar(uni_char, FALSE);
1033 }
1034 } 1018 }
1035 1019
1036 return handled; 1020 return handled;
@@ -1666,7 +1650,12 @@ void LLView::updateBoundingRect()
1666 for ( child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) 1650 for ( child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
1667 { 1651 {
1668 LLView* childp = *child_it; 1652 LLView* childp = *child_it;
1669 if (!childp->getVisible()) continue; 1653 // ignore invisible and "top" children when calculating bounding rect
1654 // such as combobox popups
1655 if (!childp->getVisible() || childp == gFocusMgr.getTopCtrl())
1656 {
1657 continue;
1658 }
1670 1659
1671 LLRect child_bounding_rect = childp->getBoundingRect(); 1660 LLRect child_bounding_rect = childp->getBoundingRect();
1672 1661
diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp
index 171cc09..e9315c9 100644
--- a/linden/indra/llwindow/llwindowwin32.cpp
+++ b/linden/indra/llwindow/llwindowwin32.cpp
@@ -2198,6 +2198,9 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
2198 case WM_SYSKEYUP: 2198 case WM_SYSKEYUP:
2199 eat_keystroke = FALSE; 2199 eat_keystroke = FALSE;
2200 case WM_KEYUP: 2200 case WM_KEYUP:
2201 {
2202 LLFastTimer t2(LLFastTimer::FTM_KEYHANDLER);
2203
2201 if (gDebugWindowProc) 2204 if (gDebugWindowProc)
2202 { 2205 {
2203 llinfos << "Debug WindowProc WM_KEYUP " 2206 llinfos << "Debug WindowProc WM_KEYUP "
@@ -2211,7 +2214,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
2211 2214
2212 // pass on to windows 2215 // pass on to windows
2213 break; 2216 break;
2214 2217 }
2215 case WM_IME_SETCONTEXT: 2218 case WM_IME_SETCONTEXT:
2216 if (LLWinImm::isAvailable() && window_imp->mPreeditor) 2219 if (LLWinImm::isAvailable() && window_imp->mPreeditor)
2217 { 2220 {
@@ -2280,6 +2283,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
2280 2283
2281 case WM_LBUTTONDOWN: 2284 case WM_LBUTTONDOWN:
2282 { 2285 {
2286 LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER);
2283 if (LLWinImm::isAvailable() && window_imp->mPreeditor) 2287 if (LLWinImm::isAvailable() && window_imp->mPreeditor)
2284 { 2288 {
2285 window_imp->interruptLanguageTextInput(); 2289 window_imp->interruptLanguageTextInput();
@@ -2337,6 +2341,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
2337 2341
2338 case WM_LBUTTONUP: 2342 case WM_LBUTTONUP:
2339 { 2343 {
2344 LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER);
2340 //if (gDebugClicks) 2345 //if (gDebugClicks)
2341 //{ 2346 //{
2342 // llinfos << "WndProc left button up" << llendl; 2347 // llinfos << "WndProc left button up" << llendl;
@@ -2367,6 +2372,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
2367 case WM_RBUTTONDBLCLK: 2372 case WM_RBUTTONDBLCLK:
2368 case WM_RBUTTONDOWN: 2373 case WM_RBUTTONDOWN:
2369 { 2374 {
2375 LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER);
2370 if (LLWinImm::isAvailable() && window_imp->mPreeditor) 2376 if (LLWinImm::isAvailable() && window_imp->mPreeditor)
2371 { 2377 {
2372 window_imp->interruptLanguageTextInput(); 2378 window_imp->interruptLanguageTextInput();
@@ -2397,6 +2403,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
2397 2403
2398 case WM_RBUTTONUP: 2404 case WM_RBUTTONUP:
2399 { 2405 {
2406 LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER);
2400 // Because we move the cursor position in the app, we need to query 2407 // Because we move the cursor position in the app, we need to query
2401 // to find out where the cursor at the time the event is handled. 2408 // to find out where the cursor at the time the event is handled.
2402 // If we don't do this, many clicks could get buffered up, and if the 2409 // If we don't do this, many clicks could get buffered up, and if the
@@ -2423,6 +2430,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
2423 case WM_MBUTTONDOWN: 2430 case WM_MBUTTONDOWN:
2424// case WM_MBUTTONDBLCLK: 2431// case WM_MBUTTONDBLCLK:
2425 { 2432 {
2433 LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER);
2426 if (LLWinImm::isAvailable() && window_imp->mPreeditor) 2434 if (LLWinImm::isAvailable() && window_imp->mPreeditor)
2427 { 2435 {
2428 window_imp->interruptLanguageTextInput(); 2436 window_imp->interruptLanguageTextInput();
@@ -2453,6 +2461,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
2453 2461
2454 case WM_MBUTTONUP: 2462 case WM_MBUTTONUP:
2455 { 2463 {
2464 LLFastTimer t2(LLFastTimer::FTM_MOUSEHANDLER);
2456 // Because we move the cursor position in tllviewerhe app, we need to query 2465 // Because we move the cursor position in tllviewerhe app, we need to query
2457 // to find out where the cursor at the time the event is handled. 2466 // to find out where the cursor at the time the event is handled.
2458 // If we don't do this, many clicks could get buffered up, and if the 2467 // If we don't do this, many clicks could get buffered up, and if the
diff --git a/linden/indra/llxml/llcontrol.cpp b/linden/indra/llxml/llcontrol.cpp
index b97498d..b9fa8ff 100644
--- a/linden/indra/llxml/llcontrol.cpp
+++ b/linden/indra/llxml/llcontrol.cpp
@@ -1235,12 +1235,25 @@ void LLControlGroup::resetToDefaults()
1235} 1235}
1236 1236
1237//============================================================================ 1237//============================================================================
1238// FIrst-use 1238// First-use
1239 1239
1240static LLString get_warn_name(const LLString& name)
1241{
1242 LLString warnname = "Warn" + name;
1243 for (LLString::iterator iter = warnname.begin(); iter != warnname.end(); ++iter)
1244 {
1245 char c = *iter;
1246 if (!isalnum(c))
1247 {
1248 *iter = '_';
1249 }
1250 }
1251 return warnname;
1252}
1240 1253
1241void LLControlGroup::addWarning(const LLString& name) 1254void LLControlGroup::addWarning(const LLString& name)
1242{ 1255{
1243 LLString warnname = "Warn" + name; 1256 LLString warnname = get_warn_name(name);
1244 if(!mNameTable[warnname]) 1257 if(!mNameTable[warnname])
1245 { 1258 {
1246 LLString comment = LLString("Enables ") + name + LLString(" warning dialog"); 1259 LLString comment = LLString("Enables ") + name + LLString(" warning dialog");
@@ -1251,13 +1264,13 @@ void LLControlGroup::addWarning(const LLString& name)
1251 1264
1252BOOL LLControlGroup::getWarning(const LLString& name) 1265BOOL LLControlGroup::getWarning(const LLString& name)
1253{ 1266{
1254 LLString warnname = "Warn" + name; 1267 LLString warnname = get_warn_name(name);
1255 return getBOOL(warnname); 1268 return getBOOL(warnname);
1256} 1269}
1257 1270
1258void LLControlGroup::setWarning(const LLString& name, BOOL val) 1271void LLControlGroup::setWarning(const LLString& name, BOOL val)
1259{ 1272{
1260 LLString warnname = "Warn" + name; 1273 LLString warnname = get_warn_name(name);
1261 setBOOL(warnname, val); 1274 setBOOL(warnname, val);
1262} 1275}
1263 1276
diff --git a/linden/indra/newview/English.lproj/InfoPlist.strings b/linden/indra/newview/English.lproj/InfoPlist.strings
index 8944cb8..76c6915 100644
--- a/linden/indra/newview/English.lproj/InfoPlist.strings
+++ b/linden/indra/newview/English.lproj/InfoPlist.strings
@@ -1,5 +1,5 @@
1/* Localized versions of Info.plist keys */ 1/* Localized versions of Info.plist keys */
2 2
3CFBundleName = "Second Life"; 3CFBundleName = "Second Life";
4CFBundleShortVersionString = "Second Life version 1.19.0.0"; 4CFBundleShortVersionString = "Second Life version 1.19.0.2";
5CFBundleGetInfoString = "Second Life version 1.19.0.0, Copyright 2004-2007 Linden Research, Inc."; 5CFBundleGetInfoString = "Second Life version 1.19.0.2, Copyright 2004-2007 Linden Research, Inc.";
diff --git a/linden/indra/newview/Info-SecondLife.plist b/linden/indra/newview/Info-SecondLife.plist
index 5956f9b..c93fbe0 100644
--- a/linden/indra/newview/Info-SecondLife.plist
+++ b/linden/indra/newview/Info-SecondLife.plist
@@ -32,7 +32,7 @@
32 </dict> 32 </dict>
33 </array> 33 </array>
34 <key>CFBundleVersion</key> 34 <key>CFBundleVersion</key>
35 <string>1.19.0.0</string> 35 <string>1.19.0.2</string>
36 <key>CSResourcesFileMapped</key> 36 <key>CSResourcesFileMapped</key>
37 <true/> 37 <true/>
38</dict> 38</dict>
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index c357b8f..2933fe9 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -270,7 +270,7 @@ BOOL gAcceptTOS = FALSE;
270BOOL gAcceptCriticalMessage = FALSE; 270BOOL gAcceptCriticalMessage = FALSE;
271 271
272LLUUID gViewerDigest; // MD5 digest of the viewer's executable file. 272LLUUID gViewerDigest; // MD5 digest of the viewer's executable file.
273BOOL gLastExecFroze = FALSE; 273eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL;
274 274
275LLSD gDebugInfo; 275LLSD gDebugInfo;
276 276
@@ -334,6 +334,7 @@ BOOL gRandomizeFramerate = FALSE;
334BOOL gPeriodicSlowFrame = FALSE; 334BOOL gPeriodicSlowFrame = FALSE;
335 335
336BOOL gQAMode = FALSE; 336BOOL gQAMode = FALSE;
337BOOL gLLErrorActivated = FALSE;
337 338
338//////////////////////////////////////////////////////////// 339////////////////////////////////////////////////////////////
339// Internal globals... that should be removed. 340// Internal globals... that should be removed.
@@ -355,6 +356,9 @@ static LLString gArgs;
355 356
356static LLString gOldSettingsFileName; 357static LLString gOldSettingsFileName;
357static const char* LEGACY_DEFAULT_SETTINGS_FILE = "settings.ini"; 358static const char* LEGACY_DEFAULT_SETTINGS_FILE = "settings.ini";
359const char* MARKER_FILE_NAME = "SecondLife.exec_marker";
360const char* ERROR_MARKER_FILE_NAME = "SecondLife.error_marker";
361const char* LLERROR_MARKER_FILE_NAME = "SecondLife.llerror_marker";
358static BOOL gDoDisconnect = FALSE; 362static BOOL gDoDisconnect = FALSE;
359static LLString gLaunchFileOnQuit; 363static LLString gLaunchFileOnQuit;
360 364
@@ -957,7 +961,6 @@ LLTextureFetch* LLAppViewer::sTextureFetch = NULL;
957 961
958LLAppViewer::LLAppViewer() : 962LLAppViewer::LLAppViewer() :
959 mMarkerFile(NULL), 963 mMarkerFile(NULL),
960 mLastExecFroze(false),
961 mCrashBehavior(CRASH_BEHAVIOR_ASK), 964 mCrashBehavior(CRASH_BEHAVIOR_ASK),
962 mReportedCrash(false), 965 mReportedCrash(false),
963 mNumSessions(0), 966 mNumSessions(0),
@@ -1983,6 +1986,10 @@ void errorCallback(const std::string &error_string)
1983#ifndef LL_RELEASE_FOR_DOWNLOAD 1986#ifndef LL_RELEASE_FOR_DOWNLOAD
1984 OSMessageBox(error_string.c_str(), "Fatal Error", OSMB_OK); 1987 OSMessageBox(error_string.c_str(), "Fatal Error", OSMB_OK);
1985#endif 1988#endif
1989
1990 //Set the ErrorActivated global so we know to create a marker file
1991 gLLErrorActivated = true;
1992
1986 LLError::crashAndLoop(error_string); 1993 LLError::crashAndLoop(error_string);
1987} 1994}
1988 1995
@@ -2163,7 +2170,7 @@ bool LLAppViewer::initConfiguration()
2163 initMarkerFile(); 2170 initMarkerFile();
2164 2171
2165#if LL_SEND_CRASH_REPORTS 2172#if LL_SEND_CRASH_REPORTS
2166 if (gLastExecFroze) 2173 if (gLastExecEvent == LAST_EXEC_FROZE)
2167 { 2174 {
2168 llinfos << "Last execution froze, requesting to send crash report." << llendl; 2175 llinfos << "Last execution froze, requesting to send crash report." << llendl;
2169 // 2176 //
@@ -2549,6 +2556,27 @@ void LLAppViewer::handleViewerCrash()
2549 gDebugInfo["CurrentPath"] = gDirUtilp->getCurPath().c_str(); 2556 gDebugInfo["CurrentPath"] = gDirUtilp->getCurPath().c_str();
2550 gDebugInfo["CurrentSimHost"] = gAgent.getRegionHost().getHostName(); 2557 gDebugInfo["CurrentSimHost"] = gAgent.getRegionHost().getHostName();
2551 2558
2559 //Write out the crash status file
2560 //Use marker file style setup, as that's the simplest, especially since
2561 //we're already in a crash situation
2562 if (gDirUtilp)
2563 {
2564 LLString crash_file_name;
2565 if(gLLErrorActivated) crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LLERROR_MARKER_FILE_NAME);
2566 else crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME);
2567 llinfos << "Creating crash marker file " << crash_file_name << llendl;
2568 apr_file_t* crash_file = ll_apr_file_open(crash_file_name, LL_APR_W);
2569 if (crash_file)
2570 {
2571 llinfos << "Created crash marker file " << crash_file_name << llendl;
2572 }
2573 else
2574 {
2575 llwarns << "Cannot create error marker file " << crash_file_name << llendl;
2576 }
2577 apr_file_close(crash_file);
2578 }
2579
2552 if (gMessageSystem && gDirUtilp) 2580 if (gMessageSystem && gDirUtilp)
2553 { 2581 {
2554 std::string filename; 2582 std::string filename;
@@ -2575,6 +2603,9 @@ void LLAppViewer::handleViewerCrash()
2575 pApp->closeDebug(); 2603 pApp->closeDebug();
2576 LLError::logToFile(""); 2604 LLError::logToFile("");
2577 2605
2606 // Remove the marker file, since otherwise we'll spawn a process that'll keep it locked
2607 pApp->removeMarkerFile();
2608
2578 // Call to pure virtual, handled by platform specifc llappviewer instance. 2609 // Call to pure virtual, handled by platform specifc llappviewer instance.
2579 pApp->handleCrashReporting(); 2610 pApp->handleCrashReporting();
2580 2611
@@ -2592,7 +2623,7 @@ bool LLAppViewer::anotherInstanceRunning()
2592 // We create a marker file when the program starts and remove the file when it finishes. 2623 // We create a marker file when the program starts and remove the file when it finishes.
2593 // If the file is currently locked, that means another process is already running. 2624 // If the file is currently locked, that means another process is already running.
2594 2625
2595 std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.exec_marker"); 2626 std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, MARKER_FILE_NAME);
2596 llinfos << "Checking marker file for lock..." << llendl; 2627 llinfos << "Checking marker file for lock..." << llendl;
2597 2628
2598 // If file doesn't exist, we create it 2629 // If file doesn't exist, we create it
@@ -2630,71 +2661,69 @@ bool LLAppViewer::anotherInstanceRunning()
2630 2661
2631void LLAppViewer::initMarkerFile() 2662void LLAppViewer::initMarkerFile()
2632{ 2663{
2633 // *FIX:Mani - an actually cross platform LLFile lib would be nice.
2634
2635#if LL_SOLARIS
2636 struct flock fl;
2637 fl.l_whence = SEEK_SET;
2638 fl.l_start = 0;
2639 fl.l_len = 1;
2640#endif
2641 // We create a marker file when the program starts and remove the file when it finishes.
2642 // If the file is currently locked, that means another process is already running.
2643 // If the file exists and isn't locked, we crashed on the last run.
2644 2664
2645 std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.exec_marker"); 2665 //First, check for the existence of other files.
2666 //There are marker files for two different types of crashes
2667
2668 mMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,MARKER_FILE_NAME);
2646 llinfos << "Checking marker file for lock..." << llendl; 2669 llinfos << "Checking marker file for lock..." << llendl;
2647 2670
2648 FILE* fMarker = LLFile::fopen(marker_file.c_str(), "rb"); // Flawfinder: ignore 2671 //We've got 4 things to test for here
2672 // - Other Process Running (SecondLife.exec_marker present, locked)
2673 // - Freeze (SecondLife.exec_marker present, not locked)
2674 // - LLError Crash (SecondLife.llerror_marker present)
2675 // - Other Crash (SecondLife.error_marker present)
2676 // These checks should also remove these files for the last 2 cases if they currently exist
2677
2678 //LLError/Error checks. Only one of these should ever happen at a time.
2679 LLString llerror_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LLERROR_MARKER_FILE_NAME);
2680 LLString error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME);
2681 apr_file_t* fMarker = ll_apr_file_open(llerror_marker_file, LL_APR_RB);
2682 if(fMarker != NULL)
2683 {
2684 apr_file_close(fMarker);
2685 llinfos << "Last exec LLError crashed, setting LastExecEvent to " << LAST_EXEC_LLERROR_CRASH << llendl;
2686 gLastExecEvent = LAST_EXEC_LLERROR_CRASH;
2687 }
2688
2689 fMarker = ll_apr_file_open(error_marker_file, LL_APR_RB);
2690 if(fMarker != NULL)
2691 {
2692 apr_file_close(fMarker);
2693 llinfos << "Last exec crashed, setting LastExecEvent to " << LAST_EXEC_OTHER_CRASH << llendl;
2694 gLastExecEvent = LAST_EXEC_OTHER_CRASH;
2695 }
2696
2697 ll_apr_file_remove(llerror_marker_file);
2698 ll_apr_file_remove(error_marker_file);
2699
2700 //Freeze case checks
2701 fMarker = ll_apr_file_open(mMarkerFileName, LL_APR_RB);
2649 if (fMarker != NULL) 2702 if (fMarker != NULL)
2650 { 2703 {
2651 // File exists, try opening with write permissions 2704 // File exists, try opening with write permissions
2652 fclose(fMarker); 2705 apr_file_close(fMarker);
2653 fMarker = LLFile::fopen(marker_file.c_str(), "wb"); // Flawfinder: ignxore 2706 fMarker = ll_apr_file_open(mMarkerFileName, LL_APR_WB);
2654 if (fMarker == NULL) 2707 if (fMarker == NULL)
2655 { 2708 {
2656 // Another instance is running. Skip the rest of these operations. 2709 // Another instance is running. Skip the rest of these operations.
2657 llinfos << "Marker file is locked." << llendl; 2710 llinfos << "Marker file is locked." << llendl;
2658 return; 2711 return;
2659 } 2712 }
2660#if LL_DARWIN || LL_LINUX || LL_SOLARIS 2713 if (apr_file_lock(fMarker, APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS) //flock(fileno(fMarker), LOCK_EX | LOCK_NB) == -1)
2661 // Try to lock it. On Mac, this is the only way to test if it's actually locked.
2662 if (flock(fileno(fMarker), LOCK_EX | LOCK_NB) == -1)
2663 { 2714 {
2664 // Lock failed - somebody else has it. 2715 apr_file_close(fMarker);
2665 fclose(fMarker);
2666 llinfos << "Marker file is locked." << llendl; 2716 llinfos << "Marker file is locked." << llendl;
2667 return; 2717 return;
2668 } 2718 }
2669#endif
2670
2671 // No other instances; we'll lock this file now & delete on quit. 2719 // No other instances; we'll lock this file now & delete on quit.
2672 fclose(fMarker); 2720 apr_file_close(fMarker);
2673 gLastExecFroze = TRUE; 2721 gLastExecEvent = LAST_EXEC_FROZE;
2674 llinfos << "Exec marker found: program froze on previous execution" << llendl; 2722 llinfos << "Exec marker found: program froze on previous execution" << llendl;
2675 } 2723 }
2676 2724
2677 // Create the marker file for this execution & lock it 2725 // Create the marker file for this execution & lock it
2678// FILE *fp_executing_marker; 2726 mMarkerFile = ll_apr_file_open(mMarkerFileName, LL_APR_W);
2679#if LL_WINDOWS
2680 mMarkerFile = LLFile::_fsopen(marker_file.c_str(), "w", _SH_DENYWR);
2681#else
2682 mMarkerFile = LLFile::fopen(marker_file.c_str(), "w"); // Flawfinder: ignore
2683 if (mMarkerFile)
2684 {
2685 int fd = fileno(mMarkerFile);
2686 // Attempt to lock
2687#if LL_SOLARIS
2688 fl.l_type = F_WRLCK;
2689 if (fcntl(fd, F_SETLK, &fl) == -1)
2690#else
2691 if (flock(fd, LOCK_EX | LOCK_NB) == -1)
2692#endif
2693 {
2694 llinfos << "Failed to lock file." << llendl;
2695 }
2696 }
2697#endif
2698 if (mMarkerFile) 2727 if (mMarkerFile)
2699 { 2728 {
2700 llinfos << "Marker file created." << llendl; 2729 llinfos << "Marker file created." << llendl;
@@ -2703,20 +2732,14 @@ void LLAppViewer::initMarkerFile()
2703 { 2732 {
2704 llinfos << "Failed to create marker file." << llendl; 2733 llinfos << "Failed to create marker file." << llendl;
2705 } 2734 }
2735 if (apr_file_lock(mMarkerFile, APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS)
2736 {
2737 apr_file_close(mMarkerFile);
2738 llinfos << "Marker file cannot be locked." << llendl;
2739 return;
2740 }
2706 2741
2707#if LL_WINDOWS 2742 llinfos << "Marker file locked." << llendl;
2708 // Clean up SecondLife.dmp files, to avoid confusion
2709 llinfos << "Removing SecondLife.dmp" << llendl;
2710 std::string dmp_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.dmp");
2711 LLFile::remove(dmp_filename.c_str());
2712#endif
2713
2714 // This is to keep the crash reporter from constantly sending stale message logs
2715 // We wipe the message file now.
2716 llinfos << "Removing message.log" << llendl;
2717 std::string message_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "message.log");
2718 LLFile::remove(message_filename.c_str());
2719
2720 llinfos << "Exiting initMarkerFile()." << llendl; 2743 llinfos << "Exiting initMarkerFile()." << llendl;
2721} 2744}
2722 2745
@@ -2725,14 +2748,9 @@ void LLAppViewer::removeMarkerFile()
2725 llinfos << "removeMarkerFile()" << llendl; 2748 llinfos << "removeMarkerFile()" << llendl;
2726 if (mMarkerFile != NULL) 2749 if (mMarkerFile != NULL)
2727 { 2750 {
2728 fclose(mMarkerFile); 2751 ll_apr_file_remove( mMarkerFileName );
2729 mMarkerFile = NULL; 2752 mMarkerFile = NULL;
2730 } 2753 }
2731 if( gDirUtilp )
2732 {
2733 LLString marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.exec_marker");
2734 ll_apr_file_remove( marker_file );
2735 }
2736} 2754}
2737 2755
2738void LLAppViewer::forceQuit() 2756void LLAppViewer::forceQuit()
diff --git a/linden/indra/newview/llappviewer.h b/linden/indra/newview/llappviewer.h
index 1078d71..ddf51b3 100644
--- a/linden/indra/newview/llappviewer.h
+++ b/linden/indra/newview/llappviewer.h
@@ -115,6 +115,8 @@ public:
115 115
116 bool isInProductionGrid(); 116 bool isInProductionGrid();
117 117
118 void removeMarkerFile();
119
118 // LLAppViewer testing helpers. 120 // LLAppViewer testing helpers.
119 // *NOTE: These will potentially crash the viewer. Only for debugging. 121 // *NOTE: These will potentially crash the viewer. Only for debugging.
120 virtual void forceErrorLLError(); 122 virtual void forceErrorLLError();
@@ -148,7 +150,6 @@ private:
148 150
149 bool anotherInstanceRunning(); 151 bool anotherInstanceRunning();
150 void initMarkerFile(); 152 void initMarkerFile();
151 void removeMarkerFile();
152 153
153 void idle(); 154 void idle();
154 void idleShutdown(); 155 void idleShutdown();
@@ -163,8 +164,8 @@ private:
163 164
164 bool mSecondInstance; // Is this a second instance of the app? 165 bool mSecondInstance; // Is this a second instance of the app?
165 166
166 FILE *mMarkerFile; // A file created to indicate the app is running. 167 LLString mMarkerFileName;
167 bool mLastExecFroze; // Set on init if the marker file was found. 168 apr_file_t* mMarkerFile; // A file created to indicate the app is running.
168 169
169 LLOSInfo mSysOSInfo; 170 LLOSInfo mSysOSInfo;
170 S32 mCrashBehavior; 171 S32 mCrashBehavior;
@@ -224,7 +225,16 @@ extern BOOL gAcceptTOS;
224extern BOOL gAcceptCriticalMessage; 225extern BOOL gAcceptCriticalMessage;
225 226
226extern LLUUID gViewerDigest; // MD5 digest of the viewer's executable file. 227extern LLUUID gViewerDigest; // MD5 digest of the viewer's executable file.
227extern BOOL gLastExecFroze; // llstartup 228
229typedef enum
230{
231 LAST_EXEC_NORMAL = 0,
232 LAST_EXEC_FROZE,
233 LAST_EXEC_LLERROR_CRASH,
234 LAST_EXEC_OTHER_CRASH
235} eLastExecEvent;
236
237extern eLastExecEvent gLastExecEvent; // llstartup
228 238
229extern U32 gFrameCount; 239extern U32 gFrameCount;
230extern U32 gForegroundFrameCount; 240extern U32 gForegroundFrameCount;
diff --git a/linden/indra/newview/llcontroldef.cpp b/linden/indra/newview/llcontroldef.cpp
index 23a1753..c30c9a6 100644
--- a/linden/indra/newview/llcontroldef.cpp
+++ b/linden/indra/newview/llcontroldef.cpp
@@ -76,9 +76,10 @@
76 76
77void declare_settings() 77void declare_settings()
78{ 78{
79 // Somewhat under 1024 by 768 79 // Somewhat under 1024 by 768, to give space for Windows task bar / Mac menu bar
80 const S32 WINDOW_WIDTH = 800; 80 // to emphasize window isn't actually maximized.
81 const S32 WINDOW_HEIGHT = 600; 81 const S32 WINDOW_WIDTH = 1000;
82 const S32 WINDOW_HEIGHT = 700;
82 83
83 //------------------------------------------------------------------------ 84 //------------------------------------------------------------------------
84 // Color constants 85 // Color constants
diff --git a/linden/indra/newview/llfasttimerview.cpp b/linden/indra/newview/llfasttimerview.cpp
index 14dc08c..6364fd2 100644
--- a/linden/indra/newview/llfasttimerview.cpp
+++ b/linden/indra/newview/llfasttimerview.cpp
@@ -76,7 +76,9 @@ static LLColor4 green9(0.6f, 1.0f, 0.6f, 1.0f);
76static struct ft_display_info ft_display_table[] = 76static struct ft_display_info ft_display_table[] =
77{ 77{
78 { LLFastTimer::FTM_FRAME, "Frame", &LLColor4::white, 0 }, 78 { LLFastTimer::FTM_FRAME, "Frame", &LLColor4::white, 0 },
79 { LLFastTimer::FTM_MESSAGES, " Messages", &LLColor4::grey1, 0 }, 79 { LLFastTimer::FTM_MESSAGES, " System Messages", &LLColor4::grey1, 1 },
80 { LLFastTimer::FTM_MOUSEHANDLER, " Mouse", &LLColor4::grey1, 0 },
81 { LLFastTimer::FTM_KEYHANDLER, " Keyboard", &LLColor4::grey1, 0 },
80 { LLFastTimer::FTM_SLEEP, " Sleep", &LLColor4::grey2, 0 }, 82 { LLFastTimer::FTM_SLEEP, " Sleep", &LLColor4::grey2, 0 },
81 { LLFastTimer::FTM_IDLE, " Idle", &blue0, 0 }, 83 { LLFastTimer::FTM_IDLE, " Idle", &blue0, 0 },
82 { LLFastTimer::FTM_PUMP, " Pump", &LLColor4::magenta2, 1 }, 84 { LLFastTimer::FTM_PUMP, " Pump", &LLColor4::magenta2, 1 },
@@ -184,14 +186,14 @@ static struct ft_display_info ft_display_table[] =
184 { LLFastTimer::FTM_SWAP, " Swap", &LLColor4::pink1, 0 }, 186 { LLFastTimer::FTM_SWAP, " Swap", &LLColor4::pink1, 0 },
185 { LLFastTimer::FTM_CLIENT_COPY, " Client Copy", &LLColor4::red1, 1}, 187 { LLFastTimer::FTM_CLIENT_COPY, " Client Copy", &LLColor4::red1, 1},
186 188
187// { LLFastTimer::FTM_TEMP1, " Temp1", &LLColor4::red1, 0 }, 189 { LLFastTimer::FTM_TEMP1, " Temp1", &LLColor4::red1, 0 },
188// { LLFastTimer::FTM_TEMP2, " Temp2", &LLColor4::magenta1, 0 }, 190 { LLFastTimer::FTM_TEMP2, " Temp2", &LLColor4::magenta1, 0 },
189// { LLFastTimer::FTM_TEMP3, " Temp3", &LLColor4::red2, 0 }, 191 { LLFastTimer::FTM_TEMP3, " Temp3", &LLColor4::red2, 0 },
190// { LLFastTimer::FTM_TEMP4, " Temp4", &LLColor4::magenta2, 0 }, 192 { LLFastTimer::FTM_TEMP4, " Temp4", &LLColor4::magenta2, 0 },
191// { LLFastTimer::FTM_TEMP5, " Temp5", &LLColor4::red3, 0 }, 193 { LLFastTimer::FTM_TEMP5, " Temp5", &LLColor4::red3, 0 },
192// { LLFastTimer::FTM_TEMP6, " Temp6", &LLColor4::magenta3, 0 }, 194 { LLFastTimer::FTM_TEMP6, " Temp6", &LLColor4::magenta3, 0 },
193// { LLFastTimer::FTM_TEMP7, " Temp7", &LLColor4::red4, 0 }, 195 { LLFastTimer::FTM_TEMP7, " Temp7", &LLColor4::red4, 0 },
194// { LLFastTimer::FTM_TEMP8, " Temp8", &LLColor4::magenta4, 0 }, 196 { LLFastTimer::FTM_TEMP8, " Temp8", &LLColor4::magenta4, 0 },
195 197
196 { LLFastTimer::FTM_OTHER, " Other", &red0 } 198 { LLFastTimer::FTM_OTHER, " Other", &red0 }
197}; 199};
diff --git a/linden/indra/newview/llfilepicker.cpp b/linden/indra/newview/llfilepicker.cpp
index 107c271..6233443 100644
--- a/linden/indra/newview/llfilepicker.cpp
+++ b/linden/indra/newview/llfilepicker.cpp
@@ -1034,7 +1034,7 @@ GtkWindow* LLFilePicker::buildFilePicker(bool is_save, bool is_folder,
1034 GTK_STOCK_SAVE : 1034 GTK_STOCK_SAVE :
1035 GTK_STOCK_OPEN), 1035 GTK_STOCK_OPEN),
1036 GTK_RESPONSE_ACCEPT, 1036 GTK_RESPONSE_ACCEPT,
1037 NULL); 1037 (gchar *)NULL);
1038 mStoreFilenames.win = win; 1038 mStoreFilenames.win = win;
1039 mStoreFilenames.contextName = context; 1039 mStoreFilenames.contextName = context;
1040 1040
diff --git a/linden/indra/newview/llfloateractivespeakers.cpp b/linden/indra/newview/llfloateractivespeakers.cpp
index 877ebca..8432d21 100644
--- a/linden/indra/newview/llfloateractivespeakers.cpp
+++ b/linden/indra/newview/llfloateractivespeakers.cpp
@@ -135,6 +135,16 @@ LLSD LLSpeakerVoiceModerationEvent::getValue()
135 return LLString("voice"); 135 return LLString("voice");
136} 136}
137 137
138LLSpeakerListChangeEvent::LLSpeakerListChangeEvent(LLSpeakerMgr* source, const LLUUID& speaker_id)
139: LLEvent(source, "Speaker added/removed from speaker mgr"),
140 mSpeakerID(speaker_id)
141{
142}
143
144LLSD LLSpeakerListChangeEvent::getValue()
145{
146 return mSpeakerID;
147}
138 148
139// helper sort class 149// helper sort class
140struct LLSortRecentSpeakers 150struct LLSortRecentSpeakers
@@ -210,9 +220,9 @@ void* LLFloaterActiveSpeakers::createSpeakersPanel(void* data)
210} 220}
211 221
212// 222//
213// LLPanelActiveSpeakers::LLSpeakerListener 223// LLPanelActiveSpeakers::SpeakerMuteListener
214// 224//
215bool LLPanelActiveSpeakers::LLSpeakerListener::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 225bool LLPanelActiveSpeakers::SpeakerMuteListener::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
216{ 226{
217 LLPointer<LLSpeaker> speakerp = (LLSpeaker*)event->getSource(); 227 LLPointer<LLSpeaker> speakerp = (LLSpeaker*)event->getSource();
218 if (speakerp.isNull()) return false; 228 if (speakerp.isNull()) return false;
@@ -231,6 +241,35 @@ bool LLPanelActiveSpeakers::LLSpeakerListener::handleEvent(LLPointer<LLEvent> ev
231 241
232 242
233// 243//
244// LLPanelActiveSpeakers::SpeakerAddListener
245//
246bool LLPanelActiveSpeakers::SpeakerAddListener::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
247{
248 mPanel->addSpeaker(event->getValue().asUUID());
249 return true;
250}
251
252
253//
254// LLPanelActiveSpeakers::SpeakerRemoveListener
255//
256bool LLPanelActiveSpeakers::SpeakerRemoveListener::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
257{
258 mPanel->removeSpeaker(event->getValue().asUUID());
259 return true;
260}
261
262//
263// LLPanelActiveSpeakers::SpeakerClearListener
264//
265bool LLPanelActiveSpeakers::SpeakerClearListener::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
266{
267 mPanel->mSpeakerList->clearRows();
268 return true;
269}
270
271
272//
234// LLPanelActiveSpeakers 273// LLPanelActiveSpeakers
235// 274//
236LLPanelActiveSpeakers::LLPanelActiveSpeakers(LLSpeakerMgr* data_source, BOOL show_text_chatters) : 275LLPanelActiveSpeakers::LLPanelActiveSpeakers(LLSpeakerMgr* data_source, BOOL show_text_chatters) :
@@ -243,12 +282,14 @@ LLPanelActiveSpeakers::LLPanelActiveSpeakers(LLSpeakerMgr* data_source, BOOL sho
243 mSpeakerMgr(data_source) 282 mSpeakerMgr(data_source)
244{ 283{
245 setMouseOpaque(FALSE); 284 setMouseOpaque(FALSE);
246 mSpeakerListener = new LLSpeakerListener(this); 285 mSpeakerMuteListener = new SpeakerMuteListener(this);
247} 286 mSpeakerAddListener = new SpeakerAddListener(this);
248 287 mSpeakerRemoveListener = new SpeakerRemoveListener(this);
249LLPanelActiveSpeakers::~LLPanelActiveSpeakers() 288 mSpeakerClearListener = new SpeakerClearListener(this);
250{ 289
251 290 mSpeakerMgr->addListener(mSpeakerAddListener, "add");
291 mSpeakerMgr->addListener(mSpeakerRemoveListener, "remove");
292 mSpeakerMgr->addListener(mSpeakerClearListener, "clear");
252} 293}
253 294
254BOOL LLPanelActiveSpeakers::postBuild() 295BOOL LLPanelActiveSpeakers::postBuild()
@@ -283,6 +324,57 @@ BOOL LLPanelActiveSpeakers::postBuild()
283 return TRUE; 324 return TRUE;
284} 325}
285 326
327void LLPanelActiveSpeakers::addSpeaker(const LLUUID& speaker_id)
328{
329 if (mSpeakerList->getItemIndex(speaker_id) >= 0)
330 {
331 // already have this speaker
332 return;
333 }
334
335 LLPointer<LLSpeaker> speakerp = mSpeakerMgr->findSpeaker(speaker_id);
336 if (speakerp)
337 {
338 // since we are forced to sort by text, encode sort order as string
339 LLString speaking_order_sort_string = llformat("%010d", speakerp->mSortIndex);
340
341 LLSD row;
342 row["id"] = speaker_id;
343
344 LLSD& columns = row["columns"];
345
346 columns[0]["column"] = "icon_speaking_status";
347 columns[0]["type"] = "icon";
348 columns[0]["value"] = gViewerArt.getString("icn_active-speakers-dot-lvl0.tga");
349
350 LLString speaker_name;
351 if (speakerp->mDisplayName.empty())
352 {
353 speaker_name = LLCacheName::getDefaultName();
354 }
355 else
356 {
357 speaker_name = speakerp->mDisplayName;
358 }
359 columns[1]["column"] = "speaker_name";
360 columns[1]["type"] = "text";
361 columns[1]["value"] = speaker_name;
362
363 columns[2]["column"] = "speaking_status";
364 columns[2]["type"] = "text";
365
366 // print speaking ordinal in a text-sorting friendly manner
367 columns[2]["value"] = speaking_order_sort_string;
368
369 mSpeakerList->addElement(row);
370 }
371}
372
373void LLPanelActiveSpeakers::removeSpeaker(const LLUUID& speaker_id)
374{
375 mSpeakerList->deleteSingleItem(mSpeakerList->getItemIndex(speaker_id));
376}
377
286void LLPanelActiveSpeakers::handleSpeakerSelect() 378void LLPanelActiveSpeakers::handleSpeakerSelect()
287{ 379{
288 LLUUID speaker_id = mSpeakerList->getValue().asUUID(); 380 LLUUID speaker_id = mSpeakerList->getValue().asUUID();
@@ -296,8 +388,8 @@ void LLPanelActiveSpeakers::handleSpeakerSelect()
296 childSetValue("moderator_allow_voice", selected_speakerp ? !selected_speakerp->mModeratorMutedVoice : TRUE); 388 childSetValue("moderator_allow_voice", selected_speakerp ? !selected_speakerp->mModeratorMutedVoice : TRUE);
297 childSetValue("moderator_allow_text", selected_speakerp ? !selected_speakerp->mModeratorMutedText : TRUE); 389 childSetValue("moderator_allow_text", selected_speakerp ? !selected_speakerp->mModeratorMutedText : TRUE);
298 390
299 mSpeakerListener->clearDispatchers(); 391 mSpeakerMuteListener->clearDispatchers();
300 selected_speakerp->addListener(mSpeakerListener); 392 selected_speakerp->addListener(mSpeakerMuteListener);
301 } 393 }
302} 394}
303 395
@@ -307,159 +399,131 @@ void LLPanelActiveSpeakers::refreshSpeakers()
307 LLUUID selected_id = mSpeakerList->getSelectedValue().asUUID(); 399 LLUUID selected_id = mSpeakerList->getSelectedValue().asUUID();
308 S32 scroll_pos = mSpeakerList->getScrollInterface()->getScrollPos(); 400 S32 scroll_pos = mSpeakerList->getScrollInterface()->getScrollPos();
309 401
310 BOOL sort_ascending = mSpeakerList->getSortAscending();
311 LLString sort_column = mSpeakerList->getSortColumnName();
312 // TODO: put this in xml
313 // enforces default sort column of speaker status
314 if (sort_column.empty())
315 {
316 sort_column = "speaking_status";
317 }
318
319 mSpeakerMgr->update(); 402 mSpeakerMgr->update();
320 403
321 // clear scrolling list widget of names 404 const LLString icon_image_0 = gViewerArt.getString("icn_active-speakers-dot-lvl0.tga");
322 mSpeakerList->clearRows(); 405 const LLString icon_image_1 = gViewerArt.getString("icn_active-speakers-dot-lvl1.tga");
406 const LLString icon_image_2 = gViewerArt.getString("icn_active-speakers-dot-lvl2.tga");
407
408
409 std::vector<LLScrollListItem*> items = mSpeakerList->getAllData();
410
411 LLUUID mute_icon_image = LLUUID(gViewerArt.getString("mute_icon.tga"));
323 412
324 LLSpeakerMgr::speaker_list_t speaker_list; 413 LLSpeakerMgr::speaker_list_t speaker_list;
325 mSpeakerMgr->getSpeakerList(&speaker_list, mShowTextChatters); 414 mSpeakerMgr->getSpeakerList(&speaker_list, mShowTextChatters);
326 for (LLSpeakerMgr::speaker_list_t::const_iterator speaker_it = speaker_list.begin(); speaker_it != speaker_list.end(); ++speaker_it) 415 for (std::vector<LLScrollListItem*>::iterator item_it = items.begin();
416 item_it != items.end();
417 ++item_it)
327 { 418 {
328 LLUUID speaker_id = (*speaker_it)->mID; 419 LLScrollListItem* itemp = (*item_it);
329 LLPointer<LLSpeaker> speakerp = (*speaker_it); 420 LLUUID speaker_id = itemp->getUUID();
421
422 LLPointer<LLSpeaker> speakerp = mSpeakerMgr->findSpeaker(speaker_id);
423 if (!speakerp)
424 {
425 continue;
426 }
330 427
331 // since we are forced to sort by text, encode sort order as string 428 // since we are forced to sort by text, encode sort order as string
332 LLString speaking_order_sort_string = llformat("%010d", speakerp->mSortIndex); 429 LLString speaking_order_sort_string = llformat("%010d", speakerp->mSortIndex);
333 430
334 LLSD row; 431 LLScrollListCell* icon_cell = itemp->getColumn(0);
335 row["id"] = speaker_id; 432 if (icon_cell)
433 {
336 434
337 row["columns"][0]["column"] = "icon_speaking_status"; 435 LLString icon_image_id;
338 row["columns"][0]["type"] = "icon";
339 LLString icon_image_id;
340 436
341 S32 icon_image_idx = llmin(2, llfloor((speakerp->mSpeechVolume / LLVoiceClient::OVERDRIVEN_POWER_LEVEL) * 3.f)); 437 S32 icon_image_idx = llmin(2, llfloor((speakerp->mSpeechVolume / LLVoiceClient::OVERDRIVEN_POWER_LEVEL) * 3.f));
342 switch(icon_image_idx) 438 switch(icon_image_idx)
343 {
344 case 0:
345 icon_image_id = gViewerArt.getString("icn_active-speakers-dot-lvl0.tga");
346 break;
347 case 1:
348 icon_image_id = gViewerArt.getString("icn_active-speakers-dot-lvl1.tga");
349 break;
350 case 2:
351 icon_image_id = gViewerArt.getString("icn_active-speakers-dot-lvl2.tga");
352 break;
353 }
354 //if (speakerp->mTyping)
355 //{
356 // S32 typing_anim_idx = llround(mIconAnimationTimer.getElapsedTimeF32() * TYPING_ANIMATION_FPS) % 3;
357 // switch(typing_anim_idx)
358 // {
359 // case 0:
360 // row["columns"][0]["overlay"] = LLUUID(gViewerArt.getString("icn_active-speakers-typing1.tga"));
361 // break;
362 // case 1:
363 // row["columns"][0]["overlay"] = LLUUID(gViewerArt.getString("icn_active-speakers-typing2.tga"));
364 // break;
365 // case 2:
366 // row["columns"][0]["overlay"] = LLUUID(gViewerArt.getString("icn_active-speakers-typing3.tga"));
367 // break;
368 // default:
369 // break;
370 // }
371 //}
372
373 LLColor4 icon_color;
374 if (speakerp->mStatus == LLSpeaker::STATUS_MUTED)
375 {
376 row["columns"][0]["value"] = gViewerArt.getString("mute_icon.tga");
377 if(speakerp->mModeratorMutedVoice)
378 { 439 {
379 icon_color.setVec(0.5f, 0.5f, 0.5f, 1.f); 440 case 0:
441 icon_image_id = icon_image_0;
442 break;
443 case 1:
444 icon_image_id = icon_image_1;
445 break;
446 case 2:
447 icon_image_id = icon_image_2;
448 break;
449 }
450
451 LLColor4 icon_color;
452 if (speakerp->mStatus == LLSpeaker::STATUS_MUTED)
453 {
454 icon_cell->setValue(mute_icon_image);
455 if(speakerp->mModeratorMutedVoice)
456 {
457 icon_color.setVec(0.5f, 0.5f, 0.5f, 1.f);
458 }
459 else
460 {
461 icon_color.setVec(1.f, 71.f / 255.f, 71.f / 255.f, 1.f);
462 }
380 } 463 }
381 else 464 else
382 { 465 {
383 icon_color.setVec(1.f, 71.f / 255.f, 71.f / 255.f, 1.f); 466 icon_cell->setValue(icon_image_id);
467 icon_color = speakerp->mDotColor;
468
469 if (speakerp->mStatus > LLSpeaker::STATUS_VOICE_ACTIVE) // if voice is disabled for this speaker
470 {
471 // non voice speakers have hidden icons, render as transparent
472 icon_color.setVec(0.f, 0.f, 0.f, 0.f);
473 }
384 } 474 }
385 }
386 else
387 {
388 row["columns"][0]["value"] = icon_image_id;
389 icon_color = speakerp->mDotColor;
390 475
391 if (speakerp->mStatus > LLSpeaker::STATUS_VOICE_ACTIVE) // if voice is disabled for this speaker 476 icon_cell->setColor(icon_color);
477
478 if (speakerp->mStatus > LLSpeaker::STATUS_VOICE_ACTIVE && speakerp->mStatus != LLSpeaker::STATUS_MUTED) // if voice is disabled for this speaker
392 { 479 {
393 // non voice speakers have hidden icons, render as transparent 480 // non voice speakers have hidden icons, render as transparent
394 icon_color.setVec(0.f, 0.f, 0.f, 0.f); 481 icon_cell->setColor(LLColor4::transparent);
395 } 482 }
396 } 483 }
397 484
398 row["columns"][0]["color"] = icon_color.getValue(); 485 // update name column
399 486 LLScrollListCell* name_cell = itemp->getColumn(1);
400 if (speakerp->mStatus > LLSpeaker::STATUS_VOICE_ACTIVE && speakerp->mStatus != LLSpeaker::STATUS_MUTED) // if voice is disabled for this speaker 487 if (name_cell)
401 {
402 // non voice speakers have hidden icons, render as transparent
403 row["columns"][0]["color"] = LLColor4(0.f, 0.f, 0.f, 0.f).getValue();
404 }
405 row["columns"][1]["column"] = "speaker_name";
406 row["columns"][1]["type"] = "text";
407 if (speakerp->mStatus == LLSpeaker::STATUS_NOT_IN_CHANNEL)
408 { 488 {
409 // draw inactive speakers in gray 489 if (speakerp->mStatus == LLSpeaker::STATUS_NOT_IN_CHANNEL)
410 row["columns"][1]["color"] = LLColor4::grey4.getValue(); 490 {
411 } 491 // draw inactive speakers in gray
492 name_cell->setColor(LLColor4::grey4);
493 }
412 494
413 LLString speaker_name; 495 LLString speaker_name;
414 if (speakerp->mDisplayName.empty()) 496 if (speakerp->mDisplayName.empty())
415 { 497 {
416 speaker_name = LLCacheName::getDefaultName(); 498 speaker_name = LLCacheName::getDefaultName();
417 } 499 }
418 else 500 else
419 { 501 {
420 speaker_name = speakerp->mDisplayName; 502 speaker_name = speakerp->mDisplayName;
503 }
504
505 if (speakerp->mIsModerator)
506 {
507 speaker_name += LLString(" ") + getFormattedUIString("moderator_label");
508 }
509
510 name_cell->setValue(speaker_name);
511 ((LLScrollListText*)name_cell)->setFontStyle(speakerp->mIsModerator ? LLFontGL::BOLD : LLFontGL::NORMAL);
421 } 512 }
422 513
423 if (speakerp->mIsModerator) 514 // update speaking order column
515 LLScrollListCell* speaking_status_cell = itemp->getColumn(2);
516 if (speaking_status_cell)
424 { 517 {
425 speaker_name += LLString(" ") + getFormattedUIString("moderator_label"); 518 // print speaking ordinal in a text-sorting friendly manner
519 speaking_status_cell->setValue(speaking_order_sort_string);
426 } 520 }
427 row["columns"][1]["value"] = speaker_name;
428 row["columns"][1]["font-style"] = speakerp->mIsModerator ? "BOLD" : "NORMAL";
429
430 row["columns"][2]["column"] = "speaking_status";
431 row["columns"][2]["type"] = "text";
432
433 // print speaking ordinal in a text-sorting friendly manner
434 row["columns"][2]["value"] = speaking_order_sort_string;
435
436 mSpeakerList->addElement(row);
437 } 521 }
438 522
439 //restore sort order, selection, etc 523 // we potentially modified the sort order by touching the list items
440 mSpeakerList->sortByColumn(sort_column, sort_ascending); 524 mSpeakerList->setSorted(FALSE);
441
442 // temporarily disable commit callback while restoring original selection
443 mSpeakerList->setCommitCallback(NULL);
444
445 // make sure something is selected
446 if (selected_id.isNull())
447 {
448 mSpeakerList->selectFirstItem();
449 handleSpeakerSelect();
450 }
451 else
452 {
453 // reselect original speaker but don't call handleSpeakerSelect()
454 // as that would change the moderation mute checkboxes before they
455 // have had time to get confirmation from the server
456 mSpeakerList->selectByValue(selected_id);
457 }
458
459 mSpeakerList->setCommitCallback(onSelectSpeaker);
460 525
461 LLPointer<LLSpeaker> selected_speakerp = mSpeakerMgr->findSpeaker(selected_id); 526 LLPointer<LLSpeaker> selected_speakerp = mSpeakerMgr->findSpeaker(selected_id);
462
463 527
464 if (gMuteListp) 528 if (gMuteListp)
465 { 529 {
@@ -847,6 +911,7 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const LLString&
847 speakerp->mStatus = status; 911 speakerp->mStatus = status;
848 mSpeakers.insert(std::make_pair(speakerp->mID, speakerp)); 912 mSpeakers.insert(std::make_pair(speakerp->mID, speakerp));
849 mSpeakersSorted.push_back(speakerp); 913 mSpeakersSorted.push_back(speakerp);
914 fireEvent(new LLSpeakerListChangeEvent(this, speakerp->mID), "add");
850 } 915 }
851 else 916 else
852 { 917 {
@@ -974,6 +1039,8 @@ void LLSpeakerMgr::update()
974 // remove speakers that have been gone too long 1039 // remove speakers that have been gone too long
975 if (speakerp->mStatus == LLSpeaker::STATUS_NOT_IN_CHANNEL && speakerp->mActivityTimer.hasExpired()) 1040 if (speakerp->mStatus == LLSpeaker::STATUS_NOT_IN_CHANNEL && speakerp->mActivityTimer.hasExpired())
976 { 1041 {
1042 fireEvent(new LLSpeakerListChangeEvent(this, speakerp->mID), "remove");
1043
977 mSpeakers.erase(speakerp->mID); 1044 mSpeakers.erase(speakerp->mID);
978 sorted_speaker_it = mSpeakersSorted.erase(sorted_speaker_it); 1045 sorted_speaker_it = mSpeakersSorted.erase(sorted_speaker_it);
979 } 1046 }
@@ -1221,6 +1288,7 @@ void LLActiveSpeakerMgr::updateSpeakerList()
1221 // always populate from active voice channel 1288 // always populate from active voice channel
1222 if (LLVoiceChannel::getCurrentVoiceChannel() != mVoiceChannel) 1289 if (LLVoiceChannel::getCurrentVoiceChannel() != mVoiceChannel)
1223 { 1290 {
1291 fireEvent(new LLSpeakerListChangeEvent(this, LLUUID::null), "clear");
1224 mSpeakers.clear(); 1292 mSpeakers.clear();
1225 mSpeakersSorted.clear(); 1293 mSpeakersSorted.clear();
1226 mVoiceChannel = LLVoiceChannel::getCurrentVoiceChannel(); 1294 mVoiceChannel = LLVoiceChannel::getCurrentVoiceChannel();
diff --git a/linden/indra/newview/llfloateractivespeakers.h b/linden/indra/newview/llfloateractivespeakers.h
index cded35d..1088be3 100644
--- a/linden/indra/newview/llfloateractivespeakers.h
+++ b/linden/indra/newview/llfloateractivespeakers.h
@@ -37,6 +37,7 @@
37#include "llvoiceclient.h" 37#include "llvoiceclient.h"
38#include "llframetimer.h" 38#include "llframetimer.h"
39#include "llevent.h" 39#include "llevent.h"
40#include <list>
40 41
41class LLScrollListCtrl; 42class LLScrollListCtrl;
42class LLButton; 43class LLButton;
@@ -106,7 +107,17 @@ public:
106 /*virtual*/ LLSD getValue(); 107 /*virtual*/ LLSD getValue();
107}; 108};
108 109
109class LLSpeakerMgr 110class LLSpeakerListChangeEvent : public LLEvent
111{
112public:
113 LLSpeakerListChangeEvent(LLSpeakerMgr* source, const LLUUID& speaker_id);
114 /*virtual*/ LLSD getValue();
115
116private:
117 const LLUUID& mSpeakerID;
118};
119
120class LLSpeakerMgr : public LLObservable
110{ 121{
111public: 122public:
112 LLSpeakerMgr(LLVoiceChannel* channelp); 123 LLSpeakerMgr(LLVoiceChannel* channelp);
@@ -196,7 +207,6 @@ class LLPanelActiveSpeakers : public LLPanel
196{ 207{
197public: 208public:
198 LLPanelActiveSpeakers(LLSpeakerMgr* data_source, BOOL show_text_chatters); 209 LLPanelActiveSpeakers(LLSpeakerMgr* data_source, BOOL show_text_chatters);
199 virtual ~LLPanelActiveSpeakers();
200 210
201 /*virtual*/ BOOL postBuild(); 211 /*virtual*/ BOOL postBuild();
202 212
@@ -222,16 +232,54 @@ public:
222 static void onChangeModerationMode(LLUICtrl* ctrl, void* user_data); 232 static void onChangeModerationMode(LLUICtrl* ctrl, void* user_data);
223 233
224protected: 234protected:
225 class LLSpeakerListener : public LLSimpleListener 235 class SpeakerMuteListener : public LLSimpleListener
226 { 236 {
227 public: 237 public:
228 LLSpeakerListener(LLPanelActiveSpeakers* panel) : mPanel(panel) {} 238 SpeakerMuteListener(LLPanelActiveSpeakers* panel) : mPanel(panel) {}
229 239
230 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata); 240 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
231 241
232 LLPanelActiveSpeakers* mPanel; 242 LLPanelActiveSpeakers* mPanel;
233 }; 243 };
234 244
245 friend class SpeakerAddListener;
246 class SpeakerAddListener : public LLSimpleListener
247 {
248 public:
249 SpeakerAddListener(LLPanelActiveSpeakers* panel) : mPanel(panel) {}
250
251 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
252
253 LLPanelActiveSpeakers* mPanel;
254 };
255
256 friend class SpeakerRemoveListener;
257 class SpeakerRemoveListener : public LLSimpleListener
258 {
259 public:
260 SpeakerRemoveListener(LLPanelActiveSpeakers* panel) : mPanel(panel) {}
261
262 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
263
264 LLPanelActiveSpeakers* mPanel;
265 };
266
267
268 friend class SpeakerClearListener;
269 class SpeakerClearListener : public LLSimpleListener
270 {
271 public:
272 SpeakerClearListener(LLPanelActiveSpeakers* panel) : mPanel(panel) {}
273
274 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
275
276 LLPanelActiveSpeakers* mPanel;
277 };
278
279 void addSpeaker(const LLUUID& id);
280 void removeSpeaker(const LLUUID& id);
281
282
235 LLScrollListCtrl* mSpeakerList; 283 LLScrollListCtrl* mSpeakerList;
236 LLUICtrl* mMuteVoiceCtrl; 284 LLUICtrl* mMuteVoiceCtrl;
237 LLUICtrl* mMuteTextCtrl; 285 LLUICtrl* mMuteTextCtrl;
@@ -240,7 +288,10 @@ protected:
240 BOOL mShowTextChatters; 288 BOOL mShowTextChatters;
241 LLSpeakerMgr* mSpeakerMgr; 289 LLSpeakerMgr* mSpeakerMgr;
242 LLFrameTimer mIconAnimationTimer; 290 LLFrameTimer mIconAnimationTimer;
243 LLPointer<LLSpeakerListener> mSpeakerListener; 291 LLPointer<SpeakerMuteListener> mSpeakerMuteListener;
292 LLPointer<SpeakerAddListener> mSpeakerAddListener;
293 LLPointer<SpeakerRemoveListener> mSpeakerRemoveListener;
294 LLPointer<SpeakerClearListener> mSpeakerClearListener;
244}; 295};
245 296
246extern LLLocalSpeakerMgr* gLocalSpeakerMgr; 297extern LLLocalSpeakerMgr* gLocalSpeakerMgr;
diff --git a/linden/indra/newview/llfloaterfriends.cpp b/linden/indra/newview/llfloaterfriends.cpp
index e6ff76b..0de8698 100644
--- a/linden/indra/newview/llfloaterfriends.cpp
+++ b/linden/indra/newview/llfloaterfriends.cpp
@@ -333,7 +333,7 @@ void LLPanelFriends::refreshRightsChangeList()
333 333
334struct SortFriendsByID 334struct SortFriendsByID
335{ 335{
336 bool SortFriendsByID::operator() (const LLScrollListItem* const a, const LLScrollListItem* const b) const 336 bool operator() (const LLScrollListItem* const a, const LLScrollListItem* const b) const
337 { 337 {
338 return a->getValue().asUUID() < b->getValue().asUUID(); 338 return a->getValue().asUUID() < b->getValue().asUUID();
339 } 339 }
diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp
index ee84537..7a8940d 100644
--- a/linden/indra/newview/llfloaterworldmap.cpp
+++ b/linden/indra/newview/llfloaterworldmap.cpp
@@ -852,15 +852,17 @@ void LLFloaterWorldMap::friendsChanged()
852void LLFloaterWorldMap::buildAvatarIDList() 852void LLFloaterWorldMap::buildAvatarIDList()
853{ 853{
854 LLCtrlListInterface *list = childGetListInterface("friend combo"); 854 LLCtrlListInterface *list = childGetListInterface("friend combo");
855 if (!list) return; 855 if (!list)
856 856 {
857 return;
858 }
859
857 // Delete all but the "None" entry 860 // Delete all but the "None" entry
858 S32 list_size = list->getItemCount(); 861 S32 list_size = list->getItemCount();
859 while (list_size > 1) 862 if (list_size > 1)
860 { 863 {
861 list->selectNthItem(1); 864 list->selectItemRange(1, -1);
862 list->operateOnSelection(LLCtrlListInterface::OP_DELETE); 865 list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
863 --list_size;
864 } 866 }
865 867
866 LLSD default_column; 868 LLSD default_column;
@@ -872,11 +874,9 @@ void LLFloaterWorldMap::buildAvatarIDList()
872 // Get all of the calling cards for avatar that are currently online 874 // Get all of the calling cards for avatar that are currently online
873 LLCollectMappableBuddies collector; 875 LLCollectMappableBuddies collector;
874 LLAvatarTracker::instance().applyFunctor(collector); 876 LLAvatarTracker::instance().applyFunctor(collector);
875 LLCollectMappableBuddies::buddy_map_t::iterator it; 877
876 LLCollectMappableBuddies::buddy_map_t::iterator end; 878 for (LLCollectMappableBuddies::buddy_map_t::iterator it = collector.mMappable.begin();
877 it = collector.mMappable.begin(); 879 it != collector.mMappable.end(); ++it)
878 end = collector.mMappable.end();
879 for( ; it != end; ++it)
880 { 880 {
881 list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second); 881 list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second);
882 } 882 }
@@ -889,15 +889,17 @@ void LLFloaterWorldMap::buildAvatarIDList()
889void LLFloaterWorldMap::buildLandmarkIDLists() 889void LLFloaterWorldMap::buildLandmarkIDLists()
890{ 890{
891 LLCtrlListInterface *list = childGetListInterface("landmark combo"); 891 LLCtrlListInterface *list = childGetListInterface("landmark combo");
892 if (!list) return; 892 if (!list)
893 {
894 return;
895 }
893 896
894 // Delete all but the "None" entry 897 // Delete all but the "None" entry
895 S32 list_size = list->getItemCount(); 898 S32 list_size = list->getItemCount();
896 while (list_size > 1) 899 if (list_size > 1)
897 { 900 {
898 list->selectNthItem(1); 901 list->selectItemRange(1, -1);
899 list->operateOnSelection(LLCtrlListInterface::OP_DELETE); 902 list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
900 --list_size;
901 } 903 }
902 904
903 mLandmarkItemIDList.reset(); 905 mLandmarkItemIDList.reset();
@@ -918,6 +920,7 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
918 items, 920 items,
919 LLInventoryModel::EXCLUDE_TRASH, 921 LLInventoryModel::EXCLUDE_TRASH,
920 is_landmark); 922 is_landmark);
923
921 std::sort(items.begin(), items.end(), LLViewerInventoryItem::comparePointers()); 924 std::sort(items.begin(), items.end(), LLViewerInventoryItem::comparePointers());
922 925
923 S32 count = items.count(); 926 S32 count = items.count();
@@ -930,7 +933,9 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
930 mLandmarkAssetIDList.put( item->getAssetUUID() ); 933 mLandmarkAssetIDList.put( item->getAssetUUID() );
931 mLandmarkItemIDList.put( item->getUUID() ); 934 mLandmarkItemIDList.put( item->getUUID() );
932 } 935 }
936
933 list->sortByColumn("landmark name", TRUE); 937 list->sortByColumn("landmark name", TRUE);
938
934 list->selectFirstItem(); 939 list->selectFirstItem();
935} 940}
936 941
diff --git a/linden/indra/newview/llgroupmgr.cpp b/linden/indra/newview/llgroupmgr.cpp
index 0dd8c6d..af6a6aa 100644
--- a/linden/indra/newview/llgroupmgr.cpp
+++ b/linden/indra/newview/llgroupmgr.cpp
@@ -96,16 +96,16 @@ LLGroupMemberData::~LLGroupMemberData()
96 96
97void LLGroupMemberData::addRole(const LLUUID& role, LLGroupRoleData* rd) 97void LLGroupMemberData::addRole(const LLUUID& role, LLGroupRoleData* rd)
98{ 98{
99 mRoles[role] = rd; 99 mRolesList[role] = rd;
100} 100}
101 101
102bool LLGroupMemberData::removeRole(const LLUUID& role) 102bool LLGroupMemberData::removeRole(const LLUUID& role)
103{ 103{
104 std::map<LLUUID,LLGroupRoleData*>::iterator it = mRoles.find(role); 104 role_list_t::iterator it = mRolesList.find(role);
105 105
106 if (it != mRoles.end()) 106 if (it != mRolesList.end())
107 { 107 {
108 mRoles.erase(it); 108 mRolesList.erase(it);
109 return true; 109 return true;
110 } 110 }
111 111
@@ -233,7 +233,7 @@ LLGroupMgrGroupData::LLGroupMgrGroupData(const LLUUID& id) :
233 233
234BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_data) 234BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_data)
235{ 235{
236 std::map<LLUUID,LLRoleData>::const_iterator it; 236 role_data_map_t::const_iterator it;
237 237
238 // Do we have changes for it? 238 // Do we have changes for it?
239 it = mRoleChanges.find(role_id); 239 it = mRoleChanges.find(role_id);
@@ -246,7 +246,7 @@ BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_da
246 } 246 }
247 247
248 // Ok, no changes, hasn't been deleted, isn't a new role, just find the role. 248 // Ok, no changes, hasn't been deleted, isn't a new role, just find the role.
249 role_list::const_iterator rit = mRoles.find(role_id); 249 role_list_t::const_iterator rit = mRoles.find(role_id);
250 if (rit != mRoles.end()) 250 if (rit != mRoles.end())
251 { 251 {
252 role_data = (*rit).second->getRoleData(); 252 role_data = (*rit).second->getRoleData();
@@ -261,7 +261,7 @@ BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_da
261void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_data) 261void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_data)
262{ 262{
263 // If this is a newly created group, we need to change the data in the created list. 263 // If this is a newly created group, we need to change the data in the created list.
264 std::map<LLUUID,LLRoleData>::iterator it; 264 role_data_map_t::iterator it;
265 it = mRoleChanges.find(role_id); 265 it = mRoleChanges.find(role_id);
266 if (it != mRoleChanges.end()) 266 if (it != mRoleChanges.end())
267 { 267 {
@@ -280,7 +280,7 @@ void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_dat
280 280
281 // Not a new role, so put it in the changes list. 281 // Not a new role, so put it in the changes list.
282 LLRoleData old_role_data; 282 LLRoleData old_role_data;
283 role_iter rit = mRoles.find(role_id); 283 role_list_t::iterator rit = mRoles.find(role_id);
284 if (rit != mRoles.end()) 284 if (rit != mRoles.end())
285 { 285 {
286 bool data_change = ( ((*rit).second->mRoleData.mRoleDescription != role_data.mRoleDescription) 286 bool data_change = ( ((*rit).second->mRoleData.mRoleDescription != role_data.mRoleDescription)
@@ -337,7 +337,7 @@ void LLGroupMgrGroupData::createRole(const LLUUID& role_id, LLRoleData role_data
337 337
338void LLGroupMgrGroupData::deleteRole(const LLUUID& role_id) 338void LLGroupMgrGroupData::deleteRole(const LLUUID& role_id)
339{ 339{
340 std::map<LLUUID,LLRoleData>::iterator it; 340 role_data_map_t::iterator it;
341 341
342 // If this was a new role, just discard it. 342 // If this was a new role, just discard it.
343 it = mRoleChanges.find(role_id); 343 it = mRoleChanges.find(role_id);
@@ -404,7 +404,7 @@ void LLGroupMgrGroupData::removeData()
404 404
405void LLGroupMgrGroupData::removeMemberData() 405void LLGroupMgrGroupData::removeMemberData()
406{ 406{
407 for (member_iter mi = mMembers.begin(); mi != mMembers.end(); ++mi) 407 for (member_list_t::iterator mi = mMembers.begin(); mi != mMembers.end(); ++mi)
408 { 408 {
409 delete mi->second; 409 delete mi->second;
410 } 410 }
@@ -414,7 +414,7 @@ void LLGroupMgrGroupData::removeMemberData()
414 414
415void LLGroupMgrGroupData::removeRoleData() 415void LLGroupMgrGroupData::removeRoleData()
416{ 416{
417 for (member_iter mi = mMembers.begin(); mi != mMembers.end(); ++mi) 417 for (member_list_t::iterator mi = mMembers.begin(); mi != mMembers.end(); ++mi)
418 { 418 {
419 LLGroupMemberData* data = mi->second; 419 LLGroupMemberData* data = mi->second;
420 if (data) 420 if (data)
@@ -423,7 +423,7 @@ void LLGroupMgrGroupData::removeRoleData()
423 } 423 }
424 } 424 }
425 425
426 for (role_iter ri = mRoles.begin(); ri != mRoles.end(); ++ri) 426 for (role_list_t::iterator ri = mRoles.begin(); ri != mRoles.end(); ++ri)
427 { 427 {
428 LLGroupRoleData* data = ri->second; 428 LLGroupRoleData* data = ri->second;
429 delete data; 429 delete data;
@@ -436,7 +436,7 @@ void LLGroupMgrGroupData::removeRoleData()
436 436
437void LLGroupMgrGroupData::removeRoleMemberData() 437void LLGroupMgrGroupData::removeRoleMemberData()
438{ 438{
439 for (member_iter mi = mMembers.begin(); mi != mMembers.end(); ++mi) 439 for (member_list_t::iterator mi = mMembers.begin(); mi != mMembers.end(); ++mi)
440 { 440 {
441 LLGroupMemberData* data = mi->second; 441 LLGroupMemberData* data = mi->second;
442 if (data) 442 if (data)
@@ -445,7 +445,7 @@ void LLGroupMgrGroupData::removeRoleMemberData()
445 } 445 }
446 } 446 }
447 447
448 for (role_iter ri = mRoles.begin(); ri != mRoles.end(); ++ri) 448 for (role_list_t::iterator ri = mRoles.begin(); ri != mRoles.end(); ++ri)
449 { 449 {
450 LLGroupRoleData* data = ri->second; 450 LLGroupRoleData* data = ri->second;
451 if (data) 451 if (data)
@@ -467,8 +467,8 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
467 const LLUUID& member_id, 467 const LLUUID& member_id,
468 LLRoleMemberChangeType rmc) 468 LLRoleMemberChangeType rmc)
469{ 469{
470 role_iter ri = mRoles.find(role_id); 470 role_list_t::iterator ri = mRoles.find(role_id);
471 member_iter mi = mMembers.find(member_id); 471 member_list_t::iterator mi = mMembers.find(member_id);
472 472
473 if (ri == mRoles.end() 473 if (ri == mRoles.end()
474 || mi == mMembers.end() ) 474 || mi == mMembers.end() )
@@ -511,7 +511,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
511 role_member.first = role_id; 511 role_member.first = role_id;
512 role_member.second = member_id; 512 role_member.second = member_id;
513 513
514 change_map::iterator it = mRoleMemberChanges.find(role_member); 514 change_map_t::iterator it = mRoleMemberChanges.find(role_member);
515 if (it != mRoleMemberChanges.end()) 515 if (it != mRoleMemberChanges.end())
516 { 516 {
517 // There was already a role change for this role_member 517 // There was already a role change for this role_member
@@ -554,18 +554,15 @@ void LLGroupMgrGroupData::recalcAllAgentPowers()
554{ 554{
555 LLGroupMemberData* gmd; 555 LLGroupMemberData* gmd;
556 556
557 member_iter mit = mMembers.begin(); 557 for (member_list_t::iterator mit = mMembers.begin();
558 member_iter mend = mMembers.end(); 558 mit != mMembers.end(); ++mit)
559 for( ; mit != mend; ++mit)
560 { 559 {
561 gmd = mit->second; 560 gmd = mit->second;
562 if (!gmd) continue; 561 if (!gmd) continue;
563 562
564 std::map<LLUUID,LLGroupRoleData*>::iterator it = gmd->mRoles.begin();
565 std::map<LLUUID,LLGroupRoleData*>::iterator end = gmd->mRoles.end();
566
567 gmd->mAgentPowers = 0; 563 gmd->mAgentPowers = 0;
568 for ( ; it != end; ++it) 564 for (LLGroupMemberData::role_list_t::iterator it = gmd->mRolesList.begin();
565 it != gmd->mRolesList.end(); ++it)
569 { 566 {
570 LLGroupRoleData* grd = (*it).second; 567 LLGroupRoleData* grd = (*it).second;
571 if (!grd) continue; 568 if (!grd) continue;
@@ -577,18 +574,16 @@ void LLGroupMgrGroupData::recalcAllAgentPowers()
577 574
578void LLGroupMgrGroupData::recalcAgentPowers(const LLUUID& agent_id) 575void LLGroupMgrGroupData::recalcAgentPowers(const LLUUID& agent_id)
579{ 576{
580 member_iter mi = mMembers.find(agent_id); 577 member_list_t::iterator mi = mMembers.find(agent_id);
581 if (mi == mMembers.end()) return; 578 if (mi == mMembers.end()) return;
582 579
583 LLGroupMemberData* gmd = mi->second; 580 LLGroupMemberData* gmd = mi->second;
584 581
585 if (!gmd) return; 582 if (!gmd) return;
586 583
587 std::map<LLUUID,LLGroupRoleData*>::iterator it = gmd->mRoles.begin();
588 std::map<LLUUID,LLGroupRoleData*>::iterator end = gmd->mRoles.end();
589
590 gmd->mAgentPowers = 0; 584 gmd->mAgentPowers = 0;
591 for ( ; it != end; ++it) 585 for (LLGroupMemberData::role_list_t::iterator it = gmd->mRolesList.begin();
586 it != gmd->mRolesList.end(); ++it)
592 { 587 {
593 LLGroupRoleData* grd = (*it).second; 588 LLGroupRoleData* grd = (*it).second;
594 if (!grd) continue; 589 if (!grd) continue;
@@ -633,10 +628,8 @@ bool packRoleUpdateMessageBlock(LLMessageSystem* msg,
633void LLGroupMgrGroupData::sendRoleChanges() 628void LLGroupMgrGroupData::sendRoleChanges()
634{ 629{
635 // Commit changes locally 630 // Commit changes locally
636 std::map<LLUUID,LLRoleData>::iterator it;
637 std::map<LLUUID,LLRoleData>::iterator end;
638 LLGroupRoleData* grd; 631 LLGroupRoleData* grd;
639 role_iter role_it; 632 role_list_t::iterator role_it;
640 LLMessageSystem* msg = gMessageSystem; 633 LLMessageSystem* msg = gMessageSystem;
641 bool start_message = true; 634 bool start_message = true;
642 635
@@ -645,16 +638,15 @@ void LLGroupMgrGroupData::sendRoleChanges()
645 bool need_power_recalc = false; 638 bool need_power_recalc = false;
646 639
647 // Apply all changes 640 // Apply all changes
648 it = mRoleChanges.begin(); 641 for (role_data_map_t::iterator iter = mRoleChanges.begin();
649 end = mRoleChanges.end(); 642 iter != mRoleChanges.end(); )
650 for ( ; it != end; ++it)
651 { 643 {
644 role_data_map_t::iterator it = iter++; // safely incrament iter
652 const LLUUID& role_id = (*it).first; 645 const LLUUID& role_id = (*it).first;
653 const LLRoleData& role_data = (*it).second; 646 const LLRoleData& role_data = (*it).second;
654 647
655 // Commit to local data set 648 // Commit to local data set
656 role_it = mRoles.find((*it).first); 649 role_it = mRoles.find((*it).first);
657 LLGroupRoleData* group_role_data = (*role_it).second;
658 if ( (mRoles.end() == role_it 650 if ( (mRoles.end() == role_it
659 && RC_CREATE != role_data.mChangeType) 651 && RC_CREATE != role_data.mChangeType)
660 || (mRoles.end() != role_it 652 || (mRoles.end() != role_it
@@ -662,11 +654,13 @@ void LLGroupMgrGroupData::sendRoleChanges()
662 { 654 {
663 continue; 655 continue;
664 } 656 }
665 657
658 // NOTE: role_it is valid EXCEPT for the RC_CREATE case
666 switch (role_data.mChangeType) 659 switch (role_data.mChangeType)
667 { 660 {
668 case RC_CREATE: 661 case RC_CREATE:
669 { 662 {
663 // NOTE: role_it is NOT valid in this case
670 grd = new LLGroupRoleData(role_id, role_data, 0); 664 grd = new LLGroupRoleData(role_id, role_data, 0);
671 mRoles[role_id] = grd; 665 mRoles[role_id] = grd;
672 need_role_data = true; 666 need_role_data = true;
@@ -674,6 +668,7 @@ void LLGroupMgrGroupData::sendRoleChanges()
674 } 668 }
675 case RC_DELETE: 669 case RC_DELETE:
676 { 670 {
671 LLGroupRoleData* group_role_data = (*role_it).second;
677 delete group_role_data; 672 delete group_role_data;
678 mRoles.erase(role_it); 673 mRoles.erase(role_it);
679 need_role_cleanup = true; 674 need_role_cleanup = true;
@@ -686,7 +681,8 @@ void LLGroupMgrGroupData::sendRoleChanges()
686 case RC_UPDATE_DATA: 681 case RC_UPDATE_DATA:
687 default: 682 default:
688 { 683 {
689 group_role_data->setRoleData(role_data); 684 LLGroupRoleData* group_role_data = (*role_it).second;
685 group_role_data->setRoleData(role_data); // NOTE! might modify mRoleChanges!
690 break; 686 break;
691 } 687 }
692 } 688 }
@@ -751,7 +747,7 @@ void LLGroupMgr::clearGroups()
751 747
752void LLGroupMgr::clearGroupData(const LLUUID& group_id) 748void LLGroupMgr::clearGroupData(const LLUUID& group_id)
753{ 749{
754 std::map<LLUUID, LLGroupMgrGroupData*>::iterator iter = mGroups.find(group_id); 750 group_map_t::iterator iter = mGroups.find(group_id);
755 if (iter != mGroups.end()) 751 if (iter != mGroups.end())
756 { 752 {
757 delete (*iter).second; 753 delete (*iter).second;
@@ -770,7 +766,7 @@ void LLGroupMgr::removeObserver(LLGroupMgrObserver* observer)
770 { 766 {
771 return; 767 return;
772 } 768 }
773 observer_iter it; 769 observer_multimap_t::iterator it;
774 it = mObservers.find(observer->getID()); 770 it = mObservers.find(observer->getID());
775 while (it != mObservers.end()) 771 while (it != mObservers.end())
776 { 772 {
@@ -788,7 +784,7 @@ void LLGroupMgr::removeObserver(LLGroupMgrObserver* observer)
788 784
789LLGroupMgrGroupData* LLGroupMgr::getGroupData(const LLUUID& id) 785LLGroupMgrGroupData* LLGroupMgr::getGroupData(const LLUUID& id)
790{ 786{
791 group_iter gi = mGroups.find(id); 787 group_map_t::iterator gi = mGroups.find(id);
792 788
793 if (gi != mGroups.end()) 789 if (gi != mGroups.end())
794 { 790 {
@@ -800,7 +796,7 @@ LLGroupMgrGroupData* LLGroupMgr::getGroupData(const LLUUID& id)
800// static 796// static
801void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) 797void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
802{ 798{
803 llinfos << "LLGroupMgr::processGroupMembersReply" << llendl; 799 lldebugs << "LLGroupMgr::processGroupMembersReply" << llendl;
804 LLUUID agent_id; 800 LLUUID agent_id;
805 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); 801 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
806 if (gAgent.getID() != agent_id) 802 if (gAgent.getID() != agent_id)
@@ -854,7 +850,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
854 std::string(online_status), 850 std::string(online_status),
855 is_owner); 851 is_owner);
856#if LL_DEBUG 852#if LL_DEBUG
857 LLGroupMgrGroupData::member_iter mit = group_datap->mMembers.find(member_id); 853 LLGroupMgrGroupData::member_list_t::iterator mit = group_datap->mMembers.find(member_id);
858 if (mit != group_datap->mMembers.end()) 854 if (mit != group_datap->mMembers.end())
859 { 855 {
860 llinfos << " *** Received duplicate member data for agent " << member_id << llendl; 856 llinfos << " *** Received duplicate member data for agent " << member_id << llendl;
@@ -894,7 +890,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
894//static 890//static
895void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data) 891void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
896{ 892{
897 llinfos << "LLGroupMgr::processGroupPropertiesReply" << llendl; 893 lldebugs << "LLGroupMgr::processGroupPropertiesReply" << llendl;
898 LLUUID agent_id; 894 LLUUID agent_id;
899 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); 895 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
900 if (gAgent.getID() != agent_id) 896 if (gAgent.getID() != agent_id)
@@ -961,7 +957,7 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
961// static 957// static
962void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data) 958void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
963{ 959{
964 llinfos << "LLGroupMgr::processGroupRoleDataReply" << llendl; 960 lldebugs << "LLGroupMgr::processGroupRoleDataReply" << llendl;
965 LLUUID agent_id; 961 LLUUID agent_id;
966 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); 962 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
967 if (gAgent.getID() != agent_id) 963 if (gAgent.getID() != agent_id)
@@ -1028,7 +1024,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
1028// static 1024// static
1029void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data) 1025void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
1030{ 1026{
1031 llinfos << "LLGroupMgr::processGroupRoleMembersReply" << llendl; 1027 lldebugs << "LLGroupMgr::processGroupRoleMembersReply" << llendl;
1032 LLUUID agent_id; 1028 LLUUID agent_id;
1033 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); 1029 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
1034 if (gAgent.getID() != agent_id) 1030 if (gAgent.getID() != agent_id)
@@ -1061,8 +1057,8 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
1061 LLGroupRoleData* rd = NULL; 1057 LLGroupRoleData* rd = NULL;
1062 LLGroupMemberData* md = NULL; 1058 LLGroupMemberData* md = NULL;
1063 1059
1064 LLGroupMgrGroupData::role_iter ri; 1060 LLGroupMgrGroupData::role_list_t::iterator ri;
1065 LLGroupMgrGroupData::member_iter mi; 1061 LLGroupMgrGroupData::member_list_t::iterator mi;
1066 1062
1067 // If total_pairs == 0, there are no members in any custom roles. 1063 // If total_pairs == 0, there are no members in any custom roles.
1068 if (total_pairs > 0) 1064 if (total_pairs > 0)
@@ -1115,9 +1111,8 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
1115 } 1111 }
1116 else 1112 else
1117 { 1113 {
1118 LLGroupMgrGroupData::member_iter mi = group_data->mMembers.begin(); 1114 for (LLGroupMgrGroupData::member_list_t::iterator mi = group_data->mMembers.begin();
1119 LLGroupMgrGroupData::member_iter end = group_data->mMembers.end(); 1115 mi != group_data->mMembers.end(); ++mi)
1120 for ( ; mi != end; ++mi)
1121 { 1116 {
1122 LLGroupMemberData* data = mi->second; 1117 LLGroupMemberData* data = mi->second;
1123 if (data) 1118 if (data)
@@ -1138,7 +1133,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
1138// static 1133// static
1139void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data) 1134void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
1140{ 1135{
1141 llinfos << "LLGroupMgr::processGroupTitlesReply" << llendl; 1136 lldebugs << "LLGroupMgr::processGroupTitlesReply" << llendl;
1142 LLUUID agent_id; 1137 LLUUID agent_id;
1143 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); 1138 msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
1144 if (gAgent.getID() != agent_id) 1139 if (gAgent.getID() != agent_id)
@@ -1188,7 +1183,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
1188// static 1183// static
1189void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data) 1184void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data)
1190{ 1185{
1191 llinfos << "processEjectGroupMemberReply" << llendl; 1186 lldebugs << "processEjectGroupMemberReply" << llendl;
1192 LLUUID group_id; 1187 LLUUID group_id;
1193 msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id); 1188 msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
1194 BOOL success; 1189 BOOL success;
@@ -1204,7 +1199,7 @@ void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data
1204// static 1199// static
1205void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data) 1200void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data)
1206{ 1201{
1207 llinfos << "processJoinGroupReply" << llendl; 1202 lldebugs << "processJoinGroupReply" << llendl;
1208 LLUUID group_id; 1203 LLUUID group_id;
1209 BOOL success; 1204 BOOL success;
1210 msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id); 1205 msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
@@ -1226,7 +1221,7 @@ void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data)
1226// static 1221// static
1227void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data) 1222void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data)
1228{ 1223{
1229 llinfos << "processLeaveGroupReply" << llendl; 1224 lldebugs << "processLeaveGroupReply" << llendl;
1230 LLUUID group_id; 1225 LLUUID group_id;
1231 BOOL success; 1226 BOOL success;
1232 msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id); 1227 msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
@@ -1291,7 +1286,7 @@ LLGroupMgrGroupData* LLGroupMgr::createGroupData(const LLUUID& id)
1291{ 1286{
1292 LLGroupMgrGroupData* group_datap; 1287 LLGroupMgrGroupData* group_datap;
1293 1288
1294 group_iter existing_group = gGroupMgr->mGroups.find(id); 1289 group_map_t::iterator existing_group = gGroupMgr->mGroups.find(id);
1295 if (existing_group == gGroupMgr->mGroups.end()) 1290 if (existing_group == gGroupMgr->mGroups.end())
1296 { 1291 {
1297 group_datap = new LLGroupMgrGroupData(id); 1292 group_datap = new LLGroupMgrGroupData(id);
@@ -1307,12 +1302,12 @@ LLGroupMgrGroupData* LLGroupMgr::createGroupData(const LLUUID& id)
1307 1302
1308void LLGroupMgr::notifyObservers(LLGroupChange gc) 1303void LLGroupMgr::notifyObservers(LLGroupChange gc)
1309{ 1304{
1310 for (group_iter gi = mGroups.begin(); gi != mGroups.end(); ++gi) 1305 for (group_map_t::iterator gi = mGroups.begin(); gi != mGroups.end(); ++gi)
1311 { 1306 {
1312 if (gi->second->mChanged) 1307 if (gi->second->mChanged)
1313 { 1308 {
1314 // find all observers for this group id 1309 // find all observers for this group id
1315 observer_iter oi = mObservers.find(gi->first); 1310 observer_multimap_t::iterator oi = mObservers.find(gi->first);
1316 for (; oi != mObservers.end(); ++oi) 1311 for (; oi != mObservers.end(); ++oi)
1317 { 1312 {
1318 oi->second->changed(gc); 1313 oi->second->changed(gc);
@@ -1327,9 +1322,9 @@ void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
1327 if (mGroups.size() > MAX_CACHED_GROUPS) 1322 if (mGroups.size() > MAX_CACHED_GROUPS)
1328 { 1323 {
1329 // get rid of groups that aren't observed 1324 // get rid of groups that aren't observed
1330 for (group_iter gi = mGroups.begin(); gi != mGroups.end() && mGroups.size() > MAX_CACHED_GROUPS / 2; ) 1325 for (group_map_t::iterator gi = mGroups.begin(); gi != mGroups.end() && mGroups.size() > MAX_CACHED_GROUPS / 2; )
1331 { 1326 {
1332 observer_iter oi = mObservers.find(gi->first); 1327 observer_multimap_t::iterator oi = mObservers.find(gi->first);
1333 if (oi == mObservers.end()) 1328 if (oi == mObservers.end())
1334 { 1329 {
1335 // not observed 1330 // not observed
@@ -1349,7 +1344,7 @@ void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
1349 1344
1350void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id) 1345void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id)
1351{ 1346{
1352 llinfos << "LLGroupMgr::sendGroupPropertiesRequest" << llendl; 1347 lldebugs << "LLGroupMgr::sendGroupPropertiesRequest" << llendl;
1353 // This will happen when we get the reply 1348 // This will happen when we get the reply
1354 //LLGroupMgrGroupData* group_datap = createGroupData(group_id); 1349 //LLGroupMgrGroupData* group_datap = createGroupData(group_id);
1355 1350
@@ -1365,7 +1360,7 @@ void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id)
1365 1360
1366void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id) 1361void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id)
1367{ 1362{
1368 llinfos << "LLGroupMgr::sendGroupMembersRequest" << llendl; 1363 lldebugs << "LLGroupMgr::sendGroupMembersRequest" << llendl;
1369 LLGroupMgrGroupData* group_datap = createGroupData(group_id); 1364 LLGroupMgrGroupData* group_datap = createGroupData(group_id);
1370 if (group_datap->mMemberRequestID.isNull()) 1365 if (group_datap->mMemberRequestID.isNull())
1371 { 1366 {
@@ -1386,7 +1381,7 @@ void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id)
1386 1381
1387void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id) 1382void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id)
1388{ 1383{
1389 llinfos << "LLGroupMgr::sendGroupRoleDataRequest" << llendl; 1384 lldebugs << "LLGroupMgr::sendGroupRoleDataRequest" << llendl;
1390 LLGroupMgrGroupData* group_datap = createGroupData(group_id); 1385 LLGroupMgrGroupData* group_datap = createGroupData(group_id);
1391 if (group_datap->mRoleDataRequestID.isNull()) 1386 if (group_datap->mRoleDataRequestID.isNull())
1392 { 1387 {
@@ -1407,7 +1402,7 @@ void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id)
1407 1402
1408void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id) 1403void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id)
1409{ 1404{
1410 llinfos << "LLGroupMgr::sendGroupRoleMembersRequest" << llendl; 1405 lldebugs << "LLGroupMgr::sendGroupRoleMembersRequest" << llendl;
1411 LLGroupMgrGroupData* group_datap = createGroupData(group_id); 1406 LLGroupMgrGroupData* group_datap = createGroupData(group_id);
1412 1407
1413 if (group_datap->mRoleMembersRequestID.isNull()) 1408 if (group_datap->mRoleMembersRequestID.isNull())
@@ -1441,7 +1436,7 @@ void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id)
1441 1436
1442void LLGroupMgr::sendGroupTitlesRequest(const LLUUID& group_id) 1437void LLGroupMgr::sendGroupTitlesRequest(const LLUUID& group_id)
1443{ 1438{
1444 llinfos << "LLGroupMgr::sendGroupTitlesRequest" << llendl; 1439 lldebugs << "LLGroupMgr::sendGroupTitlesRequest" << llendl;
1445 LLGroupMgrGroupData* group_datap = createGroupData(group_id); 1440 LLGroupMgrGroupData* group_datap = createGroupData(group_id);
1446 1441
1447 group_datap->mTitles.clear(); 1442 group_datap->mTitles.clear();
@@ -1460,7 +1455,7 @@ void LLGroupMgr::sendGroupTitlesRequest(const LLUUID& group_id)
1460 1455
1461void LLGroupMgr::sendGroupTitleUpdate(const LLUUID& group_id, const LLUUID& title_role_id) 1456void LLGroupMgr::sendGroupTitleUpdate(const LLUUID& group_id, const LLUUID& title_role_id)
1462{ 1457{
1463 llinfos << "LLGroupMgr::sendGroupTitleUpdate" << llendl; 1458 lldebugs << "LLGroupMgr::sendGroupTitleUpdate" << llendl;
1464 1459
1465 LLMessageSystem* msg = gMessageSystem; 1460 LLMessageSystem* msg = gMessageSystem;
1466 msg->newMessage("GroupTitleUpdate"); 1461 msg->newMessage("GroupTitleUpdate");
@@ -1474,10 +1469,8 @@ void LLGroupMgr::sendGroupTitleUpdate(const LLUUID& group_id, const LLUUID& titl
1474 1469
1475 // Save the change locally 1470 // Save the change locally
1476 LLGroupMgrGroupData* group_datap = createGroupData(group_id); 1471 LLGroupMgrGroupData* group_datap = createGroupData(group_id);
1477 std::vector<LLGroupTitle>::iterator iter = group_datap->mTitles.begin(); 1472 for (std::vector<LLGroupTitle>::iterator iter = group_datap->mTitles.begin();
1478 std::vector<LLGroupTitle>::iterator end = group_datap->mTitles.end(); 1473 iter != group_datap->mTitles.end(); ++iter)
1479
1480 for ( ; iter != end; ++iter)
1481 { 1474 {
1482 if (iter->mRoleID == title_role_id) 1475 if (iter->mRoleID == title_role_id)
1483 { 1476 {
@@ -1521,7 +1514,7 @@ void LLGroupMgr::sendCreateGroupRequest(const std::string& name,
1521 1514
1522void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id) 1515void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id)
1523{ 1516{
1524 llinfos << "LLGroupMgr::sendUpdateGroupInfo" << llendl; 1517 lldebugs << "LLGroupMgr::sendUpdateGroupInfo" << llendl;
1525 LLGroupMgrGroupData* group_datap = createGroupData(group_id); 1518 LLGroupMgrGroupData* group_datap = createGroupData(group_id);
1526 1519
1527 LLMessageSystem* msg = gMessageSystem; 1520 LLMessageSystem* msg = gMessageSystem;
@@ -1550,18 +1543,16 @@ void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id)
1550 1543
1551void LLGroupMgr::sendGroupRoleMemberChanges(const LLUUID& group_id) 1544void LLGroupMgr::sendGroupRoleMemberChanges(const LLUUID& group_id)
1552{ 1545{
1553 llinfos << "LLGroupMgr::sendGroupRoleMemberChanges" << llendl; 1546 lldebugs << "LLGroupMgr::sendGroupRoleMemberChanges" << llendl;
1554 LLGroupMgrGroupData* group_datap = createGroupData(group_id); 1547 LLGroupMgrGroupData* group_datap = createGroupData(group_id);
1555 1548
1556 if (group_datap->mRoleMemberChanges.empty()) return; 1549 if (group_datap->mRoleMemberChanges.empty()) return;
1557 1550
1558 LLMessageSystem* msg = gMessageSystem; 1551 LLMessageSystem* msg = gMessageSystem;
1559 1552
1560 change_map::const_iterator citer = group_datap->mRoleMemberChanges.begin();
1561 change_map::const_iterator end = group_datap->mRoleMemberChanges.end();
1562 bool start_message = true; 1553 bool start_message = true;
1563 1554 for (LLGroupMgrGroupData::change_map_t::const_iterator citer = group_datap->mRoleMemberChanges.begin();
1564 for ( ; citer != end; ++citer) 1555 citer != group_datap->mRoleMemberChanges.end(); ++citer)
1565 { 1556 {
1566 if (start_message) 1557 if (start_message)
1567 { 1558 {
@@ -1618,9 +1609,8 @@ void LLGroupMgr::sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID,
1618 bool start_message = true; 1609 bool start_message = true;
1619 LLMessageSystem* msg = gMessageSystem; 1610 LLMessageSystem* msg = gMessageSystem;
1620 1611
1621 std::map<LLUUID,LLUUID>::iterator it = member_role_pairs.begin(); 1612 for (std::map<LLUUID,LLUUID>::iterator it = member_role_pairs.begin();
1622 std::map<LLUUID,LLUUID>::iterator end = member_role_pairs.end(); 1613 it != member_role_pairs.end(); ++it)
1623 for ( ; it != end; ++it)
1624 { 1614 {
1625 if (start_message) 1615 if (start_message)
1626 { 1616 {
@@ -1660,15 +1650,14 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
1660 LLGroupMgrGroupData* group_datap = gGroupMgr->getGroupData(group_id); 1650 LLGroupMgrGroupData* group_datap = gGroupMgr->getGroupData(group_id);
1661 if (!group_datap) return; 1651 if (!group_datap) return;
1662 1652
1663 std::vector<LLUUID>::iterator it = member_ids.begin(); 1653 for (std::vector<LLUUID>::iterator it = member_ids.begin();
1664 std::vector<LLUUID>::iterator end = member_ids.end(); 1654 it != member_ids.end(); ++it)
1665 for ( ; it != end; ++it)
1666 { 1655 {
1667 // Can't use 'eject' to leave a group. 1656 // Can't use 'eject' to leave a group.
1668 if ((*it) == gAgent.getID()) continue; 1657 if ((*it) == gAgent.getID()) continue;
1669 1658
1670 // Make sure they are in the group, and we need the member data 1659 // Make sure they are in the group, and we need the member data
1671 LLGroupMgrGroupData::member_iter mit = group_datap->mMembers.find(*it); 1660 LLGroupMgrGroupData::member_list_t::iterator mit = group_datap->mMembers.find(*it);
1672 if (mit != group_datap->mMembers.end()) 1661 if (mit != group_datap->mMembers.end())
1673 { 1662 {
1674 // Add them to the message 1663 // Add them to the message
@@ -1693,9 +1682,8 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
1693 } 1682 }
1694 1683
1695 // Clean up groupmgr 1684 // Clean up groupmgr
1696 std::map<LLUUID,LLGroupRoleData*>::iterator rit = (*mit).second->roleBegin(); 1685 for (LLGroupMemberData::role_list_t::iterator rit = (*mit).second->roleBegin();
1697 std::map<LLUUID,LLGroupRoleData*>::iterator rend = (*mit).second->roleEnd(); 1686 rit != (*mit).second->roleEnd(); ++rit)
1698 for ( ; rit != rend; ++rit)
1699 { 1687 {
1700 if ((*rit).first.notNull()) 1688 if ((*rit).first.notNull())
1701 { 1689 {
@@ -1715,7 +1703,7 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
1715 1703
1716void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id) 1704void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
1717{ 1705{
1718 llinfos << "LLGroupMgr::sendGroupRoleChanges" << llendl; 1706 lldebugs << "LLGroupMgr::sendGroupRoleChanges" << llendl;
1719 LLGroupMgrGroupData* group_datap = getGroupData(group_id); 1707 LLGroupMgrGroupData* group_datap = getGroupData(group_id);
1720 1708
1721 if (group_datap && group_datap->pendingRoleChanges()) 1709 if (group_datap && group_datap->pendingRoleChanges())
@@ -1730,7 +1718,7 @@ void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
1730 1718
1731void LLGroupMgr::cancelGroupRoleChanges(const LLUUID& group_id) 1719void LLGroupMgr::cancelGroupRoleChanges(const LLUUID& group_id)
1732{ 1720{
1733 llinfos << "LLGroupMgr::cancelGroupRoleChanges" << llendl; 1721 lldebugs << "LLGroupMgr::cancelGroupRoleChanges" << llendl;
1734 LLGroupMgrGroupData* group_datap = getGroupData(group_id); 1722 LLGroupMgrGroupData* group_datap = getGroupData(group_id);
1735 1723
1736 if (group_datap) group_datap->cancelRoleChanges(); 1724 if (group_datap) group_datap->cancelRoleChanges();
@@ -1750,11 +1738,10 @@ bool LLGroupMgr::parseRoleActions(const LLString& xml_filename)
1750 } 1738 }
1751 1739
1752 LLXMLNodeList role_list; 1740 LLXMLNodeList role_list;
1753 LLXMLNodeList::iterator role_iter;
1754 1741
1755 root->getChildren("action_set", role_list, false); 1742 root->getChildren("action_set", role_list, false);
1756 1743
1757 for (role_iter = role_list.begin(); role_iter != role_list.end(); ++role_iter) 1744 for (LLXMLNodeList::iterator role_iter = role_list.begin(); role_iter != role_list.end(); ++role_iter)
1758 { 1745 {
1759 LLXMLNodePtr action_set = role_iter->second; 1746 LLXMLNodePtr action_set = role_iter->second;
1760 1747
diff --git a/linden/indra/newview/llgroupmgr.h b/linden/indra/newview/llgroupmgr.h
index 7cef5ec..89be4bf 100644
--- a/linden/indra/newview/llgroupmgr.h
+++ b/linden/indra/newview/llgroupmgr.h
@@ -58,6 +58,8 @@ class LLGroupMemberData
58friend class LLGroupMgrGroupData; 58friend class LLGroupMgrGroupData;
59 59
60public: 60public:
61 typedef std::map<LLUUID,LLGroupRoleData*> role_list_t;
62
61 LLGroupMemberData(const LLUUID& id, 63 LLGroupMemberData(const LLUUID& id,
62 S32 contribution, 64 S32 contribution,
63 U64 agent_powers, 65 U64 agent_powers,
@@ -75,11 +77,11 @@ public:
75 const std::string& getOnlineStatus() const { return mOnlineStatus; } 77 const std::string& getOnlineStatus() const { return mOnlineStatus; }
76 void addRole(const LLUUID& role, LLGroupRoleData* rd); 78 void addRole(const LLUUID& role, LLGroupRoleData* rd);
77 bool removeRole(const LLUUID& role); 79 bool removeRole(const LLUUID& role);
78 void clearRoles() { mRoles.clear(); }; 80 void clearRoles() { mRolesList.clear(); };
79 std::map<LLUUID,LLGroupRoleData*>::iterator roleBegin() { return mRoles.begin(); } 81 role_list_t::iterator roleBegin() { return mRolesList.begin(); }
80 std::map<LLUUID,LLGroupRoleData*>::iterator roleEnd() { return mRoles.end(); } 82 role_list_t::iterator roleEnd() { return mRolesList.end(); }
81 83
82 BOOL isInRole(const LLUUID& role_id) { return (mRoles.find(role_id) != mRoles.end()); } 84 BOOL isInRole(const LLUUID& role_id) { return (mRolesList.find(role_id) != mRolesList.end()); }
83 85
84protected: 86protected:
85 LLUUID mID; 87 LLUUID mID;
@@ -88,7 +90,7 @@ protected:
88 std::string mTitle; 90 std::string mTitle;
89 std::string mOnlineStatus; 91 std::string mOnlineStatus;
90 BOOL mIsOwner; 92 BOOL mIsOwner;
91 std::map<LLUUID,LLGroupRoleData*> mRoles; 93 role_list_t mRolesList;
92}; 94};
93 95
94struct LLRoleData 96struct LLRoleData
@@ -185,8 +187,6 @@ struct lluuid_pair_less
185 } 187 }
186}; 188};
187 189
188typedef std::map<lluuid_pair,LLRoleMemberChange,lluuid_pair_less> change_map;
189
190struct LLGroupTitle 190struct LLGroupTitle
191{ 191{
192 std::string mTitle; 192 std::string mTitle;
@@ -231,17 +231,16 @@ public:
231 BOOL isGroupPropertiesDataComplete() { return mGroupPropertiesDataComplete; } 231 BOOL isGroupPropertiesDataComplete() { return mGroupPropertiesDataComplete; }
232 232
233public: 233public:
234 typedef std::map<LLUUID,LLGroupMemberData*> member_list; 234 typedef std::map<LLUUID,LLGroupMemberData*> member_list_t;
235 typedef member_list::iterator member_iter; 235 typedef std::map<LLUUID,LLGroupRoleData*> role_list_t;
236 typedef std::map<LLUUID,LLGroupRoleData*> role_list; 236 typedef std::map<lluuid_pair,LLRoleMemberChange,lluuid_pair_less> change_map_t;
237 typedef role_list::iterator role_iter; 237 typedef std::map<LLUUID,LLRoleData> role_data_map_t;
238 238 member_list_t mMembers;
239 member_list mMembers; 239 role_list_t mRoles;
240 role_list mRoles;
241 240
242 241
243 change_map mRoleMemberChanges; 242 change_map_t mRoleMemberChanges;
244 std::map<LLUUID,LLRoleData> mRoleChanges; 243 role_data_map_t mRoleChanges;
245 244
246 std::vector<LLGroupTitle> mTitles; 245 std::vector<LLGroupTitle> mTitles;
247 246
@@ -298,6 +297,8 @@ struct LLRoleActionSet
298 297
299class LLGroupMgr 298class LLGroupMgr
300{ 299{
300 LOG_CLASS(LLGroupMgr);
301
301public: 302public:
302 LLGroupMgr(); 303 LLGroupMgr();
303 ~LLGroupMgr(); 304 ~LLGroupMgr();
@@ -355,10 +356,10 @@ protected:
355 LLGroupMgrGroupData* createGroupData(const LLUUID &id); 356 LLGroupMgrGroupData* createGroupData(const LLUUID &id);
356 357
357protected: 358protected:
358 typedef std::multimap<LLUUID,LLGroupMgrObserver*>::iterator observer_iter; 359 typedef std::multimap<LLUUID,LLGroupMgrObserver*> observer_multimap_t;
359 std::multimap<LLUUID,LLGroupMgrObserver*> mObservers; 360 observer_multimap_t mObservers;
360 typedef std::map<LLUUID, LLGroupMgrGroupData*>::iterator group_iter; 361 typedef std::map<LLUUID, LLGroupMgrGroupData*> group_map_t;
361 std::map<LLUUID, LLGroupMgrGroupData*> mGroups; 362 group_map_t mGroups;
362}; 363};
363 364
364extern LLGroupMgr* gGroupMgr; 365extern LLGroupMgr* gGroupMgr;
diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp
index b80b80b..193beb9 100644
--- a/linden/indra/newview/llimpanel.cpp
+++ b/linden/indra/newview/llimpanel.cpp
@@ -1370,9 +1370,13 @@ void LLFloaterIMPanel::draw()
1370 } 1370 }
1371 } 1371 }
1372 1372
1373 // use embedded panel if available
1373 if (mSpeakerPanel) 1374 if (mSpeakerPanel)
1374 { 1375 {
1375 mSpeakerPanel->refreshSpeakers(); 1376 if (mSpeakerPanel->getVisible())
1377 {
1378 mSpeakerPanel->refreshSpeakers();
1379 }
1376 } 1380 }
1377 else 1381 else
1378 { 1382 {
diff --git a/linden/indra/newview/llmediaremotectrl.cpp b/linden/indra/newview/llmediaremotectrl.cpp
index 777cbc4..8bf9103 100644
--- a/linden/indra/newview/llmediaremotectrl.cpp
+++ b/linden/indra/newview/llmediaremotectrl.cpp
@@ -67,8 +67,8 @@ void LLMediaRemoteCtrl::build()
67 67
68BOOL LLMediaRemoteCtrl::postBuild() 68BOOL LLMediaRemoteCtrl::postBuild()
69{ 69{
70 childSetAction("media_play",LLOverlayBar::mediaPlay,this); 70 childSetAction("media_play",LLOverlayBar::toggleMediaPlay,this);
71 childSetAction("music_play",LLOverlayBar::musicPlay,this); 71 childSetAction("music_play",LLOverlayBar::toggleMusicPlay,this);
72 72
73 childSetAction("expand", onClickExpandBtn, this); 73 childSetAction("expand", onClickExpandBtn, this);
74 return TRUE; 74 return TRUE;
diff --git a/linden/indra/newview/llnamelistctrl.cpp b/linden/indra/newview/llnamelistctrl.cpp
index e645cc6..4b63b08 100644
--- a/linden/indra/newview/llnamelistctrl.cpp
+++ b/linden/indra/newview/llnamelistctrl.cpp
@@ -224,7 +224,7 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& value, EAddPosition pos
224 LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex); 224 LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
225 ((LLScrollListText*)cell)->setText( fullname ); 225 ((LLScrollListText*)cell)->setText( fullname );
226 226
227 calcMaxContentWidth(item); 227 dirtyColumns();
228 228
229 // this column is resizable 229 // this column is resizable
230 LLScrollListColumn* columnp = getColumn(mNameColumnIndex); 230 LLScrollListColumn* columnp = getColumn(mNameColumnIndex);
@@ -277,9 +277,10 @@ void LLNameListCtrl::refresh(const LLUUID& id, const char* first,
277 cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex); 277 cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
278 278
279 ((LLScrollListText*)cell)->setText( fullname ); 279 ((LLScrollListText*)cell)->setText( fullname );
280 calcMaxContentWidth(item);
281 } 280 }
282 } 281 }
282
283 dirtyColumns();
283} 284}
284 285
285 286
diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp
index 9ef2eba..e24cbc7 100644
--- a/linden/indra/newview/lloverlaybar.cpp
+++ b/linden/indra/newview/lloverlaybar.cpp
@@ -163,7 +163,6 @@ void LLOverlayBar::layoutButtons()
163 { 163 {
164 LLViewQuery query; 164 LLViewQuery query;
165 LLWidgetTypeFilter widget_filter(WIDGET_TYPE_BUTTON); 165 LLWidgetTypeFilter widget_filter(WIDGET_TYPE_BUTTON);
166 query.addPreFilter(LLVisibleFilter::getInstance());
167 query.addPreFilter(LLEnabledFilter::getInstance()); 166 query.addPreFilter(LLEnabledFilter::getInstance());
168 query.addPreFilter(&widget_filter); 167 query.addPreFilter(&widget_filter);
169 168
@@ -333,7 +332,7 @@ void LLOverlayBar::onClickStandUp(void*)
333// *TODO: Move this into an audio manager abstraction 332// *TODO: Move this into an audio manager abstraction
334 333
335//static 334//static
336void LLOverlayBar::mediaPlay(void*) 335void LLOverlayBar::toggleMediaPlay(void*)
337{ 336{
338 if (!gOverlayBar) 337 if (!gOverlayBar)
339 { 338 {
@@ -361,7 +360,7 @@ void LLOverlayBar::mediaPlay(void*)
361} 360}
362 361
363//static 362//static
364void LLOverlayBar::musicPlay(void*) 363void LLOverlayBar::toggleMusicPlay(void*)
365{ 364{
366 if (!gOverlayBar) 365 if (!gOverlayBar)
367 { 366 {
diff --git a/linden/indra/newview/lloverlaybar.h b/linden/indra/newview/lloverlaybar.h
index 46dbfef..c4bf2cf 100644
--- a/linden/indra/newview/lloverlaybar.h
+++ b/linden/indra/newview/lloverlaybar.h
@@ -78,8 +78,8 @@ public:
78 static void onClickResetView(void* data); 78 static void onClickResetView(void* data);
79 79
80 //static media helper functions 80 //static media helper functions
81 static void mediaPlay(void*); 81 static void toggleMediaPlay(void*);
82 static void musicPlay(void*); 82 static void toggleMusicPlay(void*);
83 83
84protected: 84protected:
85 static void* createMediaRemote(void* userdata); 85 static void* createMediaRemote(void* userdata);
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp
index dd4d6cf..664c9a6 100644
--- a/linden/indra/newview/llpanelavatar.cpp
+++ b/linden/indra/newview/llpanelavatar.cpp
@@ -575,7 +575,8 @@ LLPanelAvatarWeb::~LLPanelAvatarWeb()
575void LLPanelAvatarWeb::enableControls(BOOL self) 575void LLPanelAvatarWeb::enableControls(BOOL self)
576{ 576{
577 childSetEnabled("url_edit",self); 577 childSetEnabled("url_edit",self);
578 childSetVisible("status_text",!self); 578 childSetVisible("status_text",!self && !mURL.empty());
579 childSetText("status_text", LLString::null);
579} 580}
580 581
581void LLPanelAvatarWeb::setWebURL(std::string url) 582void LLPanelAvatarWeb::setWebURL(std::string url)
@@ -605,6 +606,9 @@ void LLPanelAvatarWeb::setWebURL(std::string url)
605 { 606 {
606 childSetVisible("profile_html",false); 607 childSetVisible("profile_html",false);
607 } 608 }
609
610 BOOL own_avatar = (getPanelAvatar()->getAvatarID() == gAgent.getID() );
611 childSetVisible("status_text",!own_avatar && !mURL.empty());
608 612
609#if !LL_LIBXUL_ENABLED 613#if !LL_LIBXUL_ENABLED
610 childSetVisible("load",false); 614 childSetVisible("load",false);
diff --git a/linden/indra/newview/llpanelclassified.cpp b/linden/indra/newview/llpanelclassified.cpp
index 811527e..e8d6b0d 100644
--- a/linden/indra/newview/llpanelclassified.cpp
+++ b/linden/indra/newview/llpanelclassified.cpp
@@ -676,6 +676,8 @@ void LLPanelClassified::processClassifiedInfoReply(LLMessageSystem *msg, void **
676 self->mPaidFor = TRUE; 676 self->mPaidFor = TRUE;
677 677
678 self->mUpdateBtn->setLabel(self->childGetText("update_txt")); 678 self->mUpdateBtn->setLabel(self->childGetText("update_txt"));
679
680 self->resetDirty();
679 } 681 }
680} 682}
681 683
@@ -823,6 +825,25 @@ void LLPanelClassified::callbackGotPriceForListing(S32 option, LLString text, vo
823 825
824} 826}
825 827
828void LLPanelClassified::resetDirty()
829{
830 // Tell all the widgets to reset their dirty state since the ad was just saved
831 if (mSnapshotCtrl)
832 mSnapshotCtrl->resetDirty();
833 if (mNameEditor)
834 mNameEditor->resetDirty();
835 if (mDescEditor)
836 mDescEditor->resetDirty();
837 if (mLocationEditor)
838 mLocationEditor->resetDirty();
839 mLocationChanged = false;
840 if (mCategoryCombo)
841 mCategoryCombo->resetDirty();
842 if (mMatureCheck)
843 mMatureCheck->resetDirty();
844 if (mAutoRenewCheck)
845 mAutoRenewCheck->resetDirty();
846}
826 847
827// invoked from callbackConfirmPublish 848// invoked from callbackConfirmPublish
828void LLPanelClassified::confirmPublish(S32 option) 849void LLPanelClassified::confirmPublish(S32 option)
@@ -846,22 +867,7 @@ void LLPanelClassified::confirmPublish(S32 option)
846 tab->setCurrentTabName(mNameEditor->getText()); 867 tab->setCurrentTabName(mNameEditor->getText());
847 } 868 }
848 869
849 // Tell all the widgets to reset their dirty state since the ad was just saved 870 resetDirty();
850 if (mSnapshotCtrl)
851 mSnapshotCtrl->resetDirty();
852 if (mNameEditor)
853 mNameEditor->resetDirty();
854 if (mDescEditor)
855 mDescEditor->resetDirty();
856 if (mLocationEditor)
857 mLocationEditor->resetDirty();
858 mLocationChanged = false;
859 if (mCategoryCombo)
860 mCategoryCombo->resetDirty();
861 if (mMatureCheck)
862 mMatureCheck->resetDirty();
863 if (mAutoRenewCheck)
864 mAutoRenewCheck->resetDirty();
865} 871}
866 872
867// static 873// static
diff --git a/linden/indra/newview/llpanelclassified.h b/linden/indra/newview/llpanelclassified.h
index 9c39d1b..087aae0 100644
--- a/linden/indra/newview/llpanelclassified.h
+++ b/linden/indra/newview/llpanelclassified.h
@@ -95,6 +95,7 @@ public:
95 95
96 void sendClassifiedInfoRequest(); 96 void sendClassifiedInfoRequest();
97 void sendClassifiedInfoUpdate(); 97 void sendClassifiedInfoUpdate();
98 void resetDirty();
98 void confirmPublish(S32 option); 99 void confirmPublish(S32 option);
99 100
100 static void processClassifiedInfoReply(LLMessageSystem* msg, void**); 101 static void processClassifiedInfoReply(LLMessageSystem* msg, void**);
diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp
index 16e2ab7..1ecc2e5 100644
--- a/linden/indra/newview/llpanelgroupgeneral.cpp
+++ b/linden/indra/newview/llpanelgroupgeneral.cpp
@@ -762,9 +762,8 @@ void LLPanelGroupGeneral::updateMembers()
762 762
763 all_timer.reset(); 763 all_timer.reset();
764 S32 i = 0; 764 S32 i = 0;
765 LLGroupMgrGroupData::member_iter end = gdatap->mMembers.end();
766 765
767 for( ; mMemberProgress != end && i<UPDATE_MEMBERS_PER_FRAME; 766 for( ; mMemberProgress != gdatap->mMembers.end() && i<UPDATE_MEMBERS_PER_FRAME;
768 ++mMemberProgress, ++i) 767 ++mMemberProgress, ++i)
769 { 768 {
770 //llinfos << "Adding " << iter->first << ", " << iter->second->getTitle() << llendl; 769 //llinfos << "Adding " << iter->first << ", " << iter->second->getTitle() << llendl;
@@ -805,7 +804,7 @@ void LLPanelGroupGeneral::updateMembers()
805 sAllTime += all_timer.getElapsedTimeF32(); 804 sAllTime += all_timer.getElapsedTimeF32();
806 805
807 llinfos << "Updated " << i << " of " << UPDATE_MEMBERS_PER_FRAME << "members in the list." << llendl; 806 llinfos << "Updated " << i << " of " << UPDATE_MEMBERS_PER_FRAME << "members in the list." << llendl;
808 if (mMemberProgress == end) 807 if (mMemberProgress == gdatap->mMembers.end())
809 { 808 {
810 llinfos << " member list completed." << llendl; 809 llinfos << " member list completed." << llendl;
811 mListVisibleMembers->setEnabled(TRUE); 810 mListVisibleMembers->setEnabled(TRUE);
diff --git a/linden/indra/newview/llpanelgroupgeneral.h b/linden/indra/newview/llpanelgroupgeneral.h
index 5c8b791..daf7bfa 100644
--- a/linden/indra/newview/llpanelgroupgeneral.h
+++ b/linden/indra/newview/llpanelgroupgeneral.h
@@ -110,7 +110,7 @@ private:
110 LLTextBox *mActiveTitleLabel; 110 LLTextBox *mActiveTitleLabel;
111 LLComboBox *mComboActiveTitle; 111 LLComboBox *mComboActiveTitle;
112 112
113 LLGroupMgrGroupData::member_iter mMemberProgress; 113 LLGroupMgrGroupData::member_list_t::iterator mMemberProgress;
114}; 114};
115 115
116#endif 116#endif
diff --git a/linden/indra/newview/llpanelgroupinvite.cpp b/linden/indra/newview/llpanelgroupinvite.cpp
index 0879ae5..73900f0 100644
--- a/linden/indra/newview/llpanelgroupinvite.cpp
+++ b/linden/indra/newview/llpanelgroupinvite.cpp
@@ -165,7 +165,7 @@ void LLPanelGroupInvite::impl::submitInvitations()
165 165
166void LLPanelGroupInvite::impl::addRoleNames(LLGroupMgrGroupData* gdatap) 166void LLPanelGroupInvite::impl::addRoleNames(LLGroupMgrGroupData* gdatap)
167{ 167{
168 LLGroupMgrGroupData::member_iter agent_iter = 168 LLGroupMgrGroupData::member_list_t::iterator agent_iter =
169 gdatap->mMembers.find(gAgent.getID()); 169 gdatap->mMembers.find(gAgent.getID());
170 170
171 //get the member data for the agent if it exists 171 //get the member data for the agent if it exists
@@ -191,8 +191,8 @@ void LLPanelGroupInvite::impl::addRoleNames(LLGroupMgrGroupData* gdatap)
191 bool can_assign_limited = gAgent.hasPowerInGroup(mGroupID, 191 bool can_assign_limited = gAgent.hasPowerInGroup(mGroupID,
192 GP_ROLE_ASSIGN_MEMBER_LIMITED); 192 GP_ROLE_ASSIGN_MEMBER_LIMITED);
193 193
194 LLGroupMgrGroupData::role_iter rit = gdatap->mRoles.begin(); 194 LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.begin();
195 LLGroupMgrGroupData::role_iter end = gdatap->mRoles.end(); 195 LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end();
196 196
197 //populate the role list 197 //populate the role list
198 for ( ; rit != end; ++rit) 198 for ( ; rit != end; ++rit)
diff --git a/linden/indra/newview/llpanelgrouproles.cpp b/linden/indra/newview/llpanelgrouproles.cpp
index 3401bee..5a2d9db 100644
--- a/linden/indra/newview/llpanelgrouproles.cpp
+++ b/linden/indra/newview/llpanelgrouproles.cpp
@@ -70,7 +70,7 @@ bool agentCanAddToRole(const LLUUID& group_id,
70 } 70 }
71 71
72 //make sure the agent is in the group 72 //make sure the agent is in the group
73 LLGroupMgrGroupData::member_iter mi = gdatap->mMembers.find(gAgent.getID()); 73 LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find(gAgent.getID());
74 if (mi == gdatap->mMembers.end()) 74 if (mi == gdatap->mMembers.end())
75 { 75 {
76 return false; 76 return false;
@@ -1010,8 +1010,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
1010 // Build the assigned roles list. 1010 // Build the assigned roles list.
1011 ////////////////////////////////// 1011 //////////////////////////////////
1012 // Add each role to the assigned roles list. 1012 // Add each role to the assigned roles list.
1013 LLGroupMgrGroupData::role_iter iter = gdatap->mRoles.begin(); 1013 LLGroupMgrGroupData::role_list_t::iterator iter = gdatap->mRoles.begin();
1014 LLGroupMgrGroupData::role_iter end = gdatap->mRoles.end(); 1014 LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end();
1015 1015
1016 BOOL can_eject_members = gAgent.hasPowerInGroup(mGroupID, 1016 BOOL can_eject_members = gAgent.hasPowerInGroup(mGroupID,
1017 GP_MEMBER_EJECT); 1017 GP_MEMBER_EJECT);
@@ -1052,7 +1052,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
1052 if ((*member_iter) == gAgent.getID()) continue; 1052 if ((*member_iter) == gAgent.getID()) continue;
1053 1053
1054 // Look up the member data. 1054 // Look up the member data.
1055 LLGroupMgrGroupData::member_iter mi = 1055 LLGroupMgrGroupData::member_list_t::iterator mi =
1056 gdatap->mMembers.find((*member_iter)); 1056 gdatap->mMembers.find((*member_iter));
1057 if (mi == gdatap->mMembers.end()) continue; 1057 if (mi == gdatap->mMembers.end()) continue;
1058 LLGroupMemberData* member_data = (*mi).second; 1058 LLGroupMemberData* member_data = (*mi).second;
@@ -1146,7 +1146,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
1146 if (!can_eject_members && !member_is_owner) 1146 if (!can_eject_members && !member_is_owner)
1147 { 1147 {
1148 // Maybe we can eject them because we are an owner... 1148 // Maybe we can eject them because we are an owner...
1149 LLGroupMgrGroupData::member_iter mi = gdatap->mMembers.find(gAgent.getID()); 1149 LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find(gAgent.getID());
1150 if (mi != gdatap->mMembers.end()) 1150 if (mi != gdatap->mMembers.end())
1151 { 1151 {
1152 LLGroupMemberData* member_data = (*mi).second; 1152 LLGroupMemberData* member_data = (*mi).second;
@@ -1230,41 +1230,29 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id,
1230 LLUUID member_id; 1230 LLUUID member_id;
1231 1231
1232 1232
1233 member_role_change_iter member_end = mMemberRoleChangeData.end();
1234 member_role_change_iter member;
1235 role_change_data_map_t *role_change_datap;
1236 role_change_data_map_t::iterator role_end;
1237 role_change_data_map_t::iterator role;
1238
1239 std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected(); 1233 std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
1240 if (selection.empty()) return; 1234 if (selection.empty())
1241 1235 {
1242 std::vector<LLScrollListItem*>::iterator itor; 1236 return;
1243 for (itor = selection.begin() ; 1237 }
1238
1239 for (std::vector<LLScrollListItem*>::iterator itor = selection.begin() ;
1244 itor != selection.end(); ++itor) 1240 itor != selection.end(); ++itor)
1245 { 1241 {
1246 member_id = (*itor)->getUUID(); 1242 member_id = (*itor)->getUUID();
1247 1243
1248 //see if we requested a change for this member before 1244 //see if we requested a change for this member before
1249 member = mMemberRoleChangeData.find(member_id); 1245 if ( mMemberRoleChangeData.find(member_id) == mMemberRoleChangeData.end() )
1250 if ( member != member_end )
1251 { 1246 {
1252 //this member had previously had their role data changed 1247 mMemberRoleChangeData[member_id] = new role_change_data_map_t;
1253 //so grab it
1254 role_change_datap = (*member).second;
1255 }
1256 else
1257 {
1258 role_change_datap = new role_change_data_map_t;
1259 mMemberRoleChangeData[member_id] = role_change_datap;
1260 } 1248 }
1249 role_change_data_map_t* role_change_datap = mMemberRoleChangeData[member_id];
1261 1250
1262 //now check to see if the selected group member 1251 //now check to see if the selected group member
1263 //had changed his association with the selected role before 1252 //had changed his association with the selected role before
1264 role_end = role_change_datap->end();
1265 role = role_change_datap->find(role_id);
1266 1253
1267 if ( role != role_end ) 1254 role_change_data_map_t::iterator role = role_change_datap->find(role_id);
1255 if ( role != role_change_datap->end() )
1268 { 1256 {
1269 //see if the new change type cancels out the previous change 1257 //see if the new change type cancels out the previous change
1270 if (role->second != type) 1258 if (role->second != type)
@@ -1454,15 +1442,11 @@ void LLPanelGroupMembersSubTab::applyMemberChanges()
1454 1442
1455 //we need to add all of the changed roles data 1443 //we need to add all of the changed roles data
1456 //for each member whose role changed 1444 //for each member whose role changed
1457 member_role_change_iter member_end = mMemberRoleChangeData.end(); 1445 for (member_role_changes_map_t::iterator member = mMemberRoleChangeData.begin();
1458 member_role_change_iter member = mMemberRoleChangeData.begin(); 1446 member != mMemberRoleChangeData.end(); ++member)
1459
1460 for (; member != member_end; member++)
1461 { 1447 {
1462 role_change_data_map_t::iterator role_end = member->second->end(); 1448 for (role_change_data_map_t::iterator role = member->second->begin();
1463 role_change_data_map_t::iterator role = member->second->begin(); 1449 role != member->second->end(); ++role)
1464
1465 for (; role != role_end; role++)
1466 { 1450 {
1467 gdatap->changeRoleMember(role->first, //role_id 1451 gdatap->changeRoleMember(role->first, //role_id
1468 member->first, //member_id 1452 member->first, //member_id
@@ -1515,11 +1499,6 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
1515 //if we are removing a role, we store that role id away 1499 //if we are removing a role, we store that role id away
1516 //and then we have to build the powers up bases on the roles the agent 1500 //and then we have to build the powers up bases on the roles the agent
1517 //is in 1501 //is in
1518 member_role_change_iter member_end = mMemberRoleChangeData.end();
1519 member_role_change_iter member;
1520 role_change_data_map_t *role_change_datap = NULL;
1521 role_change_data_map_t::iterator role_end;
1522 role_change_data_map_t::iterator role;
1523 1502
1524 LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mGroupID); 1503 LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mGroupID);
1525 if (!gdatap) 1504 if (!gdatap)
@@ -1536,8 +1515,9 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
1536 } 1515 }
1537 1516
1538 //see if there are unsaved role changes for this agent 1517 //see if there are unsaved role changes for this agent
1539 member = mMemberRoleChangeData.find(agent_id); 1518 role_change_data_map_t* role_change_datap = NULL;
1540 if ( member != member_end ) 1519 member_role_changes_map_t::iterator member = mMemberRoleChangeData.find(agent_id);
1520 if ( member != mMemberRoleChangeData.end() )
1541 { 1521 {
1542 //this member has unsaved role changes 1522 //this member has unsaved role changes
1543 //so grab them 1523 //so grab them
@@ -1550,13 +1530,13 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
1550 { 1530 {
1551 std::vector<LLUUID> roles_to_be_removed; 1531 std::vector<LLUUID> roles_to_be_removed;
1552 1532
1553 role_end = role_change_datap->end(); 1533 for (role_change_data_map_t::iterator role = role_change_datap->begin();
1554 role = role_change_datap->begin(); 1534 role != role_change_datap->end(); ++ role)
1555
1556 for (; role != role_end; role++)
1557 { 1535 {
1558 if ( role->second == RMC_ADD ) 1536 if ( role->second == RMC_ADD )
1537 {
1559 new_powers |= gdatap->getRolePowers(role->first); 1538 new_powers |= gdatap->getRolePowers(role->first);
1539 }
1560 else 1540 else
1561 { 1541 {
1562 roles_to_be_removed.push_back(role->first); 1542 roles_to_be_removed.push_back(role->first);
@@ -1565,12 +1545,8 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
1565 1545
1566 //loop over the member's current roles, summing up 1546 //loop over the member's current roles, summing up
1567 //the powers (not including the role we are removing) 1547 //the powers (not including the role we are removing)
1568 std::map<LLUUID,LLGroupRoleData*>::iterator current_role = 1548 for (LLGroupMemberData::role_list_t::iterator current_role = member_data->roleBegin();
1569 member_data->roleBegin(); 1549 current_role != member_data->roleEnd(); ++current_role)
1570 std::map<LLUUID,LLGroupRoleData*>::iterator end_role =
1571 member_data->roleEnd();
1572
1573 for (; current_role != end_role; current_role++)
1574 { 1550 {
1575 bool role_in_remove_list = 1551 bool role_in_remove_list =
1576 (std::find(roles_to_be_removed.begin(), 1552 (std::find(roles_to_be_removed.begin(),
@@ -1603,13 +1579,10 @@ bool LLPanelGroupMembersSubTab::getRoleChangeType(const LLUUID& member_id,
1603 const LLUUID& role_id, 1579 const LLUUID& role_id,
1604 LLRoleMemberChangeType& type) 1580 LLRoleMemberChangeType& type)
1605{ 1581{
1606 member_role_change_iter member_changes_iter; 1582 member_role_changes_map_t::iterator member_changes_iter = mMemberRoleChangeData.find(member_id);
1607 role_change_data_map_t::iterator role_changes_iter;
1608
1609 member_changes_iter = mMemberRoleChangeData.find(member_id);
1610 if ( member_changes_iter != mMemberRoleChangeData.end() ) 1583 if ( member_changes_iter != mMemberRoleChangeData.end() )
1611 { 1584 {
1612 role_changes_iter = member_changes_iter->second->find(role_id); 1585 role_change_data_map_t::iterator role_changes_iter = member_changes_iter->second->find(role_id);
1613 if ( role_changes_iter != member_changes_iter->second->end() ) 1586 if ( role_changes_iter != member_changes_iter->second->end() )
1614 { 1587 {
1615 type = role_changes_iter->second; 1588 type = role_changes_iter->second;
@@ -1707,7 +1680,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
1707 return; 1680 return;
1708 } 1681 }
1709 1682
1710 LLGroupMgrGroupData::member_iter end = gdatap->mMembers.end(); 1683 LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end();
1711 1684
1712 char first[DB_FIRST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ 1685 char first[DB_FIRST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
1713 char last[DB_LAST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ 1686 char last[DB_LAST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
@@ -1997,8 +1970,8 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc)
1997 1970
1998 LLScrollListItem* item = NULL; 1971 LLScrollListItem* item = NULL;
1999 1972
2000 LLGroupMgrGroupData::role_iter rit = gdatap->mRoles.begin(); 1973 LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.begin();
2001 LLGroupMgrGroupData::role_iter end = gdatap->mRoles.end(); 1974 LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end();
2002 1975
2003 for ( ; rit != end; ++rit) 1976 for ( ; rit != end; ++rit)
2004 { 1977 {
@@ -2181,8 +2154,8 @@ void LLPanelGroupRolesSubTab::buildMembersList()
2181 if (item->getUUID().isNull()) 2154 if (item->getUUID().isNull())
2182 { 2155 {
2183 // Special cased 'Everyone' role 2156 // Special cased 'Everyone' role
2184 LLGroupMgrGroupData::member_iter mit = gdatap->mMembers.begin(); 2157 LLGroupMgrGroupData::member_list_t::iterator mit = gdatap->mMembers.begin();
2185 LLGroupMgrGroupData::member_iter end = gdatap->mMembers.end(); 2158 LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end();
2186 for ( ; mit != end; ++mit) 2159 for ( ; mit != end; ++mit)
2187 { 2160 {
2188 mAssignedMembersList->addNameItem((*mit).first); 2161 mAssignedMembersList->addNameItem((*mit).first);
@@ -2190,7 +2163,7 @@ void LLPanelGroupRolesSubTab::buildMembersList()
2190 } 2163 }
2191 else 2164 else
2192 { 2165 {
2193 LLGroupMgrGroupData::role_iter rit = gdatap->mRoles.find(item->getUUID()); 2166 LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.find(item->getUUID());
2194 if (rit != gdatap->mRoles.end()) 2167 if (rit != gdatap->mRoles.end())
2195 { 2168 {
2196 LLGroupRoleData* rdatap = (*rit).second; 2169 LLGroupRoleData* rdatap = (*rit).second;
@@ -2643,8 +2616,8 @@ void LLPanelGroupActionsSubTab::handleActionSelect()
2643 2616
2644 if (gdatap->isMemberDataComplete()) 2617 if (gdatap->isMemberDataComplete())
2645 { 2618 {
2646 LLGroupMgrGroupData::member_iter it = gdatap->mMembers.begin(); 2619 LLGroupMgrGroupData::member_list_t::iterator it = gdatap->mMembers.begin();
2647 LLGroupMgrGroupData::member_iter end = gdatap->mMembers.end(); 2620 LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end();
2648 LLGroupMemberData* gmd; 2621 LLGroupMemberData* gmd;
2649 2622
2650 for ( ; it != end; ++it) 2623 for ( ; it != end; ++it)
@@ -2664,8 +2637,8 @@ void LLPanelGroupActionsSubTab::handleActionSelect()
2664 2637
2665 if (gdatap->isRoleDataComplete()) 2638 if (gdatap->isRoleDataComplete())
2666 { 2639 {
2667 LLGroupMgrGroupData::role_iter it = gdatap->mRoles.begin(); 2640 LLGroupMgrGroupData::role_list_t::iterator it = gdatap->mRoles.begin();
2668 LLGroupMgrGroupData::role_iter end = gdatap->mRoles.end(); 2641 LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end();
2669 LLGroupRoleData* rmd; 2642 LLGroupRoleData* rmd;
2670 2643
2671 for ( ; it != end; ++it) 2644 for ( ; it != end; ++it)
diff --git a/linden/indra/newview/llpanelgrouproles.h b/linden/indra/newview/llpanelgrouproles.h
index a44f1a3..f84cb93 100644
--- a/linden/indra/newview/llpanelgrouproles.h
+++ b/linden/indra/newview/llpanelgrouproles.h
@@ -202,7 +202,6 @@ public:
202 202
203protected: 203protected:
204 typedef std::map<LLUUID, LLRoleMemberChangeType> role_change_data_map_t; 204 typedef std::map<LLUUID, LLRoleMemberChangeType> role_change_data_map_t;
205 typedef std::map<LLUUID, role_change_data_map_t*>::iterator member_role_change_iter;
206 typedef std::map<LLUUID, role_change_data_map_t*> member_role_changes_map_t; 205 typedef std::map<LLUUID, role_change_data_map_t*> member_role_changes_map_t;
207 206
208 bool matchesSearchFilter(char* first, char* last); 207 bool matchesSearchFilter(char* first, char* last);
@@ -224,7 +223,7 @@ protected:
224 member_role_changes_map_t mMemberRoleChangeData; 223 member_role_changes_map_t mMemberRoleChangeData;
225 U32 mNumOwnerAdditions; 224 U32 mNumOwnerAdditions;
226 225
227 LLGroupMgrGroupData::member_iter mMemberProgress; 226 LLGroupMgrGroupData::member_list_t::iterator mMemberProgress;
228}; 227};
229 228
230class LLPanelGroupRolesSubTab : public LLPanelGroupSubTab 229class LLPanelGroupRolesSubTab : public LLPanelGroupSubTab
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp
index 6029c2f..24d235e 100644
--- a/linden/indra/newview/llpanellogin.cpp
+++ b/linden/indra/newview/llpanellogin.cpp
@@ -368,6 +368,11 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
368 childSetKeystrokeCallback("password_edit", onPassKey, this); 368 childSetKeystrokeCallback("password_edit", onPassKey, this);
369 childSetUserData("password_edit", this); 369 childSetUserData("password_edit", this);
370 370
371 // change z sort of clickable text to be behind buttons
372 sendChildToBack(getChildByName("channel_text"));
373 sendChildToBack(getChildByName("version_text"));
374 sendChildToBack(getChildByName("forgot_password_text"));
375
371 LLLineEditor* edit = LLUICtrlFactory::getLineEditorByName(this, "password_edit"); 376 LLLineEditor* edit = LLUICtrlFactory::getLineEditorByName(this, "password_edit");
372 if (edit) edit->setDrawAsterixes(TRUE); 377 if (edit) edit->setDrawAsterixes(TRUE);
373 378
@@ -483,6 +488,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
483 // Initialize visibility (and don't force visibility - use prefs) 488 // Initialize visibility (and don't force visibility - use prefs)
484 refreshLocation( false ); 489 refreshLocation( false );
485#endif 490#endif
491
486} 492}
487 493
488void LLPanelLogin::setSiteIsAlive( bool alive ) 494void LLPanelLogin::setSiteIsAlive( bool alive )
diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp
index 6ddae78..bb0ccde 100644
--- a/linden/indra/newview/llselectmgr.cpp
+++ b/linden/indra/newview/llselectmgr.cpp
@@ -3647,14 +3647,25 @@ void LLSelectMgr::saveSelectedObjectTransform(EActionType action_type)
3647 { 3647 {
3648 selectNode->mSavedPositionGlobal = gAgent.getPosGlobalFromAgent((object->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition()); 3648 selectNode->mSavedPositionGlobal = gAgent.getPosGlobalFromAgent((object->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition());
3649 } 3649 }
3650 else
3651 {
3652 selectNode->mSavedPositionGlobal = object->getPositionGlobal();
3653 }
3650 } 3654 }
3651 else 3655 else
3652 { 3656 {
3653 LLViewerObject* attachment_root = (LLViewerObject*)object->getParent(); 3657 LLViewerObject* attachment_root = (LLViewerObject*)object->getParent();
3654 LLXform* parent_xform = attachment_root->mDrawable->getXform()->getParent(); 3658 LLXform* parent_xform = attachment_root ? attachment_root->mDrawable->getXform()->getParent() : NULL;
3655 LLVector3 root_pos = (attachment_root->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition(); 3659 if (parent_xform)
3656 LLQuaternion root_rot = (attachment_root->getRotation() * parent_xform->getWorldRotation()); 3660 {
3657 selectNode->mSavedPositionGlobal = gAgent.getPosGlobalFromAgent((object->getPosition() * root_rot) + root_pos); 3661 LLVector3 root_pos = (attachment_root->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition();
3662 LLQuaternion root_rot = (attachment_root->getRotation() * parent_xform->getWorldRotation());
3663 selectNode->mSavedPositionGlobal = gAgent.getPosGlobalFromAgent((object->getPosition() * root_rot) + root_pos);
3664 }
3665 else
3666 {
3667 selectNode->mSavedPositionGlobal = object->getPositionGlobal();
3668 }
3658 } 3669 }
3659 selectNode->mSavedRotation = object->getRenderRotation(); 3670 selectNode->mSavedRotation = object->getRenderRotation();
3660 } 3671 }
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 07aefad..2e7e609 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -1080,7 +1080,7 @@ BOOL idle_startup()
1080 gAcceptTOS, 1080 gAcceptTOS,
1081 gAcceptCriticalMessage, 1081 gAcceptCriticalMessage,
1082 gViewerDigest, 1082 gViewerDigest,
1083 gLastExecFroze, 1083 gLastExecEvent,
1084 requested_options, 1084 requested_options,
1085 hashed_mac_string, 1085 hashed_mac_string,
1086 LLAppViewer::instance()->getSerialNumber()); 1086 LLAppViewer::instance()->getSerialNumber());
@@ -2887,8 +2887,8 @@ void update_dialog_callback(S32 option, void *userdata)
2887 2887
2888 llinfos << "Calling updater: " << update_exe_path << " " << params.str() << llendl; 2888 llinfos << "Calling updater: " << update_exe_path << " " << params.str() << llendl;
2889 2889
2890 // *REMOVE:Mani The following call is handled through ~LLAppViewer. 2890 //Explicitly remove the marker file, otherwise we pass the lock onto the child process and things get weird.
2891 // remove_marker_file(); // In case updater fails 2891 LLAppViewer::instance()->removeMarkerFile(); // In case updater fails
2892 2892
2893 // Use spawn() to run asynchronously 2893 // Use spawn() to run asynchronously
2894 int retval = _spawnl(_P_NOWAIT, update_exe_path.c_str(), update_exe_path.c_str(), params.str().c_str(), NULL); 2894 int retval = _spawnl(_P_NOWAIT, update_exe_path.c_str(), update_exe_path.c_str(), params.str().c_str(), NULL);
diff --git a/linden/indra/newview/lltoolbar.cpp b/linden/indra/newview/lltoolbar.cpp
index e3aa9a3..4120c2d 100644
--- a/linden/indra/newview/lltoolbar.cpp
+++ b/linden/indra/newview/lltoolbar.cpp
@@ -279,7 +279,7 @@ void LLToolBar::layoutButtons()
279 279
280 // We actually want to extend "pad" pixels off the right edge of the 280 // We actually want to extend "pad" pixels off the right edge of the
281 // screen, such that the rightmost button is aligned. 281 // screen, such that the rightmost button is aligned.
282 S32 segment_width = llround((F32)(width) / ((F32)count - 1.f)); 282 S32 segment_width = llround((F32)(width) / ((F32)count - 1.f)); // ignore chat button
283 S32 btn_width = segment_width - pad; 283 S32 btn_width = segment_width - pad;
284 284
285 // Evenly space all views 285 // Evenly space all views
@@ -314,7 +314,7 @@ void LLToolBar::layoutButtons()
314 btn_view->reshape(r.getWidth(), r.getHeight()); 314 btn_view->reshape(r.getWidth(), r.getHeight());
315 i--; 315 i--;
316 } 316 }
317 } 317 }
318} 318}
319 319
320 320
diff --git a/linden/indra/newview/llurlsimstring.cpp b/linden/indra/newview/llurlsimstring.cpp
index 8113326..5829e73 100644
--- a/linden/indra/newview/llurlsimstring.cpp
+++ b/linden/indra/newview/llurlsimstring.cpp
@@ -75,9 +75,9 @@ void LLURLSimString::setString(const LLString& sim_string)
75// static 75// static
76S32 LLURLSimString::parseGridIdx(const LLString& in_string, S32 idx0, S32* res, S32 max) 76S32 LLURLSimString::parseGridIdx(const LLString& in_string, S32 idx0, S32* res, S32 max)
77{ 77{
78 if (idx0 == INT_MAX || in_string[idx0] != '/') 78 if (idx0 == LLString::npos || in_string[idx0] != '/')
79 { 79 {
80 return INT_MAX; // parse error 80 return LLString::npos; // parse error
81 } 81 }
82 idx0++; 82 idx0++;
83 LLString::size_type idx1 = in_string.find_first_of('/', idx0); 83 LLString::size_type idx1 = in_string.find_first_of('/', idx0);
diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp
index 81f5cc1..99bc98a 100644
--- a/linden/indra/newview/llviewercontrol.cpp
+++ b/linden/indra/newview/llviewercontrol.cpp
@@ -261,7 +261,6 @@ void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
261 spinner4->setVisible(FALSE); 261 spinner4->setVisible(FALSE);
262 color_swatch->setVisible(FALSE); 262 color_swatch->setVisible(FALSE);
263 childSetVisible("val_text", FALSE); 263 childSetVisible("val_text", FALSE);
264 childSetVisible("boolean_combo", FALSE);
265 mComment->setText(LLString::null); 264 mComment->setText(LLString::null);
266 265
267 if (controlp) 266 if (controlp)
@@ -299,6 +298,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
299 case TYPE_U32: 298 case TYPE_U32:
300 spinner1->setVisible(TRUE); 299 spinner1->setVisible(TRUE);
301 spinner1->setLabel(LLString("value")); // Debug, don't translate 300 spinner1->setLabel(LLString("value")); // Debug, don't translate
301 childSetVisible("boolean_combo", FALSE);
302 if (!spinner1->hasFocus()) 302 if (!spinner1->hasFocus())
303 { 303 {
304 spinner1->setValue(sd); 304 spinner1->setValue(sd);
@@ -311,6 +311,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
311 case TYPE_S32: 311 case TYPE_S32:
312 spinner1->setVisible(TRUE); 312 spinner1->setVisible(TRUE);
313 spinner1->setLabel(LLString("value")); // Debug, don't translate 313 spinner1->setLabel(LLString("value")); // Debug, don't translate
314 childSetVisible("boolean_combo", FALSE);
314 if (!spinner1->hasFocus()) 315 if (!spinner1->hasFocus())
315 { 316 {
316 spinner1->setValue(sd); 317 spinner1->setValue(sd);
@@ -323,6 +324,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
323 case TYPE_F32: 324 case TYPE_F32:
324 spinner1->setVisible(TRUE); 325 spinner1->setVisible(TRUE);
325 spinner1->setLabel(LLString("value")); // Debug, don't translate 326 spinner1->setLabel(LLString("value")); // Debug, don't translate
327 childSetVisible("boolean_combo", FALSE);
326 if (!spinner1->hasFocus()) 328 if (!spinner1->hasFocus())
327 { 329 {
328 spinner1->setPrecision(3); 330 spinner1->setPrecision(3);
@@ -346,6 +348,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
346 break; 348 break;
347 case TYPE_STRING: 349 case TYPE_STRING:
348 childSetVisible("val_text", TRUE); 350 childSetVisible("val_text", TRUE);
351 childSetVisible("boolean_combo", FALSE);
349 if (!childHasFocus("val_text")) 352 if (!childHasFocus("val_text"))
350 { 353 {
351 childSetValue("val_text", sd); 354 childSetValue("val_text", sd);
@@ -353,6 +356,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
353 break; 356 break;
354 case TYPE_VEC3: 357 case TYPE_VEC3:
355 { 358 {
359 childSetVisible("boolean_combo", FALSE);
356 LLVector3 v; 360 LLVector3 v;
357 v.setValue(sd); 361 v.setValue(sd);
358 spinner1->setVisible(TRUE); 362 spinner1->setVisible(TRUE);
@@ -380,6 +384,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
380 } 384 }
381 case TYPE_VEC3D: 385 case TYPE_VEC3D:
382 { 386 {
387 childSetVisible("boolean_combo", FALSE);
383 LLVector3d v; 388 LLVector3d v;
384 v.setValue(sd); 389 v.setValue(sd);
385 spinner1->setVisible(TRUE); 390 spinner1->setVisible(TRUE);
@@ -407,6 +412,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
407 } 412 }
408 case TYPE_RECT: 413 case TYPE_RECT:
409 { 414 {
415 childSetVisible("boolean_combo", FALSE);
410 LLRect r; 416 LLRect r;
411 r.setValue(sd); 417 r.setValue(sd);
412 spinner1->setVisible(TRUE); 418 spinner1->setVisible(TRUE);
@@ -457,6 +463,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
457 } 463 }
458 case TYPE_COL4: 464 case TYPE_COL4:
459 { 465 {
466 childSetVisible("boolean_combo", FALSE);
460 LLColor4 clr; 467 LLColor4 clr;
461 clr.setValue(sd); 468 clr.setValue(sd);
462 color_swatch->setVisible(TRUE); 469 color_swatch->setVisible(TRUE);
@@ -478,6 +485,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
478 } 485 }
479 case TYPE_COL3: 486 case TYPE_COL3:
480 { 487 {
488 childSetVisible("boolean_combo", FALSE);
481 LLColor3 clr; 489 LLColor3 clr;
482 clr.setValue(sd); 490 clr.setValue(sd);
483 color_swatch->setVisible(TRUE); 491 color_swatch->setVisible(TRUE);
@@ -486,6 +494,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
486 } 494 }
487 case TYPE_COL4U: 495 case TYPE_COL4U:
488 { 496 {
497 childSetVisible("boolean_combo", FALSE);
489 LLColor4U clr; 498 LLColor4U clr;
490 clr.setValue(sd); 499 clr.setValue(sd);
491 color_swatch->setVisible(TRUE); 500 color_swatch->setVisible(TRUE);
diff --git a/linden/indra/newview/llviewerimagelist.cpp b/linden/indra/newview/llviewerimagelist.cpp
index 9c74b4a..68edca8 100644
--- a/linden/indra/newview/llviewerimagelist.cpp
+++ b/linden/indra/newview/llviewerimagelist.cpp
@@ -129,7 +129,8 @@ void LLViewerImageList::doPreloadImages()
129 129
130 // Speeds up startup by 4-5 seconds. JC 130 // Speeds up startup by 4-5 seconds. JC
131 if (!gPreloadImages) return; 131 if (!gPreloadImages) return;
132 132
133 LLViewerImage* image;
133 // Images listed here are immediately decoded, before the login screen. 134 // Images listed here are immediately decoded, before the login screen.
134 // Since this slows down perceived viewer startup time, only include 135 // Since this slows down perceived viewer startup time, only include
135 // images here for buttons/checkboxes/etc. that are immediately visible. 136 // images here for buttons/checkboxes/etc. that are immediately visible.
@@ -289,7 +290,8 @@ void LLViewerImageList::doPreloadImages()
289 preloadUIImage("object_tube_active.tga", LLUUID::null, FALSE); 290 preloadUIImage("object_tube_active.tga", LLUUID::null, FALSE);
290 preloadUIImage("pixiesmall.tga", LLUUID::null, TRUE); 291 preloadUIImage("pixiesmall.tga", LLUUID::null, TRUE);
291 preloadUIImage("script_error.tga", LLUUID::null, TRUE); 292 preloadUIImage("script_error.tga", LLUUID::null, TRUE);
292 preloadUIImage("silhouette.tga", LLUUID::null, TRUE); 293 image = preloadUIImage("silhouette.tga", LLUUID::null, TRUE);
294 if (image) image->setClamp(FALSE, FALSE);
293 preloadUIImage("status_no_build.tga", LLUUID::null, FALSE); 295 preloadUIImage("status_no_build.tga", LLUUID::null, FALSE);
294 preloadUIImage("status_buy_currency.tga", LLUUID::null, FALSE); 296 preloadUIImage("status_buy_currency.tga", LLUUID::null, FALSE);
295 preloadUIImage("status_buy_currency_pressed.tga", LLUUID::null, FALSE); 297 preloadUIImage("status_buy_currency_pressed.tga", LLUUID::null, FALSE);
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index bad2f1c..fcebe70 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -3513,7 +3513,8 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
3513 gViewerStats->mSimTotalUnackedBytes.addValue(stat_value / 1024.f); 3513 gViewerStats->mSimTotalUnackedBytes.addValue(stat_value / 1024.f);
3514 break; 3514 break;
3515 default: 3515 default:
3516 llwarns << "Unknown stat id" << stat_id << llendl; 3516// llwarns << "Unknown stat id" << stat_id << llendl;
3517 break;
3517 } 3518 }
3518 } 3519 }
3519 3520
diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp
index 6ec29ae..4730799 100644
--- a/linden/indra/newview/llviewerparcelmgr.cpp
+++ b/linden/indra/newview/llviewerparcelmgr.cpp
@@ -588,13 +588,13 @@ void LLViewerParcelMgr::deselectLand()
588 588
589 mSelectedDwell = 0.f; 589 mSelectedDwell = 0.f;
590 590
591 notifyObservers();
592
593 // invalidate parcel selection so that existing users of this selection can clean up 591 // invalidate parcel selection so that existing users of this selection can clean up
594 mCurrentParcelSelection->setParcel(NULL); 592 mCurrentParcelSelection->setParcel(NULL);
595 mFloatingParcelSelection->setParcel(NULL); 593 mFloatingParcelSelection->setParcel(NULL);
596 // create new parcel selection 594 // create new parcel selection
597 mCurrentParcelSelection = new LLParcelSelection(mCurrentParcel); 595 mCurrentParcelSelection = new LLParcelSelection(mCurrentParcel);
596
597 notifyObservers(); // Notify observers *after* changing the parcel selection
598 } 598 }
599} 599}
600 600
@@ -1803,9 +1803,9 @@ void optionally_start_music(const LLString& music_url)
1803 1803
1804 // now only play music when you enter a new parcel if the control is in PLAY state 1804 // now only play music when you enter a new parcel if the control is in PLAY state
1805 // changed as part of SL-4878 1805 // changed as part of SL-4878
1806 if ( gOverlayBar && gOverlayBar->musicPlaying() ) 1806 if ( gOverlayBar && gOverlayBar->musicPlaying())
1807 { 1807 {
1808 LLOverlayBar::musicPlay(NULL); 1808 gAudiop->startInternetStream(music_url.c_str());
1809 } 1809 }
1810 } 1810 }
1811} 1811}
@@ -1819,7 +1819,10 @@ void callback_start_music(S32 option, void* data)
1819 { 1819 {
1820 gSavedSettings.setBOOL("AudioStreamingMusic", TRUE); 1820 gSavedSettings.setBOOL("AudioStreamingMusic", TRUE);
1821 llinfos << "Starting first parcel music " << music_url << llendl; 1821 llinfos << "Starting first parcel music " << music_url << llendl;
1822 LLOverlayBar::musicPlay(NULL); 1822 if ( gOverlayBar && gOverlayBar->musicPlaying())
1823 {
1824 gAudiop->startInternetStream(music_url->c_str());
1825 }
1823 } 1826 }
1824 else 1827 else
1825 { 1828 {
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index a8ff246..b0577e6 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -3000,7 +3000,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
3000 } 3000 }
3001 3001
3002 // Update rectangles for the various toolbars 3002 // Update rectangles for the various toolbars
3003 if (gOverlayBar && gNotifyBoxView && gConsole) 3003 if (gOverlayBar && gNotifyBoxView && gConsole && gToolBar)
3004 { 3004 {
3005 LLRect bar_rect(-1, STATUS_BAR_HEIGHT, getWindowWidth()+1, -1); 3005 LLRect bar_rect(-1, STATUS_BAR_HEIGHT, getWindowWidth()+1, -1);
3006 3006
@@ -3022,7 +3022,8 @@ BOOL LLViewerWindow::handlePerFrameHover()
3022 3022
3023 // snap floaters to top of chat bar/button strip 3023 // snap floaters to top of chat bar/button strip
3024 LLView* chatbar_and_buttons = gOverlayBar->getChildByName("chatbar_and_buttons", TRUE); 3024 LLView* chatbar_and_buttons = gOverlayBar->getChildByName("chatbar_and_buttons", TRUE);
3025 if (chatbar_and_buttons) 3025 // find top of chatbar and strate buttons, if either are visible
3026 if (chatbar_and_buttons && !chatbar_and_buttons->getLocalBoundingRect().isNull())
3026 { 3027 {
3027 // convert top/left corner of chatbar/buttons container to gFloaterView-relative coordinates 3028 // convert top/left corner of chatbar/buttons container to gFloaterView-relative coordinates
3028 S32 top, left; 3029 S32 top, left;
@@ -3034,6 +3035,17 @@ BOOL LLViewerWindow::handlePerFrameHover()
3034 gFloaterView); 3035 gFloaterView);
3035 gFloaterView->setSnapOffsetBottom(top); 3036 gFloaterView->setSnapOffsetBottom(top);
3036 } 3037 }
3038 else if (gToolBar->getVisible())
3039 {
3040 S32 top, left;
3041 gToolBar->localPointToOtherView(
3042 gToolBar->getLocalBoundingRect().mLeft,
3043 gToolBar->getLocalBoundingRect().mTop,
3044 &left,
3045 &top,
3046 gFloaterView);
3047 gFloaterView->setSnapOffsetBottom(top);
3048 }
3037 else 3049 else
3038 { 3050 {
3039 gFloaterView->setSnapOffsetBottom(0); 3051 gFloaterView->setSnapOffsetBottom(0);
diff --git a/linden/indra/newview/newview_vc8.vcproj b/linden/indra/newview/newview_vc8.vcproj
index e68e59a..fc8912d 100644
--- a/linden/indra/newview/newview_vc8.vcproj
+++ b/linden/indra/newview/newview_vc8.vcproj
@@ -341,7 +341,7 @@
341 WarningLevel="3" 341 WarningLevel="3"
342 WarnAsError="true" 342 WarnAsError="true"
343 Detect64BitPortabilityProblems="false" 343 Detect64BitPortabilityProblems="false"
344 DebugInformationFormat="4" 344 DebugInformationFormat="3"
345 /> 345 />
346 <Tool 346 <Tool
347 Name="VCManagedResourceCompilerTool" 347 Name="VCManagedResourceCompilerTool"
diff --git a/linden/indra/newview/releasenotes.txt b/linden/indra/newview/releasenotes.txt
index f88987d..de547c5 100644
--- a/linden/indra/newview/releasenotes.txt
+++ b/linden/indra/newview/releasenotes.txt
@@ -1,3 +1,42 @@
1Release Notes for Second Life 1.19.0(2) February 13th, 2008
2=====================================
3
4Fixes:
5* Preferences window docks at an offscreen position and cannot be moved vertically
6* Communicate window has low framerate for group ims.
7* Viewer freeze and delay in opening map
8* Visible flashing of prim highlights when editing
9* Parcel audio play setting is not remembered when crossing over a parcel with no media
10* Alt and left/right arrow keys dont move you between tabs
11* Login Page > SL Release link overlaps Quit when viewer resized
12* Redocking the Contact list causes the communicate UI to get ugly
13* Clicking on gestures button moves open windows
14* Pressing escape does not cause the chat history or inventory windows to lose focus
15* Toggling voice causes layout problems in toolbar
16* Problems loading certain settings files
17* Deutsch "System Default" is translated as "System Error" in language preferences
18* Viewer crash just after login
19* Linux compile issue with g++ 4
20* Debug settings overrides do not work for booleans.
21* reverted floater_test.xml to empty floater.
22
23Release Notes for Second Life 1.19.0(1) February 7th, 2008
24=====================================
25Changes:
26* Added second set of translated strings
27* Region info message is now a passive notification
28* Changed default SL window size to 1000x700, to allow buttons in UI to have proper labels
29
30Fixes:
31* Preferences > Web has truncated text in the Address: section
32* Korean viewer crashes on startup
33* Stand up button etc dissapear offscreen after using mouselook
34* Client-readme-voice.txt missing from open source distribution
35* Clicking on another users classifieds ad then closing asks you to save changes
36* Checking to select a role does not enable the apply button
37* Stray 'Done" on the Profile Web tab
38
39
1Release Notes for Second Life 1.19.0(0) February 1st, 2008 40Release Notes for Second Life 1.19.0(0) February 1st, 2008
2===================================== 41=====================================
3New features and changes: 42New features and changes:
diff --git a/linden/indra/newview/res/newViewRes.rc b/linden/indra/newview/res/newViewRes.rc
index 7ae5595..909393b 100644
--- a/linden/indra/newview/res/newViewRes.rc
+++ b/linden/indra/newview/res/newViewRes.rc
@@ -228,8 +228,8 @@ TOOLPIPETTE CURSOR "toolpipette.cur"
228// 228//
229 229
230VS_VERSION_INFO VERSIONINFO 230VS_VERSION_INFO VERSIONINFO
231 FILEVERSION 1,19,0,0 231 FILEVERSION 1,19,0,2
232 PRODUCTVERSION 1,19,0,0 232 PRODUCTVERSION 1,19,0,2
233 FILEFLAGSMASK 0x3fL 233 FILEFLAGSMASK 0x3fL
234#ifdef _DEBUG 234#ifdef _DEBUG
235 FILEFLAGS 0x1L 235 FILEFLAGS 0x1L
@@ -246,12 +246,12 @@ BEGIN
246 BEGIN 246 BEGIN
247 VALUE "CompanyName", "Linden Lab" 247 VALUE "CompanyName", "Linden Lab"
248 VALUE "FileDescription", "Second Life" 248 VALUE "FileDescription", "Second Life"
249 VALUE "FileVersion", "1.19.0.0" 249 VALUE "FileVersion", "1.19.0.2"
250 VALUE "InternalName", "Second Life" 250 VALUE "InternalName", "Second Life"
251 VALUE "LegalCopyright", "Copyright © 2001-2007, Linden Research, Inc." 251 VALUE "LegalCopyright", "Copyright © 2001-2007, Linden Research, Inc."
252 VALUE "OriginalFilename", "SecondLife.exe" 252 VALUE "OriginalFilename", "SecondLife.exe"
253 VALUE "ProductName", "Second Life" 253 VALUE "ProductName", "Second Life"
254 VALUE "ProductVersion", "1.19.0.0" 254 VALUE "ProductVersion", "1.19.0.2"
255 END 255 END
256 END 256 END
257 BLOCK "VarFileInfo" 257 BLOCK "VarFileInfo"
diff --git a/linden/indra/newview/skins/xui/de/panel_preferences_general.xml b/linden/indra/newview/skins/xui/de/panel_preferences_general.xml
index da066a1..8433c81 100644
--- a/linden/indra/newview/skins/xui/de/panel_preferences_general.xml
+++ b/linden/indra/newview/skins/xui/de/panel_preferences_general.xml
@@ -71,7 +71,7 @@
71 </combo_box> 71 </combo_box>
72 <combo_box name="language_combobox"> 72 <combo_box name="language_combobox">
73 <combo_item type="string" length="1" name="System Default Language"> 73 <combo_item type="string" length="1" name="System Default Language">
74 Systemfehler 74 Betriebssystem-Einstellung
75 </combo_item> 75 </combo_item>
76 <combo_item type="string" length="1" name="English"> 76 <combo_item type="string" length="1" name="English">
77 English (Englisch) 77 English (Englisch)
diff --git a/linden/indra/newview/skins/xui/en-us/floater_active_speakers.xml b/linden/indra/newview/skins/xui/en-us/floater_active_speakers.xml
index 933baad..259cb3d 100644
--- a/linden/indra/newview/skins/xui/en-us/floater_active_speakers.xml
+++ b/linden/indra/newview/skins/xui/en-us/floater_active_speakers.xml
@@ -26,6 +26,7 @@
26 draw_stripes="false" 26 draw_stripes="false"
27 multi_select="false" 27 multi_select="false"
28 search_column="1" 28 search_column="1"
29 sort_column="2"
29 > 30 >
30 <column name="icon_speaking_status" width="20" sort="speaking_status"/> 31 <column name="icon_speaking_status" width="20" sort="speaking_status"/>
31 <column name="speaker_name" label="Name" dynamicwidth="true" /> 32 <column name="speaker_name" label="Name" dynamicwidth="true" />
diff --git a/linden/indra/newview/skins/xui/en-us/floater_test.xml b/linden/indra/newview/skins/xui/en-us/floater_test.xml
index 71a3bd4..f6d38ff 100644
--- a/linden/indra/newview/skins/xui/en-us/floater_test.xml
+++ b/linden/indra/newview/skins/xui/en-us/floater_test.xml
@@ -1,45 +1,6 @@
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<!-- Please don't commit this with any changes! For local testing only! -->
3 can_resize="true" height="380" hidden="false" left="400" min_height="340" 3<floater bottom="40" left="40" height="225" width="180"
4 min_width="200" mouse_opaque="true" name="avatarpicker" 4 can_resize="false" can_close="true" can_drag_on_left="false" can_minimize="true"
5 title="Choose Resident" width="240"> 5 name="Test" title="Test">
6 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
7 bottom="-40" drop_shadow_visible="true" follows="left|top"
8 font="SansSerifSmall" h_pad="0" halign="left" height="16" hidden="false"
9 left="12" mouse_opaque="true" name="Type part of the resident&apos;s name:"
10 v_pad="0" width="220">
11 Type part of the resident&apos;s name:
12 </text>
13 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-16"
14 follows="left|top|right" font="SansSerifSmall" height="16" hidden="false"
15 left="12" max_length="254" mouse_opaque="true" name="Edit"
16 select_on_focus="false" width="132" />
17 <button bottom="-60" follows="top|right" font="SansSerif" halign="center" height="20"
18 hidden="false" label="Find" label_selected="Find" left_delta="140"
19 mouse_opaque="true" name="Find" scale_image="TRUE" width="80" />
20 <scroll_list background_visible="true" bottom="-224" column_padding="5" draw_border="true"
21 draw_heading="false" draw_stripes="true" follows="left|top|right"
22 height="160" hidden="false" left="12" mouse_opaque="true"
23 multi_select="false" name="Names" width="220" />
24 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
25 bottom_delta="-24" drop_shadow_visible="true" follows="left|top"
26 font="SansSerifSmall" h_pad="0" halign="left" height="16" hidden="false"
27 left="12" mouse_opaque="true" name="Or select their calling card:" v_pad="0"
28 width="220">
29 Or select a calling card:
30 </text>
31 <inventory_panel allow_multi_select="false" border="true" bottom_delta="-100"
32 follows="left|top|right|bottom" height="100" hidden="false" left="12"
33 mouse_opaque="true" name="Inventory Panel"
34 sort_order="AvatarPickerSortOrder" width="220" />
35 <button bottom_delta="-28" follows="left|bottom" font="SansSerif" halign="center"
36 height="20" hidden="false" label="Select" label_selected="Select" left="12"
37 mouse_opaque="true" name="Select" scale_image="TRUE" width="80" />
38 <button bottom="-376" follows="left|bottom" font="SansSerif" halign="center"
39 height="20" hidden="false" label="Close" label_selected="Close"
40 left_delta="88" mouse_opaque="true" name="Close" scale_image="TRUE"
41 width="80" />
42 <text hidden="true" name="NotFound">
43 &apos;[TEXT]&apos; not found
44 </text>
45</floater> 6</floater>
diff --git a/linden/indra/newview/skins/xui/en-us/panel_avatar.xml b/linden/indra/newview/skins/xui/en-us/panel_avatar.xml
index 1aa8899..f36a380 100644
--- a/linden/indra/newview/skins/xui/en-us/panel_avatar.xml
+++ b/linden/indra/newview/skins/xui/en-us/panel_avatar.xml
@@ -213,7 +213,6 @@
213 width="400" /> 213 width="400" />
214 <text bottom="5" follows="bottom|left|right" left="15" name="status_text" right="-70" 214 <text bottom="5" follows="bottom|left|right" left="15" name="status_text" right="-70"
215 top="25"> 215 top="25">
216 Done
217 </text> 216 </text>
218 </panel> 217 </panel>
219 <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" 218 <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466"
diff --git a/linden/indra/newview/skins/xui/en-us/panel_bars.xml b/linden/indra/newview/skins/xui/en-us/panel_bars.xml
index 8896cd6..93db538 100644
--- a/linden/indra/newview/skins/xui/en-us/panel_bars.xml
+++ b/linden/indra/newview/skins/xui/en-us/panel_bars.xml
@@ -3,9 +3,9 @@
3 <panel name="status" left="0" bottom="040" height="728" width="1024" background_visible="false" auto_resize="true" user_resize="false" mouse_opaque="false" follows="left|right|top|bottom"/> 3 <panel name="status" left="0" bottom="040" height="728" width="1024" background_visible="false" auto_resize="true" user_resize="false" mouse_opaque="false" follows="left|right|top|bottom"/>
4 <layout_stack name="bar_stack" left="0" bottom="0" height="768" width="1024" 4 <layout_stack name="bar_stack" left="0" bottom="0" height="768" width="1024"
5 follows="left|right|bottom|top" mouse_opaque="false" orientation="vertical" border_size="0" use_bounding_rect="true"> 5 follows="left|right|bottom|top" mouse_opaque="false" orientation="vertical" border_size="0" use_bounding_rect="true">
6 <layout_panel name="spacer" left="0" bottom="0" height="768" width="1024" background_visible="false" auto_resize="true" user_resize="false" mouse_opaque="false" follows="left|right|top|bottom"/> 6 <layout_panel name="spacer" left="0" bottom="0" height="768" width="1024" background_visible="false" auto_resize="true" user_resize="false" mouse_opaque="false" follows="left|right|top|bottom"/>
7 <layout_panel name="overlay" width="1024" auto_resize="false" user_resize="false" use_bounding_rect="true"/> 7 <layout_panel name="overlay" width="1024" auto_resize="false" user_resize="false" use_bounding_rect="true"/>
8 <layout_panel name="toolbar" filename="panel_toolbar.xml" width="1024" auto_resize="false" user_resize="false" use_bounding_rect="true"/> 8 <layout_panel name="toolbar" filename="panel_toolbar.xml" width="1024" auto_resize="false" user_resize="false" use_bounding_rect="true"/>
9 </layout_stack> 9 </layout_stack>
10 <panel name="hud" left="0" bottom="50" height="728" width="1024" background_visible="false" auto_resize="true" user_resize="false" mouse_opaque="false" follows="left|right|top|bottom"/> 10 <panel name="hud" left="0" bottom="50" height="728" width="1024" background_visible="false" auto_resize="true" user_resize="false" mouse_opaque="false" follows="left|right|top|bottom"/>
11</panel> 11</panel>
diff --git a/linden/indra/newview/skins/xui/en-us/panel_speaker_controls.xml b/linden/indra/newview/skins/xui/en-us/panel_speaker_controls.xml
index 5d51eed..dd89640 100644
--- a/linden/indra/newview/skins/xui/en-us/panel_speaker_controls.xml
+++ b/linden/indra/newview/skins/xui/en-us/panel_speaker_controls.xml
@@ -18,7 +18,7 @@
18 <scroll_list bottom="78" can_resize="false" column_padding="0" draw_heading="true" 18 <scroll_list bottom="78" can_resize="false" column_padding="0" draw_heading="true"
19 draw_stripes="false" follows="left|top|bottom|right" left="0" 19 draw_stripes="false" follows="left|top|bottom|right" left="0"
20 multi_select="false" name="speakers_list" right="140" search_column="1" 20 multi_select="false" name="speakers_list" right="140" search_column="1"
21 top="120"> 21 top="120" sort_column="2">
22 <column name="icon_speaking_status" sort="speaking_status" width="20" /> 22 <column name="icon_speaking_status" sort="speaking_status" width="20" />
23 <column dynamicwidth="true" label="Name" name="speaker_name" /> 23 <column dynamicwidth="true" label="Name" name="speaker_name" />
24 <column label="" name="speaking_status" width="0" /> 24 <column label="" name="speaking_status" width="0" />