summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/lib/python/indra/__init__.py12
-rw-r--r--indra/linux_crash_logger/linux_crash_logger.cpp6
-rw-r--r--indra/llcommon/llprocessor.cpp46
-rw-r--r--indra/llcommon/llprocessor.h14
-rw-r--r--indra/llcommon/llsys.cpp111
-rw-r--r--indra/llcommon/llsys.h1
-rw-r--r--indra/llui/llbutton.cpp14
-rw-r--r--indra/llui/llbutton.h4
-rw-r--r--indra/llui/llcheckboxctrl.cpp12
-rw-r--r--indra/llui/llcheckboxctrl.h2
-rw-r--r--indra/llui/lllineeditor.h1
-rw-r--r--indra/llui/lluictrl.h3
-rw-r--r--indra/lscript/lscript_compile/indra.l2
-rw-r--r--indra/newview/linux_tools/client-readme.txt5
-rw-r--r--indra/newview/llagent.cpp2
-rw-r--r--indra/newview/llfloaterland.cpp4
-rw-r--r--indra/newview/llfloaterworldmap.cpp75
-rw-r--r--indra/newview/llfloaterworldmap.h1
-rw-r--r--indra/newview/llfolderview.cpp57
-rw-r--r--indra/newview/llgesturemgr.cpp5
-rw-r--r--indra/newview/llpanelclassified.cpp21
-rw-r--r--indra/newview/llpanelclassified.h25
-rw-r--r--indra/newview/llstartup.cpp54
-rw-r--r--indra/newview/llviewermenu.cpp2
-rw-r--r--indra/newview/llviewermenufile.cpp6
-rw-r--r--indra/newview/llviewerwindow.cpp204
-rw-r--r--indra/newview/llviewerwindow.h3
-rw-r--r--indra/newview/llworldmap.cpp11
-rw-r--r--indra/newview/llworldmap.h4
-rwxr-xr-xindra/newview/viewer_manifest.py1
30 files changed, 482 insertions, 226 deletions
diff --git a/indra/lib/python/indra/__init__.py b/indra/lib/python/indra/__init__.py
index 7db53666e8..bbfdbaf98d 100644
--- a/indra/lib/python/indra/__init__.py
+++ b/indra/lib/python/indra/__init__.py
@@ -1,5 +1,7 @@
-# @file __init__.py
-# @brief Initialization file for the indra module.
-#
-# Copyright (c) 2006-$CurrentYear$, Linden Research, Inc.
-# $License$
+"""\
+@file __init__.py
+@brief Initialization file for the indra module.
+
+Copyright (c) 2006-2007, Linden Research, Inc.
+$License$
+"""
diff --git a/indra/linux_crash_logger/linux_crash_logger.cpp b/indra/linux_crash_logger/linux_crash_logger.cpp
index 1b7d2870dc..54c257b77b 100644
--- a/indra/linux_crash_logger/linux_crash_logger.cpp
+++ b/indra/linux_crash_logger/linux_crash_logger.cpp
@@ -34,10 +34,8 @@ static const char dialog_text[] =
"Second Life appears to have crashed.\n"
"This crash reporter collects information about your computer's hardware, operating system, and some Second Life logs, which are used for debugging purposes only.\n"
"Sending crash reports is the best way to help us improve the quality of Second Life.\n"
-"If you continue to experience this problem, please try one of the following:\n"
-"- Contact support by email at support@lindenlab.com\n"
-"- If you can log-in, please contact Live Help by using menu Help > Live Help.\n"
-"- Search the Second Life Knowledge Base at http://secondlife.com/knowledgebase/\n"
+"If you continue to experience this problem, please try:\n"
+"- Contacting support by visiting http://www.secondlife.com/support\n"
"\n"
"Send crash report?";
diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp
index e7cfe564f8..c8c565a05b 100644
--- a/indra/llcommon/llprocessor.cpp
+++ b/indra/llcommon/llprocessor.cpp
@@ -235,24 +235,24 @@ bool CProcessor::AnalyzeIntelProcessor()
/* 0x03 */ "0.13 micron Intel Celeron",
/* 0x04 */ "0.13 micron Intel Pentium III",
/* 0x05 */ "",
- /* 0x06 */ "0.13 micron Intel Pentium III mobile",
- /* 0x07 */ "0.13 micron Intel Celeron mobile",
+ /* 0x06 */ "0.13 micron Intel Pentium III Mobile",
+ /* 0x07 */ "0.13 micron Intel Celeron Mobile",
/* 0x08 */ "0.18 micron Intel Pentium 4",
/* 0x09 */ "0.13 micron Intel Pentium 4",
- /* 0x0A */ "0.13 micron Intel Pentium 4",
+ /* 0x0A */ "0.13 micron Intel Celeron",
/* 0x0B */ "0.13 micron Intel Pentium 4 Xeon",
- /* 0x0C */ "",
+ /* 0x0C */ "Intel Xeon MP",
/* 0x0D */ "",
/* 0x0E */ "0.18 micron Intel Pentium 4 Xeon",
- /* 0x0F */ "",
+ /* 0x0F */ "Mobile Intel Celeron",
/* 0x10 */ "",
- /* 0x11 */ "",
+ /* 0x11 */ "Mobile Genuine Intel",
/* 0x12 */ "Intel Celeron M",
- /* 0x13 */ "mobile Intel Celeron",
+ /* 0x13 */ "Mobile Intel Celeron",
/* 0x14 */ "Intel Celeron",
- /* 0x15 */ "mobile Intel",
+ /* 0x15 */ "Mobile Genuine Intel",
/* 0x16 */ "Intel Pentium M",
- /* 0x17 */ "mobile Intel Celeron",
+ /* 0x17 */ "Mobile Intel Celeron",
};
// Only override the brand if we have it in the lookup table. We should
@@ -427,17 +427,21 @@ bool CProcessor::AnalyzeIntelProcessor()
case 1: // Model = 8, Brand id = 1: Celeron (on-die L2 cache) processor model
strncat(strCPUName, "Intel Celeron (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
- case 2: // Model = 8, Brand id = 2: Pentium III (on-die L2 cache) processor model (my current cpu :-))
+ case 2: // Model = 8, Brand id = 2: Pentium III (on-die L2 cache) processor model (my current cpu :-))
strncat(strCPUName, "Intel Pentium III (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
case 3: // Model = 8, Brand id = 3: Pentium III Xeon (on-die L2 cache) processor model
- strncat(strCPUName, "Intel Pentium III Xeon (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
+ strncat(strCPUName, "Intel Pentium III Xeon (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
default: // ...
strncat(strCPUName, "Intel Pentium III core (unknown model, 0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
}
break;
+ case 9: // Model = 9: Intel Pentium M processor, Intel Celeron M processor, model 9
+ strcpy(CPUInfo.strModel, "Intel Pentium M Series Processor"); /*Flawfinder: ignore*/
+ strncat(strCPUName, "Intel Pentium M Series Processor", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
+ break;
case 0xA: // Model = 0xA: Pentium III/Xeon/Celeron (1 or 2 MB on-die L2 cache) processor model
strcpy(CPUInfo.strModel, "Intel Pentium III/Celeron/Pentium III Xeon - internal L2 cache, 0.18 micron"); /*Flawfinder: ignore*/
// Exact detection:
@@ -446,11 +450,11 @@ bool CProcessor::AnalyzeIntelProcessor()
case 1: // Model = 0xA, Brand id = 1: Celeron (1 or 2 MB on-die L2 cache (does it exist??)) processor model
strncat(strCPUName, "Intel Celeron (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
- case 2: // Model = 0xA, Brand id = 2: Pentium III (1 or 2 MB on-die L2 cache (never seen...)) processor model
+ case 2: // Model = 0xA, Brand id = 2: Pentium III (1 or 2 MB on-die L2 cache (never seen...)) processor model
strncat(strCPUName, "Intel Pentium III (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
case 3: // Model = 0xA, Brand id = 3: Pentium III Xeon (1 or 2 MB on-die L2 cache) processor model
- strncat(strCPUName, "Intel Pentium III Xeon (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
+ strncat(strCPUName, "Intel Pentium III Xeon (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
default: // Getting bored of this............
strncat(strCPUName, "Intel Pentium III core (unknown model, 0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
@@ -465,24 +469,28 @@ bool CProcessor::AnalyzeIntelProcessor()
case 3: // Model = 0xB, Brand id = 3: Celeron (Tualatin core) processor model
strncat(strCPUName, "Intel Celeron (Tualatin core, 0.13 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
- case 4: // Model = 0xB, Brand id = 4: Pentium III (Tualatin core) processor model
+ case 4: // Model = 0xB, Brand id = 4: Pentium III (Tualatin core) processor model
strncat(strCPUName, "Intel Pentium III (Tualatin core, 0.13 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
case 7: // Model = 0xB, Brand id = 7: Celeron mobile (Tualatin core) processor model
- strncat(strCPUName, "Intel Celeron mobile (Tualatin core, 0.13 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
+ strncat(strCPUName, "Intel Celeron mobile (Tualatin core, 0.13 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
default: // *bored*
strncat(strCPUName, "Intel Pentium III Tualatin core (unknown model, 0.13 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
}
break;
+ case 0xD: // Model = 0xD: Intel Pentium M processor, Intel Celeron M processor, model D
+ strcpy(CPUInfo.strModel, "Intel Pentium M Series Processor"); /*Flawfinder: ignore*/
+ strncat(strCPUName, "Intel Pentium M Series Processor", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
+ break;
case 0xE: // Model = 0xE: Intel Core Duo processor, Intel Core Solo processor, model E
- strcpy(CPUInfo.strModel, "Intel Core Duo/Solo Processor"); /*Flawfinder: ignore*/
- strncat(strCPUName, "Intel Core Duo/Solo Processor", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
+ strcpy(CPUInfo.strModel, "Intel Core Series Processor"); /*Flawfinder: ignore*/
+ strncat(strCPUName, "Intel Core Series Processor", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
case 0xF: // Model = 0xF: Intel Core 2 Duo processor, model F
- strcpy(CPUInfo.strModel, "Intel Core2 Duo Processor"); /*Flawfinder: ignore*/
- strncat(strCPUName, "Intel Core2 Duo Processor", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
+ strcpy(CPUInfo.strModel, "Intel Core 2 Series Processor"); /*Flawfinder: ignore*/
+ strncat(strCPUName, "Intel Core 2 Series Processor", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/
break;
default: // *more bored*
strcpy(CPUInfo.strModel, "Unknown Intel Pentium Pro/2/3, Core"); /*Flawfinder: ignore*/
diff --git a/indra/llcommon/llprocessor.h b/indra/llcommon/llprocessor.h
index 9060e8aa95..7a09f37d0c 100644
--- a/indra/llcommon/llprocessor.h
+++ b/indra/llcommon/llprocessor.h
@@ -20,6 +20,20 @@
#define PROCESSOR_FREQUENCY_MEASURE_AVAILABLE
#endif
+#if LL_MSVC && _M_X64
+# define LL_X86_64 1
+# define LL_X86 1
+#elif LL_MSVC && _M_IX86
+# define LL_X86 1
+#elif LL_GNUC && ( defined(__amd64__) || defined(__x86_64__) )
+# define LL_X86_64 1
+# define LL_X86 1
+#elif LL_GNUC && ( defined(__i386__) )
+# define LL_X86 1
+#elif LL_GNUC && ( defined(__powerpc__) || defined(__ppc__) )
+# define LL_PPC 1
+#endif
+
typedef struct ProcessorExtensions
{
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 87d31987ce..b6d927d0f3 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -17,7 +17,7 @@
# include "zlib/zlib.h"
#endif
-#include "processor.h"
+#include "llprocessor.h"
#if LL_WINDOWS
# define WIN32_LEAN_AND_MEAN
@@ -28,6 +28,8 @@
# include <sys/utsname.h>
#elif LL_LINUX
# include <sys/utsname.h>
+# include <unistd.h>
+# include <sys/sysinfo.h>
const char MEMINFO_FILE[] = "/proc/meminfo";
const char CPUINFO_FILE[] = "/proc/cpuinfo";
#endif
@@ -236,7 +238,7 @@ U32 LLOSInfo::getProcessVirtualSizeKB()
#if LL_WINDOWS
#endif
#if LL_LINUX
- FILE* status_filep = LLFile::fopen("/proc/self/status", "r"); /* Flawfinder: ignore */
+ FILE* status_filep = LLFile::fopen("/proc/self/status", "rb");
S32 numRead = 0;
char buff[STATUS_SIZE]; /* Flawfinder: ignore */
@@ -279,7 +281,7 @@ U32 LLOSInfo::getProcessResidentSizeKB()
#if LL_WINDOWS
#endif
#if LL_LINUX
- FILE* status_filep = LLFile::fopen("/proc/self/status", "r"); /* Flawfinder: ignore */
+ FILE* status_filep = LLFile::fopen("/proc/self/status", "rb");
if (status_filep != NULL)
{
S32 numRead = 0;
@@ -320,6 +322,7 @@ U32 LLOSInfo::getProcessResidentSizeKB()
LLCPUInfo::LLCPUInfo()
{
+ std::ostringstream out;
CProcessor proc;
const ProcessorInfo* info = proc.GetCPUInfo();
// proc.WriteInfoTextFile("procInfo.txt");
@@ -328,6 +331,63 @@ LLCPUInfo::LLCPUInfo()
mHasAltivec = info->_Ext.Altivec_Extensions;
mCPUMhz = (S32)(proc.GetCPUFrequency(50)/1000000.0);
mFamily.assign( info->strFamily );
+ mCPUString = "Unknown";
+
+#if LL_WINDOWS || LL_DARWIN || LL_SOLARIS
+ out << proc.strCPUName;
+ if (200 < mCPUMhz && mCPUMhz < 10000) // *NOTE: cpu speed is often way wrong, do a sanity check
+ {
+ out << " (" << mCPUMhz << " MHz)";
+ }
+ mCPUString = out.str();
+
+#elif LL_LINUX
+ std::map< LLString, LLString > cpuinfo;
+ FILE* cpuinfo_fp = LLFile::fopen(CPUINFO_FILE, "rb");
+ if(cpuinfo_fp)
+ {
+ char line[MAX_STRING];
+ memset(line, 0, MAX_STRING);
+ while(fgets(line, MAX_STRING, cpuinfo_fp))
+ {
+ // /proc/cpuinfo on Linux looks like:
+ // name\t*: value\n
+ char* tabspot = strchr( line, '\t' );
+ if (tabspot == NULL)
+ continue;
+ char* colspot = strchr( tabspot, ':' );
+ if (colspot == NULL)
+ continue;
+ char* spacespot = strchr( colspot, ' ' );
+ if (spacespot == NULL)
+ continue;
+ char* nlspot = strchr( line, '\n' );
+ if (nlspot == NULL)
+ nlspot = line + strlen( line ); // Fallback to terminating NUL
+ std::string linename( line, tabspot );
+ LLString llinename(linename);
+ LLString::toLower(llinename);
+ std::string lineval( spacespot + 1, nlspot );
+ cpuinfo[ llinename ] = lineval;
+ }
+ fclose(cpuinfo_fp);
+ }
+# if LL_X86
+ LLString flags = " " + cpuinfo["flags"] + " ";
+ LLString::toLower(flags);
+ mHasSSE = ( flags.find( " sse " ) != std::string::npos );
+ mHasSSE2 = ( flags.find( " sse2 " ) != std::string::npos );
+
+ F64 mhz;
+ if (LLString::convertToF64(cpuinfo["cpu mhz"], mhz)
+ && 200.0 < mhz && mhz < 10000.0)
+ {
+ mCPUMhz = (S32)llrint(mhz);
+ }
+ if (!cpuinfo["model name"].empty())
+ mCPUString = cpuinfo["model name"];
+# endif // LL_X86
+#endif // LL_LINUX
}
bool LLCPUInfo::hasAltivec() const
@@ -352,25 +412,7 @@ S32 LLCPUInfo::getMhz() const
std::string LLCPUInfo::getCPUString() const
{
-#if LL_WINDOWS || LL_DARWIN || LL_SOLARIS
- std::ostringstream out;
-
- CProcessor proc;
- (void) proc.GetCPUInfo();
- out << proc.strCPUName << " ";
-
- F32 freq = (F32)(proc.GetCPUFrequency(50) / 1000000.0);
-
- // cpu speed is often way wrong, do a sanity check
- if (200.f < freq && freq < 10000.f)
- {
- out << "(" << (S32)(freq) << " MHz)";
- }
-
- return out.str();
-#else
- return "Can't get terse CPU information";
-#endif
+ return mCPUString;
}
void LLCPUInfo::stream(std::ostream& s) const
@@ -385,38 +427,41 @@ void LLCPUInfo::stream(std::ostream& s) const
}
else
{
- s << "Unable to collect processor info";
+ s << "Unable to collect processor information" << std::endl;
}
#else
// *NOTE: This works on linux. What will it do on other systems?
- FILE* cpuinfo = LLFile::fopen(CPUINFO_FILE, "r"); /* Flawfinder: ignore */
+ FILE* cpuinfo = LLFile::fopen(CPUINFO_FILE, "rb");
if(cpuinfo)
{
- char line[MAX_STRING]; /* Flawfinder: ignore */
+ char line[MAX_STRING];
memset(line, 0, MAX_STRING);
while(fgets(line, MAX_STRING, cpuinfo))
{
- line[strlen(line)-1] = ' '; /*Flawfinder: ignore*/
+ line[strlen(line)-1] = ' ';
s << line;
}
fclose(cpuinfo);
+ s << std::endl;
}
else
{
- s << "Unable to collect memory information";
+ s << "Unable to collect processor information" << std::endl;
}
#endif
+ // These are interesting as they reflect our internal view of the
+ // CPU's attributes regardless of platform
+ s << "->mHasSSE: " << (U32)mHasSSE << std::endl;
+ s << "->mHasSSE2: " << (U32)mHasSSE2 << std::endl;
+ s << "->mHasAltivec: " << (U32)mHasAltivec << std::endl;
+ s << "->mCPUMhz: " << mCPUMhz << std::endl;
+ s << "->mCPUString: " << mCPUString << std::endl;
}
LLMemoryInfo::LLMemoryInfo()
{
}
-#if LL_LINUX
-#include <unistd.h>
-#include <sys/sysinfo.h>
-#endif
-
U32 LLMemoryInfo::getPhysicalMemory() const
{
#if LL_WINDOWS
@@ -481,7 +526,7 @@ void LLMemoryInfo::stream(std::ostream& s) const
s << "Total Physical Kb: " << phys << std::endl;
#else
// *NOTE: This works on linux. What will it do on other systems?
- FILE* meminfo = LLFile::fopen(MEMINFO_FILE,"r"); /* Flawfinder: ignore */
+ FILE* meminfo = LLFile::fopen(MEMINFO_FILE,"rb");
if(meminfo)
{
char line[MAX_STRING]; /* Flawfinder: ignore */
diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h
index 4b6fbe149b..4c80e2877c 100644
--- a/indra/llcommon/llsys.h
+++ b/indra/llcommon/llsys.h
@@ -66,6 +66,7 @@ private:
bool mHasAltivec;
S32 mCPUMhz;
std::string mFamily;
+ std::string mCPUString;
};
class LLMemoryInfo
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index d28cf96fa0..d93748d069 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -69,7 +69,8 @@ LLButton::LLButton( const LLString& name, const LLRect& rect, const LLString& co
mCurGlowStrength(0.f),
mNeedsHighlight(FALSE),
mCommitOnReturn(TRUE),
- mImagep( NULL )
+ mImagep( NULL ),
+ mIsDirty( FALSE )
{
mUnselectedLabel = name;
mSelectedLabel = name;
@@ -251,8 +252,12 @@ void LLButton::onCommit()
{
(*mClickedCallback)( mCallbackUserData );
}
+
+ mIsDirty = TRUE;
}
+
+
BOOL LLButton::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent)
{
BOOL handled = FALSE;
@@ -262,7 +267,8 @@ BOOL LLButton::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent)
{
(*mClickedCallback)( mCallbackUserData );
}
- handled = TRUE;
+ handled = TRUE;
+ mIsDirty = TRUE;
}
return handled;
}
@@ -279,6 +285,7 @@ BOOL LLButton::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent )
(*mClickedCallback)( mCallbackUserData );
}
handled = TRUE;
+ mIsDirty = TRUE;
}
}
return handled;
@@ -339,6 +346,8 @@ BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask)
{
(*mClickedCallback)( mCallbackUserData );
}
+
+ mIsDirty = TRUE;
}
mMouseDownTimer.stop();
@@ -741,6 +750,7 @@ void LLButton::setToggleState(BOOL b)
void LLButton::setValue(const LLSD& value )
{
mToggleState = value.asBoolean();
+ mIsDirty = FALSE;
}
LLSD LLButton::getValue() const
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 470c34fb64..ba77220a7b 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -80,6 +80,8 @@ public:
// HACK: "committing" a button is the same as clicking on it.
virtual void onCommit();
+ virtual BOOL isDirty() { return mIsDirty; }; // Returns TRUE if the user has clicked on the button at all
+
void setUnselectedLabelColor( const LLColor4& c ) { mUnselectedLabelColor = c; }
void setSelectedLabelColor( const LLColor4& c ) { mSelectedLabelColor = c; }
@@ -256,6 +258,8 @@ protected:
LLPointer<LLImageGL> mImagep;
+ BOOL mIsDirty;
+
static LLFrameTimer sFlashingTimer;
};
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index 215f6d40ed..6c181acc94 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -247,6 +247,18 @@ void LLCheckBoxCtrl::setControlName(const LLString& control_name, LLView* contex
mButton->setControlName(control_name, context);
}
+
+// virtual Returns TRUE if the user has modified this control.
+BOOL LLCheckBoxCtrl::isDirty()
+{
+ if ( mButton )
+ {
+ return mButton->isDirty();
+ }
+ return FALSE; // Shouldn't get here
+}
+
+
// virtual
LLXMLNodePtr LLCheckBoxCtrl::getXML(bool save_children) const
{
diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h
index b2f9c95974..76b197125d 100644
--- a/indra/llui/llcheckboxctrl.h
+++ b/indra/llui/llcheckboxctrl.h
@@ -90,6 +90,8 @@ public:
static void onButtonPress(void *userdata);
+ virtual BOOL isDirty(); // Returns TRUE if the user has modified this control.
+
protected:
// note: value is stored in toggle state of button
LLButton* mButton;
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index b3eff3c8e2..110e40b92d 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -107,6 +107,7 @@ public:
virtual void setRect(const LLRect& rect);
virtual BOOL acceptsTextInput() const;
virtual void onCommit();
+ virtual BOOL isDirty() { return ( mText.getString() != mPrevText ); }; // Returns TRUE if the user has changed value at all
// assumes UTF8 text
virtual void setValue(const LLSD& value );
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index f07cbec328..7b96ec5655 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -128,6 +128,9 @@ public:
}
};
+ // Returns TRUE if the user has modified this control. Editable controls should override this.
+ virtual BOOL isDirty() { return FALSE; };
+
protected:
virtual void onFocusReceived();
virtual void onFocusLost();
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index 19c51b08b2..2ff1028f74 100644
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -757,7 +757,7 @@ BOOL lscript_compile(char *filename, BOOL is_god_like = FALSE)
S32 yywrap()
{
-#ifdef FLEX_SCANNER
+#if defined(FLEX_SCANNER) && !defined(LL_WINDOWS)
// get gcc to stop complaining about lack of use of yyunput
(void) yyunput;
#endif
diff --git a/indra/newview/linux_tools/client-readme.txt b/indra/newview/linux_tools/client-readme.txt
index 297fd0a063..e07384cc93 100644
--- a/indra/newview/linux_tools/client-readme.txt
+++ b/indra/newview/linux_tools/client-readme.txt
@@ -235,9 +235,8 @@ For problems and discussion concerning unofficial (not secondlife.com)
releases, please contact your packager or the SLDev mailing list:
<https://lists.secondlife.com/cgi-bin/mailman/listinfo/sldev>
-In-world help: Please use the 'Help' menu in the client for general
-non-Linux-specific Second Life help including live support from the fabulous
-'Help Request' team.
+In-world help: Please use the 'Help' menu in the client for various
+non-Linux-specific Second Life help options.
In-world discussion: There is a 'Linux Client Users' group
inside Second Life which is free to join. You can find it by pressing
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index dbbe1affb9..45f0b448e2 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -6750,7 +6750,7 @@ void LLAgent::removeWearable( EWearableType type )
if( old_wearable->isDirty() )
{
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
- gViewerWindow->alertXml("WearableSave", LLAgent::onRemoveWearableDialog, (void*)(S32)type );
+ gViewerWindow->alertXml("WearableSave", LLAgent::onRemoveWearableDialog, (void*)type );
return;
}
else
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 1e9acc96c1..4b18c0c91a 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2453,6 +2453,10 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl *ctrl, void *userdata)
U8 media_auto_scale = self->mMediaAutoScaleCheck->get();
LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID();
+ // Remove leading/trailing whitespace (common when copying/pasting)
+ LLString::trim(music_url);
+ LLString::trim(media_url);
+
// Push data into current parcel
parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local);
parcel->setMusicURL(music_url.c_str());
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index d8ed27173d..365926863e 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -159,6 +159,8 @@ LLFloaterWorldMap::LLFloaterWorldMap()
mCompletingRegionName(""),
mWaitingForTracker(FALSE),
mExactMatch(FALSE),
+ mIsClosing(FALSE),
+ mSetToUserPosition(TRUE),
mTrackedLocation(0,0,0),
mTrackedStatus(LLTracker::TRACKING_NOTHING)
{
@@ -335,6 +337,9 @@ void LLFloaterWorldMap::show(void*, BOOL center_on_target)
gFloaterWorldMap->buildAvatarIDList();
gFloaterWorldMap->buildLandmarkIDLists();
+
+ // If nothing is being tracked, set flag so the user position will be found
+ gFloaterWorldMap->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
}
if (center_on_target)
@@ -497,7 +502,7 @@ void LLFloaterWorldMap::draw()
childSetEnabled("Teleport", (BOOL)tracking_status);
// childSetEnabled("Clear", (BOOL)tracking_status);
childSetEnabled("Show Destination", (BOOL)tracking_status || gWorldMap->mIsTrackingUnknownLocation);
- childSetEnabled("copy_slurl", (BOOL)tracking_status);
+ childSetEnabled("copy_slurl", (mSLURL.size() > 0) );
setMouseOpaque(TRUE);
mDragHandle->setMouseOpaque(TRUE);
@@ -641,7 +646,8 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
return;
}
- LLString sim_name = gWorldMap->simNameFromPosGlobal( pos_global );
+ LLString sim_name;
+ gWorldMap->simNameFromPosGlobal( pos_global, sim_name );
F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS );
F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS );
LLString full_name = llformat("%s (%d, %d, %d)",
@@ -662,15 +668,51 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
void LLFloaterWorldMap::updateLocation()
{
+ bool gotSimName;
+
+ LLTracker::ETrackingStatus status = LLTracker::getTrackingStatus();
+
// These values may get updated by a message, so need to check them every frame
// The fields may be changed by the user, so only update them if the data changes
LLVector3d pos_global = LLTracker::getTrackedPositionGlobal();
if (pos_global.isExactlyZero())
{
+ LLVector3d agentPos = gAgent.getPositionGlobal();
+
+ // Set to avatar's current postion if nothing is selected
+ if ( status == LLTracker::TRACKING_NOTHING && mSetToUserPosition )
+ {
+ // Make sure we know where we are before setting the current user position
+ LLString agent_sim_name;
+ gotSimName = gWorldMap->simNameFromPosGlobal( agentPos, agent_sim_name );
+ if ( gotSimName )
+ {
+ mSetToUserPosition = FALSE;
+
+ // Fill out the location field
+ childSetValue("location", agent_sim_name);
+
+ // Figure out where user is
+ LLVector3d agentPos = gAgent.getPositionGlobal();
+
+ S32 agent_x = llround( (F32)fmod( agentPos.mdV[VX], (F64)REGION_WIDTH_METERS ) );
+ S32 agent_y = llround( (F32)fmod( agentPos.mdV[VY], (F64)REGION_WIDTH_METERS ) );
+ S32 agent_z = llround( (F32)agentPos.mdV[VZ] );
+
+ childSetValue("spin x", LLSD(agent_x) );
+ childSetValue("spin y", LLSD(agent_y) );
+ childSetValue("spin z", LLSD(agent_z) );
+
+ // Set the current SLURL
+ mSLURL = LLWeb::escapeURL( llformat("http://slurl.com/secondlife/%s/%d/%d/%d",
+ agent_sim_name.c_str(), agent_x, agent_y, agent_z) );
+ }
+ }
+
return; // invalid location
}
- LLTracker::ETrackingStatus status = LLTracker::getTrackingStatus();
- LLString sim_name = gWorldMap->simNameFromPosGlobal( pos_global );
+ LLString sim_name;
+ gotSimName = gWorldMap->simNameFromPosGlobal( pos_global, sim_name );
if ((status != LLTracker::TRACKING_NOTHING) &&
(status != mTrackedStatus || pos_global != mTrackedLocation || sim_name != mTrackedSimName))
{
@@ -697,8 +739,16 @@ void LLFloaterWorldMap::updateLocation()
childSetValue("spin y", LLSD(region_y) );
childSetValue("spin z", LLSD((F32)pos_global.mdV[VZ]) );
- mSLURL = LLWeb::escapeURL(llformat("http://slurl.com/secondlife/%s/%d/%d/%d",
- sim_name.c_str(), llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ])));
+ // simNameFromPosGlobal can fail, so don't give the user an invalid SLURL
+ if ( gotSimName )
+ {
+ mSLURL = LLWeb::escapeURL(llformat("http://slurl.com/secondlife/%s/%d/%d/%d",
+ sim_name.c_str(), llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ])));
+ }
+ else
+ { // Empty SLURL will disable the "Copy SLURL to clipboard" button
+ mSLURL = "";
+ }
}
}
@@ -1082,6 +1132,9 @@ void LLFloaterWorldMap::onLandmarkComboCommit( LLUICtrl* ctrl, void* userdata )
self->trackLandmark( item_id);
onShowTargetBtn(self);
+
+ // Reset to user postion if nothing is tracked
+ self->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
}
// static
@@ -1133,6 +1186,10 @@ void LLFloaterWorldMap::onAvatarComboCommit( LLUICtrl* ctrl, void* userdata )
self->trackAvatar(new_avatar_id, name);
onShowTargetBtn(self);
}
+ else
+ { // Reset to user postion if nothing is tracked
+ self->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
+ }
}
// static
@@ -1188,6 +1245,8 @@ void LLFloaterWorldMap::onClearBtn(void* data)
self->mTrackedStatus = LLTracker::TRACKING_NOTHING;
LLTracker::stopTracking((void *)(intptr_t)TRUE);
gWorldMap->mIsTrackingUnknownLocation = FALSE;
+ self->mSLURL = ""; // Clear the SLURL since it's invalid
+ self->mSetToUserPosition = TRUE; // Revert back to the current user position
}
// static
@@ -1206,6 +1265,10 @@ void LLFloaterWorldMap::onShowTargetBtn(void* data)
void LLFloaterWorldMap::onShowAgentBtn(void* data)
{
LLWorldMapView::setPan( 0, 0, FALSE); // FALSE == animate
+
+ // Set flag so user's location will be displayed if not tracking anything else
+ LLFloaterWorldMap* self = (LLFloaterWorldMap*)data;
+ self->mSetToUserPosition = TRUE;
}
// static
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index 5867ea179c..37143b4c1b 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -156,6 +156,7 @@ protected:
BOOL mExactMatch;
BOOL mIsClosing;
+ BOOL mSetToUserPosition;
LLVector3d mTrackedLocation;
LLTracker::ETrackingStatus mTrackedStatus;
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 79e3315115..34a062576f 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -548,16 +548,15 @@ void LLFolderViewItem::rename(const LLString& new_name)
if( !new_name.empty() )
{
mLabel = new_name.c_str();
- BOOL is_renamed = TRUE;
if( mListener )
{
- is_renamed = mListener->renameItem(new_name);
- }
- if(mParentFolder && is_renamed)
- {
- mParentFolder->resort(this);
+ mListener->renameItem(new_name);
+
+ if(mParentFolder)
+ {
+ mParentFolder->resort(this);
+ }
}
- //refresh();
}
}
@@ -2970,7 +2969,10 @@ void LLFolderView::sanitizeSelection()
// store off current item in case it is automatically deselected
// and we want to preserve context
LLFolderViewItem* original_selected_item = getCurSelectedItem();
-
+
+ // Cache "Show all folders" filter setting
+ BOOL show_all_folders = (getRoot()->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS);
+
std::vector<LLFolderViewItem*> items_to_remove;
selected_items_t::iterator item_iter;
for (item_iter = mSelectedItems.begin(); item_iter != mSelectedItems.end(); ++item_iter)
@@ -2981,10 +2983,20 @@ void LLFolderView::sanitizeSelection()
BOOL visible = item->potentiallyVisible(); // initialize from filter state for this item
// modify with parent open and filters states
LLFolderViewFolder* parent_folder = item->getParentFolder();
- while(parent_folder)
+ if ( parent_folder )
{
- visible = visible && parent_folder->isOpen() && parent_folder->potentiallyVisible();
- parent_folder = parent_folder->getParentFolder();
+ if ( show_all_folders )
+ { // "Show all folders" is on, so this folder is visible
+ visible = TRUE;
+ }
+ else
+ { // Move up through parent folders and see what's visible
+ while(parent_folder)
+ {
+ visible = visible && parent_folder->isOpen() && parent_folder->potentiallyVisible();
+ parent_folder = parent_folder->getParentFolder();
+ }
+ }
}
// deselect item if any ancestor is closed or didn't pass filter requirements.
@@ -3000,7 +3012,7 @@ void LLFolderView::sanitizeSelection()
for (other_item_iter = mSelectedItems.begin(); other_item_iter != mSelectedItems.end(); ++other_item_iter)
{
LLFolderViewItem* other_item = *other_item_iter;
- for(LLFolderViewFolder* parent_folder = other_item->getParentFolder(); parent_folder; parent_folder = parent_folder->getParentFolder())
+ for( parent_folder = other_item->getParentFolder(); parent_folder; parent_folder = parent_folder->getParentFolder())
{
if (parent_folder == item)
{
@@ -3339,19 +3351,30 @@ void LLFolderView::openSelectedItems( void )
{
S32 left, top;
gFloaterView->getNewFloaterPosition(&left, &top);
-
LLMultiPreview* multi_previewp = new LLMultiPreview(LLRect(left, top, left + 300, top - 100));
-
- LLFloater::setFloaterHost(multi_previewp);
+ gFloaterView->getNewFloaterPosition(&left, &top);
+ LLMultiProperties* multi_propertiesp = new LLMultiProperties(LLRect(left, top, left + 300, top - 100));
selected_items_t::iterator item_it;
for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it)
{
- (*item_it)->open(); /* Flawfinder: ignore */
+ // IT_{OBJECT,ATTACHMENT} creates LLProperties
+ // floaters; others create LLPreviews. Put
+ // each one in the right type of container.
+ LLFolderViewEventListener* listener = (*item_it)->getListener();
+ bool is_prop = listener && (listener->getInventoryType() == LLInventoryType::IT_OBJECT || listener->getInventoryType() == LLInventoryType::IT_ATTACHMENT);
+ if (is_prop)
+ LLFloater::setFloaterHost(multi_propertiesp);
+ else
+ LLFloater::setFloaterHost(multi_previewp);
+ (*item_it)->open();
}
LLFloater::setFloaterHost(NULL);
- multi_previewp->open(); /* Flawfinder: ignore */
+ // *NOTE: LLMulti* will safely auto-delete when open'd
+ // without any children.
+ multi_previewp->open();
+ multi_propertiesp->open();
}
}
}
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index d66916e8f1..be1c26381b 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -186,6 +186,11 @@ void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id,
BOOL inform_server,
BOOL deactivate_similar)
{
+ if( !gAssetStorage )
+ {
+ llwarns << "LLGestureManager::activateGestureWithAsset without valid gAssetStorage" << llendl;
+ return;
+ }
// If gesture is already active, nothing to do.
if (isGestureActive(item_id))
{
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index b9b9cda4e8..afba55f4aa 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -85,20 +85,20 @@ LLPanelClassified::LLPanelClassified(BOOL in_finder)
mPriceForListing(0),
mDataRequested(FALSE),
mPaidFor(FALSE),
- mPosGlobal(),
- mSnapshotCtrl(NULL),
- mNameEditor(NULL),
- mDescEditor(NULL),
- mLocationEditor(NULL),
+ mPosGlobal(),
+ mSnapshotCtrl(NULL),
+ mNameEditor(NULL),
+ mDescEditor(NULL),
+ mLocationEditor(NULL),
mCategoryCombo(NULL),
+ mMatureCheck(NULL),
+ mAutoRenewCheck(NULL),
mUpdateBtn(NULL),
- mTeleportBtn(NULL),
- mMapBtn(NULL),
+ mTeleportBtn(NULL),
+ mMapBtn(NULL),
mProfileBtn(NULL),
mInfoText(NULL),
- mMatureCheck(NULL),
- mAutoRenewCheck(NULL),
- mSetBtn(NULL),
+ mSetBtn(NULL),
mClickThroughText(NULL)
{
sAllPanels.push_back(this);
@@ -825,6 +825,7 @@ void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data)
void LLPanelClassified::onFocusReceived(LLUICtrl* ctrl, void* data)
{
// allow the data to be saved
+ // Dave/Simon TODO: replace this with better isDirty() functionality
onCommitAny(ctrl, data);
}
diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h
index ca6a05eb31..21f6f9263c 100644
--- a/indra/newview/llpanelclassified.h
+++ b/indra/newview/llpanelclassified.h
@@ -95,8 +95,8 @@ protected:
BOOL mInFinder;
bool mDirty;
bool mForceClose;
- LLUUID mClassifiedID;
- LLUUID mRequestedID;
+ LLUUID mClassifiedID;
+ LLUUID mRequestedID;
LLUUID mCreatorID;
LLUUID mParcelID;
S32 mPriceForListing;
@@ -109,24 +109,25 @@ protected:
BOOL mPaidFor;
LLString mSimName;
- LLVector3d mPosGlobal;
+ LLVector3d mPosGlobal;
- LLTextureCtrl* mSnapshotCtrl;
- LLLineEditor* mNameEditor;
+ // Values the user may change
+ LLTextureCtrl* mSnapshotCtrl;
+ LLLineEditor* mNameEditor;
LLLineEditor* mDateEditor;
- LLTextEditor* mDescEditor;
- LLLineEditor* mLocationEditor;
+ LLTextEditor* mDescEditor;
+ LLLineEditor* mLocationEditor;
LLComboBox* mCategoryCombo;
+ LLCheckBoxCtrl* mMatureCheck;
+ LLCheckBoxCtrl* mAutoRenewCheck;
LLButton* mUpdateBtn;
- LLButton* mTeleportBtn;
- LLButton* mMapBtn;
+ LLButton* mTeleportBtn;
+ LLButton* mMapBtn;
LLButton* mProfileBtn;
LLTextBox* mInfoText;
- LLCheckBoxCtrl* mMatureCheck;
- LLCheckBoxCtrl* mAutoRenewCheck;
- LLButton* mSetBtn;
+ LLButton* mSetBtn;
LLTextBox* mClickThroughText;
LLRect mSnapshotSize;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index ab735c97ad..117f020793 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -191,6 +191,7 @@ static bool gGotUseCircuitCodeAck = false;
LLString gInitialOutfit;
LLString gInitialOutfitGender; // "male" or "female"
+static bool gUseCircuitCallbackCalled = false;
//
// local function declaration
@@ -775,6 +776,15 @@ BOOL idle_startup()
snprintf(gUserServerName, MAX_STRING, "%s", server_label.c_str()); /* Flawfinder: ignore */
}
+ // Dave S temp reversion of SL-49082 fix - this code breaks command line urls. I'll fix this with
+ // the control isDirty() functionality tomorrow.
+
+ //if ( userPickedServer )
+ //{ // User picked a grid from the popup, so clear the stored urls so they will be re-generated from gUserServerChoice
+ // auth_uris.clear();
+ // resetURIs();
+ //}
+
LLString location;
LLPanelLogin::getLocation( location );
LLURLSimString::setString( location );
@@ -1514,12 +1524,21 @@ BOOL idle_startup()
{
update_texture_fetch();
+ if ( gViewerWindow != NULL && gToolMgr != NULL )
+ { // This isn't the first logon attempt, so show the UI
+ gViewerWindow->setNormalControlsVisible( TRUE );
+ }
+
// Initialize UI
if (!gNoRender)
{
// Initialize all our tools. Must be done after saved settings loaded.
- gToolMgr = new LLToolMgr();
- gToolMgr->initTools();
+ if ( gToolMgr == NULL )
+ {
+ gToolMgr = new LLToolMgr();
+ gToolMgr->initTools();
+ }
+
// Quickly get something onscreen to look at.
gViewerWindow->initWorldUI();
@@ -1550,14 +1569,20 @@ BOOL idle_startup()
gXferManager->registerCallbacks(gMessageSystem);
- gCacheName = new LLCacheName(gMessageSystem);
- gCacheName->addObserver(callback_cache_name);
-
- // Load stored cache if possible
- load_name_cache();
+ if ( gCacheName == NULL )
+ {
+ gCacheName = new LLCacheName(gMessageSystem);
+ gCacheName->addObserver(callback_cache_name);
+
+ // Load stored cache if possible
+ load_name_cache();
+ }
// Data storage for map of world.
- gWorldMap = new LLWorldMap();
+ if ( gWorldMap == NULL )
+ {
+ gWorldMap = new LLWorldMap();
+ }
// register null callbacks for audio until the audio system is initialized
gMessageSystem->setHandlerFuncFast(_PREHASH_SoundTrigger, null_message_callback, NULL);
@@ -1639,6 +1664,9 @@ BOOL idle_startup()
{
llwarns << "Attempting to connect to simulator with a zero circuit code!" << llendl;
}
+
+ gUseCircuitCallbackCalled = FALSE;
+
msg->enableCircuit(first_sim, TRUE);
// now, use the circuit info to tell simulator about us!
llinfos << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << llendl;
@@ -2780,10 +2808,9 @@ void use_circuit_callback(void**, S32 result)
{
// bail if we're quitting.
if(gQuit) return;
- static bool called = false;
- if(!called)
+ if( !gUseCircuitCallbackCalled )
{
- called = true;
+ gUseCircuitCallbackCalled = true;
if (result)
{
// Make sure user knows something bad happened. JC
@@ -3701,5 +3728,8 @@ void reset_login()
{
gStartupState = STATE_LOGIN_SHOW;
- // do cleanup here of in-world UI?
+ if ( gViewerWindow )
+ { // Hide menus and normal buttons
+ gViewerWindow->setNormalControlsVisible( FALSE );
+ }
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 3e097d5600..bc0be1b5a2 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7431,7 +7431,7 @@ class LLViewCheckRenderType : public view_listener_t
bool new_value = false;
if (type == "particles")
{
- new_value = LLPipeline::toggleRenderTypeControlNegated((void *)(S32)LLPipeline::RENDER_TYPE_PARTICLES);
+ new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES);
}
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
return true;
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 0038c0cf1c..7215f7948f 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -202,7 +202,7 @@ class LLFileUploadImage : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
- const char* filename = upload_pick((void *)(S32)LLFilePicker::FFLOAD_IMAGE);
+ const char* filename = upload_pick((void *)LLFilePicker::FFLOAD_IMAGE);
if (filename)
{
LLFloaterImagePreview* floaterp = new LLFloaterImagePreview(filename);
@@ -216,7 +216,7 @@ class LLFileUploadSound : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
- const char* filename = upload_pick((void*)((S32)LLFilePicker::FFLOAD_WAV));
+ const char* filename = upload_pick((void*)LLFilePicker::FFLOAD_WAV);
if (filename)
{
LLFloaterNameDesc* floaterp = new LLFloaterNameDesc(filename);
@@ -230,7 +230,7 @@ class LLFileUploadAnim : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
- const char* filename = upload_pick((void*)((S32)LLFilePicker::FFLOAD_ANIM));
+ const char* filename = upload_pick((void*)LLFilePicker::FFLOAD_ANIM);
if (filename)
{
LLFloaterAnimPreview* floaterp = new LLFloaterAnimPreview(filename);
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index d6b5534153..dd2c1c6d76 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1813,117 +1813,120 @@ void LLViewerWindow::initWorldUI()
S32 width = mRootView->getRect().getWidth();
LLRect full_window(0, height, width, 0);
- LLRect bar_rect(-1, STATUS_BAR_HEIGHT, width+1, -1);
- gToolBar = new LLToolBar("toolbar", bar_rect);
-
- LLRect chat_bar_rect(-1,CHAT_BAR_HEIGHT, width+1, -1);
- chat_bar_rect.translate(0, STATUS_BAR_HEIGHT-1);
- gChatBar = new LLChatBar("chat", chat_bar_rect);
-
- bar_rect.translate(0, STATUS_BAR_HEIGHT-1);
- bar_rect.translate(0, CHAT_BAR_HEIGHT-1);
- gOverlayBar = new LLOverlayBar("overlay", bar_rect);
-
- // panel containing chatbar, toolbar, and overlay, over floaters
- LLRect bottom_rect(-1, 2*STATUS_BAR_HEIGHT + CHAT_BAR_HEIGHT, width+1, -1);
- gBottomPanel = new LLBottomPanel("bottom panel", bottom_rect);
+ if ( gToolBar == NULL ) // Don't re-enter if objects are alreay created
+ {
+ LLRect bar_rect(-1, STATUS_BAR_HEIGHT, width+1, -1);
+ gToolBar = new LLToolBar("toolbar", bar_rect);
- // the order here is important
- gBottomPanel->addChild(gChatBar);
- gBottomPanel->addChild(gToolBar);
- gBottomPanel->addChild(gOverlayBar);
- mRootView->addChild(gBottomPanel);
+ LLRect chat_bar_rect(-1,CHAT_BAR_HEIGHT, width+1, -1);
+ chat_bar_rect.translate(0, STATUS_BAR_HEIGHT-1);
+ gChatBar = new LLChatBar("chat", chat_bar_rect);
- // View for hover information
- gHoverView = new LLHoverView("gHoverView", full_window);
- gHoverView->setVisible(TRUE);
- mRootView->addChild(gHoverView);
+ bar_rect.translate(0, STATUS_BAR_HEIGHT-1);
+ bar_rect.translate(0, CHAT_BAR_HEIGHT-1);
+ gOverlayBar = new LLOverlayBar("overlay", bar_rect);
- //
- // Map
- //
- // TODO: Move instance management into class
- gFloaterMap = new LLFloaterMap("Map");
- gFloaterMap->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT);
- gFloaterMap->setVisible( gSavedSettings.getBOOL("ShowMiniMap") );
+ // panel containing chatbar, toolbar, and overlay, over floaters
+ LLRect bottom_rect(-1, 2*STATUS_BAR_HEIGHT + CHAT_BAR_HEIGHT, width+1, -1);
+ gBottomPanel = new LLBottomPanel("bottom panel", bottom_rect);
- // keep onscreen
- gFloaterView->adjustToFitScreen(gFloaterMap, FALSE);
+ // the order here is important
+ gBottomPanel->addChild(gChatBar);
+ gBottomPanel->addChild(gToolBar);
+ gBottomPanel->addChild(gOverlayBar);
+ mRootView->addChild(gBottomPanel);
- if (gSavedSettings.getBOOL("ShowCameraControls"))
- {
- LLFloaterCamera::show(NULL);
- }
-
- if (gSavedSettings.getBOOL("ShowMovementControls"))
- {
- LLFloaterMove::show(NULL);
- }
-
- // Must have one global chat floater so it can actually store
- // the history. JC
- gFloaterChat = new LLFloaterChat();
- gFloaterChat->setVisible( FALSE );
+ // View for hover information
+ gHoverView = new LLHoverView("gHoverView", full_window);
+ gHoverView->setVisible(TRUE);
+ mRootView->addChild(gHoverView);
- if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) gFloaterChat->loadHistory();
+ //
+ // Map
+ //
+ // TODO: Move instance management into class
+ gFloaterMap = new LLFloaterMap("Map");
+ gFloaterMap->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT);
+ gFloaterMap->setVisible( gSavedSettings.getBOOL("ShowMiniMap") );
- gIMView = new LLIMView("gIMView", LLRect() );
- gIMView->setFollowsAll();
- mRootView->addChild(gIMView);
+ // keep onscreen
+ gFloaterView->adjustToFitScreen(gFloaterMap, FALSE);
- LLRect morph_view_rect = full_window;
- morph_view_rect.stretch( -STATUS_BAR_HEIGHT );
- morph_view_rect.mTop = full_window.mTop - 32;
- gMorphView = new LLMorphView("gMorphView", morph_view_rect );
- mRootView->addChild(gMorphView);
- gMorphView->setVisible(FALSE);
+ if (gSavedSettings.getBOOL("ShowCameraControls"))
+ {
+ LLFloaterCamera::show(NULL);
+ }
+
+ if (gSavedSettings.getBOOL("ShowMovementControls"))
+ {
+ LLFloaterMove::show(NULL);
+ }
+
+ // Must have one global chat floater so it can actually store
+ // the history. JC
+ gFloaterChat = new LLFloaterChat();
+ gFloaterChat->setVisible( FALSE );
+
+ if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) gFloaterChat->loadHistory();
+
+ gIMView = new LLIMView("gIMView", LLRect() );
+ gIMView->setFollowsAll();
+ mRootView->addChild(gIMView);
+
+ LLRect morph_view_rect = full_window;
+ morph_view_rect.stretch( -STATUS_BAR_HEIGHT );
+ morph_view_rect.mTop = full_window.mTop - 32;
+ gMorphView = new LLMorphView("gMorphView", morph_view_rect );
+ mRootView->addChild(gMorphView);
+ gMorphView->setVisible(FALSE);
- gFloaterMute = new LLFloaterMute();
- gFloaterMute->setVisible(FALSE);
+ gFloaterMute = new LLFloaterMute();
+ gFloaterMute->setVisible(FALSE);
- LLWorldMapView::initClass();
+ LLWorldMapView::initClass();
- LLRect world_map_rect = gSavedSettings.getRect("FloaterWorldMapRect");
- // if 0,0,0,0 then use fullscreen
- if (world_map_rect.mTop == 0
- && world_map_rect.mLeft == 0
- && world_map_rect.mRight == 0
- && world_map_rect.mBottom == 0)
- {
- world_map_rect.set(0, height-TOOL_BAR_HEIGHT, width, STATUS_BAR_HEIGHT);
- world_map_rect.stretch(-4);
- gSavedSettings.setRect("FloaterWorldMapRect", world_map_rect);
- }
- gFloaterWorldMap = new LLFloaterWorldMap();
- gFloaterWorldMap->setVisible(FALSE);
+ LLRect world_map_rect = gSavedSettings.getRect("FloaterWorldMapRect");
+ // if 0,0,0,0 then use fullscreen
+ if (world_map_rect.mTop == 0
+ && world_map_rect.mLeft == 0
+ && world_map_rect.mRight == 0
+ && world_map_rect.mBottom == 0)
+ {
+ world_map_rect.set(0, height-TOOL_BAR_HEIGHT, width, STATUS_BAR_HEIGHT);
+ world_map_rect.stretch(-4);
+ gSavedSettings.setRect("FloaterWorldMapRect", world_map_rect);
+ }
+ gFloaterWorldMap = new LLFloaterWorldMap();
+ gFloaterWorldMap->setVisible(FALSE);
- //
- // Tools for building
- //
+ //
+ // Tools for building
+ //
- // Toolbox floater
- init_menus();
+ // Toolbox floater
+ init_menus();
- gFloaterTools = new LLFloaterTools();
- gFloaterTools->setVisible(FALSE);
+ gFloaterTools = new LLFloaterTools();
+ gFloaterTools->setVisible(FALSE);
- // Status bar
- S32 menu_bar_height = gMenuBarView->getRect().getHeight();
- LLRect root_rect = gViewerWindow->getRootView()->getRect();
- LLRect status_rect(0, root_rect.getHeight(), root_rect.getWidth(), root_rect.getHeight() - menu_bar_height);
- gStatusBar = new LLStatusBar("status", status_rect);
- gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP);
+ // Status bar
+ S32 menu_bar_height = gMenuBarView->getRect().getHeight();
+ LLRect root_rect = gViewerWindow->getRootView()->getRect();
+ LLRect status_rect(0, root_rect.getHeight(), root_rect.getWidth(), root_rect.getHeight() - menu_bar_height);
+ gStatusBar = new LLStatusBar("status", status_rect);
+ gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP);
- gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE);
- gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight());
- // sync bg color with menu bar
- gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor() );
+ gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE);
+ gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight());
+ // sync bg color with menu bar
+ gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor() );
- gViewerWindow->getRootView()->addChild(gStatusBar);
+ gViewerWindow->getRootView()->addChild(gStatusBar);
- // menu holder appears on top to get first pass at all mouse events
- gViewerWindow->getRootView()->sendChildToFront(gMenuHolder);
+ // menu holder appears on top to get first pass at all mouse events
+ gViewerWindow->getRootView()->sendChildToFront(gMenuHolder);
+ }
}
@@ -2144,6 +2147,23 @@ void LLViewerWindow::reshape(S32 width, S32 height)
}
}
+
+// Hide normal UI when a logon fails
+void LLViewerWindow::setNormalControlsVisible( BOOL visible )
+{
+ if ( gBottomPanel )
+ gBottomPanel->setVisible( visible );
+
+ if ( gMenuBarView )
+ gMenuBarView->setVisible( visible );
+
+ if ( gStatusBar )
+ gStatusBar->setVisible( visible );
+}
+
+
+
+
void LLViewerWindow::drawDebugText()
{
mDebugText->draw();
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index af5ffd7914..91bf0d9918 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -154,6 +154,9 @@ public:
BOOL handleKey(KEY key, MASK mask);
void handleScrollWheel (S32 clicks);
+ // Hide normal UI when a logon fails, re-show everything when logon is attempted again
+ void setNormalControlsVisible( BOOL visible );
+
// Handle the application becoming active (frontmost) or inactive
//BOOL handleActivate(BOOL activate);
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp
index e61b5f1af5..6fea695353 100644
--- a/indra/newview/llworldmap.cpp
+++ b/indra/newview/llworldmap.cpp
@@ -225,20 +225,25 @@ LLSimInfo* LLWorldMap::simInfoFromName(const LLString& sim_name)
return sim_info;
}
-LLString LLWorldMap::simNameFromPosGlobal(const LLVector3d& pos_global)
+bool LLWorldMap::simNameFromPosGlobal(const LLVector3d& pos_global, LLString & outSimName )
{
+ bool gotSimName = true;
+
U64 handle = to_region_handle(pos_global);
sim_info_map_t::iterator it = mSimInfoMap.find(handle);
if (it != mSimInfoMap.end())
{
LLSimInfo* info = (*it).second;
- return info->mName.c_str();
+ outSimName = info->mName.c_str();
}
else
{
- return "(unknown region)";
+ gotSimName = false;
+ outSimName = "(unknown region)";
}
+
+ return gotSimName;
}
void LLWorldMap::setCurrentLayer(S32 layer, bool request_layer)
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index 76ab88de1e..bdf8a7e735 100644
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -115,8 +115,8 @@ public:
// Returns simulator information for named sim, or NULL if non-existent
LLSimInfo* simInfoFromName(const LLString& sim_name);
- // Returns simulator name
- LLString simNameFromPosGlobal(const LLVector3d& pos_global);
+ // Gets simulator name for a global position, returns true if it was found
+ bool simNameFromPosGlobal(const LLVector3d& pos_global, LLString & outSimName );
// Sets the current layer
void setCurrentLayer(S32 layer, bool request_layer = false);
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 0fe81baae9..c93b302312 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -414,6 +414,7 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libuuid.so", "libuuid.so.1")
self.path("libSDL-1.2.so.0")
self.path("libELFIO.so")
+ #self.path("libresolv.so") - don't bundle
#self.path("libtcmalloc.so.0") - bugged
#self.path("libstacktrace.so.0") - probably bugged
self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason