QAR-377 maintenance-6 merge:

svn merge -r 82602:82644 svn+ssh://svn/svn/linden/qa/maintenance-6-merge-82557 release/
master
Brian McGroarty 2008-03-19 00:01:42 +00:00
parent 2d9afdaa03
commit 25de7377c1
28 changed files with 475 additions and 1500 deletions

View File

@ -8,6 +8,8 @@ Able Whitman
VWR-650
VWR-1460
VWR-1691
Adam Marker
VWR-2755
Aimee Trescothick
VWR-3903
VWR-4803
@ -254,6 +256,8 @@ Nicholaz Beresford
VWR-2684
Nounouch Hapmouche
VWR-238
Patric Mills
VWR-2645
Paul Churchill
VWR-20
VWR-493
@ -321,6 +325,7 @@ Strife Onizuka
WEB-164
VWR-183
VWR-2265
VWR-4111
tenebrous pau
VWR-247
TBBle Kurosawa
@ -351,3 +356,5 @@ Zipherius Turas
VWR-77
Kerutsen Sellery
VWR-1350

View File

@ -94,7 +94,7 @@ def get_channel(srctree):
for p in paths:
if os.path.exists(p):
contents = open(p, 'r').read()
channel = re.search("LL_CHANNEL\s=\s\"([\w\s]+)\"", contents).group(1)
channel = re.search("LL_CHANNEL\s=\s\"(.+)\";\s*$", contents, flags = re.M).group(1)
return channel

View File

@ -37,15 +37,16 @@
#include <cctype>
#ifdef __GNUC__
#include <cxxabi.h>
#endif
# include <cxxabi.h>
#endif // __GNUC__
#include <sstream>
#if !LL_WINDOWS
#include <syslog.h>
#endif
# include <syslog.h>
# include <unistd.h>
#endif // !LL_WINDOWS
#if LL_WINDOWS
#include <windows.h>
#endif
# include <windows.h>
#endif // LL_WINDOWS
#include <vector>
#include "llapp.h"
@ -133,18 +134,58 @@ namespace {
class RecordToStderr : public LLError::Recorder
{
public:
RecordToStderr(bool timestamp) : mTimestamp(timestamp) { }
RecordToStderr(bool timestamp) : mTimestamp(timestamp), mUseANSI(ANSI_PROBE) { }
virtual bool wantsTime() { return mTimestamp; }
virtual void recordMessage(LLError::ELevel level,
const std::string& message)
const std::string& message)
{
if (ANSI_PROBE == mUseANSI)
mUseANSI = (checkANSI() ? ANSI_YES : ANSI_NO);
if (ANSI_YES == mUseANSI)
{
// Default all message levels to bold so we can distinguish our own messages from those dumped by subprocesses and libraries.
colorANSI("1"); // bold
switch (level) {
case LLError::LEVEL_ERROR:
colorANSI("31"); // red
break;
case LLError::LEVEL_WARN:
colorANSI("34"); // blue
break;
case LLError::LEVEL_DEBUG:
colorANSI("35"); // magenta
break;
default:
break;
}
}
fprintf(stderr, "%s\n", message.c_str());
if (ANSI_YES == mUseANSI) colorANSI("0"); // reset
}
private:
bool mTimestamp;
typedef enum ANSIState {ANSI_PROBE, ANSI_YES, ANSI_NO};
ANSIState mUseANSI;
void colorANSI(const std::string color)
{
// ANSI color code escape sequence
fprintf(stderr, "\033[%sm", color.c_str() );
};
bool checkANSI(void)
{
#if LL_LINUX || LL_DARWIN
// Check whether it's okay to use ANSI; if stderr is
// a tty then we assume yes. Can be turned off with
// the LL_NO_ANSI_COLOR env var.
return (0 != isatty(2)) &&
(NULL == getenv("LL_NO_ANSI_COLOR"));
#endif // LL_LINUX
return false;
};
};
class RecordToFixedBuffer : public LLError::Recorder

View File

@ -263,20 +263,14 @@ bool get_word(std::string& output_string, std::istream& input_stream, int n)
// get everything up to and including the next newline
bool get_line(std::string& output_string, std::istream& input_stream)
{
output_string.clear();
char c = input_stream.get();
while (input_stream.good())
{
if ('\r' == c)
output_string += c;
if ('\n' == c)
{
// skip carriage returns
}
else
{
output_string += c;
if ('\n' == c)
{
break;
}
break;
}
c = input_stream.get();
}
@ -288,27 +282,21 @@ bool get_line(std::string& output_string, std::istream& input_stream)
// add a newline on the end if bail before actual line ending
bool get_line(std::string& output_string, std::istream& input_stream, int n)
{
output_string.clear();
int char_count = 0;
char c = input_stream.get();
while (input_stream.good() && char_count < n)
{
char_count++;
output_string += c;
if ('\r' == c)
if ('\n' == c)
{
// skip carriage returns
break;
}
else
if (char_count >= n)
{
if ('\n' == c)
{
break;
}
if (char_count >= n)
{
output_string.append("\n");
break;
}
output_string.append("\n");
break;
}
c = input_stream.get();
}
@ -408,49 +396,6 @@ void replace_newlines_with_whitespace(std::string& line)
}
}
// returns 1 for solitary "{"
// returns -1 for solitary "}"
// otherwise returns 0
int get_brace_count(const std::string& line)
{
int index = 0;
int line_size = line.size();
char c = 0;
while (index < line_size)
{
c = line[index];
index++;
if (!isspace(c))
{
break;
}
}
char brace = c;
// make sure the rest of the line is whitespace
while (index < line_size)
{
c = line[index];
if (!isspace(c))
{
break;
}
index++;
}
if ('\n' != c)
{
return 0;
}
if ('{' == brace)
{
return 1;
}
else if ('}' == brace)
{
return -1;
}
return 0;
}
// erases any double-quote characters in 'line'
void remove_double_quotes(std::string& line)
{
@ -498,7 +443,7 @@ void get_keyword_and_value(std::string& keyword,
}
// get the keyword
keyword.assign("");
keyword.clear();
while (line_index < line_size)
{
c = line[line_index];
@ -510,6 +455,8 @@ void get_keyword_and_value(std::string& keyword,
line_index++;
}
// get the value
value.clear();
if (keyword.size() > 0
&& '\r' != line[line_index]
&& '\n' != line[line_index])
@ -523,8 +470,6 @@ void get_keyword_and_value(std::string& keyword,
line_index++;
}
// get the value
value.assign("");
while (line_index < line_size)
{
c = line[line_index];

View File

@ -96,11 +96,6 @@ void escape_string(std::string& line);
// replaces each '\n' character with ' '
void replace_newlines_with_whitespace(std::string& line);
// returns 1 for solitary "{"
// returns -1 for solitary "}"
// otherwise returns 0
int get_brace_count(const std::string& line);
// erases any double-quote characters in line
void remove_double_quotes(std::string& line);

View File

@ -940,6 +940,7 @@ LLSD LLInventoryItem::asLLSD() const
}
else
{
// *TODO: get rid of this. Phoenix 2008-01-30
LLUUID shadow_id(mAssetUUID);
LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES);
cipher.encrypt(shadow_id.mData, UUID_BYTES);

View File

@ -81,7 +81,7 @@ const U32 PF_USE_RESTRICTED_ACCESS = PF_USE_ACCESS_GROUP
| PF_DENY_ANONYMOUS
| PF_DENY_AGEUNVERIFIED;
const U32 PF_NONE = 0x00000000;
const U32 PF_ALL = 0x7FFFFFFF;
const U32 PF_ALL = 0xFFFFFFFF;
const U32 PF_DEFAULT = PF_ALLOW_FLY
| PF_ALLOW_OTHER_SCRIPTS
| PF_ALLOW_GROUP_SCRIPTS

File diff suppressed because it is too large Load Diff

View File

@ -32,15 +32,26 @@
#ifndef LL_LLNAMEVALUE_H
#define LL_LLNAMEVALUE_H
#include "string_table.h"
// As of January 2008, I believe we only use the following name-value
// pairs. This is hard to prove because they are initialized from
// strings. JC
//
// FirstName STRING
// LastName STRING
// AttachPt U32
// AttachmentItemId STRING
// Title STRING
// AttachmentOffset VEC3
// AttachmentOrientation VEC3
// SitObject STRING
// SitPosition VEC3
#include "llmath.h"
#include "v3math.h"
#include "lldbstrings.h"
class LLNameValue;
typedef void (*TNameValueCallback)(LLNameValue *changed, void **user_data);
void add_use_callback(char *name, TNameValueCallback ucb, void **user_data);
class LLStringTable;
typedef enum e_name_value_types
{
@ -61,7 +72,6 @@ typedef enum e_name_value_class
NVC_NULL,
NVC_READ_ONLY,
NVC_READ_WRITE,
NVC_CALLBACK,
NVC_EOF
} ENameValueClass;
@ -110,17 +120,13 @@ class LLNameValue
{
public:
void baseInit();
void init(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto,
TNameValueCallback nvcb = NULL, void **user_data = NULL);
void init(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto );
LLNameValue();
LLNameValue(const char *data);
LLNameValue(const char *name, const char *type, const char *nvclass,
TNameValueCallback nvcb = NULL, void **user_data = NULL);
LLNameValue(const char *name, const char *data, const char *type, const char *nvclass,
TNameValueCallback nvcb = NULL, void **user_data = NULL);
LLNameValue(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto,
TNameValueCallback nvcb = NULL, void **user_data = NULL);
LLNameValue(const char *name, const char *type, const char *nvclass );
LLNameValue(const char *name, const char *data, const char *type, const char *nvclass );
LLNameValue(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto );
~LLNameValue();
@ -130,7 +136,6 @@ public:
S32 *getS32();
void getVec3(LLVector3 &vec);
LLVector3 *getVec3();
F32 magnitude();
U32 *getU32();
U64 *getU64();
@ -157,27 +162,8 @@ public:
void setVec3(const LLVector3 &a);
void setU32(const U32 a);
BOOL nonzero();
friend std::ostream& operator<<(std::ostream& s, const LLNameValue &a);
friend LLNameValue &operator+(const LLNameValue &a, const LLNameValue &b);
friend LLNameValue &operator-(const LLNameValue &a, const LLNameValue &b);
friend LLNameValue &operator*(const LLNameValue &a, const LLNameValue &b);
friend LLNameValue &operator/(const LLNameValue &a, const LLNameValue &b);
friend LLNameValue &operator%(const LLNameValue &a, const LLNameValue &b);
friend LLNameValue &operator*(const LLNameValue &a, F32 k);
friend LLNameValue &operator*(F32 k, const LLNameValue &a);
friend bool operator==(const LLNameValue &a, const LLNameValue &b);
friend bool operator<=(const LLNameValue &a, const LLNameValue &b);
friend bool operator>=(const LLNameValue &a, const LLNameValue &b);
friend bool operator<(const LLNameValue &a, const LLNameValue &b);
friend bool operator>(const LLNameValue &a, const LLNameValue &b);
friend bool operator!=(const LLNameValue &a, const LLNameValue &b);
friend LLNameValue &operator-(const LLNameValue &a);
private:
void printNameValue(std::ostream& s);
@ -193,8 +179,6 @@ public:
UNameValueReference mNameValueReference;
LLStringTable *mNVNameTable;
TNameValueCallback mNameValueCB;
void **mUserData;
};
extern LLStringTable gNVNameTable;

View File

@ -172,9 +172,10 @@ const U32 ESTATE_ACCESS_BANNED_AGENT_ADD = 1 << 6;
const U32 ESTATE_ACCESS_BANNED_AGENT_REMOVE = 1 << 7;
const U32 ESTATE_ACCESS_MANAGER_ADD = 1 << 8;
const U32 ESTATE_ACCESS_MANAGER_REMOVE = 1 << 9;
const U32 ESTATE_ACCESS_NO_REPLY = 1 << 10;
const S32 ESTATE_MAX_MANAGERS = 10;
const S32 ESTATE_MAX_ACCESS_IDS = 300; // max for access, banned
const S32 ESTATE_MAX_ACCESS_IDS = 500; // max for access, banned
const S32 ESTATE_MAX_GROUP_IDS = (S32) ESTATE_ACCESS_MAX_ENTRIES_PER_PACKET;
// 'Sim Wide Delete' flags

View File

@ -416,6 +416,7 @@ int main(int argc, char **argv)
if(err == noErr)
{
ShowWindow(gWindow);
SelectWindow(gWindow);
}
if(err == noErr)

View File

@ -458,8 +458,6 @@ PARCEL_FLAG_USE_BAN_LIST Used with llGetParcelFlags to find if a parcel uses a
PARCEL_FLAG_USE_LAND_PASS_LIST Used with llGetParcelFlags to find if a parcel allows passes to be purchased
PARCEL_FLAG_LOCAL_SOUND_ONLY Used with llGetParcelFlags to find if a parcel restricts spacialized sound to the parcel
PARCEL_FLAG_RESTRICT_PUSHOBJECT Used with llGetParcelFlags to find if a parcel restricts llPushObject() calls
PARCEL_FLAG_LOCAL_SOUND_ONLY Used with llGetParcelFlags to find if a parcel restricts spacialized sound to the parcel
PARCEL_FLAG_RESTRICT_PUSHOBJECT Used with llGetParcelFlags to find if a parcel restricts llPushObject() calls
PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY Used with llGetParcelFlags to find if a parcel allows all objects to enter
PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY Used with llGetParcelFlags to find if a parcel only allows group (and owner) objects to enter

View File

@ -252,7 +252,6 @@ BOOL gGodConnect = FALSE;
BOOL gAcceptTOS = FALSE;
BOOL gAcceptCriticalMessage = FALSE;
LLUUID gViewerDigest; // MD5 digest of the viewer's executable file.
eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL;
LLSD gDebugInfo;
@ -1014,8 +1013,12 @@ bool LLAppViewer::init()
// Build a string representing the current version number.
gCurrentVersion = llformat("%s %d.%d.%d.%d", gChannelName.c_str(), LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BUILD );
//
// Various introspection concerning the libs we're using.
//
llinfos << "J2C Engine is: " << LLImageJ2C::getEngineInfo() << llendl;
// Merge with the command line overrides
gSavedSettings.applyOverrides(gCommandLineSettings);
@ -1248,17 +1251,6 @@ bool LLAppViewer::init()
// Load Custom bindings (override defaults)
gViewerKeyboard.loadBindings(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"custom_keys.ini").c_str());
// Calculate the digest for the executable (takes < 90ms on a fast machine).
FILE* app_file = LLFile::fopen( gDirUtilp->getExecutablePathAndName().c_str(), "rb" ); /* Flawfinder: ignore */
if( app_file )
{
LLMD5 app_md5;
app_md5.update( app_file ); // Automatically closes the file
app_md5.finalize();
app_md5.raw_digest( gViewerDigest.mData );
}
llinfos << "Viewer Digest: " << gViewerDigest << llendl;
// If we don't have the right GL requirements, exit.
if (!gGLManager.mHasRequirements && !gNoRender)
{
@ -1368,7 +1360,7 @@ bool LLAppViewer::mainLoop()
gViewerWindow->mWindow->gatherInput();
}
#if 1 && !RELEASE_FOR_DOWNLOAD
#if 1 && !LL_RELEASE_FOR_DOWNLOAD
// once per second debug info
if (debugTime.getElapsedTimeF32() > 1.f)
{

View File

@ -224,7 +224,6 @@ extern BOOL gGodConnect; // llstartup
extern BOOL gAcceptTOS;
extern BOOL gAcceptCriticalMessage;
extern LLUUID gViewerDigest; // MD5 digest of the viewer's executable file.
typedef enum
{

View File

@ -0,0 +1,125 @@
/**
* @file lldelayedgestureerror.cpp
* @brief Delayed gesture error message -- try to wait until name has been retrieved
* @author Dale Glass
*
* $LicenseInfo:firstyear=2004&license=viewergpl$
*
* Copyright (c) 2004-2007, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlife.com/developers/opensource/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at http://secondlife.com/developers/opensource/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "lldelayedgestureerror.h"
#include <list>
#include "llnotify.h"
#include "llcallbacklist.h"
#include "llinventory.h"
#include "llviewerinventory.h"
#include "llinventorymodel.h"
const F32 MAX_NAME_WAIT_TIME = 5.0f;
LLDelayedGestureError::ErrorQueue LLDelayedGestureError::sQueue;
//static
void LLDelayedGestureError::gestureMissing(const LLUUID &id)
{
LLErrorEntry ent("GestureMissing", id);
if ( ! doDialog(ent) )
{
enqueue(ent);
}
}
//static
void LLDelayedGestureError::gestureFailedToLoad(const LLUUID &id)
{
LLErrorEntry ent("UnableToLoadGesture", id);
if ( ! doDialog(ent) )
{
enqueue(ent);
}
}
//static
void LLDelayedGestureError::enqueue(const LLErrorEntry &ent)
{
if ( sQueue.empty() )
{
gIdleCallbacks.addFunction(onIdle, NULL);
}
sQueue.push_back(ent);
}
//static
void LLDelayedGestureError::onIdle(void *userdata)
{
if ( ! sQueue.empty() )
{
LLErrorEntry ent = sQueue.front();
sQueue.pop_front();
if ( ! doDialog(ent, false ) )
{
enqueue(ent);
}
}
else
{
// Nothing to do anymore
gIdleCallbacks.deleteFunction(onIdle, NULL);
}
}
//static
bool LLDelayedGestureError::doDialog(const LLErrorEntry &ent, bool uuid_ok)
{
LLStringBase<char>::format_map_t args;
LLInventoryItem *item = gInventory.getItem( ent.mItemID );
if ( item )
{
args["[NAME]"] = item->getName();
}
else
{
if ( uuid_ok || ent.mTimer.getElapsedTimeF32() > MAX_NAME_WAIT_TIME )
{
args["[NAME]"] = LLString( ent.mItemID.asString() );
}
else
{
return false;
}
}
LLNotifyBox::showXml(ent.mNotifyName, args);
return true;
}

View File

@ -0,0 +1,82 @@
/**
* @file lldelayedgestureerror.h
* @brief Delayed gesture error message -- try to wait until name has been retrieved
* @author Dale Glass
*
* $LicenseInfo:firstyear=2004&license=viewergpl$
*
* Copyright (c) 2004-2007, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlife.com/developers/opensource/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at http://secondlife.com/developers/opensource/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#ifndef LL_DELAYEDGESTUREERROR_H
#define LL_DELAYEDGESTUREERROR_H
#include <list>
#include "lltimer.h"
// TODO: Refactor to be more generic - this may be useful for other delayed notifications in the future
class LLDelayedGestureError
{
public:
/**
* @brief Generates a missing gesture error
* @param id UUID of missing gesture
* Delays message for up to 5 seconds if UUID can't be immediately converted to a text description
*/
static void gestureMissing(const LLUUID &id);
/**
* @brief Generates a gesture failed to load error
* @param id UUID of missing gesture
* Delays message for up to 5 seconds if UUID can't be immediately converted to a text description
*/
static void gestureFailedToLoad(const LLUUID &id);
private:
struct LLErrorEntry
{
LLErrorEntry(const LLString& notify, const LLUUID &item) : mTimer(), mNotifyName(notify), mItemID(item) {}
LLTimer mTimer;
LLString mNotifyName;
LLUUID mItemID;
};
static bool doDialog(const LLErrorEntry &ent, bool uuid_ok = false);
static void enqueue(const LLErrorEntry &ent);
static void onIdle(void *userdata);
typedef std::list<LLErrorEntry> ErrorQueue;
static ErrorQueue sQueue;
};
#endif

View File

@ -168,12 +168,6 @@ LLFloaterAbout::LLFloaterAbout()
support.append("\n");
}
// MD5 digest of executable
support.append("Viewer Digest: ");
char viewer_digest_string[UUID_STR_LENGTH]; /*Flawfinder: ignore*/
gViewerDigest.toString( viewer_digest_string );
support.append(viewer_digest_string);
// Fix views
childDisable("credits_editor");

View File

@ -225,14 +225,33 @@ void LLFloaterRegionInfo::onOpen()
gFloaterView->getNewFloaterPosition(&left, &top);
rect.translate(left,top);
requestRegionInfo();
refreshFromRegion(gAgent.getRegion());
requestRegionInfo();
LLFloater::onOpen();
}
// static
void LLFloaterRegionInfo::requestRegionInfo()
{
LLTabContainer* tab = LLUICtrlFactory::getTabContainerByName(findInstance(), "region_panels");
if(tab)
{
LLPanel* panel;
panel = LLUICtrlFactory::getPanelByName(tab, "General");
if (panel) panel->setCtrlsEnabled(FALSE);
panel = LLUICtrlFactory::getPanelByName(tab, "Debug");
if (panel) panel->setCtrlsEnabled(FALSE);
panel = LLUICtrlFactory::getPanelByName(tab, "Terrain");
if (panel) panel->setCtrlsEnabled(FALSE);
panel = LLUICtrlFactory::getPanelByName(tab, "Estate");
if (panel) panel->setCtrlsEnabled(FALSE);
}
// Must allow anyone to request the RegionInfo data
// so non-owners/non-gods can see the values.
// Therefore can't use an EstateOwnerMessage JC
@ -278,6 +297,11 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
//dispatch the message
dispatch.dispatch(request, invoice, strings);
LLViewerRegion* region = gAgent.getRegion();
BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
panel->setCtrlsEnabled(allow_modify);
}
@ -295,6 +319,9 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
LLTabContainer* tab = LLUICtrlFactory::getTabContainerByName(findInstance(), "region_panels");
if(!tab) return;
LLViewerRegion* region = gAgent.getRegion();
BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
// extract message
char sim_name[MAX_STRING]; /* Flawfinder: ignore*/
U32 region_flags;
@ -335,13 +362,13 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
panel->childSetValue("access_combo", LLSD(LLViewerRegion::accessToString(sim_access)) );
// detect teen grid for maturity
LLViewerRegion* region = gAgent.getRegion();
// detect teen grid for maturity
U32 parent_estate_id;
msg->getU32("RegionInfo", "ParentEstateID", parent_estate_id);
BOOL teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that
panel->childSetEnabled("access_combo", gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid));
panel->setCtrlsEnabled(allow_modify);
// DEBUG PANEL
@ -352,6 +379,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
panel->childSetValue("disable_scripts_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_SCRIPTS)) );
panel->childSetValue("disable_collisions_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_COLLISIONS)) );
panel->childSetValue("disable_physics_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_PHYSICS)) );
panel->setCtrlsEnabled(allow_modify);
// TERRAIN PANEL
panel = LLUICtrlFactory::getPanelByName(tab, "Terrain");
@ -363,11 +391,11 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
panel->childSetValue("terrain_lower_spin", LLSD(terrain_lower_limit));
panel->childSetValue("use_estate_sun_check", LLSD(use_estate_sun));
BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
panel->childSetValue("fixed_sun_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SUN_FIXED)));
panel->childSetEnabled("fixed_sun_check", allow_modify && !use_estate_sun);
panel->childSetValue("sun_hour_slider", LLSD(sun_hour));
panel->childSetEnabled("sun_hour_slider", allow_modify && !use_estate_sun);
panel->setCtrlsEnabled(allow_modify);
getInstance()->refreshFromRegion( gAgent.getRegion() );
}
@ -584,7 +612,7 @@ BOOL LLPanelRegionGeneralInfo::postBuild()
initCtrl("block_terraform_check");
initCtrl("block_fly_check");
initCtrl("allow_damage_check");
initCtrl("allow_land_resell_check");
initCtrl("allow_land_resell_check");
initCtrl("allow_parcel_changes_check");
initCtrl("agent_limit_spin");
initCtrl("object_bonus_spin");
@ -1690,11 +1718,12 @@ bool LLPanelEstateInfo::isLindenEstate()
return (estate_id <= ESTATE_LAST_LINDEN);
}
typedef std::vector<LLUUID> AgentOrGroupIDsVector;
struct LLEstateAccessChangeInfo
{
U32 mOperationFlag; // ESTATE_ACCESS_BANNED_AGENT_ADD, _REMOVE, etc.
LLString mDialogName;
LLUUID mAgentOrGroupID;
AgentOrGroupIDsVector mAgentOrGroupIDs; // List of agent IDs to apply to this change
};
// Special case callback for groups, since it has different callback format than names
@ -1704,7 +1733,7 @@ void LLPanelEstateInfo::addAllowedGroup2(LLUUID id, void* user_data)
LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo;
change_info->mOperationFlag = ESTATE_ACCESS_ALLOWED_GROUP_ADD;
change_info->mDialogName = "EstateAllowedGroupAdd";
change_info->mAgentOrGroupID = id;
change_info->mAgentOrGroupIDs.push_back(id);
if (isLindenEstate())
{
@ -1749,8 +1778,8 @@ void LLPanelEstateInfo::accessAddCore2(S32 option, void* data)
return;
}
// avatar picker no multi-select, yes close-on-select
LLFloaterAvatarPicker::show(accessAddCore3, (void*)change_info, FALSE, TRUE);
// avatar picker yes multi-select, yes close-on-select
LLFloaterAvatarPicker::show(accessAddCore3, (void*)change_info, TRUE, TRUE);
}
// static
@ -1766,21 +1795,44 @@ void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, co
return;
}
// User did select a name.
change_info->mAgentOrGroupID = ids[0];
change_info->mAgentOrGroupIDs = ids;
// Can't put estate owner on ban list
LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
if (!panel) return;
LLViewerRegion* region = gAgent.getRegion();
if (!region) return;
if ((change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD)
&& (region->getOwner() == change_info->mAgentOrGroupID))
if (change_info->mOperationFlag & ESTATE_ACCESS_ALLOWED_AGENT_ADD)
{
gViewerWindow->alertXml("OwnerCanNotBeDenied");
delete change_info;
change_info = NULL;
return;
LLCtrlListInterface *list = panel->childGetListInterface("allowed_avatar_name_list");
int currentCount = (list ? list->getItemCount() : 0);
if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS)
{
LLString::format_map_t args;
args["[NUM_ADDED]"] = llformat("%d",ids.size());
args["[MAX_AGENTS]"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
args["[LIST_TYPE]"] = "Allowed Residents";
args["[NUM_EXCESS]"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS);
gViewerWindow->alertXml("MaxAgentOnRegionBatch", args);
delete change_info;
return;
}
}
if (change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD)
{
LLCtrlListInterface *list = panel->childGetListInterface("banned_avatar_name_list");
int currentCount = (list ? list->getItemCount() : 0);
if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS)
{
LLString::format_map_t args;
args["[NUM_ADDED]"] = llformat("%d",ids.size());
args["[MAX_AGENTS]"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
args["[LIST_TYPE]"] = "Banned Residents";
args["[NUM_EXCESS]"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS);
gViewerWindow->alertXml("MaxAgentOnRegionBatch", args);
delete change_info;
return;
}
}
if (isLindenEstate())
@ -1804,21 +1856,29 @@ void LLPanelEstateInfo::accessRemoveCore(U32 operation_flag, const char* dialog_
if (!panel) return;
LLNameListCtrl* name_list = LLViewerUICtrlFactory::getNameListByName(panel, list_ctrl_name);
if (!name_list) return;
LLScrollListItem* item = name_list->getFirstSelected();
if (!item) return;
LLUUID agent_id = item->getUUID();
std::vector<LLScrollListItem*> list_vector = name_list->getAllSelected();
if (list_vector.size() == 0)
return;
LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo;
change_info->mAgentOrGroupID = agent_id;
change_info->mOperationFlag = operation_flag;
change_info->mDialogName = dialog_name;
for (std::vector<LLScrollListItem*>::const_iterator iter = list_vector.begin();
iter != list_vector.end();
iter++)
{
LLScrollListItem *item = (*iter);
change_info->mAgentOrGroupIDs.push_back(item->getUUID());
}
if (isLindenEstate())
{
// warn on change linden estate
gViewerWindow->alertXml("ChangeLindenAccess",
accessRemoveCore2,
(void*)change_info);
accessRemoveCore2,
(void*)change_info);
}
else
{
@ -1850,9 +1910,9 @@ void LLPanelEstateInfo::accessRemoveCore2(S32 option, void* data)
LLString::format_map_t args;
args["[ALL_ESTATES]"] = all_estates_text();
gViewerWindow->alertXml(change_info->mDialogName,
args,
accessCoreConfirm,
(void*)change_info);
args,
accessCoreConfirm,
(void*)change_info);
}
}
@ -1862,35 +1922,54 @@ void LLPanelEstateInfo::accessRemoveCore2(S32 option, void* data)
void LLPanelEstateInfo::accessCoreConfirm(S32 option, void* data)
{
LLEstateAccessChangeInfo* change_info = (LLEstateAccessChangeInfo*)data;
U32 flags = change_info->mOperationFlag;
switch(option)
const U32 originalFlags = change_info->mOperationFlag;
AgentOrGroupIDsVector& ids = change_info->mAgentOrGroupIDs;
LLViewerRegion* region = gAgent.getRegion();
for (AgentOrGroupIDsVector::const_iterator iter = ids.begin();
iter != ids.end();
iter++)
{
case 0:
// This estate
sendEstateAccessDelta(flags, change_info->mAgentOrGroupID);
break;
case 1:
U32 flags = originalFlags;
if (iter + 1 != ids.end())
flags |= ESTATE_ACCESS_NO_REPLY;
const LLUUID id = (*iter);
if ((change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD)
&& region && (region->getOwner() == id))
{
// All estates, either than I own or manage for this owner.
// This will be verified on simulator. JC
LLViewerRegion* region = gAgent.getRegion();
if (!region) break;
if (region->getOwner() == gAgent.getID()
|| gAgent.isGodlike())
{
flags |= ESTATE_ACCESS_APPLY_TO_ALL_ESTATES;
sendEstateAccessDelta(flags, change_info->mAgentOrGroupID);
}
else if (region->isEstateManager())
{
flags |= ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES;
sendEstateAccessDelta(flags, change_info->mAgentOrGroupID);
}
gViewerWindow->alertXml("OwnerCanNotBeDenied");
break;
}
case 2:
default:
break;
switch(option)
{
case 0:
// This estate
sendEstateAccessDelta(flags, id);
break;
case 1:
{
// All estates, either than I own or manage for this owner.
// This will be verified on simulator. JC
if (!region) break;
if (region->getOwner() == gAgent.getID()
|| gAgent.isGodlike())
{
flags |= ESTATE_ACCESS_APPLY_TO_ALL_ESTATES;
sendEstateAccessDelta(flags, id);
}
else if (region->isEstateManager())
{
flags |= ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES;
sendEstateAccessDelta(flags, id);
}
break;
}
case 2:
default:
break;
}
}
delete change_info;
change_info = NULL;

View File

@ -50,6 +50,7 @@
// newview
#include "llagent.h"
#include "llchatbar.h"
#include "lldelayedgestureerror.h"
#include "llinventorymodel.h"
#include "llnotify.h"
#include "llviewermessage.h"
@ -1006,20 +1007,14 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs,
gViewerStats->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
}
// Get missing gesture's name. Use UUID if name can't be found.
LLStringBase<char>::format_map_t args;
LLInventoryItem *item = gInventory.getItem( item_id );
args["[NAME]"] = item ? item->getName() : LLString( item_id.asString() );
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
LLNotifyBox::showXml("GestureMissing", args);
LLDelayedGestureError::gestureMissing( item_id );
}
else
{
LLNotifyBox::showXml("UnableToLoadGesture", args);
LLDelayedGestureError::gestureFailedToLoad( item_id );
}
llwarns << "Problem loading gesture: " << status << llendl;

View File

@ -80,7 +80,7 @@ LLIMMgr* gIMMgr = NULL;
//
// Statics
//
//*FIXME: make these all either UIStrings or Strings
// *FIXME: make these all either UIStrings or Strings
static LLString sOnlyUserMessage;
static LLUIString sOfflineMessage;
static LLUIString sInviteMessage;
@ -374,7 +374,7 @@ LLIMMgr::LLIMMgr() :
mFriendObserver = new LLIMViewFriendObserver(this);
LLAvatarTracker::instance().addObserver(mFriendObserver);
//*HACK: use floater to initialize string constants from xml file
// *HACK: use floater to initialize string constants from xml file
// then delete it right away
LLFloaterIM* dummy_floater = new LLFloaterIM();
delete dummy_floater;
@ -738,7 +738,7 @@ void LLIMMgr::inviteToSession(
if (channelp && channelp->callStarted())
{
// you have already started a call to the other user, so just accept the invite
inviteUserResponse(0, invite);
inviteUserResponse(0, invite); // inviteUserResponse deletes
return;
}
@ -752,7 +752,7 @@ void LLIMMgr::inviteToSession(
if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly"))
{
// invite not from a friend, so decline
inviteUserResponse(1, invite);
inviteUserResponse(1, invite); // inviteUserResponse deletes
return;
}
}
@ -771,13 +771,17 @@ void LLIMMgr::inviteToSession(
args["[GROUP]"] = session_name;
LLNotifyBox::showXml(notify_box_type,
args,
inviteUserResponse,
(void*)invite);
args,
inviteUserResponse,
(void*)invite); // inviteUserResponse deletes
}
mPendingInvitations[session_id.asString()] = LLSD();
}
else
{
delete invite;
}
}
//static

View File

@ -199,7 +199,7 @@ public:
protected:
LLInvFVBridge(LLInventoryPanel* inventory, const LLUUID& uuid) :
mInventoryPanel(inventory), mUUID(uuid) {}
mInventoryPanel(inventory), mUUID(uuid), mInvType(LLInventoryType::IT_NONE) {}
LLInventoryObject* getInventoryObject() const;
BOOL isInTrash() const;
@ -297,7 +297,7 @@ public:
protected:
LLFolderBridge(LLInventoryPanel* inventory, const LLUUID& uuid) :
LLInvFVBridge(inventory, uuid) {}
LLInvFVBridge(inventory, uuid), mCallingCards(FALSE), mWearables(FALSE) {}
// menu callbacks
static void pasteClipboard(void* user_data);

View File

@ -49,6 +49,7 @@
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
#include "lldelayedgestureerror.h"
#include "llfloatergesture.h" // for some label constants
#include "llgesturemgr.h"
#include "llinventorymodel.h"
@ -955,11 +956,6 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
}
else
{
// Get missing gesture's name. Use UUID if name can't be found.
LLStringBase<char>::format_map_t args;
LLInventoryItem *item = gInventory.getItem( *item_idp );
args["[NAME]"] = item ? item->getName() : LLString( item_idp->asString() );
if( gViewerStats )
{
gViewerStats->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
@ -968,11 +964,11 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
LLNotifyBox::showXml("GestureMissing", args);
LLDelayedGestureError::gestureMissing( *item_idp );
}
else
{
LLNotifyBox::showXml("UnableToLoadGesture", args);
LLDelayedGestureError::gestureFailedToLoad( *item_idp );
}
llwarns << "Problem loading gesture: " << status << llendl;

View File

@ -1021,7 +1021,6 @@ BOOL idle_startup()
gSkipOptionalUpdate,
gAcceptTOS,
gAcceptCriticalMessage,
gViewerDigest,
gLastExecEvent,
requested_options,
hashed_mac_string,

View File

@ -5180,7 +5180,7 @@ void process_script_teleport_request(LLMessageSystem* msg, void**)
msg->getVector3("Data", "SimPosition", pos);
msg->getVector3("Data", "LookAt", look_at);
// gFloaterWorldMap->trackURL(sim_name, (U32)pos.mV[VX], (U32)pos.mV[VY], (U32)pos.mV[VZ]);
// gFloaterWorldMap->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]);
// LLFloaterWorldMap::show(NULL, TRUE);
LLURLDispatcher::dispatch(LLURLDispatcher::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE);

View File

@ -207,39 +207,6 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
}
LLWearable* LLWearableList::createLegacyWearableFromAvatar( EWearableType type )
{
llinfos << "LLWearableList::createLegacyWearableFromAvatar" << llendl;
LLTransactionID tid;
LLAssetID new_asset_id;
tid.generate();
new_asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
LLWearable* wearable = new LLWearable( tid );
wearable->setType( type );
wearable->setName( wearable->getTypeLabel() );
wearable->setDescription( "Recovered from lost asset." );
LLVOAvatar* avatar = gAgent.getAvatarObject();
LLPermissions perm;
perm.init( avatar->getID(), avatar->getID(), LLUUID::null, LLUUID::null );
perm.initMasks(PERM_TRANSFER, PERM_TRANSFER, PERM_NONE, PERM_NONE, PERM_MOVE | PERM_TRANSFER);
wearable->setPermissions( perm );
// Save info is the default.
wearable->readFromAvatar();
mList[ new_asset_id ] = wearable;
// Send to the dataserver
wearable->saveNewAsset();
return wearable;
}
// Creates a new wearable just like the old_wearable but with data copied over from item
LLWearable* LLWearableList::createWearableMatchedToInventoryItem( LLWearable* old_wearable, LLViewerInventoryItem* item )
{

View File

@ -51,8 +51,6 @@ public:
void(*asset_arrived_callback)(LLWearable*, void* userdata),
void* userdata );
LLWearable* createLegacyWearableFromAvatar( EWearableType type );
LLWearable* createWearableMatchedToInventoryItem( LLWearable* old_wearable, LLViewerInventoryItem* item );
LLWearable* createCopyFromAvatar( LLWearable* old_wearable, const std::string& new_name = std::string() );
LLWearable* createCopy( LLWearable* old_wearable );

View File

@ -1896,7 +1896,7 @@ void renderPhysicalBeacons(LLDrawable* drawablep)
LLViewerObject *vobj = drawablep->getVObj();
if (vobj
&& !vobj->isAvatar()
&& !vobj->getParent()
//&& !vobj->getParent()
&& vobj->usePhysics())
{
if (gPipeline.sRenderBeacons)

View File

@ -491,7 +491,7 @@ namespace tut
is.str(str = "First Second \t \r\n Third Fourth-ShouldThisBePartOfFourth IsThisFifth\n");
actual_result = "";
ret = get_line(actual_result, is);
expected_result = "First Second \t \n";
expected_result = "First Second \t \r\n";
ensure_equals("get_line: 1", actual_result, expected_result);
actual_result = "";
@ -545,7 +545,6 @@ namespace tut
template<> template<>
void streamtools_object::test<12>()
{
skip_fail("get_line() incorrectly handles lone carriage return.");
std::string str;
std::string expected_result;
std::string actual_result;
@ -554,10 +553,10 @@ namespace tut
// need to be check if this test case is wrong or the implementation is wrong.
is.clear();
is.str(str = "Should not skip \r unless they are followed with newline .\r\n");
is.str(str = "Should not skip lone \r.\r\n");
actual_result = "";
ret = get_line(actual_result, is);
expected_result = "Should not skip \r unless they are followed with newline .\n";
expected_result = "Should not skip lone \r.\r\n";
ensure_equals("get_line: carriage return skipped even though not followed by newline", actual_result, expected_result);
}
@ -804,37 +803,6 @@ namespace tut
template<> template<>
void streamtools_object::test<21>()
{
skip_fail("get_brace_count() has bugs.");
std::string str;
std::string expected_result;
int count;
str = " { ";
count = get_brace_count(str);
ensure("get_brace_count: 1 for {", count == 1);
str = "\t}\t\t \n";
count = get_brace_count(str);
ensure("get_brace_count: 1 for {", count == -1);
str = "\t\t\t \n";
count = get_brace_count(str);
ensure("get_brace_count: 0 for no braces", count == 0);
str = "{ Remaining line not empty\n";
count = get_brace_count(str);
ensure("get_brace_count: 0 for remainign line not empty", count == 0);
/* shouldn't this return 1? */
str = "{ /*Remaining line in comment*/\n";
count = get_brace_count(str);
ensure("get_brace_count: 1 for { with remaining line in comment", count == 1);
/* shouldn't this return -1? */
str = " } //Remaining line in comment \n";
count = get_brace_count(str);
ensure("get_brace_count: -1 for } with remaining line in comment", count == -1);
}
//testcases for get_keyword_and_value()
@ -860,8 +828,6 @@ namespace tut
template<> template<>
void streamtools_object::test<23>()
{
skip_fail("get_keyword_and_value() has bugs.");
std::string s;
std::string keyword = "SOME PRIOR KEYWORD";
std::string value = "SOME PRIOR VALUE";
@ -875,8 +841,6 @@ namespace tut
template<> template<>
void streamtools_object::test<24>()
{
skip_fail("get_keyword_and_value() has bugs.");
std::string s;
std::string keyword = "SOME PRIOR KEYWORD";
std::string value = "SOME PRIOR VALUE";