summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/contributions.txt3
-rw-r--r--indra/llcharacter/llgesture.cpp2
-rw-r--r--indra/llcharacter/llgesture.h2
-rw-r--r--indra/llcommon/lltimer.h2
-rw-r--r--indra/llcommon/llversionviewer.h2
-rwxr-xr-xindra/llcrashlogger/llcrashlogger.cpp63
-rwxr-xr-xindra/llcrashlogger/llcrashlogger.h2
-rw-r--r--indra/llimage/llimage.cpp34
-rw-r--r--indra/llimage/llimage.h15
-rw-r--r--indra/llimage/llimagebmp.h4
-rw-r--r--indra/llimage/llimagedxt.cpp4
-rw-r--r--indra/llimage/llimagedxt.h8
-rw-r--r--indra/llimage/llimagej2c.cpp4
-rw-r--r--indra/llimage/llimagej2c.h6
-rw-r--r--indra/llimage/llimagejpeg.h4
-rw-r--r--indra/llimage/llimagepng.h4
-rw-r--r--indra/llimage/llimageworker.cpp2
-rw-r--r--indra/llinventory/llinventory.cpp18
-rw-r--r--indra/llinventory/llinventory.h8
-rw-r--r--indra/llmath/lloctree.h2
-rw-r--r--indra/llmath/llvolume.cpp34
-rw-r--r--indra/llmath/llvolumemgr.cpp11
-rw-r--r--indra/llmath/llvolumemgr.h2
-rw-r--r--indra/llmessage/llblowfishcipher.cpp3
-rw-r--r--indra/llmessage/llcurl.cpp1
-rw-r--r--indra/llmessage/llcurl.h9
-rw-r--r--indra/llmessage/llhttpnode.cpp8
-rw-r--r--indra/llmessage/llhttpnode.h1
-rw-r--r--indra/llmessage/llnamevalue.h1
-rw-r--r--indra/llmessage/llpartdata.cpp4
-rw-r--r--indra/llmessage/llpartdata.h5
-rw-r--r--indra/llrender/llfontgl.cpp14
-rw-r--r--indra/llrender/llfontgl.h4
-rw-r--r--indra/llui/llcheckboxctrl.h2
-rw-r--r--indra/llui/lldraghandle.h1
-rw-r--r--indra/llui/llfloater.cpp28
-rw-r--r--indra/llui/llfloater.h8
-rw-r--r--indra/llui/llmenugl.cpp28
-rw-r--r--indra/llui/llmenugl.h12
-rw-r--r--indra/llui/llmodaldialog.h2
-rw-r--r--indra/llui/llmultisliderctrl.cpp2
-rw-r--r--indra/llui/llmultisliderctrl.h2
-rw-r--r--indra/llui/llpanel.cpp12
-rw-r--r--indra/llui/llscrollcontainer.h2
-rw-r--r--indra/llui/llscrolllistctrl.cpp3
-rw-r--r--indra/llui/lltabcontainer.h2
-rw-r--r--indra/llui/lltexteditor.h2
-rw-r--r--indra/llui/llui.cpp7
-rw-r--r--indra/llui/llui.h6
-rw-r--r--indra/llui/llview.cpp4
-rw-r--r--indra/llui/llview.h8
-rw-r--r--indra/llwindow/llwindowmacosx.cpp2
-rw-r--r--indra/llwindow/llwindowmacosx.h3
-rw-r--r--indra/llwindow/llwindowsdl.cpp25
-rw-r--r--indra/llwindow/llwindowwin32.cpp26
-rw-r--r--indra/llxml/llcontrol.cpp1
-rw-r--r--indra/mac_updater/mac_updater.cpp17
-rw-r--r--indra/newview/English.lproj/InfoPlist.strings4
-rw-r--r--indra/newview/Info-SecondLife.plist2
-rw-r--r--indra/newview/app_settings/settings.xml32
-rw-r--r--indra/newview/app_settings/windlight/skies/A%2D6PM.xml11
-rw-r--r--indra/newview/featuretable.txt9
-rw-r--r--indra/newview/featuretable_linux.txt2
-rw-r--r--indra/newview/featuretable_mac.txt2
-rw-r--r--indra/newview/gpu_table.txt34
-rw-r--r--indra/newview/installers/windows/installer_template.nsi21
-rw-r--r--indra/newview/llappviewer.cpp95
-rw-r--r--indra/newview/llappviewer.h10
-rw-r--r--indra/newview/lldrawable.cpp6
-rw-r--r--indra/newview/lldrawable.h2
-rw-r--r--indra/newview/lldrawpoolbump.cpp4
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp2
-rw-r--r--indra/newview/llfasttimerview.cpp4
-rw-r--r--indra/newview/llfilepicker.cpp1
-rw-r--r--indra/newview/llfloaterauction.cpp2
-rw-r--r--indra/newview/llfloaterimagepreview.cpp9
-rw-r--r--indra/newview/llfloaterimagepreview.h2
-rw-r--r--indra/newview/llfloaterscriptdebug.cpp4
-rw-r--r--indra/newview/llfloaterscriptdebug.h2
-rw-r--r--indra/newview/llfloatersnapshot.cpp10
-rw-r--r--indra/newview/llfolderview.cpp3
-rw-r--r--indra/newview/llfolderview.h5
-rw-r--r--indra/newview/llimview.cpp15
-rw-r--r--indra/newview/llinventorybridge.cpp2
-rw-r--r--indra/newview/llinventorymodel.cpp23
-rw-r--r--indra/newview/llmimetypes.cpp8
-rw-r--r--indra/newview/llmimetypes.h2
-rw-r--r--indra/newview/llnameeditor.cpp2
-rw-r--r--indra/newview/llnameeditor.h2
-rw-r--r--indra/newview/lloverlaybar.h2
-rw-r--r--indra/newview/llpanelclassified.cpp6
-rw-r--r--indra/newview/llpanelclassified.h2
-rw-r--r--indra/newview/llpanelgroupnotices.cpp4
-rw-r--r--indra/newview/llpanellandmedia.cpp24
-rw-r--r--indra/newview/llpanellandmedia.h2
-rw-r--r--indra/newview/llpreview.h2
-rw-r--r--indra/newview/llpreviewscript.cpp2
-rw-r--r--indra/newview/llpreviewtexture.cpp5
-rw-r--r--indra/newview/llpreviewtexture.h2
-rw-r--r--indra/newview/llselectmgr.cpp116
-rw-r--r--indra/newview/llspatialpartition.cpp6
-rw-r--r--indra/newview/llstartup.cpp16
-rw-r--r--indra/newview/lltexturectrl.cpp2
-rw-r--r--indra/newview/lltexturectrl.h2
-rw-r--r--indra/newview/lltexturefetch.cpp4
-rw-r--r--indra/newview/lltoolbar.h2
-rw-r--r--indra/newview/llviewerdisplay.cpp2
-rw-r--r--indra/newview/llviewerinventory.cpp22
-rw-r--r--indra/newview/llviewerinventory.h8
-rw-r--r--indra/newview/llviewerjoint.cpp2
-rw-r--r--indra/newview/llviewerjoint.h2
-rw-r--r--indra/newview/llviewerjointattachment.cpp4
-rw-r--r--indra/newview/llviewermedia.cpp7
-rw-r--r--indra/newview/llviewermenu.cpp16
-rw-r--r--indra/newview/llviewerobject.cpp16
-rw-r--r--indra/newview/llviewerobject.h3
-rw-r--r--indra/newview/llviewerparcelmedia.cpp59
-rw-r--r--indra/newview/llviewerparcelmgr.cpp17
-rw-r--r--indra/newview/llviewerpartsim.cpp6
-rw-r--r--indra/newview/llviewerpartsource.cpp3
-rw-r--r--indra/newview/llviewerwindow.cpp12
-rw-r--r--indra/newview/llvoavatar.cpp6
-rw-r--r--indra/newview/llvoiceclient.cpp2
-rw-r--r--indra/newview/llvosurfacepatch.cpp4
-rw-r--r--indra/newview/llvotextbubble.cpp8
-rw-r--r--indra/newview/llvotextbubble.h2
-rw-r--r--indra/newview/llvovolume.cpp20
-rw-r--r--indra/newview/llvovolume.h1
-rw-r--r--indra/newview/llwindebug.cpp50
-rw-r--r--indra/newview/llwindebug.h2
130 files changed, 872 insertions, 424 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index b10ed5e74a..ae4f65b8c8 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -12,7 +12,7 @@ Adam Marker
VWR-2755
Aimee Trescothick
VWR-3903
- VWR-4803
+ VWR-4083
Alejandro Rosenthal
VWR-1184
Alissa Sabre
@@ -253,6 +253,7 @@ Nicholaz Beresford
VWR-2614
VWR-2411
VWR-2412
+ VWR-2682
VWR-2684
Nounouch Hapmouche
VWR-238
diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp
index ee2396321d..283a06e37f 100644
--- a/indra/llcharacter/llgesture.cpp
+++ b/indra/llcharacter/llgesture.cpp
@@ -103,7 +103,7 @@ BOOL LLGesture::trigger(KEY key, MASK mask)
}
-BOOL LLGesture::trigger(const LLString &trigger_string)
+BOOL LLGesture::trigger(const std::string& trigger_string)
{
llwarns << "Parent class trigger called: you probably didn't mean this." << llendl;
return FALSE;
diff --git a/indra/llcharacter/llgesture.h b/indra/llcharacter/llgesture.h
index 34fdcd01c4..bab7fd0cc0 100644
--- a/indra/llcharacter/llgesture.h
+++ b/indra/llcharacter/llgesture.h
@@ -64,7 +64,7 @@ public:
virtual BOOL trigger(KEY key, MASK mask);
// Triggers if case-insensitive substring matches (assumes string is lowercase)
- virtual BOOL trigger(const LLString &string);
+ virtual BOOL trigger(const std::string &string);
// non-endian-neutral serialization
U8 *serialize(U8 *buffer) const;
diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h
index 4ffb9c8eec..647f042828 100644
--- a/indra/llcommon/lltimer.h
+++ b/indra/llcommon/lltimer.h
@@ -36,6 +36,8 @@
#include <sys/time.h>
#endif
+#include "stdtypes.h"
+
// units conversions
#ifndef USEC_PER_SEC
const U32 USEC_PER_SEC = 1000000;
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 02b956d86c..7583bc28dd 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -35,7 +35,7 @@
const S32 LL_VERSION_MAJOR = 1;
const S32 LL_VERSION_MINOR = 19;
const S32 LL_VERSION_PATCH = 1;
-const S32 LL_VERSION_BUILD = 0;
+const S32 LL_VERSION_BUILD = 4;
const char * const LL_CHANNEL = "Second Life Release";
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index c8b5f06b49..2640390b9c 100755
--- a/indra/llcrashlogger/llcrashlogger.cpp
+++ b/indra/llcrashlogger/llcrashlogger.cpp
@@ -85,7 +85,8 @@ void LLCrashLoggerText::updateApplication(LLString message)
LLCrashLogger::LLCrashLogger() :
mCrashBehavior(CRASH_BEHAVIOR_ASK),
mCrashInPreviousExec(false),
- mSentCrashLogs(false)
+ mSentCrashLogs(false),
+ mCrashHost("")
{
}
@@ -145,21 +146,14 @@ void LLCrashLogger::gatherFiles()
gatherPlatformSpecificFiles();
//Use the debug log to reconstruct the URL to send the crash report to
- mCrashHost = "https://";
- mCrashHost += mDebugLog["CurrentSimHost"].asString();
- mCrashHost += ":12043/crash/report";
- // Use login servers as the alternate, since they are already load balanced and have a known name
- // First, check to see if we have a valid grid name. If not, use agni.
- mAltCrashHost = "https://login.";
- if(mDebugLog["GridName"].asString() != "")
- {
- mAltCrashHost += mDebugLog["GridName"].asString();
- }
- else
+ if(mDebugLog.has("CurrentSimHost"))
{
- mAltCrashHost += "agni";
+ mCrashHost = "https://";
+ mCrashHost += mDebugLog["CurrentSimHost"].asString();
+ mCrashHost += ":12043/crash/report";
}
- mAltCrashHost += ".lindenlab.com:12043/crash/report";
+ // Use login servers as the alternate, since they are already load balanced and have a known name
+ mAltCrashHost = "https://login.agni.lindenlab.com:12043/crash/report";
mCrashInfo["DebugLog"] = mDebugLog;
mFileMap["StatsLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stats.log");
@@ -218,6 +212,26 @@ bool LLCrashLogger::saveCrashBehaviorSetting(S32 crash_behavior)
return true;
}
+bool LLCrashLogger::runCrashLogPost(LLString host, LLSD data, LLString msg, int retries, int timeout)
+{
+ gBreak = false;
+ LLString status_message;
+ for(int i = 0; i < retries; ++i)
+ {
+ status_message = llformat("%s, try %d...", msg.c_str(), i+1);
+ LLHTTPClient::post(host, data, new LLCrashLoggerResponder(), timeout);
+ while(!gBreak)
+ {
+ updateApplication(status_message);
+ }
+ if(gSent)
+ {
+ return gSent;
+ }
+ }
+ return gSent;
+}
+
bool LLCrashLogger::sendCrashLogs()
{
gatherFiles();
@@ -234,27 +248,20 @@ bool LLCrashLogger::sendCrashLogs()
std::ofstream out_file(report_file.c_str());
LLSDSerialize::toPrettyXML(post_data, out_file);
out_file.close();
- LLHTTPClient::post(mCrashHost, post_data, new LLCrashLoggerResponder(), 5);
- gBreak = false;
- while(!gBreak)
+ bool sent = false;
+
+ if(mCrashHost != "")
{
- updateApplication("Sending logs...");
+ sent = runCrashLogPost(mCrashHost, post_data, "Sending to server", 3, 5);
}
- if(!gSent)
+ if(!sent)
{
- gBreak = false;
- LLHTTPClient::post(mAltCrashHost, post_data, new LLCrashLoggerResponder(), 5);
-
- while(!gBreak)
- {
- updateApplication("Sending logs to Alternate Server...");
- }
+ sent = runCrashLogPost(mAltCrashHost, post_data, "Sending to alternate server", 3, 5);
}
-
- mSentCrashLogs = gSent;
+ mSentCrashLogs = sent;
return true;
}
diff --git a/indra/llcrashlogger/llcrashlogger.h b/indra/llcrashlogger/llcrashlogger.h
index b827bb9925..c4a583371e 100755
--- a/indra/llcrashlogger/llcrashlogger.h
+++ b/indra/llcrashlogger/llcrashlogger.h
@@ -56,11 +56,11 @@ public:
virtual bool cleanup() { return true; }
void setUserText(LLString& text) { mCrashInfo["UserNotes"] = text; }
S32 getCrashBehavior() { return mCrashBehavior; }
+ bool runCrashLogPost(LLString host, LLSD data, LLString msg, int retries, int timeout);
protected:
S32 mCrashBehavior;
BOOL mCrashInPreviousExec;
std::map<LLString, LLString> mFileMap;
- static const int mMaxSendSize = 200000;
LLString mGridName;
LLControlGroup mCrashSettings;
LLString mProductName;
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index a61b9cb0c0..c8cfad84f6 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -58,6 +58,7 @@ LLImageBase::LLImageBase()
mComponents(0),
mMemType(LLMemType::MTYPE_IMAGEBASE)
{
+ mBadBufferAllocation = FALSE ;
}
// virtual
@@ -142,10 +143,15 @@ U8* LLImageBase::allocateData(S32 size)
if (!mData || size != mDataSize)
{
deleteData(); // virtual
+ mBadBufferAllocation = FALSE ;
mData = new U8[size];
if (!mData)
{
- llerrs << "allocate image data: " << size << llendl;
+ //llerrs << "allocate image data: " << size << llendl;
+ llwarns << "allocate image data: " << size << llendl;
+ size = 0 ;
+ mWidth = mHeight = 0 ;
+ mBadBufferAllocation = TRUE ;
}
mDataSize = size;
}
@@ -174,6 +180,30 @@ U8* LLImageBase::reallocateData(S32 size)
return mData;
}
+const U8* LLImageBase::getData() const
+{
+ if(mBadBufferAllocation)
+ {
+ llerrs << "Bad memory allocation for the image buffer!" << llendl ;
+ }
+
+ return mData;
+} // read only
+
+U8* LLImageBase::getData()
+{
+ if(mBadBufferAllocation)
+ {
+ llerrs << "Bad memory allocation for the image buffer!" << llendl ;
+ }
+
+ return mData;
+}
+
+BOOL LLImageBase::isBufferInvalid()
+{
+ return mBadBufferAllocation || mData == NULL ;
+}
void LLImageBase::setSize(S32 width, S32 height, S32 ncomponents)
{
@@ -1339,7 +1369,7 @@ S32 LLImageFormatted::calcDiscardLevelBytes(S32 bytes)
//----------------------------------------------------------------------------
// Subclasses that can handle more than 4 channels should override this function.
-BOOL LLImageFormatted::decode(LLImageRaw* raw_image,F32 decode_time, S32 first_channel, S32 max_channel)
+BOOL LLImageFormatted::decodeChannels(LLImageRaw* raw_image,F32 decode_time, S32 first_channel, S32 max_channel)
{
llassert( (first_channel == 0) && (max_channel == 4) );
return decode( raw_image, decode_time ); // Loads first 4 channels by default.
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index ca19198332..ee29e5c4a4 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -101,9 +101,10 @@ public:
S8 getComponents() const { return mComponents; }
S32 getDataSize() const { return mDataSize; }
- const U8 *getData() const { return mData; } // read only
- U8 *getData() { return mData; }
-
+ const U8 *getData() const ;
+ U8 *getData() ;
+ BOOL isBufferInvalid() ;
+
void setSize(S32 width, S32 height, S32 ncomponents);
U8* allocateDataSize(S32 width, S32 height, S32 ncomponents, S32 size = -1); // setSize() + allocateData()
@@ -135,6 +136,8 @@ private:
S8 mComponents;
+ BOOL mBadBufferAllocation ;
+
public:
S16 mMemType; // debug
@@ -270,11 +273,11 @@ public:
void appendData(U8 *data, S32 size);
// Loads first 4 channels.
- virtual BOOL decode(LLImageRaw* raw_image, F32 decode_time=0.0) = 0;
+ virtual BOOL decode(LLImageRaw* raw_image, F32 decode_time) = 0;
// Subclasses that can handle more than 4 channels should override this function.
- virtual BOOL decode(LLImageRaw* raw_image, F32 decode_time, S32 first_channel, S32 max_channel);
+ virtual BOOL decodeChannels(LLImageRaw* raw_image, F32 decode_time, S32 first_channel, S32 max_channel);
- virtual BOOL encode(const LLImageRaw* raw_image, F32 encode_time=0.0) = 0;
+ virtual BOOL encode(const LLImageRaw* raw_image, F32 encode_time) = 0;
S8 getCodec() const;
BOOL isDecoding() const { return mDecoding ? TRUE : FALSE; }
diff --git a/indra/llimage/llimagebmp.h b/indra/llimage/llimagebmp.h
index 2924ff412c..00d3e957e4 100644
--- a/indra/llimage/llimagebmp.h
+++ b/indra/llimage/llimagebmp.h
@@ -45,8 +45,8 @@ public:
LLImageBMP();
/*virtual*/ BOOL updateData();
- /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 time=0.0);
- /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 time=0.0);
+ /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time);
+ /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time);
protected:
BOOL decodeColorTable8( U8* dst, U8* src );
diff --git a/indra/llimage/llimagedxt.cpp b/indra/llimage/llimagedxt.cpp
index 6feece4ad9..be9de3be49 100644
--- a/indra/llimage/llimagedxt.cpp
+++ b/indra/llimage/llimagedxt.cpp
@@ -308,7 +308,7 @@ BOOL LLImageDXT::getMipData(LLPointer<LLImageRaw>& raw, S32 discard)
return TRUE;
}
-BOOL LLImageDXT::encode(const LLImageRaw* raw_image, F32 time, bool explicit_mips)
+BOOL LLImageDXT::encodeDXT(const LLImageRaw* raw_image, F32 time, bool explicit_mips)
{
llassert_always(raw_image);
@@ -396,7 +396,7 @@ BOOL LLImageDXT::encode(const LLImageRaw* raw_image, F32 time, bool explicit_mip
// virtual
BOOL LLImageDXT::encode(const LLImageRaw* raw_image, F32 time)
{
- return encode(raw_image, time, false);
+ return encodeDXT(raw_image, time, false);
}
// virtual
diff --git a/indra/llimage/llimagedxt.h b/indra/llimage/llimagedxt.h
index 23a5047f0d..b6df098456 100644
--- a/indra/llimage/llimagedxt.h
+++ b/indra/llimage/llimagedxt.h
@@ -95,15 +95,17 @@ public:
protected:
/*virtual*/ ~LLImageDXT();
+
+private:
+ BOOL encodeDXT(const LLImageRaw* raw_image, F32 decode_time, bool explicit_mips);
public:
LLImageDXT();
/*virtual*/ BOOL updateData();
- /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 time=0.0);
- BOOL encode(const LLImageRaw* raw_image, F32 time, bool explicit_mips);
- /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 time=0.0);
+ /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time);
+ /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time);
/*virtual*/ S32 calcHeaderSize();
/*virtual*/ S32 calcDataSize(S32 discard_level = 0);
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 0911c43674..450d6ff93a 100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
@@ -250,11 +250,11 @@ BOOL LLImageJ2C::updateData()
BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time)
{
- return decode(raw_imagep, decode_time, 0, 4);
+ return decodeChannels(raw_imagep, decode_time, 0, 4);
}
-BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count )
+BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count )
{
LLMemType mt1((LLMemType::EMemType)mMemType);
diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h
index 35b4d6b8b4..6c720df586 100644
--- a/indra/llimage/llimagej2c.h
+++ b/indra/llimage/llimagej2c.h
@@ -46,9 +46,9 @@ public:
// Base class overrides
/*virtual*/ BOOL updateData();
- /*virtual*/ BOOL decode(LLImageRaw *raw_imagep, F32 decode_time=0.0);
- /*virtual*/ BOOL decode(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count);
- /*virtual*/ BOOL encode(const LLImageRaw *raw_imagep, F32 encode_time=0.0);
+ /*virtual*/ BOOL decode(LLImageRaw *raw_imagep, F32 decode_time);
+ /*virtual*/ BOOL decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count);
+ /*virtual*/ BOOL encode(const LLImageRaw *raw_imagep, F32 encode_time);
/*virtual*/ S32 calcHeaderSize();
/*virtual*/ S32 calcDataSize(S32 discard_level = 0);
/*virtual*/ S32 calcDiscardLevelBytes(S32 bytes);
diff --git a/indra/llimage/llimagejpeg.h b/indra/llimage/llimagejpeg.h
index 0be4002791..7ba1520a31 100644
--- a/indra/llimage/llimagejpeg.h
+++ b/indra/llimage/llimagejpeg.h
@@ -55,8 +55,8 @@ public:
LLImageJPEG();
/*virtual*/ BOOL updateData();
- /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 time=0.0);
- /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 time=0.0);
+ /*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time);
+ /*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time);
void setEncodeQuality( S32 q ) { mEncodeQuality = q; } // on a scale from 1 to 100
S32 getEncodeQuality() { return mEncodeQuality; }
diff --git a/indra/llimage/llimagepng.h b/indra/llimage/llimagepng.h
index 7a8e1f93b1..027caf9780 100644
--- a/indra/llimage/llimagepng.h
+++ b/indra/llimage/llimagepng.h
@@ -43,8 +43,8 @@ public:
LLImagePNG();
BOOL updateData();
- BOOL decode(LLImageRaw* raw_image, F32 decode_time = 0.0);
- BOOL encode(const LLImageRaw* raw_image, F32 encode_time = 0.0);
+ BOOL decode(LLImageRaw* raw_image, F32 decode_time);
+ BOOL encode(const LLImageRaw* raw_image, F32 encode_time);
private:
U8* mTmpWriteBuffer;
diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp
index 61b15b2092..cdec2bfe6c 100644
--- a/indra/llimage/llimageworker.cpp
+++ b/indra/llimage/llimageworker.cpp
@@ -115,7 +115,7 @@ bool LLImageWorker::doWork(S32 param)
else
{
// Decode aux channel
- decoded = mFormattedImage->decode(mDecodedImage, .1f, param, param); // 1ms
+ decoded = mFormattedImage->decodeChannels(mDecodedImage, .1f, param, param); // 1ms
}
}
if (decoded)
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 45a927aa7d..686524b7da 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -99,7 +99,7 @@ LLInventoryObject::~LLInventoryObject( void )
{
}
-void LLInventoryObject::copy(const LLInventoryObject* other)
+void LLInventoryObject::copyObject(const LLInventoryObject* other)
{
mUUID = other->mUUID;
mParentUUID = other->mParentUUID;
@@ -309,7 +309,7 @@ LLInventoryItem::LLInventoryItem() :
LLInventoryItem::LLInventoryItem(const LLInventoryItem* other) :
LLInventoryObject()
{
- copy(other);
+ copyItem(other);
}
LLInventoryItem::~LLInventoryItem()
@@ -317,9 +317,9 @@ LLInventoryItem::~LLInventoryItem()
}
// virtual
-void LLInventoryItem::copy(const LLInventoryItem* other)
+void LLInventoryItem::copyItem(const LLInventoryItem* other)
{
- LLInventoryObject::copy(other);
+ copyObject(other);
mPermissions = other->mPermissions;
mAssetUUID = other->mAssetUUID;
mDescription = other->mDescription;
@@ -331,10 +331,10 @@ void LLInventoryItem::copy(const LLInventoryItem* other)
// As a constructor alternative, the clone() method works like a
// copy constructor, but gens a new UUID.
-void LLInventoryItem::clone(LLPointer<LLInventoryItem>& newitem) const
+void LLInventoryItem::cloneItem(LLPointer<LLInventoryItem>& newitem) const
{
newitem = new LLInventoryItem;
- newitem->copy(this);
+ newitem->copyItem(this);
newitem->mUUID.generate();
}
@@ -1335,7 +1335,7 @@ LLInventoryCategory::LLInventoryCategory() :
LLInventoryCategory::LLInventoryCategory(const LLInventoryCategory* other) :
LLInventoryObject()
{
- copy(other);
+ copyCategory(other);
}
LLInventoryCategory::~LLInventoryCategory()
@@ -1343,9 +1343,9 @@ LLInventoryCategory::~LLInventoryCategory()
}
// virtual
-void LLInventoryCategory::copy(const LLInventoryCategory* other)
+void LLInventoryCategory::copyCategory(const LLInventoryCategory* other)
{
- LLInventoryObject::copy(other);
+ copyObject(other);
mPreferredType = other->mPreferredType;
}
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index 60a0c4158b..8b579ec306 100644
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -85,7 +85,7 @@ public:
LLInventoryObject(const LLUUID& uuid, const LLUUID& parent_uuid,
LLAssetType::EType type, const LLString& name);
LLInventoryObject();
- virtual void copy(const LLInventoryObject* other); // LLRefCount requires custom copy
+ void copyObject(const LLInventoryObject* other); // LLRefCount requires custom copy
// accessors
const LLUUID& getUUID() const;
@@ -222,12 +222,12 @@ public:
// Note: Because InventoryItems are ref counted, reference copy (a = b)
// is prohibited
LLInventoryItem(const LLInventoryItem* other);
- virtual void copy(const LLInventoryItem* other); // LLRefCount requires custom copy
+ virtual void copyItem(const LLInventoryItem* other); // LLRefCount requires custom copy
// As a constructor alternative, the clone() method works like a
// copy constructor, but gens a new UUID.
// It is up to the caller to delete (unref) the item.
- virtual void clone(LLPointer<LLInventoryItem>& newitem) const;
+ virtual void cloneItem(LLPointer<LLInventoryItem>& newitem) const;
// accessors
const LLPermissions& getPermissions() const;
@@ -306,7 +306,7 @@ public:
const LLString& name);
LLInventoryCategory();
LLInventoryCategory(const LLInventoryCategory* other);
- virtual void copy(const LLInventoryCategory* other); // LLRefCount requires custom copy
+ void copyCategory(const LLInventoryCategory* other); // LLRefCount requires custom copy
// accessors and mutators
LLAssetType::EType getPreferredType() const;
diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h
index fab8070259..998d19d58b 100644
--- a/indra/llmath/lloctree.h
+++ b/indra/llmath/lloctree.h
@@ -567,8 +567,6 @@ public:
{
}
- bool isLeaf() { return false; }
-
bool balance()
{
if (this->getChildCount() == 1 &&
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 984c13e0d8..0c711cabcd 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2075,6 +2075,14 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components,
}
mSculptLevel = sculpt_level;
+
+ // Delete any existing faces so that they get regenerated
+ if (mVolumeFaces)
+ {
+ delete[] mVolumeFaces;
+ mVolumeFaces = NULL;
+ }
+
createVolumeFaces();
}
@@ -4817,29 +4825,33 @@ BOOL LLVolumeFace::createSide(BOOL partial_build)
}
}
- //generate normals
- for (U32 i = 0; i < mIndices.size()/3; i++) { //for each triangle
- const VertexData& v0 = mVertices[mIndices[i*3+0]];
- const VertexData& v1 = mVertices[mIndices[i*3+1]];
- const VertexData& v2 = mVertices[mIndices[i*3+2]];
+ //generate normals
+ for (U32 i = 0; i < mIndices.size()/3; i++) //for each triangle
+ {
+ const S32 i0 = mIndices[i*3+0];
+ const S32 i1 = mIndices[i*3+1];
+ const S32 i2 = mIndices[i*3+2];
+ const VertexData& v0 = mVertices[i0];
+ const VertexData& v1 = mVertices[i1];
+ const VertexData& v2 = mVertices[i2];
//calculate triangle normal
- LLVector3 norm = (v0.mPosition-v1.mPosition)%
- (v0.mPosition-v2.mPosition);
+ LLVector3 norm = (v0.mPosition-v1.mPosition) % (v0.mPosition-v2.mPosition);
for (U32 j = 0; j < 3; j++)
{ //add triangle normal to vertices
- mVertices[mIndices[i*3+j]].mNormal += norm; // * (weight_sum - d[j])/weight_sum;
+ const S32 idx = mIndices[i*3+j];
+ mVertices[idx].mNormal += norm; // * (weight_sum - d[j])/weight_sum;
}
//even out quad contributions
- if (i % 2 == 0)
+ if ((i & 1) == 0)
{
- mVertices[mIndices[i*3+2]].mNormal += norm;
+ mVertices[i2].mNormal += norm;
}
else
{
- mVertices[mIndices[i*3+1]].mNormal += norm;
+ mVertices[i1].mNormal += norm;
}
}
diff --git a/indra/llmath/llvolumemgr.cpp b/indra/llmath/llvolumemgr.cpp
index 945d74f7c1..1a448ed8e0 100644
--- a/indra/llmath/llvolumemgr.cpp
+++ b/indra/llmath/llvolumemgr.cpp
@@ -229,12 +229,6 @@ LLVolumeLODGroup::LLVolumeLODGroup(const LLVolumeParams &params)
LLVolumeLODGroup::~LLVolumeLODGroup()
{
- S32 i;
- for (i = 0; i < NUM_LODS; i++)
- {
- delete mVolumeLODs[i];
- mVolumeLODs[i] = NULL;
- }
}
@@ -242,11 +236,12 @@ LLVolume * LLVolumeLODGroup::getLOD(const S32 detail)
{
llassert(detail >=0 && detail < NUM_LODS);
mAccessCount[detail]++;
- mLODRefs[detail]++;
- if (!mVolumeLODs[detail])
+
+ if (!mLODRefs[detail])
{
mVolumeLODs[detail] = new LLVolume(mParams, mDetailScales[detail]);
}
+ mLODRefs[detail]++;
return mVolumeLODs[detail];
}
diff --git a/indra/llmath/llvolumemgr.h b/indra/llmath/llvolumemgr.h
index 3d7b663670..f3d4b5ee6b 100644
--- a/indra/llmath/llvolumemgr.h
+++ b/indra/llmath/llvolumemgr.h
@@ -69,7 +69,7 @@ protected:
LLVolumeParams mParams;
S32 mLODRefs[NUM_LODS];
- LLVolume *mVolumeLODs[NUM_LODS];
+ LLPointer<LLVolume> mVolumeLODs[NUM_LODS];
static F32 mDetailThresholds[NUM_LODS];
static F32 mDetailScales[NUM_LODS];
S32 mAccessCount[NUM_LODS];
diff --git a/indra/llmessage/llblowfishcipher.cpp b/indra/llmessage/llblowfishcipher.cpp
index 7c9194d603..8c055a72f6 100644
--- a/indra/llmessage/llblowfishcipher.cpp
+++ b/indra/llmessage/llblowfishcipher.cpp
@@ -2,9 +2,6 @@
* @file llblowfishcipher.cpp
* @brief Wrapper around OpenSSL Blowfish encryption algorithm.
*
- * We do not have OpenSSL headers or libraries on Windows, so this
- * class only works on Linux.
- *
* $LicenseInfo:firstyear=2007&license=viewergpl$
*
* Copyright (c) 2007, Linden Research, Inc.
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp
index 8b9a45ff3f..8afcb6ba4f 100644
--- a/indra/llmessage/llcurl.cpp
+++ b/indra/llmessage/llcurl.cpp
@@ -121,7 +121,6 @@ void LLCurl::Responder::error(U32 status, const std::string& reason)
// virtual
void LLCurl::Responder::result(const LLSD& content)
{
- llwarns << "Virtual Function not implemented" << llendl;
}
// virtual
diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h
index 48c14d9460..1b3d3f6266 100644
--- a/indra/llmessage/llcurl.h
+++ b/indra/llmessage/llcurl.h
@@ -150,13 +150,10 @@ public:
static std::vector<LLMutex*> sSSLMutex;
// OpenSSL callbacks
- static void LLCurl::ssl_locking_callback(int mode, int type, const char *file, int line);
- static unsigned long LLCurl::ssl_thread_id(void);
-
-
-
-private:
+ static void ssl_locking_callback(int mode, int type, const char *file, int line);
+ static unsigned long ssl_thread_id(void);
+private:
static std::string sCAPath;
static std::string sCAFile;
};
diff --git a/indra/llmessage/llhttpnode.cpp b/indra/llmessage/llhttpnode.cpp
index 1289b63d79..b82bd65d2e 100644
--- a/indra/llmessage/llhttpnode.cpp
+++ b/indra/llmessage/llhttpnode.cpp
@@ -169,15 +169,9 @@ void LLHTTPNode::del(LLHTTPNode::ResponsePtr response, const LLSD& context) cons
}
// virtual
-LLSD LLHTTPNode::del() const
-{
- throw NotImplemented();
-}
-
-// virtual
LLSD LLHTTPNode::del(const LLSD&) const
{
- return del();
+ throw NotImplemented();
}
diff --git a/indra/llmessage/llhttpnode.h b/indra/llmessage/llhttpnode.h
index 2f177bf0ef..e27056a51f 100644
--- a/indra/llmessage/llhttpnode.h
+++ b/indra/llmessage/llhttpnode.h
@@ -86,7 +86,6 @@ public:
virtual LLSD put(const LLSD& input) const;
virtual LLSD post(const LLSD& input) const;
- virtual LLSD del() const;
virtual LLSD del(const LLSD& context) const;
class Response : public LLRefCount
diff --git a/indra/llmessage/llnamevalue.h b/indra/llmessage/llnamevalue.h
index 4d40328c59..f50ed08207 100644
--- a/indra/llmessage/llnamevalue.h
+++ b/indra/llmessage/llnamevalue.h
@@ -46,6 +46,7 @@
// SitObject STRING
// SitPosition VEC3
+#include "string_table.h"
#include "llmath.h"
#include "v3math.h"
#include "lldbstrings.h"
diff --git a/indra/llmessage/llpartdata.cpp b/indra/llmessage/llpartdata.cpp
index 0e1dc4a7bd..792d03e72b 100644
--- a/indra/llmessage/llpartdata.cpp
+++ b/indra/llmessage/llpartdata.cpp
@@ -155,6 +155,8 @@ void LLPartData::setEndAlpha(const F32 alpha)
LLPartSysData::LLPartSysData()
{
mCRC = 0;
+ mFlags = 0;
+
mPartData.mFlags = 0;
mPartData.mStartColor = LLColor4(1.f, 1.f, 1.f, 1.f);
mPartData.mEndColor = LLColor4(1.f, 1.f, 1.f, 1.f);
@@ -172,6 +174,8 @@ LLPartSysData::LLPartSysData()
mBurstSpeedMin = 1.f; // Minimum particle velocity
mBurstSpeedMax = 1.f; // Maximum particle velocity
mBurstRadius = 0.f;
+
+ mNumParticles = 0;
}
diff --git a/indra/llmessage/llpartdata.h b/indra/llmessage/llpartdata.h
index 4220f5d791..b16cdc5141 100644
--- a/indra/llmessage/llpartdata.h
+++ b/indra/llmessage/llpartdata.h
@@ -84,7 +84,8 @@ class LLPartData
public:
LLPartData() :
mFlags(0),
- mMaxAge(0)
+ mMaxAge(0.f),
+ mParameter(0.f)
{
}
BOOL unpack(LLDataPacker &dp);
@@ -108,7 +109,7 @@ public:
LL_PART_BEAM_MASK = 0x200, // Particle is a "beam" connecting source and target
// Not implemented yet!
- //LL_PART_RANDOM_ACCEL_MASK = 0x100, // Patricles have random accelearation
+ //LL_PART_RANDOM_ACCEL_MASK = 0x100, // Particles have random acceleration
//LL_PART_RANDOM_VEL_MASK = 0x200, // Particles have random velocity shifts"
//LL_PART_TRAIL_MASK = 0x400, // Particles have historical "trails"
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index df9dca3af5..52df5b8e75 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -235,10 +235,10 @@ bool LLFontGL::loadFaceFallback(LLFontList *fontlistp, const LLString& fontname,
{
LLFont *fontp = new LLFont();
LLString font_path = local_path + *token_iter;
- if (!fontp->loadFace(font_path.c_str(), point_size, sVertDPI, sHorizDPI, 2, TRUE))
+ if (!fontp->loadFace(font_path, point_size, sVertDPI, sHorizDPI, 2, TRUE))
{
font_path = sys_path + *token_iter;
- if (!fontp->loadFace(font_path.c_str(), point_size, sVertDPI, sHorizDPI, 2, TRUE))
+ if (!fontp->loadFace(font_path, point_size, sVertDPI, sHorizDPI, 2, TRUE))
{
llwarns << "Couldn't load font " << *token_iter << llendl;
delete fontp;
@@ -261,11 +261,11 @@ bool LLFontGL::loadFace(LLFontGL *fontp, const LLString& fontname, const F32 poi
{
LLString local_path = getFontPathLocal();
LLString font_path = local_path + fontname;
- if (!fontp->loadFace(font_path.c_str(), point_size, sVertDPI, sHorizDPI))
+ if (!fontp->loadFace(font_path, point_size, sVertDPI, sHorizDPI, 2, FALSE))
{
LLString sys_path = getFontPathSystem();
font_path = sys_path + fontname;
- if (!fontp->loadFace(font_path.c_str(), point_size, sVertDPI, sHorizDPI))
+ if (!fontp->loadFace(font_path, point_size, sVertDPI, sHorizDPI, 2, FALSE))
{
llwarns << "Couldn't load font " << fontname << llendl;
return false;
@@ -506,9 +506,11 @@ LLFontGL &LLFontGL::operator=(const LLFontGL &source)
return *this;
}
-BOOL LLFontGL::loadFace(const LLString& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi)
+BOOL LLFontGL::loadFace(const std::string& filename,
+ const F32 point_size, const F32 vert_dpi, const F32 horz_dpi,
+ const S32 components, BOOL is_fallback)
{
- if (!LLFont::loadFace(filename, point_size, vert_dpi, horz_dpi, 2, FALSE))
+ if (!LLFont::loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback))
{
return FALSE;
}
diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h
index b5f018e8f7..196d063840 100644
--- a/indra/llrender/llfontgl.h
+++ b/indra/llrender/llfontgl.h
@@ -97,7 +97,9 @@ public:
static bool loadFaceFallback(LLFontList *fontp, const LLString& fontname, const F32 point_size);
static bool loadFace(LLFontGL *fontp, const LLString& fontname, const F32 point_size, LLFontList *fallback_fontp);
- BOOL loadFace(const LLString& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi);
+ /* virtual*/ BOOL loadFace(const std::string& filename,
+ const F32 point_size, const F32 vert_dpi, const F32 horz_dpi,
+ const S32 components, BOOL is_fallback);
S32 renderUTF8(const LLString &text, const S32 begin_offset,
diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h
index 2921e837c4..6e1ab322af 100644
--- a/indra/llui/llcheckboxctrl.h
+++ b/indra/llui/llcheckboxctrl.h
@@ -82,7 +82,7 @@ public:
virtual void setEnabled( BOOL b );
virtual void draw();
- virtual void reshape(S32 width, S32 height, BOOL called_from_parent);
+ virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
// LLUICtrl interface
virtual void setValue(const LLSD& value );
diff --git a/indra/llui/lldraghandle.h b/indra/llui/lldraghandle.h
index 6215142e6f..3635409ec8 100644
--- a/indra/llui/lldraghandle.h
+++ b/indra/llui/lldraghandle.h
@@ -57,7 +57,6 @@ public:
virtual void setTitle( const LLString& title ) = 0;
virtual const LLString& getTitle() const = 0;
- virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE) = 0;
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index a6c35b67a8..b69ac30e9c 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -154,7 +154,7 @@ LLFloater::LLFloater(const LLString& name)
mButtons[i] = NULL;
}
LLString title; // null string
- init(title, FALSE, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, FALSE, TRUE, TRUE); // defaults
+ initFloater(title, FALSE, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, FALSE, TRUE, TRUE); // defaults
}
@@ -173,7 +173,7 @@ LLFloater::LLFloater(const LLString& name, const LLRect& rect, const LLString& t
mButtonsEnabled[i] = FALSE;
mButtons[i] = NULL;
}
- init( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
+ initFloater( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
}
LLFloater::LLFloater(const LLString& name, const LLString& rect_control, const LLString& title,
@@ -191,12 +191,12 @@ LLFloater::LLFloater(const LLString& name, const LLString& rect_control, const L
mButtonsEnabled[i] = FALSE;
mButtons[i] = NULL;
}
- init( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
+ initFloater( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
}
// Note: Floaters constructed from XML call init() twice!
-void LLFloater::init(const LLString& title,
+void LLFloater::initFloater(const LLString& title,
BOOL resizable, S32 min_width, S32 min_height,
BOOL drag_on_left, BOOL minimizable, BOOL close_btn)
{
@@ -576,6 +576,11 @@ void LLFloater::close(bool app_quitting)
}
}
+/*virtual*/
+void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ LLPanel::reshape(width, height, called_from_parent);
+}
void LLFloater::releaseFocus()
{
@@ -777,8 +782,6 @@ void LLFloater::setMinimized(BOOL minimize)
{
mExpandedRect = getRect();
- reshape( MINIMIZED_WIDTH, LLFLOATER_HEADER_SIZE, TRUE);
-
// If the floater has been dragged while minimized in the
// past, then locate it at its previous minimized location.
// Otherwise, ask the view for a minimize position.
@@ -833,6 +836,9 @@ void LLFloater::setMinimized(BOOL minimize)
}
mMinimized = TRUE;
+
+ // Reshape *after* setting mMinimized
+ reshape( MINIMIZED_WIDTH, LLFLOATER_HEADER_SIZE, TRUE);
}
else
{
@@ -845,7 +851,6 @@ void LLFloater::setMinimized(BOOL minimize)
mPreviousMinimizedBottom = currentRect.mBottom;
}
- reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE );
setOrigin( mExpandedRect.mLeft, mExpandedRect.mBottom );
if (mButtonsEnabled[BUTTON_RESTORE])
@@ -874,6 +879,9 @@ void LLFloater::setMinimized(BOOL minimize)
}
mMinimized = FALSE;
+
+ // Reshape *after* setting mMinimized
+ reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE );
}
make_ui_sound("UISndWindowClose");
updateButtons();
@@ -1639,11 +1647,11 @@ LLFloaterView::LLFloaterView( const LLString& name, const LLRect& rect )
// By default, adjust vertical.
void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)
{
- reshape(width, height, called_from_parent, ADJUST_VERTICAL_YES);
+ reshapeFloater(width, height, called_from_parent, ADJUST_VERTICAL_YES);
}
// When reshaping this view, make the floaters follow their closest edge.
-void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical)
+void LLFloaterView::reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical)
{
S32 old_width = getRect().getWidth();
S32 old_height = getRect().getHeight();
@@ -2910,7 +2918,7 @@ void LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor
setRect(rect);
setName(name);
- init(title,
+ initFloater(title,
resizable,
min_width,
min_height,
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index e722d5ad07..280789d64c 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -119,7 +119,7 @@ public:
// Can be called multiple times to reset floater parameters.
// Deletes all children of the floater.
- virtual void init(const LLString& title, BOOL resizable,
+ virtual void initFloater(const LLString& title, BOOL resizable,
S32 min_width, S32 min_height, BOOL drag_on_left,
BOOL minimizable, BOOL close_btn);
@@ -128,6 +128,8 @@ public:
// If allowed, close the floater cleanly, releasing focus.
// app_quitting is passed to onClose() below.
virtual void close(bool app_quitting = false);
+
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
// Release keyboard and mouse focus
void releaseFocus();
@@ -300,8 +302,8 @@ class LLFloaterView : public LLUICtrl
public:
LLFloaterView( const LLString& name, const LLRect& rect );
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
- void reshape(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical);
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ void reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical);
/*virtual*/ void draw();
/*virtual*/ LLRect getSnapRect() const;
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index b52de24bb5..8ae44fbfd5 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -2965,8 +2965,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y)
class LLPieMenuBranch : public LLMenuItemGL
{
public:
- LLPieMenuBranch(const LLString& name, const LLString& label, LLPieMenu* branch,
- enabled_callback ecb, void* user_data);
+ LLPieMenuBranch(const LLString& name, const LLString& label, LLPieMenu* branch);
// called to rebuild the draw label
virtual void buildDrawLabel( void );
@@ -2978,19 +2977,13 @@ public:
protected:
LLPieMenu* mBranch;
- enabled_callback mEnabledCallback;
- void* mUserData;
};
LLPieMenuBranch::LLPieMenuBranch(const LLString& name,
const LLString& label,
- LLPieMenu* branch,
- enabled_callback ecb,
- void* user_data)
+ LLPieMenu* branch)
: LLMenuItemGL( name, label, KEY_NONE, MASK_NONE ),
- mBranch( branch ),
- mEnabledCallback( ecb ),
- mUserData(user_data)
+ mBranch( branch )
{
mBranch->hide(FALSE);
mBranch->setParentMenuItem(this);
@@ -2999,12 +2992,6 @@ LLPieMenuBranch::LLPieMenuBranch(const LLString& name,
// called to rebuild the draw label
void LLPieMenuBranch::buildDrawLabel( void )
{
- if(mEnabledCallback)
- {
- setEnabled(mEnabledCallback(mUserData));
- setDrawTextDisabled(FALSE);
- }
- else
{
// default enablement is this -- if any of the subitems are
// enabled, this item is enabled. JC
@@ -3097,7 +3084,7 @@ void LLPieMenu::initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *fac
child->getAttributeString("label", label);
LLPieMenu *submenu = new LLPieMenu(name, label);
- appendMenu(submenu);
+ appendPieMenu(submenu);
submenu->initXML(child, context, factory);
}
else
@@ -3479,17 +3466,14 @@ BOOL LLPieMenu::appendSeparator(const LLString &separator_name)
}
-// virtual
-BOOL LLPieMenu::appendMenu(LLPieMenu *menu,
- enabled_callback enabled_cb,
- void* user_data)
+BOOL LLPieMenu::appendPieMenu(LLPieMenu *menu)
{
if (menu == this)
{
llerrs << "Can't attach a pie menu to itself" << llendl;
}
LLPieMenuBranch *item;
- item = new LLPieMenuBranch(menu->getName(), menu->getLabel(), menu, enabled_cb, user_data);
+ item = new LLPieMenuBranch(menu->getName(), menu->getLabel(), menu);
getParent()->addChild(item->getBranch());
item->setFont( LLFontGL::sSansSerifSmall );
return append( item );
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 3166290307..77998be880 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -512,8 +512,6 @@ public:
static void setKeyboardMode(BOOL mode) { sKeyboardMode = mode; }
static BOOL getKeyboardMode() { return sKeyboardMode; }
- static void onFocusLost(LLView* old_focus);
-
static class LLMenuHolderGL* sMenuContainer;
protected:
@@ -646,12 +644,8 @@ public:
virtual BOOL append(LLMenuItemGL* item);
virtual BOOL appendSeparator( const LLString &separator_name = "separator" );
- // the enabled callback is meant for the submenu. The api works
- // this way because the menu branch item responsible for the pie
- // submenu is constructed here.
- virtual BOOL appendMenu(LLPieMenu *menu,
- enabled_callback enabled_cb = NULL,
- void* user_data = NULL );
+ BOOL appendPieMenu(LLPieMenu *menu);
+
virtual void arrange( void );
// Display the menu centered on this point on the screen.
@@ -737,7 +731,7 @@ public:
virtual ~LLMenuHolderGL() {}
virtual BOOL hideMenus();
- void reshape(S32 width, S32 height, BOOL called_from_parent);
+ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
void setCanHide(BOOL can_hide) { mCanHide = can_hide; }
// LLView functionality
diff --git a/indra/llui/llmodaldialog.h b/indra/llui/llmodaldialog.h
index a5e6e9a490..887239b18d 100644
--- a/indra/llui/llmodaldialog.h
+++ b/indra/llui/llmodaldialog.h
@@ -49,7 +49,7 @@ public:
/*virtual*/ void open(); /* Flawfinder: ignore */
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = 1);
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/*virtual*/ void startModal();
/*virtual*/ void stopModal();
diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp
index 641b88de9a..e2b1e410fa 100644
--- a/indra/llui/llmultisliderctrl.cpp
+++ b/indra/llui/llmultisliderctrl.cpp
@@ -185,7 +185,7 @@ void LLMultiSliderCtrl::setCurSlider(const LLString& name)
mCurValue = mMultiSlider->getCurSliderValue();
}
-BOOL LLMultiSliderCtrl::setLabelArg( const LLString& key, const LLString& text )
+BOOL LLMultiSliderCtrl::setLabelArg( const LLString& key, const LLStringExplicit& text )
{
BOOL res = FALSE;
if (mLabelBox)
diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h
index a3a602c2b2..bbc3955f58 100644
--- a/indra/llui/llmultisliderctrl.h
+++ b/indra/llui/llmultisliderctrl.h
@@ -79,7 +79,7 @@ public:
virtual void setValue(const LLSD& value );
virtual LLSD getValue() const { return mMultiSlider->getValue(); }
- virtual BOOL setLabelArg( const LLString& key, const LLString& text );
+ virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text );
const LLString& getCurSlider() const { return mMultiSlider->getCurSlider(); }
F32 getCurSliderValue() const { return mCurValue; }
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index fa48ebebe9..875f114ce3 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -618,7 +618,17 @@ LLString LLPanel::getString(const LLString& name, const LLString::format_map_t&
formatted_string.setArgList(args);
return formatted_string.getString();
}
- llerrs << "Failed to find string " << name << " in panel " << getName() << llendl;
+ LLString err_str("Failed to find string " + name + " in panel " + getName());
+ // *TODO: once the QAR-369 ui-cleanup work on settings is in we need to change the following line to be
+ //if(LLUI::sConfigGroup->getBOOL("QAMode"))
+ if(LLUI::sQAMode)
+ {
+ llerrs << err_str << llendl;
+ }
+ else
+ {
+ llwarns << err_str << llendl;
+ }
return LLString::null;
}
diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h
index db6d7d6198..64be2169ad 100644
--- a/indra/llui/llscrollcontainer.h
+++ b/indra/llui/llscrollcontainer.h
@@ -87,7 +87,7 @@ public:
BOOL needsToScroll(S32 x, S32 y, SCROLL_ORIENTATION axis) const;
// LLView functionality
- virtual void reshape(S32 width, S32 height, BOOL called_from_parent);
+ virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
virtual BOOL handleKeyHere(KEY key, MASK mask);
virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index a4ea08bd5d..87929b10b4 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -901,6 +901,9 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r
return not_too_big;
}
+// NOTE: This is *very* expensive for large lists, especially when we are dirtying the list every frame
+// while receiving a long list of names.
+// *TODO: Use bookkeeping to make this an incramental cost with item additions
void LLScrollListCtrl::calcColumnWidths()
{
const S32 HEADING_TEXT_PADDING = 30;
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index 20d04cbf86..f4da5e5aed 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -63,7 +63,7 @@ public:
// from LLView
/*virtual*/ void setValue(const LLSD& value);
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/*virtual*/ void draw();
/*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask );
/*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask );
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index d48a162830..00dc70ba92 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -92,7 +92,7 @@ public:
virtual void onMouseCaptureLost();
// view overrides
- virtual void reshape(S32 width, S32 height, BOOL called_from_parent);
+ virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
virtual void draw();
virtual void onFocusReceived();
virtual void onFocusLost();
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 4866a4b309..d88f4ee7c1 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -81,6 +81,7 @@ LLWindow* LLUI::sWindow = NULL;
LLHtmlHelp* LLUI::sHtmlHelp = NULL;
BOOL LLUI::sShowXUINames = FALSE;
std::stack<LLRect> LLScreenClipRect::sClipRectStack;
+BOOL LLUI::sQAMode = FALSE;
//
// Functions
@@ -1747,6 +1748,12 @@ void LLUI::setHtmlHelp(LLHtmlHelp* html_help)
LLUI::sHtmlHelp = html_help;
}
+//static
+void LLUI::setQAMode(BOOL b)
+{
+ LLUI::sQAMode = b;
+}
+
LLScreenClipRect::LLScreenClipRect(const LLRect& rect, BOOL enabled) : mScissorState(GL_SCISSOR_TEST), mEnabled(enabled)
{
if (mEnabled)
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index b5a64e7533..ab45e36175 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -198,6 +198,12 @@ public:
static BOOL sShowXUINames;
static LLHtmlHelp* sHtmlHelp;
+ // *TODO: remove the following when QAR-369 settings clean-up work is in.
+ // Also remove the call to this method which will then be obsolete.
+ // Search for QAR-369 below to enable the proper accessing of this feature. -MG
+ static void setQAMode(BOOL b);
+ static BOOL sQAMode;
+
};
// FactoryPolicy is a static class that controls the creation and lookup of UI elements,
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index b49ee4338f..9db667bb51 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -644,13 +644,13 @@ void LLView::translate(S32 x, S32 y)
}
// virtual
-BOOL LLView::canSnapTo(const LLView* other_view) const
+BOOL LLView::canSnapTo(const LLView* other_view)
{
return other_view != this && other_view->getVisible();
}
// virtual
-void LLView::snappedTo(LLView* snap_view)
+void LLView::snappedTo(const LLView* snap_view)
{
}
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 6c5bcc5470..94811adaa5 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -106,9 +106,9 @@ virtual void userSetShape(const LLRect& new_rect);
virtual LLView* findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0);
virtual LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0);
LLScrollListCtrl
-virtual BOOL canSnapTo(const LLView* other_view) const { return other_view != this && other_view->getVisible(); }
+virtual BOOL canSnapTo(const LLView* other_view) { return other_view != this && other_view->getVisible(); }
LLFloater
-virtual void snappedTo(LLView* snap_view) {}
+virtual void snappedTo(const LLView* snap_view) {}
LLFloater
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
*
@@ -393,9 +393,9 @@ public:
virtual LLView* findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0);
virtual LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0);
- virtual BOOL canSnapTo(const LLView* other_view) const;
+ virtual BOOL canSnapTo(const LLView* other_view);
- virtual void snappedTo(LLView* snap_view);
+ virtual void snappedTo(const LLView* snap_view);
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 9daedef1f1..8483e37cf9 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -2880,7 +2880,7 @@ void LLWindowMacOSX::setCursor(ECursorType cursor)
mCurrentCursor = cursor;
}
-ECursorType LLWindowMacOSX::getCursor()
+ECursorType LLWindowMacOSX::getCursor() const
{
return mCurrentCursor;
}
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 58bcd91381..3fb4eff728 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -68,7 +68,7 @@ public:
/*virtual*/ void hideCursorUntilMouseMove();
/*virtual*/ BOOL isCursorHidden();
/*virtual*/ void setCursor(ECursorType cursor);
- /*virtual*/ ECursorType getCursor();
+ /*virtual*/ ECursorType getCursor() const;
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
/*virtual*/ void setMouseClipping( BOOL b );
@@ -114,7 +114,6 @@ public:
/*virtual*/ void bringToFront() {};
/*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b);
- /*virtual*/ void updateLanguageTextInputArea(const LLCoordGL& caret, const LLRect& bounds);
/*virtual*/ void interruptLanguageTextInput();
protected:
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 5597ff4334..519e0e8ec8 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -48,6 +48,7 @@
extern "C" {
# include "gtk/gtk.h"
}
+#include <locale.h>
#endif // LL_GTK
#if LL_LINUX || LL_SOLARIS
@@ -137,11 +138,11 @@ BOOL ll_try_gtk_init(void)
<< gtk_major_version << "."
<< gtk_minor_version << "."
<< gtk_micro_version << llendl;
- gchar *gtk_warning;
maybe_lock_display();
- gtk_warning = gtk_check_version(GTK_MAJOR_VERSION,
- GTK_MINOR_VERSION,
- GTK_MICRO_VERSION);
+ const gchar* gtk_warning = gtk_check_version(
+ GTK_MAJOR_VERSION,
+ GTK_MINOR_VERSION,
+ GTK_MICRO_VERSION);
maybe_unlock_display();
if (gtk_warning)
{
@@ -2028,12 +2029,16 @@ void LLWindowSDL::gatherInput()
// and crashness. (SL-35450)
std::string saved_locale = setlocale(LC_ALL, NULL);
- // Do a limited number of pumps so SL doesn't starve!
- // *TODO: this should ideally be time-limited, not count-limited.
- gtk_main_iteration_do(0); // Always do one non-blocking pump
- for (int iter=0; iter<10; ++iter)
- if (gtk_events_pending())
- gtk_main_iteration();
+ // Pump until we've nothing left to do or passed 1/15th of a
+ // second pumping for this frame.
+ static LLTimer pump_timer;
+ pump_timer.reset();
+ pump_timer.setTimerExpirySec(1.0f / 15.0f);
+ do {
+ // Always do at least one non-blocking pump
+ gtk_main_iteration_do(0);
+ } while (gtk_events_pending() &&
+ !pump_timer.hasExpired());
setlocale(LC_ALL, saved_locale.c_str() );
}
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index c9554ce7fe..f05397b058 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -3038,10 +3038,29 @@ void spawn_web_browser(const char* escaped_url )
llinfos << "Opening URL " << escaped_url << llendl;
+ // replaced ShellExecute code with ShellExecuteEx since ShellExecute doesn't work
+ // reliablly on Vista.
+
+ // this is madness.. no, this is..
+ LLWString url_wstring = utf8str_to_wstring( escaped_url );
+ llutf16string url_utf16 = wstring_to_utf16str( url_wstring );
+
+ // let the OS decide what to use to open the URL
+ SHELLEXECUTEINFO sei = { sizeof( sei ) };
+ sei.fMask = SEE_MASK_FLAG_DDEWAIT;
+ sei.nShow = SW_SHOWNORMAL;
+ sei.lpVerb = L"open";
+ sei.lpFile = url_utf16.c_str();
+ ShellExecuteEx( &sei );
+
+ //// TODO: LEAVING OLD CODE HERE SO I DON'T BONE OTHER MERGES
+ //// DELETE THIS ONCE THE MERGES ARE DONE
+
// Figure out the user's default web browser
// HKEY_CLASSES_ROOT\http\shell\open\command
- char reg_path_str[256]; /* Flawfinder: ignore */
- snprintf(reg_path_str, sizeof(reg_path_str), "%s\\shell\\open\\command", gURLProtocolWhitelistHandler[i]); /* Flawfinder: ignore */
+ /*
+ char reg_path_str[256]; // Flawfinder: ignore
+ snprintf(reg_path_str, sizeof(reg_path_str), "%s\\shell\\open\\command", gURLProtocolWhitelistHandler[i]); // Flawfinder: ignore
WCHAR reg_path_wstr[256];
mbstowcs(reg_path_wstr, reg_path_str, sizeof(reg_path_wstr)/sizeof(reg_path_wstr[0]));
@@ -3092,7 +3111,7 @@ void spawn_web_browser(const char* escaped_url )
// MS docs say to cast to int and compare to 32.
HWND our_window = NULL;
LPCWSTR directory_wstr = NULL;
- int retval = (int) ShellExecute(our_window, /* Flawfinder: ignore */
+ int retval = (int) ShellExecute(our_window, // Flawfinder: ignore
L"open",
browser_exec_utf16.c_str(),
url_utf16.c_str(),
@@ -3106,6 +3125,7 @@ void spawn_web_browser(const char* escaped_url )
{
llinfos << "load_url failure with " << retval << llendl;
}
+ */
}
diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp
index 9de426fc03..a1d2620a6f 100644
--- a/indra/llxml/llcontrol.cpp
+++ b/indra/llxml/llcontrol.cpp
@@ -39,7 +39,6 @@
#include "llstl.h"
-#include "linked_lists.h"
#include "llstring.h"
#include "v3math.h"
#include "v3dmath.h"
diff --git a/indra/mac_updater/mac_updater.cpp b/indra/mac_updater/mac_updater.cpp
index 8be4ddcc74..396a40288a 100644
--- a/indra/mac_updater/mac_updater.cpp
+++ b/indra/mac_updater/mac_updater.cpp
@@ -734,7 +734,7 @@ void *updatethreadproc(void*)
FSRef targetRef;
FSRef targetParentRef;
FSVolumeRefNum targetVol;
- FSRef trashFolderRef, tempFolderRef;
+ FSRef trashFolderRef;
Boolean replacingTarget = false;
memset(&tempDirRef, 0, sizeof(tempDirRef));
@@ -893,6 +893,10 @@ void *updatethreadproc(void*)
if(err != noErr)
throw 0;
+#if 0 // *HACK for DEV-11935 see below for details.
+
+ FSRef tempFolderRef;
+
err = FSFindFolder(
targetVol,
kTemporaryFolderType,
@@ -906,6 +910,17 @@ void *updatethreadproc(void*)
if(err != noErr)
throw 0;
+
+#else
+
+ // *HACK for DEV-11935 the above kTemporaryFolderType query was giving
+ // back results with path names that seem to be too long to be used as
+ // mount points. I suspect this incompatibility was introduced in the
+ // Leopard 10.5.2 update, but I have not verified this.
+ char const HARDCODED_TMP[] = "/tmp";
+ strncpy(temp, HARDCODED_TMP, sizeof(HARDCODED_TMP));
+
+#endif // 0 *HACK for DEV-11935
strncat(temp, "/SecondLifeUpdate_XXXXXX", (sizeof(temp) - strlen(temp)) - 1);
if(mkdtemp(temp) == NULL)
diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings
index 5bca4eab5e..bb7ddc17a6 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.1.0";
-CFBundleGetInfoString = "Second Life version 1.19.1.0, Copyright 2004-2008 Linden Research, Inc.";
+CFBundleShortVersionString = "Second Life version 1.19.1.4";
+CFBundleGetInfoString = "Second Life version 1.19.1.4, Copyright 2004-2008 Linden Research, Inc.";
diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist
index 6f8c464466..492e589384 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.1.0</string>
+ <string>1.19.1.4</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 93c06a474c..1a26783623 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -2608,10 +2608,10 @@
<string>Rect</string>
<key>Value</key>
<array>
- <integer>0</integer>
- <integer>400</integer>
- <integer>400</integer>
- <integer>0</integer>
+ <integer>16</integer>
+ <integer>650</integer>
+ <integer>600</integer>
+ <integer>128</integer>
</array>
</map>
<key>FloaterMiniMapRect</key>
@@ -5859,6 +5859,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>SaveMinidump</key>
+ <map>
+ <key>Comment</key>
+ <string>Save minidump for developer debugging on crash</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>ScaleShowAxes</key>
<map>
<key>Comment</key>
@@ -8689,6 +8700,17 @@
<key>Value</key>
<string />
</map>
+ <key>UseStartScreen</key>
+ <map>
+ <key>Comment</key>
+ <string>Whether to load a start screen image or not.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>VFSOldSize</key>
<map>
<key>Comment</key>
@@ -9669,7 +9691,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>1</integer>
+ <integer>0</integer>
</map>
<key>RenderDeferred</key>
<map>
diff --git a/indra/newview/app_settings/windlight/skies/A%2D6PM.xml b/indra/newview/app_settings/windlight/skies/A%2D6PM.xml
index 6e82f2eb21..ebf08e1a3f 100644
--- a/indra/newview/app_settings/windlight/skies/A%2D6PM.xml
+++ b/indra/newview/app_settings/windlight/skies/A%2D6PM.xml
@@ -2,10 +2,10 @@
<map>
<key>ambient</key>
<array>
- <real>0.14840038120746613</real>
- <real>0.17633917927742004</real>
- <real>0.23999999463558197</real>
- <real>0.079999998211860657</real>
+ <real>1.0199999809265137</real>
+ <real>0.80999994277954102</real>
+ <real>0.80999994277954102</real>
+ <real>1.0199999809265137</real>
</array>
<key>blue_density</key>
<array>
@@ -70,7 +70,7 @@
</array>
<key>distance_multiplier</key>
<array>
- <real>2.7000000476837158</real>
+ <real>1</real>
<real>0</real>
<real>0</real>
<real>1</real>
@@ -139,3 +139,4 @@
</array>
</map>
</llsd>
+
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 2fcec67c0e..5f81027b10 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -1,4 +1,4 @@
-version 15
+version 16
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@@ -45,6 +45,7 @@ RenderUseImpostors 1 1
RenderVBOEnable 1 1
RenderVolumeLODFactor 1 2.0
RenderWaterReflections 1 1
+UseStartScreen 1 1
UseOcclusion 1 1
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -319,7 +320,9 @@ list Intel_Springdale
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
-
+list ATI_FireGL_5200
+RenderVBOEnable 1 0
+WindLightUseAtmosShaders 0 0
list ATI_Mobility_Radeon_9800
RenderAvatarCloth 0 0
@@ -363,10 +366,12 @@ list ATI_Radeon_X700
Disregard128DefaultDrawDistance 1 0
list ATI_Radeon_X1300
Disregard128DefaultDrawDistance 1 0
+UseStartScreen 0 0
list ATI_Radeon_X1400
Disregard128DefaultDrawDistance 1 0
list ATI_Radeon_X1500
Disregard128DefaultDrawDistance 1 0
+UseStartScreen 0 0
list ATI_Radeon_X1600
Disregard128DefaultDrawDistance 1 0
list ATI_Radeon_X1700
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 40aa05d0c6..88570e3e09 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -1,4 +1,4 @@
-version 15
+version 16
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index c17ca7fcad..d19e4eded4 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,4 @@
-version 15
+version 16
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 066cd980b6..c75edc8565 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -24,6 +24,7 @@
ATI 3D-Analyze .*ATI.*3D-Analyze.* 0 0
ATI All-in-Wonder PCI-E .*ATI.*All-in-Wonder.*PCI-E.* 1 1
ATI All-in-Wonder 9xxx .*ATI.*All-in-Wonder 9.* 1 1
+ATI All-in-Wonder X600 .*ATI.*All-in-Wonder X6.* 1 1
ATI All-in-Wonder X800 .*ATI.*All-in-Wonder X8.* 2 1
ATI All-in-Wonder X1800 .*ATI.*All-in-Wonder X18.* 3 1
ATI All-in-Wonder X1900 .*ATI.*All-in-Wonder X19.* 3 1
@@ -33,19 +34,24 @@ ATI ASUS AH26xx .*ATI.*ASUS.*AH26.* 3 1
ATI ASUS AX3xx .*ATI.*ASUS.*AX3.* 1 1
ATI ASUS AX5xx .*ATI.*ASUS.*AX5.* 1 1
ATI ASUS AX8xx .*ATI.*ASUS.*AX8.* 2 1
-ATI ASUS EAH38xx .*ATI.*ASUS.*EAH38.* 3 1
ATI ASUS EAH24xx .*ATI.*ASUS.*EAH24.* 2 1
ATI ASUS EAH26xx .*ATI.*ASUS.*EAH26.* 3 1
+ATI ASUS EAH34xx .*ATI.*ASUS.*EAH34.* 1 1
+ATI ASUS EAH36xx .*ATI.*ASUS.*EAH36.* 3 1
+ATI ASUS EAH38xx .*ATI.*ASUS.*EAH38.* 3 1
ATI ASUS X1xxx .*ATI.*ASUS.*X1.* 2 1
-ATI Diamond X1xxx .*ATI.*Diamond.*X1.* 3 1
ATI Diamond X550 .*ATI.*Diamond X550.* 1 1
-ATI FireGL 5xxx .*ATI.*FireGL V5.* 1 0
-ATI FireGL .*ATI.*Fire.*GL.* 0 0
+ATI FireGL 5200 .*ATI.*FireGL V52.* 0 1
+ATI FireGL 5xxx .*ATI.*FireGL V5.* 1 1
+ATI FireGL .*ATI.*Fire.*GL.* 0 1
ATI FireMV .*ATI.*FireMV.* 0 0
ATI Generic .*ATI.*Generic.* 0 0
ATI Hercules 9800 .*ATI.*Hercules.*9800.* 1 1
ATI IGP 340M .*ATI.*IGP.*340M.* 0 0
ATI M52 .*ATI.*M52.* 1 1
+ATI M54 .*ATI.*M54.* 1 1
+ATI M56 .*ATI.*M56.* 1 1
+ATI M76 .*ATI.*M76.* 3 1
ATI Mobility Radeon 9800 .*ATI.*Mobility.*98.* 1 1
ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 1 1
ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 0 1
@@ -57,9 +63,11 @@ ATI Mobility Radeon X7xx .*ATI.*Mobility.*X7.* 1 1
ATI Mobility Radeon Xxxx .*ATI.*Mobility.*X.* 1 1
ATI Mobility Radeon .*ATI.*Mobility.* 0 1
ATI Radeon HD 2300 .*ATI.*Radeon HD 23.* 1 1
-ATI Radeon HD 2400 .*ATI.*Radeon HD 24.* 1 1
+ATI Radeon HD 2400 .*ATI.*Radeon HD.*24.* 1 1
ATI Radeon HD 2600 .*ATI.*Radeon HD 26.* 2 1
ATI Radeon HD 2900 .*ATI.*Radeon HD 29.* 3 1
+ATI Radeon HD 3400 .*ATI.*Radeon HD 34.* 1 1
+ATI Radeon HD 3600 .*ATI.*Radeon HD 36.* 3 1
ATI Radeon HD 3800 .*ATI.*Radeon HD 38.* 3 1
ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 0 0
ATI Radeon 7000 .*ATI.*Radeon 7.* 0 1
@@ -72,6 +80,7 @@ ATI Radeon 9600 .*ATI.*Radeon 96.* 0 1
ATI Radeon 9700 .*ATI.*Radeon 97.* 1 1
ATI Radeon 9800 .*ATI.*Radeon 98.* 1 1
ATI Radeon RV250 .*ATI.*RV250.* 0 1
+ATI Radeon RV600 .*ATI.*RV6.* 1 1
ATI Radeon RX700 .*ATI.*RX70.* 1 1
ATI Radeon RX800 .*ATI.*Radeon *RX80.* 2 1
ATI Radeon VE .*ATI.*Radeon.*VE.* 0 0
@@ -144,6 +153,10 @@ NVIDIA GeForce 8500 .*NVIDIA.*GeForce 85.* 3 1
NVIDIA GeForce 8600 .*NVIDIA.*GeForce 86.* 3 1
NVIDIA GeForce 8700 .*NVIDIA.*GeForce 87.* 3 1
NVIDIA GeForce 8800 .*NVIDIA.*GeForce 88.* 3 1
+NVIDIA GeForce 9300M .*NVIDIA.*GeForce 9300M.* 1 1
+NVIDIA GeForce 9500M .*NVIDIA.*GeForce 9500M.* 2 1
+NVIDIA GeForce 9600 .*NVIDIA.*GeForce 96.* 3 1
+NVIDIA GeForce 9800 .*NVIDIA.*GeForce 98.* 3 1
NVIDIA GeForce FX 5100 .*NVIDIA.*GeForce FX 51.* 0 1
NVIDIA GeForce FX 5200 .*NVIDIA.*GeForce FX 52.* 0 1
NVIDIA GeForce FX 5500 .*NVIDIA.*GeForce FX 55.* 0 1
@@ -176,11 +189,12 @@ NVIDIA GeForce Go 6 .*GeForce Go 6.* 1 1
NVIDIA GeForce PCX .*GeForce PCX.* 0 1
NVIDIA Generic .*NVIDIA.*Unknown.* 0 0
NVIDIA NV43 .*NVIDIA.*NV43.* 1 1
-NVIDIA Quadro2 .*Quadro2.* 0 0
-NVIDIA Quadro4 .*Quadro4.* 0 0
-NVIDIA Quadro DCC .*Quadro DCC.* 0 0
-NVIDIA Quadro FX .*Quadro FX.* 1 0
-NVIDIA Quadro NVS .*Quadro NVS.* 0 0
+NVIDIA Quadro2 .*Quadro2.* 0 1
+NVIDIA Quadro4 .*Quadro4.* 0 1
+NVIDIA Quadro DCC .*Quadro DCC.* 0 1
+NVIDIA Quadro FX 4500 .*Quadro.*FX.*4500.* 3 1
+NVIDIA Quadro FX .*Quadro FX.* 1 1
+NVIDIA Quadro NVS .*Quadro NVS.* 0 1
NVIDIA RIVA TNT .*RIVA TNT.* 0 0
S3 .*S3 Graphics.* 0 0
SiS SiS.* 0 0
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 2fe23c9a51..8db336f86f 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -372,7 +372,7 @@ FunctionEnd
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.CheckIfAdministrator
- DetailPrint $(CheckAdministratorUnInstDP)
+ DetailPrint $(CheckAdministratorUnInstDP)
UserInfo::GetAccountType
Pop $R0
StrCmp $R0 "Admin" is_admin
@@ -575,6 +575,22 @@ Function un.CloseSecondLife
Return
FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;
+; Delete the stored password for the current Windows user
+; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled
+;
+Function un.RemovePassword
+
+DetailPrint "Removing Second Life password"
+
+SetShellVarContext current
+Delete "$APPDATA\SecondLife\user_settings\password.dat"
+SetShellVarContext all
+
+FunctionEnd
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Delete the installed files
;;; This deletes the uninstall executable, but it works
@@ -674,6 +690,9 @@ Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk"
Call un.DocumentsAndSettingsFolder
!endif
+; remove stored password on uninstall
+Call un.RemovePassword
+
Call un.ProgramFiles
SectionEnd ; end of uninstall section
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index aefa1af106..502160716e 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -287,6 +287,7 @@ BOOL gRandomizeFramerate = FALSE;
BOOL gPeriodicSlowFrame = FALSE;
BOOL gLLErrorActivated = FALSE;
+BOOL gLogoutInProgress = FALSE;
////////////////////////////////////////////////////////////
// Internal globals... that should be removed.
static LLString gArgs;
@@ -294,6 +295,7 @@ static LLString gArgs;
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";
+const char* LOGOUT_MARKER_FILE_NAME = "SecondLife.logout_marker";
static BOOL gDoDisconnect = FALSE;
static LLString gLaunchFileOnQuit;
@@ -441,7 +443,7 @@ static void settings_modify()
#endif
// propagate push to talk preference to current status
- gSavedSettings.setBOOL("PTTCurrentlyEnabled", gSavedSettings.getBOOL("EnablePushToTalk"));
+ gSavedSettings.setBOOL("PTTCurrentlyEnabled", TRUE); //gSavedSettings.getBOOL("EnablePushToTalk"));
}
void initGridChoice()
@@ -882,9 +884,10 @@ bool LLAppViewer::mainLoop()
while (!LLApp::isExiting())
{
LLFastTimer::reset(); // Should be outside of any timer instances
+ try
{
LLFastTimer t(LLFastTimer::FTM_FRAME);
-
+
{
LLFastTimer t2(LLFastTimer::FTM_MESSAGES);
#if LL_WINDOWS
@@ -1040,12 +1043,23 @@ bool LLAppViewer::mainLoop()
}
}
+ catch(std::bad_alloc)
+ {
+ llwarns << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ;
+ }
}
// Save snapshot for next time, if we made it through initialization
if (STATE_STARTED == LLStartUp::getStartupState())
{
- saveFinalSnapshot();
+ try
+ {
+ saveFinalSnapshot();
+ }
+ catch(std::bad_alloc)
+ {
+ llwarns << "Bad memory allocation when saveFinalSnapshot() is called!" << llendl ;
+ }
}
delete gServicePump;
@@ -2073,6 +2087,7 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD;
+ gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString();
gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily();
gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMhz();
gDebugInfo["CPUInfo"]["CPUAltivec"] = gSysCPU.hasAltivec();
@@ -2118,11 +2133,33 @@ void LLAppViewer::handleViewerCrash()
}
pApp->mReportedCrash = TRUE;
+ //We already do this in writeSystemInfo(), but we do it again here to make /sure/ we have a version
+ //to check against no matter what
+ gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName");
+
+ gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR;
+ gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
+ gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
+ gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD;
+
gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile");
gDebugInfo["CAFilename"] = gDirUtilp->getCAFile();
gDebugInfo["ViewerExePath"] = gDirUtilp->getExecutablePathAndName().c_str();
gDebugInfo["CurrentPath"] = gDirUtilp->getCurPath().c_str();
- gDebugInfo["CurrentSimHost"] = gAgent.getRegionHost().getHostName();
+ if(gLogoutInProgress)
+ {
+ gDebugInfo["LastExecEvent"] = LAST_EXEC_LOGOUT_CRASH;
+ }
+ else
+ {
+ gDebugInfo["LastExecEvent"] = gLLErrorActivated ? LAST_EXEC_LLERROR_CRASH : LAST_EXEC_OTHER_CRASH;
+ }
+
+ if(gAgent.getRegion())
+ {
+ gDebugInfo["CurrentSimHost"] = gAgent.getRegionHost().getHostName();
+ gDebugInfo["CurrentRegion"] = gAgent.getRegion()->getName();
+ }
//Write out the crash status file
//Use marker file style setup, as that's the simplest, especially since
@@ -2170,7 +2207,14 @@ void LLAppViewer::handleViewerCrash()
LLError::logToFile("");
// Remove the marker file, since otherwise we'll spawn a process that'll keep it locked
- pApp->removeMarkerFile();
+ if(gDebugInfo["LastExecEvent"].asInteger() == LAST_EXEC_LOGOUT_CRASH)
+ {
+ pApp->removeMarkerFile(true);
+ }
+ else
+ {
+ pApp->removeMarkerFile(false);
+ }
// Call to pure virtual, handled by platform specifc llappviewer instance.
pApp->handleCrashReporting();
@@ -2235,24 +2279,35 @@ void LLAppViewer::initMarkerFile()
// 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 logout_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LOGOUT_MARKER_FILE_NAME);
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);
+
+ apr_file_t* fMarker = ll_apr_file_open(logout_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_LOGOUT_FROZE;
+ }
+ 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;
+ if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
+ else 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;
+ if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
+ else gLastExecEvent = LAST_EXEC_OTHER_CRASH;
}
+ ll_apr_file_remove(logout_marker_file);
ll_apr_file_remove(llerror_marker_file);
ll_apr_file_remove(error_marker_file);
@@ -2279,6 +2334,7 @@ void LLAppViewer::initMarkerFile()
else
{
llinfos << "Failed to create marker file." << llendl;
+ return;
}
if (apr_file_lock(mMarkerFile, APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS)
{
@@ -2291,7 +2347,7 @@ void LLAppViewer::initMarkerFile()
llinfos << "Exiting initMarkerFile()." << llendl;
}
-void LLAppViewer::removeMarkerFile()
+void LLAppViewer::removeMarkerFile(bool leave_logout_marker)
{
llinfos << "removeMarkerFile()" << llendl;
if (mMarkerFile != NULL)
@@ -2299,6 +2355,11 @@ void LLAppViewer::removeMarkerFile()
ll_apr_file_remove( mMarkerFileName );
mMarkerFile = NULL;
}
+ if (mLogoutMarkerFile != NULL && !leave_logout_marker)
+ {
+ ll_apr_file_remove( mLogoutMarkerFileName );
+ mLogoutMarkerFile = NULL;
+ }
}
void LLAppViewer::forceQuit()
@@ -3277,6 +3338,20 @@ void LLAppViewer::sendLogoutRequest()
mLogoutRequestSent = TRUE;
gVoiceClient->leaveChannel();
+
+ //Set internal status variables and marker files
+ gLogoutInProgress = TRUE;
+ mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME);
+ mLogoutMarkerFile = ll_apr_file_open(mLogoutMarkerFileName, LL_APR_W);
+ if (mLogoutMarkerFile)
+ {
+ llinfos << "Created logout marker file " << mLogoutMarkerFileName << llendl;
+ }
+ else
+ {
+ llwarns << "Cannot create logout marker file " << mLogoutMarkerFileName << llendl;
+ }
+ apr_file_close(mLogoutMarkerFile);
}
}
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 0adf178b34..d687481002 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -112,7 +112,7 @@ public:
bool isInProductionGrid();
- void removeMarkerFile();
+ void removeMarkerFile(bool leave_logout_marker = false);
// LLAppViewer testing helpers.
// *NOTE: These will potentially crash the viewer. Only for debugging.
@@ -167,6 +167,10 @@ private:
LLString mMarkerFileName;
apr_file_t* mMarkerFile; // A file created to indicate the app is running.
+ LLString mLogoutMarkerFileName;
+ apr_file_t* mLogoutMarkerFile; // A file created to indicate the app is running.
+
+
LLOSInfo mSysOSInfo;
S32 mCrashBehavior;
bool mReportedCrash;
@@ -217,7 +221,9 @@ typedef enum
LAST_EXEC_NORMAL = 0,
LAST_EXEC_FROZE,
LAST_EXEC_LLERROR_CRASH,
- LAST_EXEC_OTHER_CRASH
+ LAST_EXEC_OTHER_CRASH,
+ LAST_EXEC_LOGOUT_FROZE,
+ LAST_EXEC_LOGOUT_CRASH
} eLastExecEvent;
extern eLastExecEvent gLastExecEvent; // llstartup
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index b73ea09a0c..198c235a1e 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -409,14 +409,14 @@ void LLDrawable::makeActive()
}
-void LLDrawable::makeStatic()
+void LLDrawable::makeStatic(BOOL warning_enabled)
{
if (isState(ACTIVE))
{
clearState(ACTIVE);
gPipeline.setActive(this, FALSE);
- if (mParent.notNull() && mParent->isActive())
+ if (mParent.notNull() && mParent->isActive() && warning_enabled)
{
llwarns << "Drawable becamse static with active parent!" << llendl;
}
@@ -431,7 +431,7 @@ void LLDrawable::makeStatic()
{
llwarns << "Child drawable has unknown parent." << llendl;
}
- child_drawable->makeStatic();
+ child_drawable->makeStatic(warning_enabled);
}
}
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index 9a0dafe77b..d6f77f2ab4 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -140,7 +140,7 @@ public:
F32 updateXform(BOOL undamped);
virtual void makeActive();
- virtual void makeStatic();
+ /*virtual*/ void makeStatic(BOOL warning_enabled = TRUE);
BOOL isActive() const { return isState(ACTIVE); }
BOOL isStatic() const { return !isActive(); }
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 4a9d8d1ec9..b35ef81803 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -73,7 +73,7 @@ const U32 VERTEX_MASK_SHINY = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_N
const U32 VERTEX_MASK_BUMP = LLVertexBuffer::MAP_VERTEX |LLVertexBuffer::MAP_TEXCOORD | LLVertexBuffer::MAP_TEXCOORD2;
U32 LLDrawPoolBump::sVertexMask = VERTEX_MASK_SHINY;
-static LLCubeMap* sCubeMap = NULL;
+static LLPointer<LLCubeMap> sCubeMap;
static LLGLSLShader* shader = NULL;
static S32 cube_channel = -1;
@@ -597,7 +597,7 @@ void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL
{
sCubeMap->bind();
}
- else
+ else if (gSky.mVOSkyp->getCubeMap())
{
gSky.mVOSkyp->getCubeMap()->bind();
}
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index ee0d9e58ad..63d13d61d9 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -68,7 +68,7 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) :
sCloudNoiseRawImage = new LLImageRaw();
- cloudNoiseFile->decode(sCloudNoiseRawImage);
+ cloudNoiseFile->decode(sCloudNoiseRawImage, 0.0f);
LLImageGL::create(sCloudNoiseTexture, sCloudNoiseRawImage, TRUE);
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 5ebf599583..fd9d790f27 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -185,8 +185,8 @@ static struct ft_display_info ft_display_table[] =
{ LLFastTimer::FTM_RENDER_BLOOM_FBO, " First FBO", &LLColor4::blue, 0 },
{ LLFastTimer::FTM_RENDER_UI, " UI", &LLColor4::cyan4, 1 },
{ LLFastTimer::FTM_RENDER_TIMER, " Timers", &LLColor4::cyan5, 1, 0 },
-// { LLFastTimer::FTM_RENDER_FONTS, " Fonts", &LLColor4::pink1, 0 },
- { LLFastTimer::FTM_SWAP, " Swap", &LLColor4::pink1, 0 },
+ { LLFastTimer::FTM_RENDER_FONTS, " Fonts", &LLColor4::pink1, 0 },
+ { LLFastTimer::FTM_SWAP, " Swap", &LLColor4::pink2, 0 },
{ LLFastTimer::FTM_CLIENT_COPY, " Client Copy", &LLColor4::red1, 1},
#if 0 || !LL_RELEASE_FOR_DOWNLOAD
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index 0108ac205e..4c387a3b6d 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -1348,7 +1348,6 @@ const char* LLFilePicker::getDirname()
void LLFilePicker::reset()
{
- llinfos << "GTK LLFilePicker::reset()" << llendl;
mNextFileIndex = 0;
mStoreFilenames.win = NULL;
mStoreFilenames.fileVector.clear();
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index faa69f7a03..25b275c8cb 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -197,7 +197,7 @@ void LLFloaterAuction::onClickSnapshot(void* data)
llinfos << "Writing J2C..." << llendl;
LLPointer<LLImageJ2C> j2c = new LLImageJ2C;
- j2c->encode(raw);
+ j2c->encode(raw, 0.0f);
LLVFile::writeFile(j2c->getData(), j2c->getDataSize(), gVFS, self->mImageID, LLAssetType::AT_TEXTURE);
self->mImage = new LLImageGL((LLImageRaw*)raw, FALSE);
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index 0fdc1ccdc6..3607aad7ef 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -353,7 +353,7 @@ bool LLFloaterImagePreview::loadImage(const char *src_filename)
return false;
}
- if (!bmp_image->decode(raw_image))
+ if (!bmp_image->decode(raw_image, 0.0f))
{
return false;
}
@@ -390,7 +390,7 @@ bool LLFloaterImagePreview::loadImage(const char *src_filename)
return false;
}
- if (!jpeg_image->decode(raw_image))
+ if (!jpeg_image->decode(raw_image, 0.0f))
{
return false;
}
@@ -405,7 +405,7 @@ bool LLFloaterImagePreview::loadImage(const char *src_filename)
return false;
}
- if (!png_image->decode(raw_image))
+ if (!png_image->decode(raw_image, 0.0f))
{
return false;
}
@@ -589,7 +589,8 @@ BOOL LLFloaterImagePreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
//-----------------------------------------------------------------------------
// onMouseCaptureLost()
//-----------------------------------------------------------------------------
-void LLFloaterImagePreview::onMouseCaptureLost(LLMouseHandler* handler)
+// static
+void LLFloaterImagePreview::onMouseCaptureLostImagePreview(LLMouseHandler* handler)
{
gViewerWindow->showCursor();
}
diff --git a/indra/newview/llfloaterimagepreview.h b/indra/newview/llfloaterimagepreview.h
index d90af9dbe4..365dc7eefd 100644
--- a/indra/newview/llfloaterimagepreview.h
+++ b/indra/newview/llfloaterimagepreview.h
@@ -112,7 +112,7 @@ public:
BOOL handleHover(S32 x, S32 y, MASK mask);
BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
- static void onMouseCaptureLost(LLMouseHandler*);
+ static void onMouseCaptureLostImagePreview(LLMouseHandler*);
static void setUploadAmount(S32 amount) { sUploadAmount = amount; }
protected:
diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp
index 9a7634a739..14bc721e8e 100644
--- a/indra/newview/llfloaterscriptdebug.cpp
+++ b/indra/newview/llfloaterscriptdebug.cpp
@@ -181,11 +181,11 @@ LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLUUID& object_id)
addChild(mHistoryEditor);
}
-void LLFloaterScriptDebugOutput::init(const LLString& title, BOOL resizable,
+void LLFloaterScriptDebugOutput::initFloater(const LLString& title, BOOL resizable,
S32 min_width, S32 min_height, BOOL drag_on_left,
BOOL minimizable, BOOL close_btn)
{
- LLFloater::init(title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
+ LLFloater::initFloater(title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
S32 y = getRect().getHeight() - LLFLOATER_HEADER_SIZE - LLFLOATER_VPAD;
S32 x = LLFLOATER_HPAD;
// History editor
diff --git a/indra/newview/llfloaterscriptdebug.h b/indra/newview/llfloaterscriptdebug.h
index 0fefb3a54c..05e6629913 100644
--- a/indra/newview/llfloaterscriptdebug.h
+++ b/indra/newview/llfloaterscriptdebug.h
@@ -62,7 +62,7 @@ public:
LLFloaterScriptDebugOutput(const LLUUID& object_id);
~LLFloaterScriptDebugOutput();
- virtual void init(const LLString& title, BOOL resizable,
+ virtual void initFloater(const LLString& title, BOOL resizable,
S32 min_width, S32 min_height, BOOL drag_on_left,
BOOL minimizable, BOOL close_btn);
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 962269ca89..6f31508fb8 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -770,10 +770,10 @@ void LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->mJPEGImage = NULL; // deletes image
previewp->mJPEGImage = new LLImageJPEG();
previewp->mJPEGImage->setEncodeQuality(llclamp(previewp->mSnapshotQuality, 0, 100));
- if (previewp->mJPEGImage->encode(previewp->mRawImage))
+ if (previewp->mJPEGImage->encode(previewp->mRawImage, 0.0f))
{
previewp->mDataSize = previewp->mJPEGImage->getDataSize();
- previewp->mJPEGImage->decode(previewp->mRawImageEncoded);
+ previewp->mJPEGImage->decode(previewp->mRawImageEncoded, 0.0f);
}
}
else if (previewp->getSnapshotType() == SNAPSHOT_TEXTURE)
@@ -786,10 +786,10 @@ void LLSnapshotLivePreview::onIdle( void* snapshot_preview )
scaled->biasedScaleToPowerOfTwo(512);
previewp->mImageScaled[previewp->mCurImageIndex] = TRUE;
- if (formatted->encode(scaled))
+ if (formatted->encode(scaled, 0.0f))
{
previewp->mDataSize = formatted->getDataSize();
- formatted->decode(previewp->mRawImageEncoded);
+ formatted->decode(previewp->mRawImageEncoded, 0.0f);
}
}
else
@@ -885,7 +885,7 @@ void LLSnapshotLivePreview::saveTexture()
scaled->biasedScaleToPowerOfTwo(512);
- if (formatted->encode(scaled))
+ if (formatted->encode(scaled, 0.0f))
{
LLVFile::writeFile(formatted->getData(), formatted->getDataSize(), gVFS, new_asset_id, LLAssetType::AT_TEXTURE);
std::string pos_string;
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 1739cd5fef..087452919e 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -4509,6 +4509,9 @@ LLInventoryFilter::LLInventoryFilter(const LLString& name) :
mLastLogoff = gSavedPerAccountSettings.getU32("LastLogoff");
mFilterBehavior = FILTER_NONE;
+
+ // copy mFilterOps into mDefaultFilterOps
+ markDefault();
}
LLInventoryFilter::~LLInventoryFilter()
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 28c2268952..f8380fc47e 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -286,7 +286,10 @@ class LLInventorySort
{
public:
LLInventorySort()
- : mSortOrder(0) { }
+ : mSortOrder(0),
+ mByDate(false),
+ mSystemToTop(false),
+ mFoldersByName(false) { }
// Returns true if order has changed
bool updateSort(U32 order);
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 203adc2fb5..536f4b44da 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -420,6 +420,8 @@ void LLIMMgr::addMessage(
other_participant_id = LLUUID::null;
}
+
+
LLFloaterIMPanel* floater;
LLUUID new_session_id = session_id;
if (new_session_id.isNull())
@@ -875,19 +877,14 @@ public:
if ( floaterp )
{
- std::string error_string;
-
if ( 404 == statusNum )
{
+ std::string error_string;
error_string = "does not exist";
- }
- else
- {
- error_string = "generic";
- }
- floaterp->showSessionStartError(
- error_string);
+ floaterp->showSessionStartError(
+ error_string);
+ }
}
}
}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index c3a0a2d931..5ae7c2a4e7 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3280,7 +3280,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
{
if (iter->second == attachment)
{
- rez_action->mAttachPt = iter->first;
+ attach_pt = iter->first;
break;
}
}
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 49f2256f61..32a9fc95b4 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -538,7 +538,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
{
mask |= LLInventoryObserver::LABEL;
}
- old_item->copy(item);
+ old_item->copyViewerItem(item);
mask |= LLInventoryObserver::INTERNAL;
}
else
@@ -654,14 +654,14 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat)
{
mask |= LLInventoryObserver::LABEL;
}
- old_cat->copy(cat);
+ old_cat->copyViewerCategory(cat);
addChangedMask(mask, cat->getUUID());
}
else
{
// add this category
LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat->getParentUUID());
- new_cat->copy(cat);
+ new_cat->copyViewerCategory(cat);
addCategory(new_cat);
// make sure this category is correctly referenced by it's parent.
@@ -1158,7 +1158,13 @@ void LLInventoryModel::fetchDescendentsResponder::onClickRetry(S32 option, void*
{
if (option == 0)
{
- std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents");
+ std::string url;
+
+ LLViewerRegion * agent_region = gAgent.getRegion();
+ if (agent_region)
+ {
+ url = agent_region->getCapability("FetchInventoryDescendents");
+ }
if (!url.empty()) //Capability found. Build up LLSD and use it.
{
@@ -1351,7 +1357,14 @@ void LLInventoryModel::backgroundFetch(void*)
if (sBackgroundFetchActive)
{
//If we'll be using the capability, we'll be sending batches and the background thing isn't as important.
- std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents");
+ std::string url;
+
+ LLViewerRegion * agent_region = gAgent.getRegion();
+ if (agent_region)
+ {
+ url = agent_region->getCapability("FetchInventoryDescendents");
+ }
+
if (!url.empty())
{
bulkFetch(url);
diff --git a/indra/newview/llmimetypes.cpp b/indra/newview/llmimetypes.cpp
index e165650da1..821f21313c 100644
--- a/indra/newview/llmimetypes.cpp
+++ b/indra/newview/llmimetypes.cpp
@@ -131,11 +131,15 @@ bool LLMIMETypes::parseMIMETypes(const LLString& xml_filename)
}
if (child->hasName("allow_resize"))
{
- child->getBoolValue( 1, (BOOL*)&( info.mAllowResize ) );
+ BOOL allow_resize = FALSE;
+ child->getBoolValue( 1, &allow_resize );
+ info.mAllowResize = (bool)allow_resize;
}
if (child->hasName("allow_looping"))
{
- child->getBoolValue( 1, (BOOL*)&( info.mAllowLooping ) );
+ BOOL allow_looping = FALSE;
+ child->getBoolValue( 1, &allow_looping );
+ info.mAllowLooping = (bool)allow_looping;
}
}
sWidgetMap[set_name] = info;
diff --git a/indra/newview/llmimetypes.h b/indra/newview/llmimetypes.h
index 3ffe0a4f23..61359e1933 100644
--- a/indra/newview/llmimetypes.h
+++ b/indra/newview/llmimetypes.h
@@ -68,7 +68,7 @@ public:
static bool findAllowResize(const LLString& mime_type);
// accessor for flag to enable/disable media size edit fields
- static bool LLMIMETypes::findAllowLooping(const LLString& mime_type);
+ static bool findAllowLooping(const LLString& mime_type);
// accessor for flag to enable/disable media looping checkbox
public:
diff --git a/indra/newview/llnameeditor.cpp b/indra/newview/llnameeditor.cpp
index 3b4ac4f81e..31c9b41f30 100644
--- a/indra/newview/llnameeditor.cpp
+++ b/indra/newview/llnameeditor.cpp
@@ -130,7 +130,7 @@ void LLNameEditor::refreshAll(const LLUUID& id, const char* firstname,
}
}
-void LLNameEditor::setValue( LLSD value )
+void LLNameEditor::setValue( const LLSD& value )
{
setNameID(value.asUUID(), FALSE);
}
diff --git a/indra/newview/llnameeditor.h b/indra/newview/llnameeditor.h
index c7c94f458a..70b20fc369 100644
--- a/indra/newview/llnameeditor.h
+++ b/indra/newview/llnameeditor.h
@@ -73,7 +73,7 @@ public:
// Take/return agent UUIDs
- virtual void setValue( LLSD value );
+ virtual void setValue( const LLSD& value );
virtual LLSD getValue() const;
private:
diff --git a/indra/newview/lloverlaybar.h b/indra/newview/lloverlaybar.h
index 06b39aa23a..0ccb1b517b 100644
--- a/indra/newview/lloverlaybar.h
+++ b/indra/newview/lloverlaybar.h
@@ -58,7 +58,7 @@ public:
~LLOverlayBar();
/*virtual*/ void refresh();
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/*virtual*/ BOOL postBuild();
void layoutButtons();
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 560ed1768d..99df38dc83 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -231,14 +231,14 @@ BOOL LLPanelClassified::postBuild()
mNameEditor = getChild<LLLineEditor>("given_name_editor");
mNameEditor->setMaxTextLength(DB_PARCEL_NAME_LEN);
mNameEditor->setCommitOnFocusLost(TRUE);
- mNameEditor->setFocusReceivedCallback(onFocusReceived, this);
+ mNameEditor->setFocusReceivedCallback(focusReceived, this);
mNameEditor->setCommitCallback(onCommitAny);
mNameEditor->setCallbackUserData(this);
mNameEditor->setPrevalidate( LLLineEditor::prevalidateASCII );
mDescEditor = getChild<LLTextEditor>("desc_editor");
mDescEditor->setCommitOnFocusLost(TRUE);
- mDescEditor->setFocusReceivedCallback(onFocusReceived, this);
+ mDescEditor->setFocusReceivedCallback(focusReceived, this);
mDescEditor->setCommitCallback(onCommitAny);
mDescEditor->setCallbackUserData(this);
mDescEditor->setTabsToNextField(TRUE);
@@ -965,7 +965,7 @@ void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data)
}
// static
-void LLPanelClassified::onFocusReceived(LLFocusableElement* ctrl, void* data)
+void LLPanelClassified::focusReceived(LLFocusableElement* ctrl, void* data)
{
// allow the data to be saved
onCommitAny((LLUICtrl*)ctrl, data);
diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h
index e3705705db..aabb2a80f1 100644
--- a/indra/newview/llpanelclassified.h
+++ b/indra/newview/llpanelclassified.h
@@ -113,7 +113,7 @@ protected:
static void onClickProfile(void* data);
static void onClickSet(void* data);
- static void onFocusReceived(LLFocusableElement* ctrl, void* data);
+ static void focusReceived(LLFocusableElement* ctrl, void* data);
static void onCommitAny(LLUICtrl* ctrl, void* data);
BOOL checkDirty(); // Update and return mDirty
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 9c9c058685..3d5abc2fb9 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -496,8 +496,10 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
row["columns"][4]["column"] = "sort";
row["columns"][4]["value"] = buffer;
- mNoticesList->addElement(row, ADD_SORTED);
+ mNoticesList->addElement(row, ADD_BOTTOM);
}
+
+ mNoticesList->sortItems();
}
void LLPanelGroupNotices::onSelectNotice(LLUICtrl* ctrl, void* data)
diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp
index 8df677a755..085cbfa7a0 100644
--- a/indra/newview/llpanellandmedia.cpp
+++ b/indra/newview/llpanellandmedia.cpp
@@ -117,7 +117,6 @@ BOOL LLPanelLandMedia::postBuild()
mMediaTypeCombo = getChild<LLComboBox>("media type");
childSetCommitCallback("media type", onCommitType, this);
populateMIMECombo();
- mMediaTypeCombo->sortByName();
mMediaWidthCtrl = getChild<LLSpinCtrl>("media_size_width");
childSetCommitCallback("media_size_width", onCommitAny, this);
@@ -268,14 +267,28 @@ void LLPanelLandMedia::refresh()
void LLPanelLandMedia::populateMIMECombo()
{
+ LLString default_mime_type = "none/none";
+ LLString default_label;
LLMIMETypes::mime_widget_set_map_t::const_iterator it;
for (it = LLMIMETypes::sWidgetMap.begin(); it != LLMIMETypes::sWidgetMap.end(); ++it)
{
const LLString& mime_type = it->first;
const LLMIMETypes::LLMIMEWidgetSet& info = it->second;
- mMediaTypeCombo->add(info.mLabel, mime_type);
+ if (info.mDefaultMimeType == default_mime_type)
+ {
+ // Add this label at the end to make UI look cleaner
+ default_label = info.mLabel;
+ }
+ else
+ {
+ mMediaTypeCombo->add(info.mLabel, mime_type);
+ }
}
+ // *TODO: The sort order is based on std::map key, which is
+ // ASCII-sorted and is wrong in other languages. TRANSLATE
+ mMediaTypeCombo->add( default_label, default_mime_type, ADD_BOTTOM );
}
+
void LLPanelLandMedia::setMediaType(const LLString& mime_type)
{
LLParcel *parcel = mParcel->getParcel();
@@ -291,7 +304,11 @@ void LLPanelLandMedia::setMediaURL(const LLString& media_url)
{
mMediaURLEdit->setText(media_url);
mMediaURLEdit->onCommit();
+}
+LLString LLPanelLandMedia::getMediaURL()
+{
+ return mMediaURLEdit->getText();
}
// static
@@ -307,8 +324,9 @@ void LLPanelLandMedia::onCommitType(LLUICtrl *ctrl, void *userdata)
onCommitAny(ctrl, userdata);
}
+
// static
-void LLPanelLandMedia::onCommitAny(LLUICtrl *ctrl, void *userdata)
+void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata)
{
LLPanelLandMedia *self = (LLPanelLandMedia *)userdata;
diff --git a/indra/newview/llpanellandmedia.h b/indra/newview/llpanellandmedia.h
index 8ec8bcc013..e22e49ca35 100644
--- a/indra/newview/llpanellandmedia.h
+++ b/indra/newview/llpanellandmedia.h
@@ -48,7 +48,7 @@ public:
void refresh();
void setMediaType(const LLString& media_type);
void setMediaURL(const LLString& media_type);
- const LLString& getMediaURL() { return mMediaURLEdit->getText(); }
+ LLString getMediaURL();
private:
void populateMIMECombo();
diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h
index 5f129b99d4..d7afa91520 100644
--- a/indra/newview/llpreview.h
+++ b/indra/newview/llpreview.h
@@ -100,7 +100,7 @@ public:
void setAuxItem( const LLInventoryItem* item )
{
if ( mAuxItem )
- mAuxItem->copy(item);
+ mAuxItem->copyItem(item);
}
static void onBtnCopyToInv(void* userdata);
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 26052968fc..e55d2b2225 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -2036,7 +2036,7 @@ void LLLiveLSLEditor::saveIfNeeded()
LLInventoryItem* inv_item = (LLInventoryItem*)object->getInventoryObject(mItemID);
if(inv_item)
{
- mItem->copy(inv_item);
+ mItem->copyItem(inv_item);
}
// Don't need to save if we're pristine
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index bdcde60f46..e94e323850 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -288,7 +288,7 @@ void LLPreviewTexture::draw()
// virtual
-BOOL LLPreviewTexture::canSaveAs()
+BOOL LLPreviewTexture::canSaveAs() const
{
return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
}
@@ -421,6 +421,9 @@ void LLPreviewTexture::updateDimensions()
view_height += BTN_HEIGHT + CLIENT_RECT_VPAD;
button_height = BTN_HEIGHT + PREVIEW_PAD;
}
+
+ view_width = llmax(view_width, getMinWidth());
+ view_height = llmax(view_height, getMinHeight());
if (client_height != mLastHeight || client_width != mLastWidth)
{
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index a897dcadef..6cb5aebfa9 100644
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -59,7 +59,7 @@ public:
virtual void draw();
- virtual BOOL canSaveAs();
+ virtual BOOL canSaveAs() const;
virtual void saveAs();
virtual void loadAsset();
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index ba2434d7b0..c2dfd779a3 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -83,6 +83,7 @@
#include "llglheaders.h"
+LLViewerObject* getSelectedParentObject(LLViewerObject *object) ;
//
// Consts
//
@@ -259,7 +260,7 @@ void LLSelectMgr::overrideObjectUpdates()
virtual bool apply(LLSelectNode* selectNode)
{
LLViewerObject* object = selectNode->getObject();
- if (object->permMove())
+ if (object && object->permMove())
{
if (!selectNode->mLastPositionLocal.isExactlyZero())
{
@@ -1035,10 +1036,19 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &
if (mGridMode == GRID_MODE_LOCAL && mSelectedObjects->getObjectCount())
{
+ LLViewerObject* root = getSelectedParentObject(mSelectedObjects->getFirstObject());
LLBBox bbox = mSavedSelectionBBox;
mGridOrigin = mSavedSelectionBBox.getCenterAgent();
- mGridRotation = mSavedSelectionBBox.getRotation();
mGridScale = mSavedSelectionBBox.getExtentLocal() * 0.5f;
+
+ if(mSelectedObjects->getObjectCount() < 2 || !root || root->mDrawable.isNull())
+ {
+ mGridRotation = mSavedSelectionBBox.getRotation();
+ }
+ else //set to the root object
+ {
+ mGridRotation = root->getRenderRotation();
+ }
}
else if (mGridMode == GRID_MODE_REF_OBJECT && first_grid_object && first_grid_object->mDrawable.notNull())
{
@@ -1314,6 +1324,8 @@ void LLSelectMgr::dump()
{
LLSelectNode* node = *iter;
LLViewerObject* objectp = node->getObject();
+ if (!objectp)
+ continue;
for (S32 te = 0; te < objectp->getNumTEs(); ++te )
{
if (node->isTESelected(te))
@@ -2096,6 +2108,11 @@ void LLSelectMgr::adjustTexturesByScale(BOOL send_to_sim, BOOL stretch)
LLSelectNode* selectNode = *iter;
LLViewerObject* object = selectNode->getObject();
+ if (!object)
+ {
+ continue;
+ }
+
if (!object->permModify())
{
continue;
@@ -2196,7 +2213,7 @@ BOOL LLSelectMgr::selectGetModify()
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
- if( !node->mValid )
+ if( !object || !node->mValid )
{
return FALSE;
}
@@ -3256,7 +3273,7 @@ void LLSelectMgr::packBuyObjectIDs(LLSelectNode* node, void* data)
{
buy->mObjectsSent.push_back(object);
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
- gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, node->getObject()->getLocalID() );
+ gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, object->getLocalID() );
gMessageSystem->addU8Fast(_PREHASH_SaleType, buy->mSaleInfo.getSaleType());
gMessageSystem->addS32Fast(_PREHASH_SalePrice, buy->mSaleInfo.getSalePrice());
}
@@ -3717,6 +3734,10 @@ void LLSelectMgr::saveSelectedObjectTransform(EActionType action_type)
virtual bool apply(LLSelectNode* selectNode)
{
LLViewerObject* object = selectNode->getObject();
+ if (!object)
+ {
+ return true; // skip
+ }
selectNode->mSavedPositionLocal = object->getPosition();
if (object->isAttachment())
{
@@ -4047,7 +4068,10 @@ void LLSelectMgr::sendListToRegions(const LLString& message_name,
push_all(std::queue<LLSelectNode*>& n) : nodes_to_send(n) {}
virtual bool apply(LLSelectNode* node)
{
- nodes_to_send.push(node);
+ if (node->getObject())
+ {
+ nodes_to_send.push(node);
+ }
return true;
}
};
@@ -4058,29 +4082,20 @@ void LLSelectMgr::sendListToRegions(const LLString& message_name,
push_some(std::queue<LLSelectNode*>& n, bool roots) : nodes_to_send(n), mRoots(roots) {}
virtual bool apply(LLSelectNode* node)
{
- BOOL is_root = node->getObject()->isRootEdit();
- if ((mRoots && is_root) || (!mRoots && !is_root))
+ if (node->getObject())
{
- nodes_to_send.push(node);
+ BOOL is_root = node->getObject()->isRootEdit();
+ if ((mRoots && is_root) || (!mRoots && !is_root))
+ {
+ nodes_to_send.push(node);
+ }
}
return true;
}
};
- struct push_editable : public LLSelectedNodeFunctor
- {
- std::queue<LLSelectNode*>& nodes_to_send;
- push_editable(std::queue<LLSelectNode*>& n) : nodes_to_send(n) {}
- virtual bool apply(LLSelectNode* node)
- {
-
- nodes_to_send.push(node);
- return true;
- }
- };
struct push_all pushall(nodes_to_send);
struct push_some pushroots(nodes_to_send, TRUE);
struct push_some pushnonroots(nodes_to_send, FALSE);
- struct push_editable pusheditable(nodes_to_send);
switch(send_type)
{
@@ -4088,7 +4103,7 @@ void LLSelectMgr::sendListToRegions(const LLString& message_name,
if(message_name == "ObjectBuy")
getSelection()->applyToRootNodes(&pushroots);
else
- getSelection()->applyToRootNodes(&pusheditable);
+ getSelection()->applyToRootNodes(&pushall);
break;
case SEND_INDIVIDUALS:
@@ -4152,7 +4167,7 @@ void LLSelectMgr::sendListToRegions(const LLString& message_name,
}
else
{
- node = nodes_to_send.front();
+ node = nodes_to_send.front();
nodes_to_send.pop();
}
}
@@ -4292,7 +4307,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
f(const LLUUID& id) : mID(id) {}
virtual bool apply(LLSelectNode* node)
{
- return (node->getObject()->mID == mID);
+ return (node->getObject() && node->getObject()->mID == mID);
}
} func(id);
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(&func);
@@ -4435,7 +4450,7 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use
f(const LLUUID& id) : mID(id) {}
virtual bool apply(LLSelectNode* node)
{
- return (node->getObject()->mID == mID);
+ return (node->getObject() && node->getObject()->mID == mID);
}
} func(id);
LLSelectNode* node = LLSelectMgr::getInstance()->getHoverObjects()->getFirstNode(&func);
@@ -4541,7 +4556,8 @@ void LLSelectMgr::updateSilhouettes()
{
LLSelectNode* node = *iter;
LLViewerObject* objectp = node->getObject();
-
+ if (!objectp)
+ continue;
// do roots first, then children so that root flags are cleared ASAP
BOOL roots_only = (pass == 0);
BOOL is_root = (objectp->isRootEdit());
@@ -4614,6 +4630,8 @@ void LLSelectMgr::updateSilhouettes()
{
LLSelectNode* node = *iter;
LLViewerObject* objectp = node->getObject();
+ if (!objectp)
+ continue;
if (objectp->isRoot() || !select_linked_set)
{
if (roots.count(objectp) == 0)
@@ -4657,14 +4675,14 @@ void LLSelectMgr::updateSilhouettes()
iter != roots.end(); iter++)
{
LLViewerObject* objectp = *iter;
- LLSelectNode* rect_select_root_node = new LLSelectNode(objectp, TRUE);
- rect_select_root_node->selectAllTEs(TRUE);
-
if (!canSelectObject(objectp))
{
continue;
}
+ LLSelectNode* rect_select_root_node = new LLSelectNode(objectp, TRUE);
+ rect_select_root_node->selectAllTEs(TRUE);
+
if (!select_linked_set)
{
rect_select_root_node->mIndividualSelection = TRUE;
@@ -4702,7 +4720,9 @@ void LLSelectMgr::updateSilhouettes()
{
LLSelectNode* node = *iter;
LLViewerObject* objectp = node->getObject();
-
+ if (!objectp)
+ continue;
+
// do roots first, then children so that root flags are cleared ASAP
BOOL roots_only = (pass == 0);
BOOL is_root = objectp->isRootEdit();
@@ -4806,6 +4826,8 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
{
LLSelectNode* node = *iter;
LLViewerObject* objectp = node->getObject();
+ if (!objectp)
+ continue;
if (objectp->isHUDAttachment() != for_hud)
{
continue;
@@ -4844,6 +4866,8 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
{
LLSelectNode* node = *iter;
LLViewerObject* objectp = node->getObject();
+ if (!objectp)
+ continue;
if (objectp->isHUDAttachment() != for_hud)
{
continue;
@@ -5439,6 +5463,8 @@ void LLSelectMgr::updateSelectionCenter()
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
+ if (!object)
+ continue;
LLViewerObject *myAvatar = gAgent.getAvatarObject();
LLViewerObject *root = object->getRootEdit();
if (mSelectedObjects->mSelectType == SELECT_TYPE_WORLD && // not an attachment
@@ -5665,6 +5691,12 @@ void LLSelectMgr::validateSelection()
BOOL LLSelectMgr::canSelectObject(LLViewerObject* object)
{
+ // Never select dead objects
+ if (!object || object->isDead())
+ {
+ return FALSE;
+ }
+
if (mForceSelection)
{
return TRUE;
@@ -5677,9 +5709,6 @@ BOOL LLSelectMgr::canSelectObject(LLViewerObject* object)
return FALSE;
}
- // Can't select dead objects
- if (object->isDead()) return FALSE;
-
// Can't select orphans
if (object->isOrphaned()) return FALSE;
@@ -5851,6 +5880,8 @@ S32 LLObjectSelection::getTECount()
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
+ if (!object)
+ continue;
S32 num_tes = object->getNumTEs();
for (S32 te = 0; te < num_tes; te++)
{
@@ -5883,6 +5914,8 @@ bool LLObjectSelection::applyToObjects(LLSelectedObjectFunctor* func, bool first
{
iterator nextiter = iter++;
LLViewerObject* object = (*nextiter)->getObject();
+ if (!object)
+ continue;
bool r = func->apply(object);
if (firstonly && r)
return true;
@@ -5899,6 +5932,8 @@ bool LLObjectSelection::applyToRootObjects(LLSelectedObjectFunctor* func, bool f
{
root_iterator nextiter = iter++;
LLViewerObject* object = (*nextiter)->getObject();
+ if (!object)
+ continue;
bool r = func->apply(object);
if (firstonly && r)
return true;
@@ -5916,6 +5951,8 @@ bool LLObjectSelection::applyToTEs(LLSelectedTEFunctor* func, bool firstonly)
iterator nextiter = iter++;
LLSelectNode* node = *nextiter;
LLViewerObject* object = (*nextiter)->getObject();
+ if (!object)
+ continue;
S32 num_tes = llmin((S32)object->getNumTEs(), (S32)object->getNumFaces()); // avatars have TEs but no faces
for (S32 te = 0; te < num_tes; ++te)
{
@@ -6118,7 +6155,7 @@ LLSelectNode* LLObjectSelection::getFirstMoveableNode(BOOL get_root_first)
bool apply(LLSelectNode* node)
{
LLViewerObject* obj = node->getObject();
- return obj->permMove();
+ return obj && obj->permMove();
}
} func;
LLSelectNode* res = get_root_first ? getFirstRootNode(&func, TRUE) : getFirstNode(&func);
@@ -6135,7 +6172,7 @@ LLViewerObject* LLObjectSelection::getFirstCopyableObject(BOOL get_parent)
bool apply(LLSelectNode* node)
{
LLViewerObject* obj = node->getObject();
- return obj->permCopy() && !obj->isAttachment();
+ return obj && obj->permCopy() && !obj->isAttachment();
}
} func;
return getFirstSelectedObject(&func, get_parent);
@@ -6156,10 +6193,9 @@ LLViewerObject* LLObjectSelection::getFirstDeleteableObject()
LLViewerObject* obj = node->getObject();
// you can delete an object if you are the owner
// or you have permission to modify it.
- if( (obj->permModify())
- || (obj->permYouOwner())
- || (!obj->permAnyOwner()) // public
- )
+ if( obj && ( (obj->permModify()) ||
+ (obj->permYouOwner()) ||
+ (!obj->permAnyOwner()) )) // public
{
if( !obj->isAttachment() )
{
@@ -6183,7 +6219,7 @@ LLViewerObject* LLObjectSelection::getFirstEditableObject(BOOL get_parent)
bool apply(LLSelectNode* node)
{
LLViewerObject* obj = node->getObject();
- return obj->permModify();
+ return obj && obj->permModify();
}
} func;
return getFirstSelectedObject(&func, get_parent);
@@ -6199,7 +6235,7 @@ LLViewerObject* LLObjectSelection::getFirstMoveableObject(BOOL get_parent)
bool apply(LLSelectNode* node)
{
LLViewerObject* obj = node->getObject();
- return obj->permMove();
+ return obj && obj->permMove();
}
} func;
return getFirstSelectedObject(&func, get_parent);
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index d610cd3fdf..1e715a5bf2 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1602,6 +1602,12 @@ public:
{
return mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]);
}
+
+ virtual S32 frustumCheckObjects(const LLSpatialGroup* group)
+ {
+ S32 res = mCamera->AABBInFrustumNoFarClip(group->mObjectBounds[0], group->mObjectBounds[1]);
+ return res;
+ }
};
class LLOctreeSelect : public LLOctreeCull
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 1533ccf659..331d13d85d 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -294,7 +294,7 @@ void update_texture_fetch()
}
static std::vector<std::string> sAuthUris;
-static int sAuthUriNum = -1;
+static S32 sAuthUriNum = -1;
// Returns FALSE to skip other idle processing. Should only return
// TRUE when all initialization done.
@@ -993,6 +993,7 @@ BOOL idle_startup()
hashed_mac.hex_digest(hashed_mac_string);
// TODO if statement here to use web_login_key
+ sAuthUriNum = llclamp(sAuthUriNum, 0, (S32)sAuthUris.size()-1);
LLUserAuth::getInstance()->authenticate(
sAuthUris[sAuthUriNum].c_str(),
auth_method.c_str(),
@@ -3601,7 +3602,15 @@ void init_start_screen(S32 location_id)
}
LLPointer<LLImageBMP> start_image_bmp = new LLImageBMP;
- if( !start_image_bmp->load(temp_str) )
+
+ // Turn off start screen to get around the occasional readback
+ // driver bug
+ if(!gSavedSettings.getBOOL("UseStartScreen"))
+ {
+ llinfos << "Bitmap load disabled" << llendl;
+ return;
+ }
+ else if(!start_image_bmp->load(temp_str) )
{
llinfos << "Bitmap load failed" << llendl;
return;
@@ -3610,8 +3619,9 @@ void init_start_screen(S32 location_id)
gStartImageGL = new LLImageGL(FALSE);
gStartImageWidth = start_image_bmp->getWidth();
gStartImageHeight = start_image_bmp->getHeight();
+
LLPointer<LLImageRaw> raw = new LLImageRaw;
- if (!start_image_bmp->decode(raw))
+ if (!start_image_bmp->decode(raw, 0.0f))
{
llinfos << "Bitmap decode failed" << llendl;
gStartImageGL = NULL;
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index e20cc75b0a..a654dbc2cd 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -1380,7 +1380,7 @@ BOOL LLTextureCtrl::handleUnicodeCharHere(llwchar uni_char)
return LLUICtrl::handleUnicodeCharHere(uni_char);
}
-void LLTextureCtrl::setValue( LLSD value )
+void LLTextureCtrl::setValue( const LLSD& value )
{
setImageAssetID(value.asUUID());
}
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 5a7b9eede6..dbdade3b78 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -98,7 +98,7 @@ public:
virtual void clear();
// Takes a UUID, wraps get/setImageAssetID
- virtual void setValue( LLSD value );
+ virtual void setValue(const LLSD& value );
virtual LLSD getValue() const;
// LLTextureCtrl interface
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 4635b1b88a..669ea3167e 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -55,6 +55,7 @@ class LLTextureFetchWorker : public LLWorkerClass
friend class LLTextureFetch;
private:
+#if 0
class URLResponder : public LLHTTPClient::Responder
{
public:
@@ -131,7 +132,8 @@ private:
LLTextureFetch* mFetcher;
LLUUID mID;
};
-
+#endif
+
class CacheReadResponder : public LLTextureCache::ReadResponder
{
public:
diff --git a/indra/newview/lltoolbar.h b/indra/newview/lltoolbar.h
index 85adba8c55..28a03aa5d9 100644
--- a/indra/newview/lltoolbar.h
+++ b/indra/newview/lltoolbar.h
@@ -58,7 +58,7 @@ public:
EAcceptance* accept,
LLString& tooltip_msg);
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
static void toggle(void*);
static BOOL visible(void*);
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 82e889f00a..3d0daa73a2 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1139,7 +1139,7 @@ void render_disconnected_background()
gDisconnectedImagep = new LLImageGL( FALSE );
LLPointer<LLImageRaw> raw = new LLImageRaw;
- if (!image_bmp->decode(raw))
+ if (!image_bmp->decode(raw, 0.0f))
{
llinfos << "Bitmap decode failed" << llendl;
gDisconnectedImagep = NULL;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 01feff9b3c..aeffcd6c56 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -97,7 +97,7 @@ LLViewerInventoryItem::LLViewerInventoryItem() :
LLViewerInventoryItem::LLViewerInventoryItem(const LLViewerInventoryItem* other) :
LLInventoryItem()
{
- copy(other);
+ copyViewerItem(other);
if (!mIsComplete)
{
llwarns << "LLViewerInventoryItem copy constructor for incomplete item"
@@ -116,23 +116,22 @@ LLViewerInventoryItem::~LLViewerInventoryItem()
{
}
-// virtual
-void LLViewerInventoryItem::copy(const LLViewerInventoryItem* other)
+void LLViewerInventoryItem::copyViewerItem(const LLViewerInventoryItem* other)
{
- LLInventoryItem::copy(other);
+ LLInventoryItem::copyItem(other);
mIsComplete = other->mIsComplete;
mTransactionID = other->mTransactionID;
}
-void LLViewerInventoryItem::copy(const LLInventoryItem *other)
+// virtual
+void LLViewerInventoryItem::copyItem(const LLInventoryItem *other)
{
- LLInventoryItem::copy(other);
+ LLInventoryItem::copyItem(other);
mIsComplete = true;
mTransactionID.setNull();
}
-// virtual
-void LLViewerInventoryItem::clone(LLPointer<LLViewerInventoryItem>& newitem) const
+void LLViewerInventoryItem::cloneViewerItem(LLPointer<LLViewerInventoryItem>& newitem) const
{
newitem = new LLViewerInventoryItem(this);
if(newitem.notNull())
@@ -348,17 +347,16 @@ LLViewerInventoryCategory::LLViewerInventoryCategory(const LLUUID& owner_id) :
LLViewerInventoryCategory::LLViewerInventoryCategory(const LLViewerInventoryCategory* other)
{
- copy(other);
+ copyViewerCategory(other);
}
LLViewerInventoryCategory::~LLViewerInventoryCategory()
{
}
-// virtual
-void LLViewerInventoryCategory::copy(const LLViewerInventoryCategory* other)
+void LLViewerInventoryCategory::copyViewerCategory(const LLViewerInventoryCategory* other)
{
- LLInventoryCategory::copy(other);
+ copyCategory(other);
mOwnerID = other->mOwnerID;
mVersion = other->mVersion;
mDescendentCount = other->mDescendentCount;
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index bf49a1604f..24c33bf292 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -83,13 +83,13 @@ public:
LLViewerInventoryItem(const LLViewerInventoryItem* other);
LLViewerInventoryItem(const LLInventoryItem* other);
- virtual void copy(const LLViewerInventoryItem* other);
- virtual void copy(const LLInventoryItem* other);
+ void copyViewerItem(const LLViewerInventoryItem* other);
+ /*virtual*/ void copyItem(const LLInventoryItem* other);
// construct a new clone of this item - it creates a new viewer
// inventory item using the copy constructor, and returns it.
// It is up to the caller to delete (unref) the item.
- virtual void clone(LLPointer<LLViewerInventoryItem>& newitem) const;
+ void cloneViewerItem(LLPointer<LLViewerInventoryItem>& newitem) const;
// virtual methods
virtual void removeFromServer( void );
@@ -156,7 +156,7 @@ public:
// Note: Because InventoryCategorys are ref counted, reference copy (a = b)
// is prohibited
LLViewerInventoryCategory(const LLViewerInventoryCategory* other);
- virtual void copy(const LLViewerInventoryCategory* other);
+ void copyViewerCategory(const LLViewerInventoryCategory* other);
virtual void removeFromServer();
virtual void updateParentOnServer(BOOL restamp_children) const;
diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp
index 365bfa7010..04de6bed92 100644
--- a/indra/newview/llviewerjoint.cpp
+++ b/indra/newview/llviewerjoint.cpp
@@ -519,7 +519,7 @@ LLViewerJointCollisionVolume::LLViewerJointCollisionVolume(const std::string &na
}
-void LLViewerJointCollisionVolume::render()
+void LLViewerJointCollisionVolume::renderCollision()
{
updateWorldMatrix();
glMatrixMode(GL_MODELVIEW);
diff --git a/indra/newview/llviewerjoint.h b/indra/newview/llviewerjoint.h
index 5aa49aee7e..605f40979b 100644
--- a/indra/newview/llviewerjoint.h
+++ b/indra/newview/llviewerjoint.h
@@ -152,7 +152,7 @@ public:
virtual BOOL inheritScale() { return TRUE; }
- void render();
+ void renderCollision();
LLVector3 getVolumePos(LLVector3 &offset);
};
diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp
index 8b653b6430..7ec60a31d1 100644
--- a/indra/newview/llviewerjointattachment.cpp
+++ b/indra/newview/llviewerjointattachment.cpp
@@ -197,7 +197,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
//if object is active, make it static
if(drawablep->isActive())
{
- drawablep->makeStatic() ;
+ drawablep->makeStatic(FALSE) ;
}
setupDrawable(drawablep);
@@ -238,7 +238,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
//if object is active, make it static
if(object->mDrawable->isActive())
{
- object->mDrawable->makeStatic() ;
+ object->mDrawable->makeStatic(FALSE) ;
}
LLVector3 cur_position = object->getRenderPosition();
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 9af072ad6f..d53d32ccea 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -144,6 +144,9 @@ void LLViewerMediaImpl::play(const std::string& media_url,
return;
}
+ // Store the URL and Mime Type
+ mMediaURL = media_url;
+
if ((media_width != 0) && (media_height != 0))
{
mMediaSource->setRequestedMediaSize(media_width, media_height);
@@ -154,10 +157,6 @@ void LLViewerMediaImpl::play(const std::string& media_url,
mMediaSource->addObserver( this );
mMediaSource->navigateTo( media_url );
mMediaSource->addCommand(LLMediaBase::COMMAND_START);
-
- // Store the URL and Mime Type
- mMediaURL = media_url;
-
}
void LLViewerMediaImpl::stop()
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index f4cf31273f..4d7ef5e2fd 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -895,13 +895,15 @@ void init_client_menu(LLMenuGL* menu)
NULL,
&get_visibility,
(void*)gDebugView->mFastTimerView,
- '9', MASK_CONTROL|MASK_SHIFT ) );
+ '9', MASK_CONTROL|MASK_SHIFT ) );
+#if MEM_TRACK_MEM
sub->append(new LLMenuItemCheckGL("Memory",
&toggle_visibility,
NULL,
&get_visibility,
(void*)gDebugView->mMemoryView,
- '0', MASK_CONTROL|MASK_SHIFT ) );
+ '0', MASK_CONTROL|MASK_SHIFT ) );
+#endif
sub->appendSeparator();
sub->append(new LLMenuItemCallGL("Region Info to Debug Console",
&handle_region_dump_settings, NULL));
@@ -1109,6 +1111,12 @@ void init_client_menu(LLMenuGL* menu)
menu->appendMenu(sub);
}
+ menu->append(new LLMenuItemCheckGL( "Output Debug Minidump",
+ &menu_toggle_control,
+ NULL,
+ &menu_check_control,
+ (void*)"SaveMinidump"));
+
// TomY Temporary menu item so we can test this floater
menu->append(new LLMenuItemCheckGL("Clothing...",
&handle_clothing,
@@ -1116,7 +1124,7 @@ void init_client_menu(LLMenuGL* menu)
NULL,
NULL));
- menu->append(new LLMenuItemCallGL("Debug Settings", LLFloaterSettingsDebug::show, NULL, NULL));
+ menu->append(new LLMenuItemCallGL("Debug Settings...", LLFloaterSettingsDebug::show, NULL, NULL));
menu->append(new LLMenuItemCheckGL("View Admin Options", &handle_admin_override_toggle, NULL, &check_admin_override, NULL, 'V', MASK_CONTROL | MASK_ALT));
menu->append(new LLMenuItemCallGL("Request Admin Status",
@@ -5289,7 +5297,7 @@ class LLShowFloater : public view_listener_t
{
if (gAgent.getWearablesLoaded())
{
- gAgent.changeCameraToCustomizeAvatar(gSavedSettings.getBOOL("AppearanceCameraMovement"));
+ gAgent.changeCameraToCustomizeAvatar();
}
}
else if (floater_name == "friends")
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 60fc733cb5..d32eb6414c 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -240,8 +240,11 @@ LLViewerObject::~LLViewerObject()
std::map<U16, ExtraParameter*>::iterator iter;
for (iter = mExtraParameterList.begin(); iter != mExtraParameterList.end(); ++iter)
{
- delete iter->second->data;
- delete iter->second;
+ if(iter->second != NULL)
+ {
+ delete iter->second->data;
+ delete iter->second;
+ }
}
mExtraParameterList.clear();
@@ -3650,7 +3653,12 @@ S32 LLViewerObject::setTETexture(const U8 te, const LLUUID& uuid)
}
-S32 LLViewerObject::setTEColor(const U8 te, const LLColor4 &color)
+S32 LLViewerObject::setTEColor(const U8 te, const LLColor3& color)
+{
+ return setTEColor(te, LLColor4(color));
+}
+
+S32 LLViewerObject::setTEColor(const U8 te, const LLColor4& color)
{
S32 retval = 0;
const LLTextureEntry *tep = getTE(te);
@@ -4855,7 +4863,7 @@ void LLViewerObject::dirtySpatialGroup() const
}
}
-void LLViewerObject::dirtyMesh() const
+void LLViewerObject::dirtyMesh()
{
if (mDrawable)
{
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 38744c35cf..06cf2b2266 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -280,6 +280,7 @@ public:
/*virtual*/ void setTE(const U8 te, const LLTextureEntry &texture_entry);
/*virtual*/ S32 setTETexture(const U8 te, const LLUUID &uuid);
S32 setTETextureCore(const U8 te, const LLUUID& uuid, LLHost host);
+ /*virtual*/ S32 setTEColor(const U8 te, const LLColor3 &color);
/*virtual*/ S32 setTEColor(const U8 te, const LLColor4 &color);
/*virtual*/ S32 setTEScale(const U8 te, const F32 s, const F32 t);
/*virtual*/ S32 setTEScaleS(const U8 te, const F32 s);
@@ -453,7 +454,7 @@ public:
virtual S32 getLOD() const { return 3; }
virtual U32 getPartitionType() const;
virtual void dirtySpatialGroup() const;
- virtual void dirtyMesh() const;
+ virtual void dirtyMesh();
virtual LLNetworkData* getParameterEntry(U16 param_type) const;
virtual bool setParameterEntry(U16 param_type, const LLNetworkData& new_value, bool local_origin);
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index de37ce253e..2b475ce9f9 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -41,6 +41,7 @@
#include "lluuid.h"
#include "message.h"
#include "llviewerparcelmediaautoplay.h"
+#include "llviewerwindow.h"
#include "llfirstuse.h"
// Static Variables
@@ -48,6 +49,9 @@
S32 LLViewerParcelMedia::sMediaParcelLocalID = 0;
LLUUID LLViewerParcelMedia::sMediaRegionID;
+// Local functions
+void callback_play_media(S32 option, void* data);
+
// Move this to its own file.
// helper class that tries to download a URL from a web site and calls a method
// on the Panel Land Media and to discover the MIME type
@@ -152,6 +156,14 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
LLViewerMedia::setMimeType(parcel->getMediaType());
}
+ // First use warning
+ if( gSavedSettings.getWarning("FirstStreamingVideo") )
+ {
+ gViewerWindow->alertXml("ParcelCanPlayMedia",
+ callback_play_media, (void*)parcel);
+
+ }
+
}
}
else
@@ -274,7 +286,8 @@ void LLViewerParcelMedia::processParcelMediaCommandMessage( LLMessageSystem *msg
}
else
// play
- if( command == PARCEL_MEDIA_COMMAND_PLAY )
+ if(( command == PARCEL_MEDIA_COMMAND_PLAY ) ||
+ ( command == PARCEL_MEDIA_COMMAND_LOOP ))
{
if (LLViewerMedia::isMediaPaused())
{
@@ -287,16 +300,6 @@ void LLViewerParcelMedia::processParcelMediaCommandMessage( LLMessageSystem *msg
}
}
else
- // loop
- if( command == PARCEL_MEDIA_COMMAND_LOOP )
- {
- //llinfos << ">>> LLMediaEngine::process_parcel_media with command = " <<( '0' + command ) << llendl;
-
- // huh? what is play?
- //convertImageAndLoadUrl( play );
- //convertImageAndLoadUrl( true, false, std::string() );
- }
- else
// unload
if( command == PARCEL_MEDIA_COMMAND_UNLOAD )
{
@@ -354,10 +357,36 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg, void *
(parcel->getMediaHeight() == media_height) &&
(parcel->getMediaAutoScale() == media_auto_scale) &&
(parcel->getMediaLoop() == media_loop));
+
+ if (!same)
+ {
+ // temporarily store these new values in the parcel
+ parcel->setMediaURL(media_url);
+ parcel->setMediaType(media_type.c_str());
+ parcel->setMediaID(media_id);
+ parcel->setMediaWidth(media_width);
+ parcel->setMediaHeight(media_height);
+ parcel->setMediaAutoScale(media_auto_scale);
+ parcel->setMediaLoop(media_loop);
+
+ play(parcel);
+ }
}
+}
+
+void callback_play_media(S32 option, void* data)
+{
+ LLParcel* parcel = (LLParcel*)data;
+ if (option == 0)
+ {
+ gSavedSettings.setBOOL("AudioStreamingVideo", TRUE);
+ LLViewerParcelMedia::play(parcel);
+ }
+ else
+ {
+ gSavedSettings.setBOOL("AudioStreamingVideo", FALSE);
+ }
+ gSavedSettings.setWarning("FirstStreamingVideo", FALSE);
- if (!same)
- LLViewerMedia::play(media_url, media_type, media_id,
- media_auto_scale, media_width, media_height,
- media_loop);
}
+
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 4a76fe7142..61aa51a6d8 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1230,28 +1230,27 @@ const LLString& LLViewerParcelMgr::getAgentParcelName() const
void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_agent_region)
{
- if (!parcel) return;
+ if(!parcel) return;
LLViewerRegion *region = use_agent_region ? gAgent.getRegion() : LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth );
if (!region) return;
+ //llinfos << "found region: " << region->getName() << llendl;
LLSD body;
- std::string url = gAgent.getRegion()->getCapability("ParcelPropertiesUpdate");
+ std::string url = region->getCapability("ParcelPropertiesUpdate");
if (!url.empty())
{
- U32 message_flags = 0x01;
// request new properties update from simulator
+ U32 message_flags = 0x01;
body["flags"] = ll_sd_from_U32(message_flags);
parcel->packMessage(body);
-
- llinfos << "Sending parcel properties update via capability to:" << url << llendl;
-
+ llinfos << "Sending parcel properties update via capability to: "
+ << url << llendl;
LLHTTPClient::post(url, body, new LLHTTPClient::Responder());
}
else
{
- LLMessageSystem *msg = gMessageSystem;
-
+ LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ParcelPropertiesUpdate);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
@@ -1266,8 +1265,6 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_ag
msg->sendReliable( region->getHost() );
}
-
-
}
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index 223078ffe0..6cfef5b18f 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -75,7 +75,11 @@ F32 calc_desired_size(LLVector3 pos, LLVector2 scale)
return llclamp(desired_size, scale.magVec()*0.5f, PART_SIM_BOX_SIDE*2);
}
-LLViewerPart::LLViewerPart()
+LLViewerPart::LLViewerPart() :
+ mPartID(0),
+ mLastUpdateTime(0.f),
+ mVPCallback(NULL),
+ mImagep(NULL)
{
LLMemType mt(LLMemType::MTYPE_PARTICLES);
mPartSourcep = NULL;
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index 3c3b1bf3ff..7e9f3e2fa9 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -46,7 +46,8 @@
LLViewerPartSource::LLViewerPartSource(const U32 type) :
mType(type),
- mOwnerUUID(LLUUID::null)
+ mOwnerUUID(LLUUID::null),
+ mPartFlags(0)
{
mLastUpdateTime = 0.f;
mLastPartTime = 0.f;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 4068933fe1..5c3128b8e0 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2999,8 +2999,8 @@ BOOL LLViewerWindow::handlePerFrameHover()
{
floater_rect.mBottom = bar_rect.mBottom+1;
// Don't bounce the floaters up and down.
- gFloaterView->reshape(floater_rect.getWidth(), floater_rect.getHeight(),
- TRUE, ADJUST_VERTICAL_NO);
+ gFloaterView->reshapeFloater(floater_rect.getWidth(), floater_rect.getHeight(),
+ TRUE, ADJUST_VERTICAL_NO);
gFloaterView->setRect(floater_rect);
}
@@ -4124,7 +4124,7 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageRaw *raw, const LLString& extensio
LLPointer<LLImageFormatted> formatted_image = LLImageFormatted::createFromExtension(extension);
LLImageBase::setSizeOverride(TRUE);
- BOOL success = formatted_image->encode(raw);
+ BOOL success = formatted_image->encode(raw, 0.0f);
if( success )
{
success = formatted_image->save(filepath);
@@ -4180,7 +4180,7 @@ BOOL LLViewerWindow::saveSnapshot( const LLString& filepath, S32 image_width, S3
if (success)
{
LLPointer<LLImageBMP> bmp_image = new LLImageBMP;
- success = bmp_image->encode(raw);
+ success = bmp_image->encode(raw, 0.0f);
if( success )
{
success = bmp_image->save(filepath);
@@ -4436,6 +4436,10 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
image_buffer_y = llfloor(snapshot_height *scale_factor) ;
}
raw->resize(image_buffer_x, image_buffer_y, type == SNAPSHOT_TYPE_DEPTH ? 4 : 3);
+ if(raw->isBufferInvalid())
+ {
+ return FALSE ;
+ }
BOOL high_res = scale_factor > 1.f;
if (high_res)
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 0add3bd9a9..99a87ba025 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1931,7 +1931,7 @@ void LLVOAvatar::buildCharacter()
{
if (gAttachBodyPartPieMenus[i])
{
- gAttachPieMenu->appendMenu( gAttachBodyPartPieMenus[i] );
+ gAttachPieMenu->appendPieMenu( gAttachBodyPartPieMenus[i] );
}
else
{
@@ -1965,7 +1965,7 @@ void LLVOAvatar::buildCharacter()
if (gDetachBodyPartPieMenus[i])
{
- gDetachPieMenu->appendMenu( gDetachBodyPartPieMenus[i] );
+ gDetachPieMenu->appendPieMenu( gDetachBodyPartPieMenus[i] );
}
else
{
@@ -4163,7 +4163,7 @@ void LLVOAvatar::renderCollisionVolumes()
{
for (S32 i = 0; i < mNumCollisionVolumes; i++)
{
- mCollisionVolumes[i].render();
+ mCollisionVolumes[i].renderCollision();
}
}
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 56e5062820..10dea0e715 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -823,7 +823,7 @@ LLVoiceClient::LLVoiceClient()
// Load initial state from prefs.
mVoiceEnabled = gSavedSettings.getBOOL("EnableVoiceChat");
- mUsePTT = gSavedSettings.getBOOL("EnablePushToTalk");
+ mUsePTT = TRUE; //gSavedSettings.getBOOL("EnablePushToTalk");
std::string keyString = gSavedSettings.getString("PushToTalkButton");
setPTTKey(keyString);
mPTTIsToggle = gSavedSettings.getBOOL("PushToTalkToggle");
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index d2fe5d31e6..8915ae799d 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -920,7 +920,7 @@ void LLVOSurfacePatch::updateSpatialExtents(LLVector3& newMin, LLVector3 &newMax
{
LLVector3 posAgent = getPositionAgent();
LLVector3 scale = getScale();
- newMin = posAgent-scale*0.5f;
+ newMin = posAgent-scale*0.5f; // Changing to 2.f makes the culling a -little- better, but still wrong
newMax = posAgent+scale*0.5f;
mDrawable->setPositionGroup((newMin+newMax)*0.5f);
}
@@ -935,7 +935,7 @@ LLTerrainPartition::LLTerrainPartition()
{
mOcclusionEnabled = FALSE;
mRenderByGroup = FALSE;
- mInfiniteFarClip = FALSE;
+ mInfiniteFarClip = TRUE;
mBufferUsage = GL_DYNAMIC_DRAW_ARB;
mDrawableType = LLPipeline::RENDER_TYPE_TERRAIN;
mPartitionType = LLViewerRegion::PARTITION_TERRAIN;
diff --git a/indra/newview/llvotextbubble.cpp b/indra/newview/llvotextbubble.cpp
index 4ecf180777..775b1ec61d 100644
--- a/indra/newview/llvotextbubble.cpp
+++ b/indra/newview/llvotextbubble.cpp
@@ -61,7 +61,7 @@ LLVOTextBubble::LLVOTextBubble(const LLUUID &id, const LLPCode pcode, LLViewerRe
volume_params.setBeginAndEndT(0.f, 1.f);
volume_params.setRatio(0.25f, 0.25f);
volume_params.setShear(0.f, 0.f);
- setVolume(volume_params);
+ setVolume(volume_params, 0);
mColor = LLColor4(1.0f, 0.0f, 0.0f, 1.f);
S32 i;
for (i = 0; i < getNumTEs(); i++)
@@ -165,8 +165,8 @@ LLDrawable *LLVOTextBubble::createDrawable(LLPipeline *pipeline)
return mDrawable;
}
-
-BOOL LLVOTextBubble::setVolume(const LLVolumeParams &volume_params)
+// virtual
+BOOL LLVOTextBubble::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume)
{
if (LLPrimitive::setVolume(volume_params, mLOD))
{
@@ -194,7 +194,7 @@ BOOL LLVOTextBubble::updateGeometry(LLDrawable *drawable)
if (mVolumeChanged)
{
LLVolumeParams volume_params = getVolume()->getParams();
- setVolume(volume_params);
+ setVolume(volume_params, 0);
LLPipeline::sCompiles++;
diff --git a/indra/newview/llvotextbubble.h b/indra/newview/llvotextbubble.h
index 790e7208bc..d9fa628c3c 100644
--- a/indra/newview/llvotextbubble.h
+++ b/indra/newview/llvotextbubble.h
@@ -64,7 +64,7 @@ public:
protected:
~LLVOTextBubble();
- BOOL setVolume(const LLVolumeParams &volume_params);
+ BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false);
LLFrameTimer mUpdateTimer;
};
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 37353cf7ec..a1b3c32e01 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1124,30 +1124,36 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
}
else if ((mLODChanged) || (mSculptChanged))
{
- LLPointer<LLVolume> old_volumep, new_volumep;
+ LLVolume *old_volumep, *new_volumep;
F32 old_lod, new_lod;
+ S32 old_num_faces, new_num_faces ;
old_volumep = getVolume();
old_lod = old_volumep->getDetail();
+ old_num_faces = old_volumep->getNumFaces() ;
+ old_volumep = NULL ;
{
LLFastTimer ftm(LLFastTimer::FTM_GEN_VOLUME);
LLVolumeParams volume_params = getVolume()->getParams();
setVolume(volume_params, 0);
}
+
new_volumep = getVolume();
new_lod = new_volumep->getDetail();
+ new_num_faces = new_volumep->getNumFaces() ;
+ new_volumep = NULL ;
if ((new_lod != old_lod) || mSculptChanged)
{
compiled = TRUE;
- sNumLODChanges += getVolume()->getNumFaces();
+ sNumLODChanges += new_num_faces ;
drawable->setState(LLDrawable::REBUILD_VOLUME); // for face->genVolumeTriangles()
{
LLFastTimer t(LLFastTimer::FTM_GEN_TRIANGLES);
- if (new_volumep->getNumFaces() != old_volumep->getNumFaces())
+ if (new_num_faces != old_num_faces)
{
regenFaces();
}
@@ -1225,7 +1231,12 @@ S32 LLVOVolume::setTETexture(const U8 te, const LLUUID &uuid)
return res;
}
-S32 LLVOVolume::setTEColor(const U8 te, const LLColor4 &color)
+S32 LLVOVolume::setTEColor(const U8 te, const LLColor3& color)
+{
+ return setTEColor(te, LLColor4(color));
+}
+
+S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color)
{
S32 res = LLViewerObject::setTEColor(te, color);
if (res)
@@ -2458,6 +2469,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (facep->mGeomCount + index_offset > 65535)
{ //cut off alpha nodes at 64k vertices
facep->mVertexBuffer = NULL ;
+ facep->mLastVertexBuffer = NULL ;
continue ;
}
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 5f98dd6b9c..d7b72f7a18 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -141,6 +141,7 @@ public:
/*virtual*/ void setTEImage(const U8 te, LLViewerImage *imagep);
/*virtual*/ S32 setTETexture(const U8 te, const LLUUID &uuid);
+ /*virtual*/ S32 setTEColor(const U8 te, const LLColor3 &color);
/*virtual*/ S32 setTEColor(const U8 te, const LLColor4 &color);
/*virtual*/ S32 setTEBumpmap(const U8 te, const U8 bump);
/*virtual*/ S32 setTEShiny(const U8 te, const U8 shiny);
diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp
index 42f8a12e4c..7a90be50b8 100644
--- a/indra/newview/llwindebug.cpp
+++ b/indra/newview/llwindebug.cpp
@@ -633,6 +633,44 @@ BOOL LLWinDebug::setupExceptionHandler()
// Internal builds don't mess with exception handling.
//return TRUE;
}
+
+void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const char *filename)
+{
+ if(f_mdwp == NULL || gDirUtilp == NULL)
+ {
+ return;
+ //write_debug("No way to generate a minidump, no MiniDumpWriteDump function!\n");
+ }
+ else
+ {
+ std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ filename);
+
+ HANDLE hFile = CreateFileA(dump_path.c_str(),
+ GENERIC_WRITE,
+ FILE_SHARE_WRITE,
+ NULL,
+ CREATE_ALWAYS,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL);
+
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ // Write the dump, ignoring the return value
+ f_mdwp(GetCurrentProcess(),
+ GetCurrentProcessId(),
+ hFile,
+ type,
+ ExInfop,
+ NULL,
+ NULL);
+
+ CloseHandle(hFile);
+ }
+
+ }
+}
+
// static
LONG LLWinDebug::handleException(struct _EXCEPTION_POINTERS *exception_infop)
{
@@ -648,6 +686,18 @@ LONG LLWinDebug::handleException(struct _EXCEPTION_POINTERS *exception_infop)
if (exception_infop)
{
+ if(gSavedSettings.getControl("SaveMinidump") != NULL && gSavedSettings.getBOOL("SaveMinidump"))
+ {
+ _MINIDUMP_EXCEPTION_INFORMATION ExInfo;
+
+ ExInfo.ThreadId = ::GetCurrentThreadId();
+ ExInfo.ExceptionPointers = exception_infop;
+ ExInfo.ClientPointers = NULL;
+
+ writeDumpToFile(MiniDumpNormal, &ExInfo, "SecondLife.dmp");
+ writeDumpToFile((MINIDUMP_TYPE)(MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory), &ExInfo, "SecondLifePlus.dmp");
+ }
+
std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
"SecondLifeException");
diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h
index e420138216..bb1f11df67 100644
--- a/indra/newview/llwindebug.h
+++ b/indra/newview/llwindebug.h
@@ -41,7 +41,7 @@ public:
static BOOL setupExceptionHandler();
static LONG WINAPI handleException(struct _EXCEPTION_POINTERS *pExceptionInfo);
- //static void writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const char *filename);
+ static void writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const char *filename);
};
#endif // LL_LLWINDEBUG_H