summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-02-19 23:12:34 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-02-19 23:12:34 +0000
commit903292ba6779daabdb25cf22862cef6907a81f3d (patch)
tree3bb0d58e749e70c79cd5adef768aed79228ea487 /indra/newview
parent2e32d44e7165775936beae5d9ef636ff9d3f2bd2 (diff)
merge -r 78989:80279 Branch_1-19-0-Viewer-> release
Changes from 1.19.0.2 and 1.19.0.3 DEV-9226 Some Dazzle? icons have sneaked into the release branch DEV-9226 - lock icon not appearing in properties window for no-modify inventory items DEV-8771 Preferences > Web has truncated text in the Address: section, ported and tested minor xml change DEV-9736 commit 1.19.0 second set of translated xui strings DEV-9825 Make the region info message a passive notification DEV-7714 - Korean viewer crashes on startup. DEV-9759 - Stand up button etc dissapear offscreen after using mouselook DEV-9938 client-readme-voice.txt missing from open source distribution DEV-9436 Changed default SL window size to 1000x700, to allow buttons in UI to have proper labels (Communicate) and search to fit onscreen. DEV-10031 Clicking on another users classifieds ad then closing asks you to save changes DEV-10066 Checking to select a role does not enable the apply button DEV-8809 stray 'Done" on the Profile Web tab DEV-8515 Debug settings overrides do not work for booleans. svn merge -r77376:77377 sl-parcelmedia-3. OK by cg. DEV-10083: Preferences window docks at an offscreen position and cannot be moved vertically DEV-10186 - LLIMPanel kills the framerate for group ims. DEV-10108 Viewer freeze and delay in opening map DEV-10115 Visible flashing of prim highlight when editing DEV-10112 Parcel audio play setting is not remembered when crossing over a parcel with no media DEV-10109 Alt and left/right arrow keys dont move you between tabs DEV-10093 Login Page > SL Release link overlaps Quit when viewer resized DEV-10048 Redocking the Contact list causes the communicate ui to get ugly DEV-8131 Deutsch "System Default" is translated as "System Error" in language preferences DEV-10209 - reverted floater_test.xml to empty floater. DEV-10255 - Clicking on gestures button moves open windows DEV-10046 Pressing escape doesnt cause the chat history or inventory windows to lose focus DEV-10399 -- Update required version of QuickTime library to 7.4.1 for 1.19.0 Viewer DEV-10410 - Toggling voice causes layout problems in toolbar DEV-8562 - Viewer crash just after login DEV-10147 - "LLXmlTree parse failed" with settings_releasecandidate.xml DEV-9874 - Land forsale icon in menubar overlaps pushobject restriction icon DEV-9701 - Upload Animation window: Button missing in Stopped window state DEV-10355 - Client crashes when viewing the proposals tab in group information DEV-10521 My Landmarks dropdown list adds a repetition to EOF every time it's opened DEV-10496 Groups>Proposals>Past Vote text gets chomped DEV-10499 Defaulted buttons in floater dialogs remain highlighted when not in focus DEV-5611 - Crash reporter appears in the background on mac (Changed launch to use open instead of direct binary call) DEV-10704 - Crash reporter not initializing boolean, causing false exec_froze reporting (Added initilizer to constructor)
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/English.lproj/InfoPlist.strings4
-rw-r--r--indra/newview/Info-SecondLife.plist2
-rw-r--r--indra/newview/llappviewer.cpp166
-rw-r--r--indra/newview/llappviewer.h18
-rw-r--r--indra/newview/llappviewermacosx.cpp5
-rw-r--r--indra/newview/llfasttimerview.cpp20
-rw-r--r--indra/newview/llfilepicker.cpp2
-rw-r--r--indra/newview/llfloaterfriends.cpp2
-rw-r--r--indra/newview/llfloaterworldmap.cpp33
-rw-r--r--indra/newview/llgroupmgr.cpp167
-rw-r--r--indra/newview/llgroupmgr.h41
-rw-r--r--indra/newview/llimpanel.cpp6
-rw-r--r--indra/newview/llnamelistctrl.cpp5
-rw-r--r--indra/newview/lloverlaybar.cpp24
-rw-r--r--indra/newview/lloverlaybar.h7
-rw-r--r--indra/newview/llpanelavatar.cpp6
-rw-r--r--indra/newview/llpanelclassified.cpp38
-rw-r--r--indra/newview/llpanelclassified.h1
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp5
-rw-r--r--indra/newview/llpanelgroupgeneral.h2
-rw-r--r--indra/newview/llpanelgroupinvite.cpp6
-rw-r--r--indra/newview/llpanelgrouproles.cpp109
-rw-r--r--indra/newview/llpanelgrouproles.h3
-rw-r--r--indra/newview/llpanellogin.cpp6
-rw-r--r--indra/newview/llselectmgr.cpp19
-rw-r--r--indra/newview/llstartup.cpp6
-rw-r--r--indra/newview/llstatusbar.cpp2
-rw-r--r--indra/newview/lltexturecache.cpp6
-rw-r--r--indra/newview/lltoolbar.cpp4
-rw-r--r--indra/newview/llviewermessage.cpp16
-rw-r--r--indra/newview/llviewerparcelmgr.cpp9
-rw-r--r--indra/newview/llviewerwindow.cpp16
32 files changed, 390 insertions, 366 deletions
diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings
index 8944cb8d81..76c69153c9 100644
--- a/indra/newview/English.lproj/InfoPlist.strings
+++ b/indra/newview/English.lproj/InfoPlist.strings
@@ -1,5 +1,5 @@
/* Localized versions of Info.plist keys */
CFBundleName = "Second Life";
-CFBundleShortVersionString = "Second Life version 1.19.0.0";
-CFBundleGetInfoString = "Second Life version 1.19.0.0, Copyright 2004-2007 Linden Research, Inc.";
+CFBundleShortVersionString = "Second Life version 1.19.0.2";
+CFBundleGetInfoString = "Second Life version 1.19.0.2, Copyright 2004-2007 Linden Research, Inc.";
diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist
index 5956f9bd8d..c93fbe0986 100644
--- a/indra/newview/Info-SecondLife.plist
+++ b/indra/newview/Info-SecondLife.plist
@@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
- <string>1.19.0.0</string>
+ <string>1.19.0.2</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 075a7089de..fe1d93c7bc 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -252,7 +252,7 @@ BOOL gAcceptTOS = FALSE;
BOOL gAcceptCriticalMessage = FALSE;
LLUUID gViewerDigest; // MD5 digest of the viewer's executable file.
-BOOL gLastExecFroze = FALSE;
+eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL;
LLSD gDebugInfo;
@@ -316,6 +316,7 @@ BOOL gRandomizeFramerate = FALSE;
BOOL gPeriodicSlowFrame = FALSE;
BOOL gQAMode = FALSE;
+BOOL gLLErrorActivated = FALSE;
////////////////////////////////////////////////////////////
// Internal globals... that should be removed.
@@ -337,6 +338,9 @@ static LLString gArgs;
static LLString gOldSettingsFileName;
static const char* LEGACY_DEFAULT_SETTINGS_FILE = "settings.ini";
+const char* MARKER_FILE_NAME = "SecondLife.exec_marker";
+const char* ERROR_MARKER_FILE_NAME = "SecondLife.error_marker";
+const char* LLERROR_MARKER_FILE_NAME = "SecondLife.llerror_marker";
static BOOL gDoDisconnect = FALSE;
static LLString gLaunchFileOnQuit;
@@ -923,7 +927,6 @@ LLTextureFetch* LLAppViewer::sTextureFetch = NULL;
LLAppViewer::LLAppViewer() :
mMarkerFile(NULL),
- mLastExecFroze(false),
mCrashBehavior(CRASH_BEHAVIOR_ASK),
mReportedCrash(false),
mNumSessions(0),
@@ -1912,6 +1915,10 @@ void errorCallback(const std::string &error_string)
#ifndef LL_RELEASE_FOR_DOWNLOAD
OSMessageBox(error_string.c_str(), "Fatal Error", OSMB_OK);
#endif
+
+ //Set the ErrorActivated global so we know to create a marker file
+ gLLErrorActivated = true;
+
LLError::crashAndLoop(error_string);
}
@@ -2092,7 +2099,7 @@ bool LLAppViewer::initConfiguration()
initMarkerFile();
#if LL_SEND_CRASH_REPORTS
- if (gLastExecFroze)
+ if (gLastExecEvent == LAST_EXEC_FROZE)
{
llinfos << "Last execution froze, requesting to send crash report." << llendl;
//
@@ -2112,25 +2119,19 @@ bool LLAppViewer::initConfiguration()
{
llinfos << "Sending crash report." << llendl;
- removeMarkerFile();
#if LL_WINDOWS
std::string exe_path = gDirUtilp->getAppRODataDir();
exe_path += gDirUtilp->getDirDelimiter();
exe_path += "win_crash_logger.exe";
- std::string arg_string = "-previous -user ";
- arg_string += gGridName;
- arg_string += " -name \"";
- arg_string += gSecondLife;
- arg_string += "\"";
+ std::string arg_string = "-previous ";
// Spawn crash logger.
// NEEDS to wait until completion, otherwise log files will get smashed.
_spawnl(_P_WAIT, exe_path.c_str(), exe_path.c_str(), arg_string.c_str(), NULL);
#elif LL_DARWIN
std::string command_str;
command_str = "crashreporter.app/Contents/MacOS/crashreporter ";
- command_str += "-previous -user ";
- command_str += gGridName;
+ command_str += "-previous";
// XXX -- We need to exit fullscreen mode for this to work.
// XXX -- system() also doesn't wait for completion. Hmm...
system(command_str.c_str()); /* Flawfinder: Ignore */
@@ -2145,10 +2146,6 @@ bool LLAppViewer::initConfiguration()
char* const cmdargv[] =
{(char*)cmd.c_str(),
(char*)"-previous",
- (char*)"-user",
- (char*)gGridName,
- (char*)"-name",
- (char*)gSecondLife.c_str(),
NULL};
pid_t pid = fork();
if (pid == 0)
@@ -2476,6 +2473,27 @@ void LLAppViewer::handleViewerCrash()
gDebugInfo["CurrentPath"] = gDirUtilp->getCurPath().c_str();
gDebugInfo["CurrentSimHost"] = gAgent.getRegionHost().getHostName();
+ //Write out the crash status file
+ //Use marker file style setup, as that's the simplest, especially since
+ //we're already in a crash situation
+ if (gDirUtilp)
+ {
+ LLString crash_file_name;
+ if(gLLErrorActivated) crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LLERROR_MARKER_FILE_NAME);
+ else crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME);
+ llinfos << "Creating crash marker file " << crash_file_name << llendl;
+ apr_file_t* crash_file = ll_apr_file_open(crash_file_name, LL_APR_W);
+ if (crash_file)
+ {
+ llinfos << "Created crash marker file " << crash_file_name << llendl;
+ }
+ else
+ {
+ llwarns << "Cannot create error marker file " << crash_file_name << llendl;
+ }
+ apr_file_close(crash_file);
+ }
+
if (gMessageSystem && gDirUtilp)
{
std::string filename;
@@ -2502,6 +2520,9 @@ void LLAppViewer::handleViewerCrash()
pApp->closeDebug();
LLError::logToFile("");
+ // Remove the marker file, since otherwise we'll spawn a process that'll keep it locked
+ pApp->removeMarkerFile();
+
// Call to pure virtual, handled by platform specifc llappviewer instance.
pApp->handleCrashReporting();
@@ -2519,7 +2540,7 @@ bool LLAppViewer::anotherInstanceRunning()
// We create a marker file when the program starts and remove the file when it finishes.
// If the file is currently locked, that means another process is already running.
- std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.exec_marker");
+ std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, MARKER_FILE_NAME);
llinfos << "Checking marker file for lock..." << llendl;
// If file doesn't exist, we create it
@@ -2557,71 +2578,69 @@ bool LLAppViewer::anotherInstanceRunning()
void LLAppViewer::initMarkerFile()
{
- // *FIX:Mani - an actually cross platform LLFile lib would be nice.
-
-#if LL_SOLARIS
- struct flock fl;
- fl.l_whence = SEEK_SET;
- fl.l_start = 0;
- fl.l_len = 1;
-#endif
- // We create a marker file when the program starts and remove the file when it finishes.
- // If the file is currently locked, that means another process is already running.
- // If the file exists and isn't locked, we crashed on the last run.
- std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.exec_marker");
+ //First, check for the existence of other files.
+ //There are marker files for two different types of crashes
+
+ mMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,MARKER_FILE_NAME);
llinfos << "Checking marker file for lock..." << llendl;
- FILE* fMarker = LLFile::fopen(marker_file.c_str(), "rb"); // Flawfinder: ignore
+ //We've got 4 things to test for here
+ // - Other Process Running (SecondLife.exec_marker present, locked)
+ // - Freeze (SecondLife.exec_marker present, not locked)
+ // - LLError Crash (SecondLife.llerror_marker present)
+ // - Other Crash (SecondLife.error_marker present)
+ // These checks should also remove these files for the last 2 cases if they currently exist
+
+ //LLError/Error checks. Only one of these should ever happen at a time.
+ LLString llerror_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LLERROR_MARKER_FILE_NAME);
+ LLString error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME);
+ apr_file_t* fMarker = ll_apr_file_open(llerror_marker_file, LL_APR_RB);
+ if(fMarker != NULL)
+ {
+ apr_file_close(fMarker);
+ llinfos << "Last exec LLError crashed, setting LastExecEvent to " << LAST_EXEC_LLERROR_CRASH << llendl;
+ gLastExecEvent = LAST_EXEC_LLERROR_CRASH;
+ }
+
+ fMarker = ll_apr_file_open(error_marker_file, LL_APR_RB);
+ if(fMarker != NULL)
+ {
+ apr_file_close(fMarker);
+ llinfos << "Last exec crashed, setting LastExecEvent to " << LAST_EXEC_OTHER_CRASH << llendl;
+ gLastExecEvent = LAST_EXEC_OTHER_CRASH;
+ }
+
+ ll_apr_file_remove(llerror_marker_file);
+ ll_apr_file_remove(error_marker_file);
+
+ //Freeze case checks
+ fMarker = ll_apr_file_open(mMarkerFileName, LL_APR_RB);
if (fMarker != NULL)
{
// File exists, try opening with write permissions
- fclose(fMarker);
- fMarker = LLFile::fopen(marker_file.c_str(), "wb"); // Flawfinder: ignxore
+ apr_file_close(fMarker);
+ fMarker = ll_apr_file_open(mMarkerFileName, LL_APR_WB);
if (fMarker == NULL)
{
// Another instance is running. Skip the rest of these operations.
llinfos << "Marker file is locked." << llendl;
return;
}
-#if LL_DARWIN || LL_LINUX || LL_SOLARIS
- // Try to lock it. On Mac, this is the only way to test if it's actually locked.
- if (flock(fileno(fMarker), LOCK_EX | LOCK_NB) == -1)
+ if (apr_file_lock(fMarker, APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS) //flock(fileno(fMarker), LOCK_EX | LOCK_NB) == -1)
{
- // Lock failed - somebody else has it.
- fclose(fMarker);
+ apr_file_close(fMarker);
llinfos << "Marker file is locked." << llendl;
return;
}
-#endif
-
// No other instances; we'll lock this file now & delete on quit.
- fclose(fMarker);
- gLastExecFroze = TRUE;
+ apr_file_close(fMarker);
+ gLastExecEvent = LAST_EXEC_FROZE;
llinfos << "Exec marker found: program froze on previous execution" << llendl;
}
// Create the marker file for this execution & lock it
-// FILE *fp_executing_marker;
-#if LL_WINDOWS
- mMarkerFile = LLFile::_fsopen(marker_file.c_str(), "w", _SH_DENYWR);
-#else
- mMarkerFile = LLFile::fopen(marker_file.c_str(), "w"); // Flawfinder: ignore
- if (mMarkerFile)
- {
- int fd = fileno(mMarkerFile);
- // Attempt to lock
-#if LL_SOLARIS
- fl.l_type = F_WRLCK;
- if (fcntl(fd, F_SETLK, &fl) == -1)
-#else
- if (flock(fd, LOCK_EX | LOCK_NB) == -1)
-#endif
- {
- llinfos << "Failed to lock file." << llendl;
- }
- }
-#endif
+ mMarkerFile = ll_apr_file_open(mMarkerFileName, LL_APR_W);
if (mMarkerFile)
{
llinfos << "Marker file created." << llendl;
@@ -2630,20 +2649,14 @@ void LLAppViewer::initMarkerFile()
{
llinfos << "Failed to create marker file." << llendl;
}
+ if (apr_file_lock(mMarkerFile, APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS)
+ {
+ apr_file_close(mMarkerFile);
+ llinfos << "Marker file cannot be locked." << llendl;
+ return;
+ }
-#if LL_WINDOWS
- // Clean up SecondLife.dmp files, to avoid confusion
- llinfos << "Removing SecondLife.dmp" << llendl;
- std::string dmp_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.dmp");
- LLFile::remove(dmp_filename.c_str());
-#endif
-
- // This is to keep the crash reporter from constantly sending stale message logs
- // We wipe the message file now.
- llinfos << "Removing message.log" << llendl;
- std::string message_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "message.log");
- LLFile::remove(message_filename.c_str());
-
+ llinfos << "Marker file locked." << llendl;
llinfos << "Exiting initMarkerFile()." << llendl;
}
@@ -2652,14 +2665,9 @@ void LLAppViewer::removeMarkerFile()
llinfos << "removeMarkerFile()" << llendl;
if (mMarkerFile != NULL)
{
- fclose(mMarkerFile);
+ ll_apr_file_remove( mMarkerFileName );
mMarkerFile = NULL;
}
- if( gDirUtilp )
- {
- LLString marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.exec_marker");
- ll_apr_file_remove( marker_file );
- }
}
void LLAppViewer::forceQuit()
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 32501b4642..9518636f87 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -115,6 +115,8 @@ public:
bool isInProductionGrid();
+ void removeMarkerFile();
+
// LLAppViewer testing helpers.
// *NOTE: These will potentially crash the viewer. Only for debugging.
virtual void forceErrorLLError();
@@ -148,7 +150,6 @@ private:
bool anotherInstanceRunning();
void initMarkerFile();
- void removeMarkerFile();
void idle();
void idleShutdown();
@@ -163,8 +164,8 @@ private:
bool mSecondInstance; // Is this a second instance of the app?
- FILE *mMarkerFile; // A file created to indicate the app is running.
- bool mLastExecFroze; // Set on init if the marker file was found.
+ LLString mMarkerFileName;
+ apr_file_t* mMarkerFile; // A file created to indicate the app is running.
LLOSInfo mSysOSInfo;
S32 mCrashBehavior;
@@ -224,7 +225,16 @@ extern BOOL gAcceptTOS;
extern BOOL gAcceptCriticalMessage;
extern LLUUID gViewerDigest; // MD5 digest of the viewer's executable file.
-extern BOOL gLastExecFroze; // llstartup
+
+typedef enum
+{
+ LAST_EXEC_NORMAL = 0,
+ LAST_EXEC_FROZE,
+ LAST_EXEC_LLERROR_CRASH,
+ LAST_EXEC_OTHER_CRASH
+} eLastExecEvent;
+
+extern eLastExecEvent gLastExecEvent; // llstartup
extern U32 gFrameCount;
extern U32 gForegroundFrameCount;
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 11605ecf73..2d7091a075 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -112,10 +112,7 @@ void LLAppViewerMacOSX::handleCrashReporting()
{
// Macintosh
LLString command_str;
- command_str = "crashreporter.app/Contents/MacOS/crashreporter ";
- command_str += "-user ";
- command_str += gGridName;
- command_str += " &"; // This backgrounds the command so system() doesn't block until the crashreporter exits.
+ command_str = "open crashreporter.app";
system(command_str.c_str()); /* Flawfinder: ignore */
// Sometimes signals don't seem to quit the viewer.
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 654c33bb93..7c1ec514e5 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -76,7 +76,9 @@ static LLColor4 green9(0.6f, 1.0f, 0.6f, 1.0f);
static struct ft_display_info ft_display_table[] =
{
{ LLFastTimer::FTM_FRAME, "Frame", &LLColor4::white, 0 },
- { LLFastTimer::FTM_MESSAGES, " Messages", &LLColor4::grey1, 0 },
+ { LLFastTimer::FTM_MESSAGES, " System Messages", &LLColor4::grey1, 1 },
+ { LLFastTimer::FTM_MOUSEHANDLER, " Mouse", &LLColor4::grey1, 0 },
+ { LLFastTimer::FTM_KEYHANDLER, " Keyboard", &LLColor4::grey1, 0 },
{ LLFastTimer::FTM_SLEEP, " Sleep", &LLColor4::grey2, 0 },
{ LLFastTimer::FTM_IDLE, " Idle", &blue0, 0 },
{ LLFastTimer::FTM_PUMP, " Pump", &LLColor4::magenta2, 1 },
@@ -184,14 +186,14 @@ static struct ft_display_info ft_display_table[] =
{ LLFastTimer::FTM_SWAP, " Swap", &LLColor4::pink1, 0 },
{ LLFastTimer::FTM_CLIENT_COPY, " Client Copy", &LLColor4::red1, 1},
-// { LLFastTimer::FTM_TEMP1, " Temp1", &LLColor4::red1, 0 },
-// { LLFastTimer::FTM_TEMP2, " Temp2", &LLColor4::magenta1, 0 },
-// { LLFastTimer::FTM_TEMP3, " Temp3", &LLColor4::red2, 0 },
-// { LLFastTimer::FTM_TEMP4, " Temp4", &LLColor4::magenta2, 0 },
-// { LLFastTimer::FTM_TEMP5, " Temp5", &LLColor4::red3, 0 },
-// { LLFastTimer::FTM_TEMP6, " Temp6", &LLColor4::magenta3, 0 },
-// { LLFastTimer::FTM_TEMP7, " Temp7", &LLColor4::red4, 0 },
-// { LLFastTimer::FTM_TEMP8, " Temp8", &LLColor4::magenta4, 0 },
+ { LLFastTimer::FTM_TEMP1, " Temp1", &LLColor4::red1, 0 },
+ { LLFastTimer::FTM_TEMP2, " Temp2", &LLColor4::magenta1, 0 },
+ { LLFastTimer::FTM_TEMP3, " Temp3", &LLColor4::red2, 0 },
+ { LLFastTimer::FTM_TEMP4, " Temp4", &LLColor4::magenta2, 0 },
+ { LLFastTimer::FTM_TEMP5, " Temp5", &LLColor4::red3, 0 },
+ { LLFastTimer::FTM_TEMP6, " Temp6", &LLColor4::magenta3, 0 },
+ { LLFastTimer::FTM_TEMP7, " Temp7", &LLColor4::red4, 0 },
+ { LLFastTimer::FTM_TEMP8, " Temp8", &LLColor4::magenta4, 0 },
{ LLFastTimer::FTM_OTHER, " Other", &red0 }
};
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index 5fd0c4ca06..0108ac205e 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -1036,7 +1036,7 @@ GtkWindow* LLFilePicker::buildFilePicker(bool is_save, bool is_folder,
GTK_STOCK_SAVE :
GTK_STOCK_OPEN),
GTK_RESPONSE_ACCEPT,
- NULL);
+ (gchar *)NULL);
mStoreFilenames.win = win;
mStoreFilenames.contextName = context;
diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp
index 30326dc496..f5942cfbdd 100644
--- a/indra/newview/llfloaterfriends.cpp
+++ b/indra/newview/llfloaterfriends.cpp
@@ -344,7 +344,7 @@ void LLPanelFriends::refreshRightsChangeList()
struct SortFriendsByID
{
- bool SortFriendsByID::operator() (const LLScrollListItem* const a, const LLScrollListItem* const b) const
+ bool operator() (const LLScrollListItem* const a, const LLScrollListItem* const b) const
{
return a->getValue().asUUID() < b->getValue().asUUID();
}
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 9da923e739..1344b6ef22 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -832,15 +832,17 @@ void LLFloaterWorldMap::friendsChanged()
void LLFloaterWorldMap::buildAvatarIDList()
{
LLCtrlListInterface *list = childGetListInterface("friend combo");
- if (!list) return;
-
+ if (!list)
+ {
+ return;
+ }
+
// Delete all but the "None" entry
S32 list_size = list->getItemCount();
- while (list_size > 1)
+ if (list_size > 1)
{
- list->selectNthItem(1);
+ list->selectItemRange(1, -1);
list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
- --list_size;
}
LLSD default_column;
@@ -852,11 +854,9 @@ void LLFloaterWorldMap::buildAvatarIDList()
// Get all of the calling cards for avatar that are currently online
LLCollectMappableBuddies collector;
LLAvatarTracker::instance().applyFunctor(collector);
- LLCollectMappableBuddies::buddy_map_t::iterator it;
- LLCollectMappableBuddies::buddy_map_t::iterator end;
- it = collector.mMappable.begin();
- end = collector.mMappable.end();
- for( ; it != end; ++it)
+
+ for (LLCollectMappableBuddies::buddy_map_t::iterator it = collector.mMappable.begin();
+ it != collector.mMappable.end(); ++it)
{
list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second);
}
@@ -869,15 +869,17 @@ void LLFloaterWorldMap::buildAvatarIDList()
void LLFloaterWorldMap::buildLandmarkIDLists()
{
LLCtrlListInterface *list = childGetListInterface("landmark combo");
- if (!list) return;
+ if (!list)
+ {
+ return;
+ }
// Delete all but the "None" entry
S32 list_size = list->getItemCount();
- while (list_size > 1)
+ if (list_size > 1)
{
- list->selectNthItem(1);
+ list->selectItemRange(1, -1);
list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
- --list_size;
}
mLandmarkItemIDList.reset();
@@ -898,6 +900,7 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
items,
LLInventoryModel::EXCLUDE_TRASH,
is_landmark);
+
std::sort(items.begin(), items.end(), LLViewerInventoryItem::comparePointers());
S32 count = items.count();
@@ -910,7 +913,9 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
mLandmarkAssetIDList.put( item->getAssetUUID() );
mLandmarkItemIDList.put( item->getUUID() );
}
+
list->sortByColumn("landmark name", TRUE);
+
list->selectFirstItem();
}
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 82a42a18b5..bb6abcd95b 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -96,16 +96,16 @@ LLGroupMemberData::~LLGroupMemberData()
void LLGroupMemberData::addRole(const LLUUID& role, LLGroupRoleData* rd)
{
- mRoles[role] = rd;
+ mRolesList[role] = rd;
}
bool LLGroupMemberData::removeRole(const LLUUID& role)
{
- std::map<LLUUID,LLGroupRoleData*>::iterator it = mRoles.find(role);
+ role_list_t::iterator it = mRolesList.find(role);
- if (it != mRoles.end())
+ if (it != mRolesList.end())
{
- mRoles.erase(it);
+ mRolesList.erase(it);
return true;
}
@@ -233,7 +233,7 @@ LLGroupMgrGroupData::LLGroupMgrGroupData(const LLUUID& id) :
BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_data)
{
- std::map<LLUUID,LLRoleData>::const_iterator it;
+ role_data_map_t::const_iterator it;
// Do we have changes for it?
it = mRoleChanges.find(role_id);
@@ -246,7 +246,7 @@ BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_da
}
// Ok, no changes, hasn't been deleted, isn't a new role, just find the role.
- role_list::const_iterator rit = mRoles.find(role_id);
+ role_list_t::const_iterator rit = mRoles.find(role_id);
if (rit != mRoles.end())
{
role_data = (*rit).second->getRoleData();
@@ -261,7 +261,7 @@ BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_da
void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_data)
{
// If this is a newly created group, we need to change the data in the created list.
- std::map<LLUUID,LLRoleData>::iterator it;
+ role_data_map_t::iterator it;
it = mRoleChanges.find(role_id);
if (it != mRoleChanges.end())
{
@@ -280,7 +280,7 @@ void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_dat
// Not a new role, so put it in the changes list.
LLRoleData old_role_data;
- role_iter rit = mRoles.find(role_id);
+ role_list_t::iterator rit = mRoles.find(role_id);
if (rit != mRoles.end())
{
bool data_change = ( ((*rit).second->mRoleData.mRoleDescription != role_data.mRoleDescription)
@@ -337,7 +337,7 @@ void LLGroupMgrGroupData::createRole(const LLUUID& role_id, LLRoleData role_data
void LLGroupMgrGroupData::deleteRole(const LLUUID& role_id)
{
- std::map<LLUUID,LLRoleData>::iterator it;
+ role_data_map_t::iterator it;
// If this was a new role, just discard it.
it = mRoleChanges.find(role_id);
@@ -404,7 +404,7 @@ void LLGroupMgrGroupData::removeData()
void LLGroupMgrGroupData::removeMemberData()
{
- for (member_iter mi = mMembers.begin(); mi != mMembers.end(); ++mi)
+ for (member_list_t::iterator mi = mMembers.begin(); mi != mMembers.end(); ++mi)
{
delete mi->second;
}
@@ -414,7 +414,7 @@ void LLGroupMgrGroupData::removeMemberData()
void LLGroupMgrGroupData::removeRoleData()
{
- for (member_iter mi = mMembers.begin(); mi != mMembers.end(); ++mi)
+ for (member_list_t::iterator mi = mMembers.begin(); mi != mMembers.end(); ++mi)
{
LLGroupMemberData* data = mi->second;
if (data)
@@ -423,7 +423,7 @@ void LLGroupMgrGroupData::removeRoleData()
}
}
- for (role_iter ri = mRoles.begin(); ri != mRoles.end(); ++ri)
+ for (role_list_t::iterator ri = mRoles.begin(); ri != mRoles.end(); ++ri)
{
LLGroupRoleData* data = ri->second;
delete data;
@@ -436,7 +436,7 @@ void LLGroupMgrGroupData::removeRoleData()
void LLGroupMgrGroupData::removeRoleMemberData()
{
- for (member_iter mi = mMembers.begin(); mi != mMembers.end(); ++mi)
+ for (member_list_t::iterator mi = mMembers.begin(); mi != mMembers.end(); ++mi)
{
LLGroupMemberData* data = mi->second;
if (data)
@@ -445,7 +445,7 @@ void LLGroupMgrGroupData::removeRoleMemberData()
}
}
- for (role_iter ri = mRoles.begin(); ri != mRoles.end(); ++ri)
+ for (role_list_t::iterator ri = mRoles.begin(); ri != mRoles.end(); ++ri)
{
LLGroupRoleData* data = ri->second;
if (data)
@@ -467,8 +467,8 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
const LLUUID& member_id,
LLRoleMemberChangeType rmc)
{
- role_iter ri = mRoles.find(role_id);
- member_iter mi = mMembers.find(member_id);
+ role_list_t::iterator ri = mRoles.find(role_id);
+ member_list_t::iterator mi = mMembers.find(member_id);
if (ri == mRoles.end()
|| mi == mMembers.end() )
@@ -511,7 +511,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id,
role_member.first = role_id;
role_member.second = member_id;
- change_map::iterator it = mRoleMemberChanges.find(role_member);
+ change_map_t::iterator it = mRoleMemberChanges.find(role_member);
if (it != mRoleMemberChanges.end())
{
// There was already a role change for this role_member
@@ -554,18 +554,15 @@ void LLGroupMgrGroupData::recalcAllAgentPowers()
{
LLGroupMemberData* gmd;
- member_iter mit = mMembers.begin();
- member_iter mend = mMembers.end();
- for( ; mit != mend; ++mit)
+ for (member_list_t::iterator mit = mMembers.begin();
+ mit != mMembers.end(); ++mit)
{
gmd = mit->second;
if (!gmd) continue;
- std::map<LLUUID,LLGroupRoleData*>::iterator it = gmd->mRoles.begin();
- std::map<LLUUID,LLGroupRoleData*>::iterator end = gmd->mRoles.end();
-
gmd->mAgentPowers = 0;
- for ( ; it != end; ++it)
+ for (LLGroupMemberData::role_list_t::iterator it = gmd->mRolesList.begin();
+ it != gmd->mRolesList.end(); ++it)
{
LLGroupRoleData* grd = (*it).second;
if (!grd) continue;
@@ -577,18 +574,16 @@ void LLGroupMgrGroupData::recalcAllAgentPowers()
void LLGroupMgrGroupData::recalcAgentPowers(const LLUUID& agent_id)
{
- member_iter mi = mMembers.find(agent_id);
+ member_list_t::iterator mi = mMembers.find(agent_id);
if (mi == mMembers.end()) return;
LLGroupMemberData* gmd = mi->second;
if (!gmd) return;
- std::map<LLUUID,LLGroupRoleData*>::iterator it = gmd->mRoles.begin();
- std::map<LLUUID,LLGroupRoleData*>::iterator end = gmd->mRoles.end();
-
gmd->mAgentPowers = 0;
- for ( ; it != end; ++it)
+ for (LLGroupMemberData::role_list_t::iterator it = gmd->mRolesList.begin();
+ it != gmd->mRolesList.end(); ++it)
{
LLGroupRoleData* grd = (*it).second;
if (!grd) continue;
@@ -633,10 +628,8 @@ bool packRoleUpdateMessageBlock(LLMessageSystem* msg,
void LLGroupMgrGroupData::sendRoleChanges()
{
// Commit changes locally
- std::map<LLUUID,LLRoleData>::iterator it;
- std::map<LLUUID,LLRoleData>::iterator end;
LLGroupRoleData* grd;
- role_iter role_it;
+ role_list_t::iterator role_it;
LLMessageSystem* msg = gMessageSystem;
bool start_message = true;
@@ -645,16 +638,15 @@ void LLGroupMgrGroupData::sendRoleChanges()
bool need_power_recalc = false;
// Apply all changes
- it = mRoleChanges.begin();
- end = mRoleChanges.end();
- for ( ; it != end; ++it)
+ for (role_data_map_t::iterator iter = mRoleChanges.begin();
+ iter != mRoleChanges.end(); )
{
+ role_data_map_t::iterator it = iter++; // safely incrament iter
const LLUUID& role_id = (*it).first;
const LLRoleData& role_data = (*it).second;
// Commit to local data set
role_it = mRoles.find((*it).first);
- LLGroupRoleData* group_role_data = (*role_it).second;
if ( (mRoles.end() == role_it
&& RC_CREATE != role_data.mChangeType)
|| (mRoles.end() != role_it
@@ -662,11 +654,13 @@ void LLGroupMgrGroupData::sendRoleChanges()
{
continue;
}
-
+
+ // NOTE: role_it is valid EXCEPT for the RC_CREATE case
switch (role_data.mChangeType)
{
case RC_CREATE:
{
+ // NOTE: role_it is NOT valid in this case
grd = new LLGroupRoleData(role_id, role_data, 0);
mRoles[role_id] = grd;
need_role_data = true;
@@ -674,6 +668,7 @@ void LLGroupMgrGroupData::sendRoleChanges()
}
case RC_DELETE:
{
+ LLGroupRoleData* group_role_data = (*role_it).second;
delete group_role_data;
mRoles.erase(role_it);
need_role_cleanup = true;
@@ -686,7 +681,8 @@ void LLGroupMgrGroupData::sendRoleChanges()
case RC_UPDATE_DATA:
default:
{
- group_role_data->setRoleData(role_data);
+ LLGroupRoleData* group_role_data = (*role_it).second;
+ group_role_data->setRoleData(role_data); // NOTE! might modify mRoleChanges!
break;
}
}
@@ -751,7 +747,7 @@ void LLGroupMgr::clearGroups()
void LLGroupMgr::clearGroupData(const LLUUID& group_id)
{
- std::map<LLUUID, LLGroupMgrGroupData*>::iterator iter = mGroups.find(group_id);
+ group_map_t::iterator iter = mGroups.find(group_id);
if (iter != mGroups.end())
{
delete (*iter).second;
@@ -770,7 +766,7 @@ void LLGroupMgr::removeObserver(LLGroupMgrObserver* observer)
{
return;
}
- observer_iter it;
+ observer_multimap_t::iterator it;
it = mObservers.find(observer->getID());
while (it != mObservers.end())
{
@@ -788,7 +784,7 @@ void LLGroupMgr::removeObserver(LLGroupMgrObserver* observer)
LLGroupMgrGroupData* LLGroupMgr::getGroupData(const LLUUID& id)
{
- group_iter gi = mGroups.find(id);
+ group_map_t::iterator gi = mGroups.find(id);
if (gi != mGroups.end())
{
@@ -800,7 +796,7 @@ LLGroupMgrGroupData* LLGroupMgr::getGroupData(const LLUUID& id)
// static
void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
{
- llinfos << "LLGroupMgr::processGroupMembersReply" << llendl;
+ lldebugs << "LLGroupMgr::processGroupMembersReply" << llendl;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
@@ -854,7 +850,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
std::string(online_status),
is_owner);
#if LL_DEBUG
- LLGroupMgrGroupData::member_iter mit = group_datap->mMembers.find(member_id);
+ LLGroupMgrGroupData::member_list_t::iterator mit = group_datap->mMembers.find(member_id);
if (mit != group_datap->mMembers.end())
{
llinfos << " *** Received duplicate member data for agent " << member_id << llendl;
@@ -894,7 +890,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
//static
void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
{
- llinfos << "LLGroupMgr::processGroupPropertiesReply" << llendl;
+ lldebugs << "LLGroupMgr::processGroupPropertiesReply" << llendl;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
@@ -961,7 +957,7 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
// static
void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
{
- llinfos << "LLGroupMgr::processGroupRoleDataReply" << llendl;
+ lldebugs << "LLGroupMgr::processGroupRoleDataReply" << llendl;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
@@ -1028,7 +1024,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
// static
void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
{
- llinfos << "LLGroupMgr::processGroupRoleMembersReply" << llendl;
+ lldebugs << "LLGroupMgr::processGroupRoleMembersReply" << llendl;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
@@ -1061,8 +1057,8 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
LLGroupRoleData* rd = NULL;
LLGroupMemberData* md = NULL;
- LLGroupMgrGroupData::role_iter ri;
- LLGroupMgrGroupData::member_iter mi;
+ LLGroupMgrGroupData::role_list_t::iterator ri;
+ LLGroupMgrGroupData::member_list_t::iterator mi;
// If total_pairs == 0, there are no members in any custom roles.
if (total_pairs > 0)
@@ -1115,9 +1111,8 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
}
else
{
- LLGroupMgrGroupData::member_iter mi = group_data->mMembers.begin();
- LLGroupMgrGroupData::member_iter end = group_data->mMembers.end();
- for ( ; mi != end; ++mi)
+ for (LLGroupMgrGroupData::member_list_t::iterator mi = group_data->mMembers.begin();
+ mi != group_data->mMembers.end(); ++mi)
{
LLGroupMemberData* data = mi->second;
if (data)
@@ -1138,7 +1133,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
// static
void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
{
- llinfos << "LLGroupMgr::processGroupTitlesReply" << llendl;
+ lldebugs << "LLGroupMgr::processGroupTitlesReply" << llendl;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
@@ -1188,7 +1183,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
// static
void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data)
{
- llinfos << "processEjectGroupMemberReply" << llendl;
+ lldebugs << "processEjectGroupMemberReply" << llendl;
LLUUID group_id;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
BOOL success;
@@ -1204,7 +1199,7 @@ void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data
// static
void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data)
{
- llinfos << "processJoinGroupReply" << llendl;
+ lldebugs << "processJoinGroupReply" << llendl;
LLUUID group_id;
BOOL success;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
@@ -1226,7 +1221,7 @@ void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data)
// static
void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data)
{
- llinfos << "processLeaveGroupReply" << llendl;
+ lldebugs << "processLeaveGroupReply" << llendl;
LLUUID group_id;
BOOL success;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id);
@@ -1291,7 +1286,7 @@ LLGroupMgrGroupData* LLGroupMgr::createGroupData(const LLUUID& id)
{
LLGroupMgrGroupData* group_datap;
- group_iter existing_group = gGroupMgr->mGroups.find(id);
+ group_map_t::iterator existing_group = gGroupMgr->mGroups.find(id);
if (existing_group == gGroupMgr->mGroups.end())
{
group_datap = new LLGroupMgrGroupData(id);
@@ -1307,12 +1302,12 @@ LLGroupMgrGroupData* LLGroupMgr::createGroupData(const LLUUID& id)
void LLGroupMgr::notifyObservers(LLGroupChange gc)
{
- for (group_iter gi = mGroups.begin(); gi != mGroups.end(); ++gi)
+ for (group_map_t::iterator gi = mGroups.begin(); gi != mGroups.end(); ++gi)
{
if (gi->second->mChanged)
{
// find all observers for this group id
- observer_iter oi = mObservers.find(gi->first);
+ observer_multimap_t::iterator oi = mObservers.find(gi->first);
for (; oi != mObservers.end(); ++oi)
{
oi->second->changed(gc);
@@ -1327,9 +1322,9 @@ void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
if (mGroups.size() > MAX_CACHED_GROUPS)
{
// get rid of groups that aren't observed
- for (group_iter gi = mGroups.begin(); gi != mGroups.end() && mGroups.size() > MAX_CACHED_GROUPS / 2; )
+ for (group_map_t::iterator gi = mGroups.begin(); gi != mGroups.end() && mGroups.size() > MAX_CACHED_GROUPS / 2; )
{
- observer_iter oi = mObservers.find(gi->first);
+ observer_multimap_t::iterator oi = mObservers.find(gi->first);
if (oi == mObservers.end())
{
// not observed
@@ -1349,7 +1344,7 @@ void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id)
{
- llinfos << "LLGroupMgr::sendGroupPropertiesRequest" << llendl;
+ lldebugs << "LLGroupMgr::sendGroupPropertiesRequest" << llendl;
// This will happen when we get the reply
//LLGroupMgrGroupData* group_datap = createGroupData(group_id);
@@ -1365,7 +1360,7 @@ void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id)
void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id)
{
- llinfos << "LLGroupMgr::sendGroupMembersRequest" << llendl;
+ lldebugs << "LLGroupMgr::sendGroupMembersRequest" << llendl;
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
if (group_datap->mMemberRequestID.isNull())
{
@@ -1386,7 +1381,7 @@ void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id)
void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id)
{
- llinfos << "LLGroupMgr::sendGroupRoleDataRequest" << llendl;
+ lldebugs << "LLGroupMgr::sendGroupRoleDataRequest" << llendl;
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
if (group_datap->mRoleDataRequestID.isNull())
{
@@ -1407,7 +1402,7 @@ void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id)
void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id)
{
- llinfos << "LLGroupMgr::sendGroupRoleMembersRequest" << llendl;
+ lldebugs << "LLGroupMgr::sendGroupRoleMembersRequest" << llendl;
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
if (group_datap->mRoleMembersRequestID.isNull())
@@ -1441,7 +1436,7 @@ void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id)
void LLGroupMgr::sendGroupTitlesRequest(const LLUUID& group_id)
{
- llinfos << "LLGroupMgr::sendGroupTitlesRequest" << llendl;
+ lldebugs << "LLGroupMgr::sendGroupTitlesRequest" << llendl;
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
group_datap->mTitles.clear();
@@ -1460,7 +1455,7 @@ void LLGroupMgr::sendGroupTitlesRequest(const LLUUID& group_id)
void LLGroupMgr::sendGroupTitleUpdate(const LLUUID& group_id, const LLUUID& title_role_id)
{
- llinfos << "LLGroupMgr::sendGroupTitleUpdate" << llendl;
+ lldebugs << "LLGroupMgr::sendGroupTitleUpdate" << llendl;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("GroupTitleUpdate");
@@ -1474,10 +1469,8 @@ void LLGroupMgr::sendGroupTitleUpdate(const LLUUID& group_id, const LLUUID& titl
// Save the change locally
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
- std::vector<LLGroupTitle>::iterator iter = group_datap->mTitles.begin();
- std::vector<LLGroupTitle>::iterator end = group_datap->mTitles.end();
-
- for ( ; iter != end; ++iter)
+ for (std::vector<LLGroupTitle>::iterator iter = group_datap->mTitles.begin();
+ iter != group_datap->mTitles.end(); ++iter)
{
if (iter->mRoleID == title_role_id)
{
@@ -1521,7 +1514,7 @@ void LLGroupMgr::sendCreateGroupRequest(const std::string& name,
void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id)
{
- llinfos << "LLGroupMgr::sendUpdateGroupInfo" << llendl;
+ lldebugs << "LLGroupMgr::sendUpdateGroupInfo" << llendl;
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
LLMessageSystem* msg = gMessageSystem;
@@ -1550,18 +1543,16 @@ void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id)
void LLGroupMgr::sendGroupRoleMemberChanges(const LLUUID& group_id)
{
- llinfos << "LLGroupMgr::sendGroupRoleMemberChanges" << llendl;
+ lldebugs << "LLGroupMgr::sendGroupRoleMemberChanges" << llendl;
LLGroupMgrGroupData* group_datap = createGroupData(group_id);
if (group_datap->mRoleMemberChanges.empty()) return;
LLMessageSystem* msg = gMessageSystem;
- change_map::const_iterator citer = group_datap->mRoleMemberChanges.begin();
- change_map::const_iterator end = group_datap->mRoleMemberChanges.end();
bool start_message = true;
-
- for ( ; citer != end; ++citer)
+ for (LLGroupMgrGroupData::change_map_t::const_iterator citer = group_datap->mRoleMemberChanges.begin();
+ citer != group_datap->mRoleMemberChanges.end(); ++citer)
{
if (start_message)
{
@@ -1618,9 +1609,8 @@ void LLGroupMgr::sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID,
bool start_message = true;
LLMessageSystem* msg = gMessageSystem;
- std::map<LLUUID,LLUUID>::iterator it = member_role_pairs.begin();
- std::map<LLUUID,LLUUID>::iterator end = member_role_pairs.end();
- for ( ; it != end; ++it)
+ for (std::map<LLUUID,LLUUID>::iterator it = member_role_pairs.begin();
+ it != member_role_pairs.end(); ++it)
{
if (start_message)
{
@@ -1660,15 +1650,14 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
LLGroupMgrGroupData* group_datap = gGroupMgr->getGroupData(group_id);
if (!group_datap) return;
- std::vector<LLUUID>::iterator it = member_ids.begin();
- std::vector<LLUUID>::iterator end = member_ids.end();
- for ( ; it != end; ++it)
+ for (std::vector<LLUUID>::iterator it = member_ids.begin();
+ it != member_ids.end(); ++it)
{
// Can't use 'eject' to leave a group.
if ((*it) == gAgent.getID()) continue;
// Make sure they are in the group, and we need the member data
- LLGroupMgrGroupData::member_iter mit = group_datap->mMembers.find(*it);
+ LLGroupMgrGroupData::member_list_t::iterator mit = group_datap->mMembers.find(*it);
if (mit != group_datap->mMembers.end())
{
// Add them to the message
@@ -1693,9 +1682,8 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
}
// Clean up groupmgr
- std::map<LLUUID,LLGroupRoleData*>::iterator rit = (*mit).second->roleBegin();
- std::map<LLUUID,LLGroupRoleData*>::iterator rend = (*mit).second->roleEnd();
- for ( ; rit != rend; ++rit)
+ for (LLGroupMemberData::role_list_t::iterator rit = (*mit).second->roleBegin();
+ rit != (*mit).second->roleEnd(); ++rit)
{
if ((*rit).first.notNull())
{
@@ -1715,7 +1703,7 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
{
- llinfos << "LLGroupMgr::sendGroupRoleChanges" << llendl;
+ lldebugs << "LLGroupMgr::sendGroupRoleChanges" << llendl;
LLGroupMgrGroupData* group_datap = getGroupData(group_id);
if (group_datap && group_datap->pendingRoleChanges())
@@ -1730,7 +1718,7 @@ void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
void LLGroupMgr::cancelGroupRoleChanges(const LLUUID& group_id)
{
- llinfos << "LLGroupMgr::cancelGroupRoleChanges" << llendl;
+ lldebugs << "LLGroupMgr::cancelGroupRoleChanges" << llendl;
LLGroupMgrGroupData* group_datap = getGroupData(group_id);
if (group_datap) group_datap->cancelRoleChanges();
@@ -1750,11 +1738,10 @@ bool LLGroupMgr::parseRoleActions(const LLString& xml_filename)
}
LLXMLNodeList role_list;
- LLXMLNodeList::iterator role_iter;
root->getChildren("action_set", role_list, false);
- for (role_iter = role_list.begin(); role_iter != role_list.end(); ++role_iter)
+ for (LLXMLNodeList::iterator role_iter = role_list.begin(); role_iter != role_list.end(); ++role_iter)
{
LLXMLNodePtr action_set = role_iter->second;
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index 76040f9636..ee848ec16d 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -58,6 +58,8 @@ class LLGroupMemberData
friend class LLGroupMgrGroupData;
public:
+ typedef std::map<LLUUID,LLGroupRoleData*> role_list_t;
+
LLGroupMemberData(const LLUUID& id,
S32 contribution,
U64 agent_powers,
@@ -75,11 +77,11 @@ public:
const std::string& getOnlineStatus() const { return mOnlineStatus; }
void addRole(const LLUUID& role, LLGroupRoleData* rd);
bool removeRole(const LLUUID& role);
- void clearRoles() { mRoles.clear(); };
- std::map<LLUUID,LLGroupRoleData*>::iterator roleBegin() { return mRoles.begin(); }
- std::map<LLUUID,LLGroupRoleData*>::iterator roleEnd() { return mRoles.end(); }
+ void clearRoles() { mRolesList.clear(); };
+ role_list_t::iterator roleBegin() { return mRolesList.begin(); }
+ role_list_t::iterator roleEnd() { return mRolesList.end(); }
- BOOL isInRole(const LLUUID& role_id) { return (mRoles.find(role_id) != mRoles.end()); }
+ BOOL isInRole(const LLUUID& role_id) { return (mRolesList.find(role_id) != mRolesList.end()); }
protected:
LLUUID mID;
@@ -88,7 +90,7 @@ protected:
std::string mTitle;
std::string mOnlineStatus;
BOOL mIsOwner;
- std::map<LLUUID,LLGroupRoleData*> mRoles;
+ role_list_t mRolesList;
};
struct LLRoleData
@@ -185,8 +187,6 @@ struct lluuid_pair_less
}
};
-typedef std::map<lluuid_pair,LLRoleMemberChange,lluuid_pair_less> change_map;
-
struct LLGroupTitle
{
std::string mTitle;
@@ -231,17 +231,16 @@ public:
BOOL isGroupPropertiesDataComplete() { return mGroupPropertiesDataComplete; }
public:
- typedef std::map<LLUUID,LLGroupMemberData*> member_list;
- typedef member_list::iterator member_iter;
- typedef std::map<LLUUID,LLGroupRoleData*> role_list;
- typedef role_list::iterator role_iter;
-
- member_list mMembers;
- role_list mRoles;
+ typedef std::map<LLUUID,LLGroupMemberData*> member_list_t;
+ typedef std::map<LLUUID,LLGroupRoleData*> role_list_t;
+ typedef std::map<lluuid_pair,LLRoleMemberChange,lluuid_pair_less> change_map_t;
+ typedef std::map<LLUUID,LLRoleData> role_data_map_t;
+ member_list_t mMembers;
+ role_list_t mRoles;
- change_map mRoleMemberChanges;
- std::map<LLUUID,LLRoleData> mRoleChanges;
+ change_map_t mRoleMemberChanges;
+ role_data_map_t mRoleChanges;
std::vector<LLGroupTitle> mTitles;
@@ -298,6 +297,8 @@ struct LLRoleActionSet
class LLGroupMgr
{
+ LOG_CLASS(LLGroupMgr);
+
public:
LLGroupMgr();
~LLGroupMgr();
@@ -355,10 +356,10 @@ protected:
LLGroupMgrGroupData* createGroupData(const LLUUID &id);
protected:
- typedef std::multimap<LLUUID,LLGroupMgrObserver*>::iterator observer_iter;
- std::multimap<LLUUID,LLGroupMgrObserver*> mObservers;
- typedef std::map<LLUUID, LLGroupMgrGroupData*>::iterator group_iter;
- std::map<LLUUID, LLGroupMgrGroupData*> mGroups;
+ typedef std::multimap<LLUUID,LLGroupMgrObserver*> observer_multimap_t;
+ observer_multimap_t mObservers;
+ typedef std::map<LLUUID, LLGroupMgrGroupData*> group_map_t;
+ group_map_t mGroups;
};
extern LLGroupMgr* gGroupMgr;
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index c26e9de423..445095a12b 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -1370,9 +1370,13 @@ void LLFloaterIMPanel::draw()
}
}
+ // use embedded panel if available
if (mSpeakerPanel)
{
- mSpeakerPanel->refreshSpeakers();
+ if (mSpeakerPanel->getVisible())
+ {
+ mSpeakerPanel->refreshSpeakers();
+ }
}
else
{
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index a3faa55a06..5f1afccbdc 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -205,7 +205,7 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& value, EAddPosition pos
LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
((LLScrollListText*)cell)->setText( fullname );
- calcMaxContentWidth(item);
+ dirtyColumns();
// this column is resizable
LLScrollListColumn* columnp = getColumn(mNameColumnIndex);
@@ -258,9 +258,10 @@ void LLNameListCtrl::refresh(const LLUUID& id, const char* first,
cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
((LLScrollListText*)cell)->setText( fullname );
- calcMaxContentWidth(item);
}
}
+
+ dirtyColumns();
}
diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp
index 8af83af272..53066aa52d 100644
--- a/indra/newview/lloverlaybar.cpp
+++ b/indra/newview/lloverlaybar.cpp
@@ -160,11 +160,10 @@ void LLOverlayBar::layoutButtons()
{
LLView* state_buttons_panel = getChildByName("state_buttons", TRUE);
- if (state_buttons_panel)
+ if (state_buttons_panel && state_buttons_panel->getVisible())
{
LLViewQuery query;
LLWidgetTypeFilter widget_filter(WIDGET_TYPE_BUTTON);
- query.addPreFilter(LLVisibleFilter::getInstance());
query.addPreFilter(LLEnabledFilter::getInstance());
query.addPreFilter(&widget_filter);
@@ -333,7 +332,7 @@ void LLOverlayBar::onClickStandUp(void*)
// *TODO: Move this into an audio manager abstraction
//static
-void LLOverlayBar::mediaPlay(void*)
+void LLOverlayBar::toggleMediaPlay(void*)
{
if (!gOverlayBar)
{
@@ -360,24 +359,7 @@ void LLOverlayBar::mediaPlay(void*)
}
//static
-void LLOverlayBar::mediaPause(void*)
-{
-
- LLViewerParcelMedia::pause();
-}
-
-//static
-void LLOverlayBar::mediaStop(void*)
-{
- if (!gOverlayBar)
- {
- return;
- }
- LLViewerParcelMedia::stop();
-}
-
-//static
-void LLOverlayBar::musicPlay(void*)
+void LLOverlayBar::toggleMusicPlay(void*)
{
if (!gOverlayBar)
{
diff --git a/indra/newview/lloverlaybar.h b/indra/newview/lloverlaybar.h
index 90ab8d057a..741095e408 100644
--- a/indra/newview/lloverlaybar.h
+++ b/indra/newview/lloverlaybar.h
@@ -77,11 +77,8 @@ public:
static void onClickResetView(void* data);
//static media helper functions
- static void mediaPlay(void*);
- static void mediaPause(void*);
- static void mediaStop(void*);
-
- static void musicPlay(void*);
+ static void toggleMediaPlay(void*);
+ static void toggleMusicPlay(void*);
static void musicPause(void*);
static void musicStop(void*);
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 7c8acd3947..9a0eef9a10 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -570,7 +570,8 @@ LLPanelAvatarWeb::~LLPanelAvatarWeb()
void LLPanelAvatarWeb::enableControls(BOOL self)
{
childSetEnabled("url_edit",self);
- childSetVisible("status_text",!self);
+ childSetVisible("status_text",!self && !mURL.empty());
+ childSetText("status_text", LLString::null);
}
void LLPanelAvatarWeb::setWebURL(std::string url)
@@ -600,6 +601,9 @@ void LLPanelAvatarWeb::setWebURL(std::string url)
{
childSetVisible("profile_html",false);
}
+
+ BOOL own_avatar = (getPanelAvatar()->getAvatarID() == gAgent.getID() );
+ childSetVisible("status_text",!own_avatar && !mURL.empty());
}
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index e24d258a22..fcf3eea7eb 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -672,6 +672,8 @@ void LLPanelClassified::processClassifiedInfoReply(LLMessageSystem *msg, void **
self->mPaidFor = TRUE;
self->mUpdateBtn->setLabel(self->getString("update_txt"));
+
+ self->resetDirty();
}
}
@@ -814,6 +816,25 @@ void LLPanelClassified::callbackGotPriceForListing(S32 option, LLString text, vo
}
+void LLPanelClassified::resetDirty()
+{
+ // Tell all the widgets to reset their dirty state since the ad was just saved
+ if (mSnapshotCtrl)
+ mSnapshotCtrl->resetDirty();
+ if (mNameEditor)
+ mNameEditor->resetDirty();
+ if (mDescEditor)
+ mDescEditor->resetDirty();
+ if (mLocationEditor)
+ mLocationEditor->resetDirty();
+ mLocationChanged = false;
+ if (mCategoryCombo)
+ mCategoryCombo->resetDirty();
+ if (mMatureCheck)
+ mMatureCheck->resetDirty();
+ if (mAutoRenewCheck)
+ mAutoRenewCheck->resetDirty();
+}
// invoked from callbackConfirmPublish
void LLPanelClassified::confirmPublish(S32 option)
@@ -837,22 +858,7 @@ void LLPanelClassified::confirmPublish(S32 option)
tab->setCurrentTabName(mNameEditor->getText());
}
- // Tell all the widgets to reset their dirty state since the ad was just saved
- if (mSnapshotCtrl)
- mSnapshotCtrl->resetDirty();
- if (mNameEditor)
- mNameEditor->resetDirty();
- if (mDescEditor)
- mDescEditor->resetDirty();
- if (mLocationEditor)
- mLocationEditor->resetDirty();
- mLocationChanged = false;
- if (mCategoryCombo)
- mCategoryCombo->resetDirty();
- if (mMatureCheck)
- mMatureCheck->resetDirty();
- if (mAutoRenewCheck)
- mAutoRenewCheck->resetDirty();
+ resetDirty();
}
// static
diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h
index f28795a4f2..e3705705db 100644
--- a/indra/newview/llpanelclassified.h
+++ b/indra/newview/llpanelclassified.h
@@ -95,6 +95,7 @@ public:
void sendClassifiedInfoRequest();
void sendClassifiedInfoUpdate();
+ void resetDirty();
void confirmPublish(S32 option);
static void processClassifiedInfoReply(LLMessageSystem* msg, void**);
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 2e55cfb30a..64c4354d36 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -748,9 +748,8 @@ void LLPanelGroupGeneral::updateMembers()
all_timer.reset();
S32 i = 0;
- LLGroupMgrGroupData::member_iter end = gdatap->mMembers.end();
- for( ; mMemberProgress != end && i<UPDATE_MEMBERS_PER_FRAME;
+ for( ; mMemberProgress != gdatap->mMembers.end() && i<UPDATE_MEMBERS_PER_FRAME;
++mMemberProgress, ++i)
{
//llinfos << "Adding " << iter->first << ", " << iter->second->getTitle() << llendl;
@@ -791,7 +790,7 @@ void LLPanelGroupGeneral::updateMembers()
sAllTime += all_timer.getElapsedTimeF32();
llinfos << "Updated " << i << " of " << UPDATE_MEMBERS_PER_FRAME << "members in the list." << llendl;
- if (mMemberProgress == end)
+ if (mMemberProgress == gdatap->mMembers.end())
{
llinfos << " member list completed." << llendl;
mListVisibleMembers->setEnabled(TRUE);
diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h
index b17a66d0a3..ab1ccef89e 100644
--- a/indra/newview/llpanelgroupgeneral.h
+++ b/indra/newview/llpanelgroupgeneral.h
@@ -110,7 +110,7 @@ private:
LLTextBox *mActiveTitleLabel;
LLComboBox *mComboActiveTitle;
- LLGroupMgrGroupData::member_iter mMemberProgress;
+ LLGroupMgrGroupData::member_list_t::iterator mMemberProgress;
};
#endif
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index 229daf44ff..e51afa30ea 100644
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -165,7 +165,7 @@ void LLPanelGroupInvite::impl::submitInvitations()
void LLPanelGroupInvite::impl::addRoleNames(LLGroupMgrGroupData* gdatap)
{
- LLGroupMgrGroupData::member_iter agent_iter =
+ LLGroupMgrGroupData::member_list_t::iterator agent_iter =
gdatap->mMembers.find(gAgent.getID());
//get the member data for the agent if it exists
@@ -191,8 +191,8 @@ void LLPanelGroupInvite::impl::addRoleNames(LLGroupMgrGroupData* gdatap)
bool can_assign_limited = gAgent.hasPowerInGroup(mGroupID,
GP_ROLE_ASSIGN_MEMBER_LIMITED);
- LLGroupMgrGroupData::role_iter rit = gdatap->mRoles.begin();
- LLGroupMgrGroupData::role_iter end = gdatap->mRoles.end();
+ LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.begin();
+ LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end();
//populate the role list
for ( ; rit != end; ++rit)
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 6ca3e1e085..8034ed6f03 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -70,7 +70,7 @@ bool agentCanAddToRole(const LLUUID& group_id,
}
//make sure the agent is in the group
- LLGroupMgrGroupData::member_iter mi = gdatap->mMembers.find(gAgent.getID());
+ LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find(gAgent.getID());
if (mi == gdatap->mMembers.end())
{
return false;
@@ -998,8 +998,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
// Build the assigned roles list.
//////////////////////////////////
// Add each role to the assigned roles list.
- LLGroupMgrGroupData::role_iter iter = gdatap->mRoles.begin();
- LLGroupMgrGroupData::role_iter end = gdatap->mRoles.end();
+ LLGroupMgrGroupData::role_list_t::iterator iter = gdatap->mRoles.begin();
+ LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end();
BOOL can_eject_members = gAgent.hasPowerInGroup(mGroupID,
GP_MEMBER_EJECT);
@@ -1040,7 +1040,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
if ((*member_iter) == gAgent.getID()) continue;
// Look up the member data.
- LLGroupMgrGroupData::member_iter mi =
+ LLGroupMgrGroupData::member_list_t::iterator mi =
gdatap->mMembers.find((*member_iter));
if (mi == gdatap->mMembers.end()) continue;
LLGroupMemberData* member_data = (*mi).second;
@@ -1134,7 +1134,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
if (!can_eject_members && !member_is_owner)
{
// Maybe we can eject them because we are an owner...
- LLGroupMgrGroupData::member_iter mi = gdatap->mMembers.find(gAgent.getID());
+ LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find(gAgent.getID());
if (mi != gdatap->mMembers.end())
{
LLGroupMemberData* member_data = (*mi).second;
@@ -1218,41 +1218,29 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id,
LLUUID member_id;
- member_role_change_iter member_end = mMemberRoleChangeData.end();
- member_role_change_iter member;
- role_change_data_map_t *role_change_datap;
- role_change_data_map_t::iterator role_end;
- role_change_data_map_t::iterator role;
-
std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
- if (selection.empty()) return;
-
- std::vector<LLScrollListItem*>::iterator itor;
- for (itor = selection.begin() ;
+ if (selection.empty())
+ {
+ return;
+ }
+
+ for (std::vector<LLScrollListItem*>::iterator itor = selection.begin() ;
itor != selection.end(); ++itor)
{
member_id = (*itor)->getUUID();
//see if we requested a change for this member before
- member = mMemberRoleChangeData.find(member_id);
- if ( member != member_end )
+ if ( mMemberRoleChangeData.find(member_id) == mMemberRoleChangeData.end() )
{
- //this member had previously had their role data changed
- //so grab it
- role_change_datap = (*member).second;
- }
- else
- {
- role_change_datap = new role_change_data_map_t;
- mMemberRoleChangeData[member_id] = role_change_datap;
+ mMemberRoleChangeData[member_id] = new role_change_data_map_t;
}
+ role_change_data_map_t* role_change_datap = mMemberRoleChangeData[member_id];
//now check to see if the selected group member
//had changed his association with the selected role before
- role_end = role_change_datap->end();
- role = role_change_datap->find(role_id);
- if ( role != role_end )
+ role_change_data_map_t::iterator role = role_change_datap->find(role_id);
+ if ( role != role_change_datap->end() )
{
//see if the new change type cancels out the previous change
if (role->second != type)
@@ -1442,15 +1430,11 @@ void LLPanelGroupMembersSubTab::applyMemberChanges()
//we need to add all of the changed roles data
//for each member whose role changed
- member_role_change_iter member_end = mMemberRoleChangeData.end();
- member_role_change_iter member = mMemberRoleChangeData.begin();
-
- for (; member != member_end; member++)
+ for (member_role_changes_map_t::iterator member = mMemberRoleChangeData.begin();
+ member != mMemberRoleChangeData.end(); ++member)
{
- role_change_data_map_t::iterator role_end = member->second->end();
- role_change_data_map_t::iterator role = member->second->begin();
-
- for (; role != role_end; role++)
+ for (role_change_data_map_t::iterator role = member->second->begin();
+ role != member->second->end(); ++role)
{
gdatap->changeRoleMember(role->first, //role_id
member->first, //member_id
@@ -1500,11 +1484,6 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
//if we are removing a role, we store that role id away
//and then we have to build the powers up bases on the roles the agent
//is in
- member_role_change_iter member_end = mMemberRoleChangeData.end();
- member_role_change_iter member;
- role_change_data_map_t *role_change_datap = NULL;
- role_change_data_map_t::iterator role_end;
- role_change_data_map_t::iterator role;
LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mGroupID);
if (!gdatap)
@@ -1521,8 +1500,9 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
}
//see if there are unsaved role changes for this agent
- member = mMemberRoleChangeData.find(agent_id);
- if ( member != member_end )
+ role_change_data_map_t* role_change_datap = NULL;
+ member_role_changes_map_t::iterator member = mMemberRoleChangeData.find(agent_id);
+ if ( member != mMemberRoleChangeData.end() )
{
//this member has unsaved role changes
//so grab them
@@ -1535,13 +1515,13 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
{
std::vector<LLUUID> roles_to_be_removed;
- role_end = role_change_datap->end();
- role = role_change_datap->begin();
-
- for (; role != role_end; role++)
+ for (role_change_data_map_t::iterator role = role_change_datap->begin();
+ role != role_change_datap->end(); ++ role)
{
if ( role->second == RMC_ADD )
+ {
new_powers |= gdatap->getRolePowers(role->first);
+ }
else
{
roles_to_be_removed.push_back(role->first);
@@ -1550,12 +1530,8 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
//loop over the member's current roles, summing up
//the powers (not including the role we are removing)
- std::map<LLUUID,LLGroupRoleData*>::iterator current_role =
- member_data->roleBegin();
- std::map<LLUUID,LLGroupRoleData*>::iterator end_role =
- member_data->roleEnd();
-
- for (; current_role != end_role; current_role++)
+ for (LLGroupMemberData::role_list_t::iterator current_role = member_data->roleBegin();
+ current_role != member_data->roleEnd(); ++current_role)
{
bool role_in_remove_list =
(std::find(roles_to_be_removed.begin(),
@@ -1588,13 +1564,10 @@ bool LLPanelGroupMembersSubTab::getRoleChangeType(const LLUUID& member_id,
const LLUUID& role_id,
LLRoleMemberChangeType& type)
{
- member_role_change_iter member_changes_iter;
- role_change_data_map_t::iterator role_changes_iter;
-
- member_changes_iter = mMemberRoleChangeData.find(member_id);
+ member_role_changes_map_t::iterator member_changes_iter = mMemberRoleChangeData.find(member_id);
if ( member_changes_iter != mMemberRoleChangeData.end() )
{
- role_changes_iter = member_changes_iter->second->find(role_id);
+ role_change_data_map_t::iterator role_changes_iter = member_changes_iter->second->find(role_id);
if ( role_changes_iter != member_changes_iter->second->end() )
{
type = role_changes_iter->second;
@@ -1692,7 +1665,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
return;
}
- LLGroupMgrGroupData::member_iter end = gdatap->mMembers.end();
+ LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end();
S32 i = 0;
for( ; mMemberProgress != end && i<UPDATE_MEMBERS_PER_FRAME;
@@ -1976,8 +1949,8 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc)
LLScrollListItem* item = NULL;
- LLGroupMgrGroupData::role_iter rit = gdatap->mRoles.begin();
- LLGroupMgrGroupData::role_iter end = gdatap->mRoles.end();
+ LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.begin();
+ LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end();
for ( ; rit != end; ++rit)
{
@@ -2160,8 +2133,8 @@ void LLPanelGroupRolesSubTab::buildMembersList()
if (item->getUUID().isNull())
{
// Special cased 'Everyone' role
- LLGroupMgrGroupData::member_iter mit = gdatap->mMembers.begin();
- LLGroupMgrGroupData::member_iter end = gdatap->mMembers.end();
+ LLGroupMgrGroupData::member_list_t::iterator mit = gdatap->mMembers.begin();
+ LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end();
for ( ; mit != end; ++mit)
{
mAssignedMembersList->addNameItem((*mit).first);
@@ -2169,7 +2142,7 @@ void LLPanelGroupRolesSubTab::buildMembersList()
}
else
{
- LLGroupMgrGroupData::role_iter rit = gdatap->mRoles.find(item->getUUID());
+ LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.find(item->getUUID());
if (rit != gdatap->mRoles.end())
{
LLGroupRoleData* rdatap = (*rit).second;
@@ -2622,8 +2595,8 @@ void LLPanelGroupActionsSubTab::handleActionSelect()
if (gdatap->isMemberDataComplete())
{
- LLGroupMgrGroupData::member_iter it = gdatap->mMembers.begin();
- LLGroupMgrGroupData::member_iter end = gdatap->mMembers.end();
+ LLGroupMgrGroupData::member_list_t::iterator it = gdatap->mMembers.begin();
+ LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end();
LLGroupMemberData* gmd;
for ( ; it != end; ++it)
@@ -2643,8 +2616,8 @@ void LLPanelGroupActionsSubTab::handleActionSelect()
if (gdatap->isRoleDataComplete())
{
- LLGroupMgrGroupData::role_iter it = gdatap->mRoles.begin();
- LLGroupMgrGroupData::role_iter end = gdatap->mRoles.end();
+ LLGroupMgrGroupData::role_list_t::iterator it = gdatap->mRoles.begin();
+ LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end();
LLGroupRoleData* rmd;
for ( ; it != end; ++it)
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index 6d2c6ab4cf..89264abc94 100644
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -202,7 +202,6 @@ public:
protected:
typedef std::map<LLUUID, LLRoleMemberChangeType> role_change_data_map_t;
- typedef std::map<LLUUID, role_change_data_map_t*>::iterator member_role_change_iter;
typedef std::map<LLUUID, role_change_data_map_t*> member_role_changes_map_t;
bool matchesSearchFilter(const std::string& fullname);
@@ -224,7 +223,7 @@ protected:
member_role_changes_map_t mMemberRoleChangeData;
U32 mNumOwnerAdditions;
- LLGroupMgrGroupData::member_iter mMemberProgress;
+ LLGroupMgrGroupData::member_list_t::iterator mMemberProgress;
};
class LLPanelGroupRolesSubTab : public LLPanelGroupSubTab
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index b65835fed3..a27295c7b5 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -367,6 +367,11 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
childSetKeystrokeCallback("password_edit", onPassKey, this);
childSetUserData("password_edit", this);
+ // change z sort of clickable text to be behind buttons
+ sendChildToBack(getChildByName("channel_text"));
+ sendChildToBack(getChildByName("version_text"));
+ sendChildToBack(getChildByName("forgot_password_text"));
+
LLLineEditor* edit = LLUICtrlFactory::getLineEditorByName(this, "password_edit");
if (edit) edit->setDrawAsterixes(TRUE);
@@ -478,6 +483,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
// Initialize visibility (and don't force visibility - use prefs)
refreshLocation( false );
#endif
+
}
void LLPanelLogin::setSiteIsAlive( bool alive )
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index d80a9ee053..ffc53f0dd5 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -3649,14 +3649,25 @@ void LLSelectMgr::saveSelectedObjectTransform(EActionType action_type)
{
selectNode->mSavedPositionGlobal = gAgent.getPosGlobalFromAgent((object->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition());
}
+ else
+ {
+ selectNode->mSavedPositionGlobal = object->getPositionGlobal();
+ }
}
else
{
LLViewerObject* attachment_root = (LLViewerObject*)object->getParent();
- LLXform* parent_xform = attachment_root->mDrawable->getXform()->getParent();
- LLVector3 root_pos = (attachment_root->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition();
- LLQuaternion root_rot = (attachment_root->getRotation() * parent_xform->getWorldRotation());
- selectNode->mSavedPositionGlobal = gAgent.getPosGlobalFromAgent((object->getPosition() * root_rot) + root_pos);
+ LLXform* parent_xform = attachment_root ? attachment_root->mDrawable->getXform()->getParent() : NULL;
+ if (parent_xform)
+ {
+ LLVector3 root_pos = (attachment_root->getPosition() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition();
+ LLQuaternion root_rot = (attachment_root->getRotation() * parent_xform->getWorldRotation());
+ selectNode->mSavedPositionGlobal = gAgent.getPosGlobalFromAgent((object->getPosition() * root_rot) + root_pos);
+ }
+ else
+ {
+ selectNode->mSavedPositionGlobal = object->getPositionGlobal();
+ }
}
selectNode->mSavedRotation = object->getRenderRotation();
}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 423954800f..455fcc7bc0 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1016,7 +1016,7 @@ BOOL idle_startup()
gAcceptTOS,
gAcceptCriticalMessage,
gViewerDigest,
- gLastExecFroze,
+ gLastExecEvent,
requested_options,
hashed_mac_string,
LLAppViewer::instance()->getSerialNumber());
@@ -2767,8 +2767,8 @@ void update_dialog_callback(S32 option, void *userdata)
llinfos << "Calling updater: " << update_exe_path << " " << params.str() << llendl;
- // *REMOVE:Mani The following call is handled through ~LLAppViewer.
- // remove_marker_file(); // In case updater fails
+ //Explicitly remove the marker file, otherwise we pass the lock onto the child process and things get weird.
+ LLAppViewer::instance()->removeMarkerFile(); // In case updater fails
// Use spawn() to run asynchronously
int retval = _spawnl(_P_NOWAIT, update_exe_path.c_str(), update_exe_path.c_str(), params.str().c_str(), NULL);
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index d64b3864b3..00331a2e23 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -468,6 +468,8 @@ void LLStatusBar::refresh()
childSetVisible("buyland", canBuyLand);
if (canBuyLand)
{
+ //HACK: layout tweak until this is all xml
+ x += 9;
childGetRect( "buyland", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect( "buyland", r );
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 02eff4d587..b60ef6c5ac 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -492,7 +492,11 @@ bool LLTextureCacheWorker::doWrite()
idx = mCache->getHeaderCacheEntry(mID, true, &mImageSize); // touch entry
if (idx >= 0)
{
- llassert_always(cur_imagesize <= 0 || mImageSize == cur_imagesize);
+ if(cur_imagesize > 0 && mImageSize != cur_imagesize)
+ {
+ llwarns << "Header cache entry size: " << cur_imagesize << " != mImageSize: " << mImageSize << llendl;
+ offset = 0; // re-write header
+ }
mState = offset < TEXTURE_CACHE_ENTRY_SIZE ? HEADER : BODY;
}
else
diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp
index 444a2d1524..0fb7fbba4c 100644
--- a/indra/newview/lltoolbar.cpp
+++ b/indra/newview/lltoolbar.cpp
@@ -279,7 +279,7 @@ void LLToolBar::layoutButtons()
// We actually want to extend "pad" pixels off the right edge of the
// screen, such that the rightmost button is aligned.
- S32 segment_width = llround((F32)(width) / ((F32)count - 1.f));
+ S32 segment_width = llround((F32)(width) / ((F32)count - 1.f)); // ignore chat button
S32 btn_width = segment_width - pad;
// Evenly space all views
@@ -314,7 +314,7 @@ void LLToolBar::layoutButtons()
btn_view->reshape(r.getWidth(), r.getHeight());
i--;
}
- }
+ }
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index e9839d64dc..cf71694e13 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2667,6 +2667,13 @@ void process_avatar_init_complete(LLMessageSystem* msg, void**)
}
*/
+static void display_release_message(S32, void* data)
+{
+ std::string* msg = (std::string*)data;
+ LLFloaterReleaseMsg::displayMessage(msg->c_str());
+ delete msg;
+}
+
void process_agent_movement_complete(LLMessageSystem* msg, void**)
{
gAgentMovementCompleted = TRUE;
@@ -2835,8 +2842,10 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
msg->addBOOLFast(_PREHASH_AlwaysRun, gAgent.getAlwaysRun());
gAgent.sendReliableMessage();
- LLFloaterReleaseMsg::displayMessage(version_channel_char);
-
+ if (LLFloaterReleaseMsg::checkVersion(version_channel_char))
+ {
+ LLNotifyBox::showXml("ServerVersionChanged", display_release_message, new std::string(version_channel_char) );
+ }
}
void process_crossed_region(LLMessageSystem* msg, void**)
@@ -3491,7 +3500,8 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
gViewerStats->mSimTotalUnackedBytes.addValue(stat_value / 1024.f);
break;
default:
- llwarns << "Unknown stat id" << stat_id << llendl;
+// llwarns << "Unknown stat id" << stat_id << llendl;
+ break;
}
}
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 290650e251..08a73b343c 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1739,9 +1739,9 @@ void optionally_start_music(const LLString& music_url)
// now only play music when you enter a new parcel if the control is in PLAY state
// changed as part of SL-4878
- if ( gOverlayBar && gOverlayBar->musicPlaying() )
+ if ( gOverlayBar && gOverlayBar->musicPlaying())
{
- LLOverlayBar::musicPlay(NULL);
+ gAudiop->startInternetStream(music_url.c_str());
}
}
}
@@ -1755,7 +1755,10 @@ void callback_start_music(S32 option, void* data)
{
gSavedSettings.setBOOL("AudioStreamingMusic", TRUE);
llinfos << "Starting first parcel music " << music_url << llendl;
- LLOverlayBar::musicPlay(NULL);
+ if ( gOverlayBar && gOverlayBar->musicPlaying())
+ {
+ gAudiop->startInternetStream(music_url->c_str());
+ }
}
else
{
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 5dcf4fdb5d..9e8a7c2a9b 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -3006,7 +3006,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
}
// Update rectangles for the various toolbars
- if (gOverlayBar && gNotifyBoxView && gConsole)
+ if (gOverlayBar && gNotifyBoxView && gConsole && gToolBar)
{
LLRect bar_rect(-1, STATUS_BAR_HEIGHT, getWindowWidth()+1, -1);
@@ -3028,7 +3028,8 @@ BOOL LLViewerWindow::handlePerFrameHover()
// snap floaters to top of chat bar/button strip
LLView* chatbar_and_buttons = gOverlayBar->getChild<LLView>("chatbar_and_buttons", TRUE);
- if (chatbar_and_buttons)
+ // find top of chatbar and strate buttons, if either are visible
+ if (chatbar_and_buttons && !chatbar_and_buttons->getLocalBoundingRect().isNull())
{
// convert top/left corner of chatbar/buttons container to gFloaterView-relative coordinates
S32 top, left;
@@ -3040,6 +3041,17 @@ BOOL LLViewerWindow::handlePerFrameHover()
gFloaterView);
gFloaterView->setSnapOffsetBottom(top);
}
+ else if (gToolBar->getVisible())
+ {
+ S32 top, left;
+ gToolBar->localPointToOtherView(
+ gToolBar->getLocalBoundingRect().mLeft,
+ gToolBar->getLocalBoundingRect().mTop,
+ &left,
+ &top,
+ gFloaterView);
+ gFloaterView->setSnapOffsetBottom(top);
+ }
else
{
gFloaterView->setSnapOffsetBottom(0);