Merge Firestorm LGPL
commit
d171e16c58
2
.hgtags
2
.hgtags
|
|
@ -30,6 +30,7 @@ fdf1fd7884cf642ad3d41c3f5bc2521e4a7ab3aa Firestorm_4.6.9_Release
|
|||
0a61dad41140c261bb90412ff0abe83e5e3e89d9 Firestorm_4.7.1_Beta
|
||||
76c9998c37a52d58792e7a22cc5055e831c95023 Firestorm_4.7.3_Release
|
||||
a27ad24ed75000d96d056aa20495637386e4a53e Firestorm_4.7.5_Release
|
||||
31f9b0f8e9365a87975af3aa73e3f782db17f994 Firestorm_4.7.7_Release
|
||||
bb38ff1a763738609e1b3cada6d15fa61e5e84b9 2.1.1-release
|
||||
003dd9461bfa479049afcc34545ab3431b147c7c v2start
|
||||
52d96ad3d39be29147c5b2181b3bb46af6164f0e alpha-3
|
||||
|
|
@ -545,3 +546,4 @@ e821ef17c6edea4a59997719d8ba416d8c16e143 3.8.5-release
|
|||
5a5bd148943bfb46cf2ff2ccf376c42dee93d19b 3.8.6-release
|
||||
ae3297cdd03ab14f19f3811acbc4acd3eb600336 4.0.0-release
|
||||
759710a9acef61aaf7b69f4bc4a5a913de87ad8a 4.0.1-release
|
||||
e9d350764dfbf5a46229e627547ef5c1b1eeef00 4.0.2-release
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ Ansariel Hiller
|
|||
MAINT-5533
|
||||
MAINT-5756
|
||||
MAINT-4677
|
||||
MAINT-2199
|
||||
Aralara Rajal
|
||||
Arare Chantilly
|
||||
CHUIBUG-191
|
||||
|
|
@ -784,6 +785,12 @@ Kitty Barnett
|
|||
VWR-24217
|
||||
STORM-1804
|
||||
MAINT-5416
|
||||
MAINT-6041
|
||||
MAINT-6142
|
||||
MAINT-6144
|
||||
MAINT-6152
|
||||
MAINT-6153
|
||||
MAINT-6154
|
||||
Kolor Fall
|
||||
Komiko Okamoto
|
||||
Korvel Noh
|
||||
|
|
@ -1002,6 +1009,7 @@ NickyD
|
|||
MAINT-873
|
||||
Nicky Dasmijn
|
||||
VWR-29228
|
||||
MAINT-1392
|
||||
MAINT-873
|
||||
SUN-72
|
||||
BUG-2432
|
||||
|
|
@ -1255,6 +1263,7 @@ Sovereign Engineer
|
|||
OPEN-195
|
||||
OPEN-217
|
||||
OPEN-295
|
||||
MAINT-6107
|
||||
STORM-2107
|
||||
SpacedOut Frye
|
||||
VWR-34
|
||||
|
|
|
|||
|
|
@ -36,10 +36,18 @@ StringVec sv(const StringVec& listof) { return listof; }
|
|||
|
||||
#if defined(LL_WINDOWS)
|
||||
#define sleep(secs) _sleep((secs) * 1000)
|
||||
#endif
|
||||
|
||||
// WOLF-300: It appears that driving a megabyte of data through an LLLeap pipe
|
||||
// causes Windows abdominal pain such that it later fails code-signing in some
|
||||
// mysterious way. Entirely suppressing these LLLeap tests pushes the failure
|
||||
// rate MUCH lower. Can we re-enable them with a smaller data size on Windows?
|
||||
const size_t BUFFERED_LENGTH = 100*1024;
|
||||
|
||||
#else // not Windows
|
||||
const size_t BUFFERED_LENGTH = 1023*1024; // try wrangling just under a megabyte of data
|
||||
|
||||
#endif
|
||||
|
||||
void waitfor(const std::vector<LLLeap*>& instances, int timeout=60)
|
||||
{
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -157,29 +157,50 @@ void LLAssetInfo::setFromNameValue( const LLNameValue& nv )
|
|||
LL_DEBUGS("AssetStorage") << "creator: " << mCreatorID << LL_ENDL;
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// LLBaseDownloadRequest
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLBaseDownloadRequest::LLBaseDownloadRequest(const LLUUID &uuid, const LLAssetType::EType type)
|
||||
: mUUID(uuid),
|
||||
mType(type),
|
||||
mDownCallback(NULL),
|
||||
mUserData(NULL),
|
||||
mHost(),
|
||||
mIsTemp(FALSE),
|
||||
mIsPriority(FALSE),
|
||||
mDataSentInFirstPacket(FALSE),
|
||||
mDataIsInVFS(FALSE)
|
||||
{
|
||||
// Need to guarantee that this time is up to date, we may be creating a circuit even though we haven't been
|
||||
// running a message system loop.
|
||||
mTime = LLMessageSystem::getMessageTimeSeconds(TRUE);
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLBaseDownloadRequest::~LLBaseDownloadRequest()
|
||||
{
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLBaseDownloadRequest* LLBaseDownloadRequest::getCopy()
|
||||
{
|
||||
return new LLBaseDownloadRequest(*this);
|
||||
}
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// LLAssetRequest
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLAssetRequest::LLAssetRequest(const LLUUID &uuid, const LLAssetType::EType type)
|
||||
: mUUID(uuid),
|
||||
mType(type),
|
||||
mDownCallback( NULL ),
|
||||
: LLBaseDownloadRequest(uuid, type),
|
||||
mUpCallback( NULL ),
|
||||
mInfoCallback( NULL ),
|
||||
mUserData( NULL ),
|
||||
mHost(),
|
||||
mIsTemp( FALSE ),
|
||||
mIsLocal(FALSE),
|
||||
mIsUserWaiting(FALSE),
|
||||
mTimeout(LL_ASSET_STORAGE_TIMEOUT),
|
||||
mIsPriority(FALSE),
|
||||
mDataSentInFirstPacket(FALSE),
|
||||
mDataIsInVFS( FALSE )
|
||||
mTimeout(LL_ASSET_STORAGE_TIMEOUT)
|
||||
{
|
||||
// Need to guarantee that this time is up to date, we may be creating a circuit even though we haven't been
|
||||
// running a message system loop.
|
||||
mTime = LLMessageSystem::getMessageTimeSeconds(TRUE);
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -217,56 +238,51 @@ LLSD LLAssetRequest::getFullDetails() const
|
|||
return sd;
|
||||
}
|
||||
|
||||
LLBaseDownloadRequest* LLAssetRequest::getCopy()
|
||||
{
|
||||
return new LLAssetRequest(*this);
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// LLInvItemRequest
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLInvItemRequest::LLInvItemRequest(const LLUUID &uuid, const LLAssetType::EType type)
|
||||
: mUUID(uuid),
|
||||
mType(type),
|
||||
mDownCallback( NULL ),
|
||||
mUserData( NULL ),
|
||||
mHost(),
|
||||
mIsTemp( FALSE ),
|
||||
mIsPriority(FALSE),
|
||||
mDataSentInFirstPacket(FALSE),
|
||||
mDataIsInVFS( FALSE )
|
||||
: LLBaseDownloadRequest(uuid, type)
|
||||
{
|
||||
// Need to guarantee that this time is up to date, we may be creating a circuit even though we haven't been
|
||||
// running a message system loop.
|
||||
mTime = LLMessageSystem::getMessageTimeSeconds(TRUE);
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLInvItemRequest::~LLInvItemRequest()
|
||||
{
|
||||
}
|
||||
|
||||
LLBaseDownloadRequest* LLInvItemRequest::getCopy()
|
||||
{
|
||||
return new LLInvItemRequest(*this);
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// LLEstateAssetRequest
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLEstateAssetRequest::LLEstateAssetRequest(const LLUUID &uuid, const LLAssetType::EType atype,
|
||||
EstateAssetType etype)
|
||||
: mUUID(uuid),
|
||||
mAType(atype),
|
||||
mEstateAssetType(etype),
|
||||
mDownCallback( NULL ),
|
||||
mUserData( NULL ),
|
||||
mHost(),
|
||||
mIsTemp( FALSE ),
|
||||
mIsPriority(FALSE),
|
||||
mDataSentInFirstPacket(FALSE),
|
||||
mDataIsInVFS( FALSE )
|
||||
: LLBaseDownloadRequest(uuid, atype),
|
||||
mEstateAssetType(etype)
|
||||
{
|
||||
// Need to guarantee that this time is up to date, we may be creating a circuit even though we haven't been
|
||||
// running a message system loop.
|
||||
mTime = LLMessageSystem::getMessageTimeSeconds(TRUE);
|
||||
}
|
||||
|
||||
// Virtual
|
||||
LLEstateAssetRequest::~LLEstateAssetRequest()
|
||||
{
|
||||
}
|
||||
|
||||
LLBaseDownloadRequest* LLEstateAssetRequest::getCopy()
|
||||
{
|
||||
return new LLEstateAssetRequest(*this);
|
||||
}
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// LLAssetStorage
|
||||
|
|
@ -565,7 +581,7 @@ void LLAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType at
|
|||
// Set our destination file, and the completion callback.
|
||||
LLTransferTargetParamsVFile tpvf;
|
||||
tpvf.setAsset(uuid, atype);
|
||||
tpvf.setCallback(downloadCompleteCallback, req);
|
||||
tpvf.setCallback(downloadCompleteCallback, *req);
|
||||
|
||||
//LL_INFOS() << "Starting transfer for " << uuid << LL_ENDL;
|
||||
LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(mUpstreamHost, LLTCT_ASSET);
|
||||
|
|
@ -589,7 +605,7 @@ void LLAssetStorage::downloadCompleteCallback(
|
|||
S32 result,
|
||||
const LLUUID& file_id,
|
||||
LLAssetType::EType file_type,
|
||||
void* user_data, LLExtStat ext_status)
|
||||
LLBaseDownloadRequest* user_data, LLExtStat ext_status)
|
||||
{
|
||||
LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << file_id << " downloadCompleteCallback" << LL_ENDL;
|
||||
|
||||
|
|
@ -608,36 +624,40 @@ void LLAssetStorage::downloadCompleteCallback(
|
|||
return;
|
||||
}
|
||||
|
||||
LLUUID callback_id;
|
||||
LLAssetType::EType callback_type;
|
||||
|
||||
// Inefficient since we're doing a find through a list that may have thousands of elements.
|
||||
// This is due for refactoring; we will probably change mPendingDownloads into a set.
|
||||
request_list_t::iterator download_iter = std::find(gAssetStorage->mPendingDownloads.begin(),
|
||||
gAssetStorage->mPendingDownloads.end(),
|
||||
req);
|
||||
// If the LLAssetRequest doesn't exist in the downloads queue, then it either has already been deleted
|
||||
// by _cleanupRequests, or it's a transfer.
|
||||
|
||||
if (download_iter != gAssetStorage->mPendingDownloads.end())
|
||||
{
|
||||
req->setUUID(file_id);
|
||||
req->setType(file_type);
|
||||
callback_id = file_id;
|
||||
callback_type = file_type;
|
||||
}
|
||||
else
|
||||
{
|
||||
// either has already been deleted by _cleanupRequests or it's a transfer.
|
||||
callback_id = req->getUUID();
|
||||
callback_type = req->getType();
|
||||
}
|
||||
|
||||
if (LL_ERR_NOERR == result)
|
||||
{
|
||||
// we might have gotten a zero-size file
|
||||
LLVFile vfile(gAssetStorage->mVFS, req->getUUID(), req->getType());
|
||||
LLVFile vfile(gAssetStorage->mVFS, callback_id, callback_type);
|
||||
if (vfile.getSize() <= 0)
|
||||
{
|
||||
LL_WARNS() << "downloadCompleteCallback has non-existent or zero-size asset " << req->getUUID() << LL_ENDL;
|
||||
LL_WARNS() << "downloadCompleteCallback has non-existent or zero-size asset " << callback_id << LL_ENDL;
|
||||
|
||||
result = LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE;
|
||||
vfile.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// we will be deleting elements of mPendingDownloads which req might be part of, save id and type for reference
|
||||
LLUUID callback_id = req->getUUID();
|
||||
LLAssetType::EType callback_type = req->getType();
|
||||
|
||||
// find and callback ALL pending requests for this UUID
|
||||
// SJB: We process the callbacks in reverse order, I do not know if this is important,
|
||||
// but I didn't want to mess with it.
|
||||
|
|
@ -731,10 +751,10 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen
|
|||
if (source_host.isOk())
|
||||
{
|
||||
// stash the callback info so we can find it after we get the response message
|
||||
LLEstateAssetRequest *req = new LLEstateAssetRequest(asset_id, atype, etype);
|
||||
req->mDownCallback = callback;
|
||||
req->mUserData = user_data;
|
||||
req->mIsPriority = is_priority;
|
||||
LLEstateAssetRequest req(asset_id, atype, etype);
|
||||
req.mDownCallback = callback;
|
||||
req.mUserData = user_data;
|
||||
req.mIsPriority = is_priority;
|
||||
|
||||
// send request message to our upstream data provider
|
||||
// Create a new asset transfer.
|
||||
|
|
@ -768,7 +788,7 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback(
|
|||
S32 result,
|
||||
const LLUUID& file_id,
|
||||
LLAssetType::EType file_type,
|
||||
void* user_data,
|
||||
LLBaseDownloadRequest* user_data,
|
||||
LLExtStat ext_status)
|
||||
{
|
||||
LLEstateAssetRequest *req = (LLEstateAssetRequest*)user_data;
|
||||
|
|
@ -875,10 +895,10 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age
|
|||
if (source_host.isOk())
|
||||
{
|
||||
// stash the callback info so we can find it after we get the response message
|
||||
LLInvItemRequest *req = new LLInvItemRequest(asset_id, atype);
|
||||
req->mDownCallback = callback;
|
||||
req->mUserData = user_data;
|
||||
req->mIsPriority = is_priority;
|
||||
LLInvItemRequest req(asset_id, atype);
|
||||
req.mDownCallback = callback;
|
||||
req.mUserData = user_data;
|
||||
req.mIsPriority = is_priority;
|
||||
|
||||
// send request message to our upstream data provider
|
||||
// Create a new asset transfer.
|
||||
|
|
@ -916,7 +936,7 @@ void LLAssetStorage::downloadInvItemCompleteCallback(
|
|||
S32 result,
|
||||
const LLUUID& file_id,
|
||||
LLAssetType::EType file_type,
|
||||
void* user_data,
|
||||
LLBaseDownloadRequest* user_data,
|
||||
LLExtStat ext_status)
|
||||
{
|
||||
LLInvItemRequest *req = (LLInvItemRequest*)user_data;
|
||||
|
|
|
|||
|
|
@ -92,38 +92,52 @@ public:
|
|||
};
|
||||
|
||||
|
||||
class LLAssetRequest
|
||||
class LLBaseDownloadRequest
|
||||
{
|
||||
public:
|
||||
LLAssetRequest(const LLUUID &uuid, const LLAssetType::EType at);
|
||||
virtual ~LLAssetRequest();
|
||||
|
||||
LLUUID getUUID() const { return mUUID; }
|
||||
LLAssetType::EType getType() const { return mType; }
|
||||
LLBaseDownloadRequest(const LLUUID &uuid, const LLAssetType::EType at);
|
||||
virtual ~LLBaseDownloadRequest();
|
||||
|
||||
void setUUID(const LLUUID& id) { mUUID = id; }
|
||||
void setType(LLAssetType::EType type) { mType = type; }
|
||||
void setTimeout (F64Seconds timeout) { mTimeout = timeout; }
|
||||
LLUUID getUUID() const { return mUUID; }
|
||||
LLAssetType::EType getType() const { return mType; }
|
||||
|
||||
void setUUID(const LLUUID& id) { mUUID = id; }
|
||||
void setType(LLAssetType::EType type) { mType = type; }
|
||||
|
||||
virtual LLBaseDownloadRequest* getCopy();
|
||||
|
||||
protected:
|
||||
LLUUID mUUID;
|
||||
LLAssetType::EType mType;
|
||||
LLUUID mUUID;
|
||||
LLAssetType::EType mType;
|
||||
|
||||
public:
|
||||
void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
|
||||
void(*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
|
||||
|
||||
void *mUserData;
|
||||
LLHost mHost;
|
||||
BOOL mIsTemp;
|
||||
F64Seconds mTime; // Message system time
|
||||
BOOL mIsPriority;
|
||||
BOOL mDataSentInFirstPacket;
|
||||
BOOL mDataIsInVFS;
|
||||
};
|
||||
|
||||
class LLAssetRequest : public LLBaseDownloadRequest
|
||||
{
|
||||
public:
|
||||
LLAssetRequest(const LLUUID &uuid, const LLAssetType::EType at);
|
||||
virtual ~LLAssetRequest();
|
||||
|
||||
void setTimeout(F64Seconds timeout) { mTimeout = timeout; }
|
||||
|
||||
virtual LLBaseDownloadRequest* getCopy();
|
||||
|
||||
void (*mUpCallback)(const LLUUID&, void *, S32, LLExtStat);
|
||||
void (*mInfoCallback)(LLAssetInfo *, void *, S32);
|
||||
|
||||
void *mUserData;
|
||||
LLHost mHost;
|
||||
BOOL mIsTemp;
|
||||
BOOL mIsLocal;
|
||||
BOOL mIsUserWaiting; // We don't want to try forever if a user is waiting for a result.
|
||||
F64Seconds mTime; // Message system time
|
||||
F64Seconds mTimeout; // Amount of time before timing out.
|
||||
BOOL mIsPriority;
|
||||
BOOL mDataSentInFirstPacket;
|
||||
BOOL mDataIsInVFS;
|
||||
LLUUID mRequestingAgentID; // Only valid for uploads from an agent
|
||||
|
||||
virtual LLSD getTerseDetails() const;
|
||||
|
|
@ -141,63 +155,27 @@ struct ll_asset_request_equal : public std::equal_to<T>
|
|||
};
|
||||
|
||||
|
||||
class LLInvItemRequest
|
||||
class LLInvItemRequest : public LLBaseDownloadRequest
|
||||
{
|
||||
public:
|
||||
LLInvItemRequest(const LLUUID &uuid, const LLAssetType::EType at);
|
||||
virtual ~LLInvItemRequest();
|
||||
|
||||
LLUUID getUUID() const { return mUUID; }
|
||||
LLAssetType::EType getType() const { return mType; }
|
||||
|
||||
void setUUID(const LLUUID& id) { mUUID = id; }
|
||||
void setType(LLAssetType::EType type) { mType = type; }
|
||||
|
||||
protected:
|
||||
LLUUID mUUID;
|
||||
LLAssetType::EType mType;
|
||||
|
||||
public:
|
||||
void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
|
||||
|
||||
void *mUserData;
|
||||
LLHost mHost;
|
||||
BOOL mIsTemp;
|
||||
F64Seconds mTime; // Message system time
|
||||
BOOL mIsPriority;
|
||||
BOOL mDataSentInFirstPacket;
|
||||
BOOL mDataIsInVFS;
|
||||
LLInvItemRequest(const LLUUID &uuid, const LLAssetType::EType at);
|
||||
virtual ~LLInvItemRequest();
|
||||
|
||||
virtual LLBaseDownloadRequest* getCopy();
|
||||
};
|
||||
|
||||
class LLEstateAssetRequest
|
||||
class LLEstateAssetRequest : public LLBaseDownloadRequest
|
||||
{
|
||||
public:
|
||||
LLEstateAssetRequest(const LLUUID &uuid, const LLAssetType::EType at, EstateAssetType et);
|
||||
virtual ~LLEstateAssetRequest();
|
||||
LLEstateAssetRequest(const LLUUID &uuid, const LLAssetType::EType at, EstateAssetType et);
|
||||
virtual ~LLEstateAssetRequest();
|
||||
|
||||
LLUUID getUUID() const { return mUUID; }
|
||||
LLAssetType::EType getAType() const { return mAType; }
|
||||
LLAssetType::EType getAType() const { return mType; }
|
||||
|
||||
void setUUID(const LLUUID& id) { mUUID = id; }
|
||||
void setType(LLAssetType::EType type) { mAType = type; }
|
||||
virtual LLBaseDownloadRequest* getCopy();
|
||||
|
||||
protected:
|
||||
LLUUID mUUID;
|
||||
LLAssetType::EType mAType;
|
||||
EstateAssetType mEstateAssetType;
|
||||
|
||||
public:
|
||||
void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
|
||||
|
||||
void *mUserData;
|
||||
LLHost mHost;
|
||||
BOOL mIsTemp;
|
||||
F64Seconds mTime; // Message system time
|
||||
BOOL mIsPriority;
|
||||
BOOL mDataSentInFirstPacket;
|
||||
BOOL mDataIsInVFS;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -369,17 +347,17 @@ public:
|
|||
S32 result,
|
||||
const LLUUID& file_id,
|
||||
LLAssetType::EType file_type,
|
||||
void* user_data, LLExtStat ext_status);
|
||||
LLBaseDownloadRequest* user_data, LLExtStat ext_status);
|
||||
static void downloadEstateAssetCompleteCallback(
|
||||
S32 result,
|
||||
const LLUUID& file_id,
|
||||
LLAssetType::EType file_type,
|
||||
void* user_data, LLExtStat ext_status);
|
||||
LLBaseDownloadRequest* user_data, LLExtStat ext_status);
|
||||
static void downloadInvItemCompleteCallback(
|
||||
S32 result,
|
||||
const LLUUID& file_id,
|
||||
LLAssetType::EType file_type,
|
||||
void* user_data, LLExtStat ext_status);
|
||||
LLBaseDownloadRequest* user_data, LLExtStat ext_status);
|
||||
|
||||
// upload process callbacks
|
||||
static void uploadCompleteCallback(const LLUUID&, void *user_data, S32 result, LLExtStat ext_status);
|
||||
|
|
|
|||
|
|
@ -938,22 +938,22 @@ void LLHTTPAssetStorage::checkForTimeouts()
|
|||
long curl_result = 0;
|
||||
S32 xfer_result = LL_ERR_NOERR;
|
||||
|
||||
LLHTTPAssetRequest *req = NULL;
|
||||
curl_easy_getinfo(curl_msg->easy_handle, CURLINFO_PRIVATE, &req);
|
||||
LLHTTPAssetRequest *http_req = NULL;
|
||||
curl_easy_getinfo(curl_msg->easy_handle, CURLINFO_PRIVATE, &http_req);
|
||||
|
||||
// TODO: Throw curl_result at all callbacks.
|
||||
curl_easy_getinfo(curl_msg->easy_handle, CURLINFO_HTTP_CODE, &curl_result);
|
||||
if (RT_UPLOAD == req->mRequestType || RT_LOCALUPLOAD == req->mRequestType)
|
||||
if (RT_UPLOAD == http_req->mRequestType || RT_LOCALUPLOAD == http_req->mRequestType)
|
||||
{
|
||||
if (curl_msg->data.result == CURLE_OK &&
|
||||
( curl_result == HTTP_OK
|
||||
|| curl_result == HTTP_CREATED
|
||||
|| curl_result == HTTP_NO_CONTENT))
|
||||
{
|
||||
LL_INFOS() << "Success uploading " << req->getUUID() << " to " << req->mURLBuffer << LL_ENDL;
|
||||
if (RT_LOCALUPLOAD == req->mRequestType)
|
||||
LL_INFOS() << "Success uploading " << http_req->getUUID() << " to " << http_req->mURLBuffer << LL_ENDL;
|
||||
if (RT_LOCALUPLOAD == http_req->mRequestType)
|
||||
{
|
||||
addTempAssetData(req->getUUID(), req->mRequestingAgentID, mHostName);
|
||||
addTempAssetData(http_req->getUUID(), http_req->mRequestingAgentID, mHostName);
|
||||
}
|
||||
}
|
||||
else if (curl_msg->data.result == CURLE_COULDNT_CONNECT ||
|
||||
|
|
@ -961,18 +961,18 @@ void LLHTTPAssetStorage::checkForTimeouts()
|
|||
curl_result == HTTP_BAD_GATEWAY ||
|
||||
curl_result == HTTP_SERVICE_UNAVAILABLE)
|
||||
{
|
||||
LL_WARNS() << "Re-requesting upload for " << req->getUUID() << ". Received upload error to " << req->mURLBuffer <<
|
||||
LL_WARNS() << "Re-requesting upload for " << http_req->getUUID() << ". Received upload error to " << http_req->mURLBuffer <<
|
||||
" with result " << curl_easy_strerror(curl_msg->data.result) << ", http result " << curl_result << LL_ENDL;
|
||||
|
||||
////HACK (probably) I am sick of this getting requeued and driving me mad.
|
||||
//if (req->mIsUserWaiting)
|
||||
//if (http_req->mIsUserWaiting)
|
||||
//{
|
||||
// deletePendingRequest(RT_UPLOAD, req->getType(), req->getUUID());
|
||||
// deletePendingRequest(RT_UPLOAD, http_req->getType(), http_req->getUUID());
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS() << "Failure uploading " << req->getUUID() << " to " << req->mURLBuffer <<
|
||||
LL_WARNS() << "Failure uploading " << http_req->getUUID() << " to " << http_req->mURLBuffer <<
|
||||
" with result " << curl_easy_strerror(curl_msg->data.result) << ", http result " << curl_result << LL_ENDL;
|
||||
|
||||
xfer_result = LL_ERR_ASSET_REQUEST_FAILED;
|
||||
|
|
@ -985,39 +985,39 @@ void LLHTTPAssetStorage::checkForTimeouts()
|
|||
{
|
||||
// shared upload finished callback
|
||||
// in the base class, this is called from processUploadComplete
|
||||
_callUploadCallbacks(req->getUUID(), req->getType(), (xfer_result == 0), LL_EXSTAT_CURL_RESULT | curl_result);
|
||||
_callUploadCallbacks(http_req->getUUID(), http_req->getType(), (xfer_result == 0), LL_EXSTAT_CURL_RESULT | curl_result);
|
||||
// Pending upload flag will get cleared when the request is deleted
|
||||
}
|
||||
}
|
||||
else if (RT_DOWNLOAD == req->mRequestType)
|
||||
else if (RT_DOWNLOAD == http_req->mRequestType)
|
||||
{
|
||||
if (curl_result == HTTP_OK && curl_msg->data.result == CURLE_OK)
|
||||
{
|
||||
if (req->mVFile && req->mVFile->getSize() > 0)
|
||||
if (http_req->mVFile && http_req->mVFile->getSize() > 0)
|
||||
{
|
||||
LL_INFOS() << "Success downloading " << req->mURLBuffer << ", size " << req->mVFile->getSize() << LL_ENDL;
|
||||
LL_INFOS() << "Success downloading " << http_req->mURLBuffer << ", size " << http_req->mVFile->getSize() << LL_ENDL;
|
||||
|
||||
req->mVFile->rename(req->getUUID(), req->getType());
|
||||
http_req->mVFile->rename(http_req->getUUID(), http_req->getType());
|
||||
}
|
||||
else
|
||||
{
|
||||
// *TODO: if this actually indicates a bad asset on the server
|
||||
// (not certain at this point), then delete it
|
||||
LL_WARNS() << "Found " << req->mURLBuffer << " to be zero size" << LL_ENDL;
|
||||
LL_WARNS() << "Found " << http_req->mURLBuffer << " to be zero size" << LL_ENDL;
|
||||
xfer_result = LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// KLW - TAT See if an avatar owns this texture, and if so request re-upload.
|
||||
LL_WARNS() << "Failure downloading " << req->mURLBuffer <<
|
||||
LL_WARNS() << "Failure downloading " << http_req->mURLBuffer <<
|
||||
" with result " << curl_easy_strerror(curl_msg->data.result) << ", http result " << curl_result << LL_ENDL;
|
||||
|
||||
xfer_result = (curl_result == HTTP_NOT_FOUND) ? LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE : LL_ERR_ASSET_REQUEST_FAILED;
|
||||
|
||||
if (req->mVFile)
|
||||
if (http_req->mVFile)
|
||||
{
|
||||
req->mVFile->remove();
|
||||
http_req->mVFile->remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1025,9 +1025,9 @@ void LLHTTPAssetStorage::checkForTimeouts()
|
|||
// this will cleanup all requests for this asset, including ours
|
||||
downloadCompleteCallback(
|
||||
xfer_result,
|
||||
req->getUUID(),
|
||||
req->getType(),
|
||||
(void *)req,
|
||||
http_req->getUUID(),
|
||||
http_req->getType(),
|
||||
http_req,
|
||||
LL_EXSTAT_CURL_RESULT | curl_result);
|
||||
// Pending download flag will get cleared when the request is deleted
|
||||
}
|
||||
|
|
@ -1038,8 +1038,8 @@ void LLHTTPAssetStorage::checkForTimeouts()
|
|||
}
|
||||
|
||||
// Deleting clears the pending upload/download flag if it's set and the request is transferring
|
||||
delete req;
|
||||
req = NULL;
|
||||
delete http_req;
|
||||
http_req = NULL;
|
||||
}
|
||||
|
||||
} while (curl_msg && queue_length > 0);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ LLTransferTargetParamsVFile::LLTransferTargetParamsVFile() :
|
|||
LLTransferTargetParams(LLTTT_VFILE),
|
||||
mAssetType(LLAssetType::AT_NONE),
|
||||
mCompleteCallback(NULL),
|
||||
mUserDatap(NULL),
|
||||
mRequestDatap(NULL),
|
||||
mErrCode(0)
|
||||
{
|
||||
}
|
||||
|
|
@ -55,10 +55,14 @@ void LLTransferTargetParamsVFile::setAsset(
|
|||
mAssetType = asset_type;
|
||||
}
|
||||
|
||||
void LLTransferTargetParamsVFile::setCallback(LLTTVFCompleteCallback cb, void *user_data)
|
||||
void LLTransferTargetParamsVFile::setCallback(LLTTVFCompleteCallback cb, LLBaseDownloadRequest& request)
|
||||
{
|
||||
mCompleteCallback = cb;
|
||||
mUserDatap = user_data;
|
||||
if (mRequestDatap)
|
||||
{
|
||||
delete mRequestDatap;
|
||||
}
|
||||
mRequestDatap = request.getCopy();
|
||||
}
|
||||
|
||||
bool LLTransferTargetParamsVFile::unpackParams(LLDataPacker& dp)
|
||||
|
|
@ -98,6 +102,12 @@ LLTransferTargetVFile::LLTransferTargetVFile(
|
|||
|
||||
LLTransferTargetVFile::~LLTransferTargetVFile()
|
||||
{
|
||||
if (mParams.mRequestDatap)
|
||||
{
|
||||
// TODO: Consider doing it in LLTransferTargetParamsVFile's destructor
|
||||
delete mParams.mRequestDatap;
|
||||
mParams.mRequestDatap = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -208,12 +218,18 @@ void LLTransferTargetVFile::completionCallback(const LLTSCode status)
|
|||
err_code = LL_ERR_ASSET_REQUEST_FAILED;
|
||||
break;
|
||||
}
|
||||
if (mParams.mCompleteCallback)
|
||||
{
|
||||
mParams.mCompleteCallback(err_code,
|
||||
mParams.getAssetID(),
|
||||
mParams.getAssetType(),
|
||||
mParams.mUserDatap,
|
||||
LL_EXSTAT_NONE);
|
||||
}
|
||||
|
||||
if (mParams.mRequestDatap)
|
||||
{
|
||||
if (mParams.mCompleteCallback)
|
||||
{
|
||||
mParams.mCompleteCallback(err_code,
|
||||
mParams.getAssetID(),
|
||||
mParams.getAssetType(),
|
||||
mParams.mRequestDatap,
|
||||
LL_EXSTAT_NONE);
|
||||
}
|
||||
delete mParams.mRequestDatap;
|
||||
mParams.mRequestDatap = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ typedef void (*LLTTVFCompleteCallback)(
|
|||
S32 status,
|
||||
const LLUUID& file_id,
|
||||
LLAssetType::EType file_type,
|
||||
void* user_data, LLExtStat ext_status );
|
||||
LLBaseDownloadRequest* user_data, LLExtStat ext_status );
|
||||
|
||||
class LLTransferTargetParamsVFile : public LLTransferTargetParams
|
||||
{
|
||||
|
|
@ -47,7 +47,7 @@ public:
|
|||
LLTransferTargetParamsVFile();
|
||||
|
||||
void setAsset(const LLUUID& asset_id, LLAssetType::EType asset_type);
|
||||
void setCallback(LLTTVFCompleteCallback cb, void* user_data);
|
||||
void setCallback(LLTTVFCompleteCallback cb, LLBaseDownloadRequest& request);
|
||||
|
||||
LLUUID getAssetID() const { return mAssetID; }
|
||||
LLAssetType::EType getAssetType() const { return mAssetType; }
|
||||
|
|
@ -60,7 +60,7 @@ protected:
|
|||
LLAssetType::EType mAssetType;
|
||||
|
||||
LLTTVFCompleteCallback mCompleteCallback;
|
||||
void* mUserDatap;
|
||||
LLBaseDownloadRequest* mRequestDatap;
|
||||
S32 mErrCode;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,9 @@
|
|||
#include "glh/glh_linear.h"
|
||||
#include "llmatrix4a.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
|
||||
// <FS:ND> Logging for error and warning messages from colladadom
|
||||
#include "dae/daeErrorHandler.h"
|
||||
|
||||
|
|
@ -845,7 +848,8 @@ LLDAELoader::LLDAELoader(
|
|||
void* opaque_userdata,
|
||||
JointTransformMap& jointMap,
|
||||
JointSet& jointsFromNodes,
|
||||
U32 modelLimit)
|
||||
U32 modelLimit,
|
||||
bool preprocess)
|
||||
: LLModelLoader(
|
||||
filename,
|
||||
lod,
|
||||
|
|
@ -857,7 +861,7 @@ LLDAELoader::LLDAELoader(
|
|||
jointMap,
|
||||
jointsFromNodes),
|
||||
mGeneratedModelLimit(modelLimit),
|
||||
mForceIdNaming(false)
|
||||
mPreprocessDAE(preprocess)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -890,10 +894,20 @@ bool LLDAELoader::OpenFile(const std::string& filename)
|
|||
|
||||
//no suitable slm exists, load from the .dae file
|
||||
DAE dae;
|
||||
// <FS:Ansariel> Bug fixes in mesh importer by Drake Arconis
|
||||
//domCOLLADA* dom = dae.open(filename);
|
||||
domCOLLADA* dom = dae.open(tmp_file);
|
||||
// </FS:Ansariel>
|
||||
domCOLLADA* dom;
|
||||
if (mPreprocessDAE)
|
||||
{
|
||||
// <FS:Ansariel> Bug fixes in mesh importer by Drake Arconis
|
||||
//dom = dae.openFromMemory(filename, preprocessDAE(filename).c_str());
|
||||
dom = dae.openFromMemory(tmp_file, preprocessDAE(filename).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS() << "Skipping dae preprocessing" << LL_ENDL;
|
||||
// <FS:Ansariel> Bug fixes in mesh importer by Drake Arconis
|
||||
//dom = dae.open(filename);
|
||||
dom = dae.open(tmp_file);
|
||||
}
|
||||
|
||||
if (!dom)
|
||||
{
|
||||
|
|
@ -922,9 +936,8 @@ bool LLDAELoader::OpenFile(const std::string& filename)
|
|||
daeInt count = db->getElementCount(NULL, COLLADA_TYPE_MESH);
|
||||
|
||||
// <FS:Ansariel> Bug fixes in mesh importer by Drake Arconis
|
||||
//daeDocument* doc = dae.getDoc(mFilename);
|
||||
//daeDocument* doc = dae.getDoc(filename);
|
||||
daeDocument* doc = dae.getDoc(tmp_file);
|
||||
// </FS:Ansariel>
|
||||
if (!doc)
|
||||
{
|
||||
LL_WARNS() << "can't find internal doc" << LL_ENDL;
|
||||
|
|
@ -995,32 +1008,6 @@ bool LLDAELoader::OpenFile(const std::string& filename)
|
|||
|
||||
mTransform.condition();
|
||||
|
||||
mForceIdNaming = false;
|
||||
std::vector<std::string> checkNames;
|
||||
for (daeInt idx = 0; idx < count; ++idx)
|
||||
{
|
||||
domMesh* mesh = NULL;
|
||||
db->getElement((daeElement**)&mesh, idx, NULL, COLLADA_TYPE_MESH);
|
||||
|
||||
if (mesh)
|
||||
{
|
||||
std::string name = getLodlessLabel(mesh, false);
|
||||
|
||||
std::vector<std::string>::iterator it;
|
||||
it = std::find(checkNames.begin(), checkNames.end(), name);
|
||||
if (it != checkNames.end())
|
||||
{
|
||||
LL_WARNS() << "document has duplicate names, using IDs instead" << LL_ENDL;
|
||||
mForceIdNaming = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
checkNames.push_back(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
U32 submodel_limit = count > 0 ? mGeneratedModelLimit/count : 0;
|
||||
for (daeInt idx = 0; idx < count; ++idx)
|
||||
{ //build map of domEntities to LLModel
|
||||
|
|
@ -1128,6 +1115,41 @@ bool LLDAELoader::OpenFile(const std::string& filename)
|
|||
return true;
|
||||
}
|
||||
|
||||
std::string LLDAELoader::preprocessDAE(std::string filename)
|
||||
{
|
||||
// Open a DAE file for some preprocessing (like removing space characters in IDs), see MAINT-5678
|
||||
std::ifstream inFile;
|
||||
inFile.open(filename.c_str(), std::ios_base::in);
|
||||
std::stringstream strStream;
|
||||
strStream << inFile.rdbuf();
|
||||
std::string buffer = strStream.str();
|
||||
|
||||
LL_INFOS() << "Preprocessing dae file to remove spaces from the names, ids, etc." << LL_ENDL;
|
||||
|
||||
try
|
||||
{
|
||||
boost::regex re("\"[\\w\\.@#$-]*(\\s[\\w\\.@#$-]*)+\"");
|
||||
boost::sregex_iterator next(buffer.begin(), buffer.end(), re);
|
||||
boost::sregex_iterator end;
|
||||
while (next != end)
|
||||
{
|
||||
boost::smatch match = *next;
|
||||
std::string s = match.str();
|
||||
LL_INFOS() << s << " found" << LL_ENDL;
|
||||
boost::replace_all(s, " ", "_");
|
||||
LL_INFOS() << "Replacing with " << s << LL_ENDL;
|
||||
boost::replace_all(buffer, match.str(), s);
|
||||
next++;
|
||||
}
|
||||
}
|
||||
catch (boost::regex_error &)
|
||||
{
|
||||
LL_INFOS() << "Regex error" << LL_ENDL;
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, domMesh* mesh, domSkin* skin)
|
||||
{
|
||||
llassert(model && dae && mesh && skin);
|
||||
|
|
@ -2021,7 +2043,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
|
|||
|
||||
if (model->mLabel.empty())
|
||||
{
|
||||
label = getLodlessLabel(instance_geo, mForceIdNaming);
|
||||
label = getLodlessLabel(instance_geo);
|
||||
|
||||
llassert(!label.empty());
|
||||
|
||||
|
|
@ -2236,17 +2258,12 @@ LLImportMaterial LLDAELoader::profileToMaterial(domProfile_COMMON* material, DAE
|
|||
return mat;
|
||||
}
|
||||
|
||||
std::string LLDAELoader::getElementLabel(daeElement *element)
|
||||
{
|
||||
return getElementLabel(element, mForceIdNaming);
|
||||
}
|
||||
|
||||
// try to get a decent label for this element
|
||||
std::string LLDAELoader::getElementLabel(daeElement *element, bool forceIdNaming)
|
||||
std::string LLDAELoader::getElementLabel(daeElement *element)
|
||||
{
|
||||
// if we have a name attribute, use it
|
||||
std::string name = element->getAttribute("name");
|
||||
if (name.length() && !forceIdNaming)
|
||||
if (name.length())
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
|
@ -2269,7 +2286,7 @@ std::string LLDAELoader::getElementLabel(daeElement *element, bool forceIdNaming
|
|||
|
||||
// if parent has a name or ID, use it
|
||||
std::string name = parent->getAttribute("name");
|
||||
if (!name.length() || forceIdNaming)
|
||||
if (!name.length())
|
||||
{
|
||||
name = std::string(parent->getID());
|
||||
}
|
||||
|
|
@ -2315,9 +2332,9 @@ size_t LLDAELoader::getSuffixPosition(std::string label)
|
|||
}
|
||||
|
||||
// static
|
||||
std::string LLDAELoader::getLodlessLabel(daeElement *element, bool forceIdNaming)
|
||||
std::string LLDAELoader::getLodlessLabel(daeElement *element)
|
||||
{
|
||||
std::string label = getElementLabel(element, forceIdNaming);
|
||||
std::string label = getElementLabel(element);
|
||||
size_t ext_pos = getSuffixPosition(label);
|
||||
if (ext_pos != -1)
|
||||
{
|
||||
|
|
@ -2426,13 +2443,8 @@ bool LLDAELoader::addVolumeFacesFromDomMesh(LLModel* pModel,domMesh* mesh)
|
|||
return (status == LLModel::NO_ERRORS);
|
||||
}
|
||||
|
||||
LLModel* LLDAELoader::loadModelFromDomMesh(domMesh *mesh)
|
||||
{
|
||||
return loadModelFromDomMesh(mesh, mForceIdNaming);
|
||||
}
|
||||
|
||||
//static
|
||||
LLModel* LLDAELoader::loadModelFromDomMesh(domMesh *mesh, bool forceIdNaming)
|
||||
LLModel* LLDAELoader::loadModelFromDomMesh(domMesh *mesh)
|
||||
{
|
||||
LLVolumeParams volume_params;
|
||||
volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE);
|
||||
|
|
@ -2440,7 +2452,7 @@ LLModel* LLDAELoader::loadModelFromDomMesh(domMesh *mesh, bool forceIdNaming)
|
|||
createVolumeFacesFromDomMesh(ret, mesh);
|
||||
if (ret->mLabel.empty())
|
||||
{
|
||||
ret->mLabel = getElementLabel(mesh, forceIdNaming);
|
||||
ret->mLabel = getElementLabel(mesh);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -2458,7 +2470,7 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& mo
|
|||
|
||||
LLModel* ret = new LLModel(volume_params, 0.f);
|
||||
|
||||
std::string model_name = getLodlessLabel(mesh, mForceIdNaming);
|
||||
std::string model_name = getLodlessLabel(mesh);
|
||||
ret->mLabel = model_name + lod_suffix[mLod];
|
||||
|
||||
llassert(!ret->mLabel.empty());
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ public:
|
|||
void* opaque_userdata,
|
||||
JointTransformMap& jointMap,
|
||||
JointSet& jointsFromNodes,
|
||||
U32 modelLimit);
|
||||
U32 modelLimit,
|
||||
bool preprocess);
|
||||
virtual ~LLDAELoader() ;
|
||||
|
||||
virtual bool OpenFile(const std::string& filename);
|
||||
|
|
@ -89,22 +90,22 @@ protected:
|
|||
static bool addVolumeFacesFromDomMesh(LLModel* model, domMesh* mesh);
|
||||
static bool createVolumeFacesFromDomMesh(LLModel* model, domMesh *mesh);
|
||||
|
||||
static LLModel* loadModelFromDomMesh(domMesh* mesh, bool forceIdNaming);
|
||||
LLModel* loadModelFromDomMesh(domMesh* mesh);
|
||||
static LLModel* loadModelFromDomMesh(domMesh* mesh);
|
||||
|
||||
// Loads a mesh breaking it into one or more models as necessary
|
||||
// to get around volume face limitations while retaining >8 materials
|
||||
//
|
||||
bool loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& models_out, U32 submodel_limit);
|
||||
|
||||
static std::string getElementLabel(daeElement *element, bool forceIdNaming);
|
||||
std::string getElementLabel(daeElement *element);
|
||||
static std::string getElementLabel(daeElement *element);
|
||||
static size_t getSuffixPosition(std::string label);
|
||||
static std::string getLodlessLabel(daeElement *element, bool forceIdNaming = false);
|
||||
static std::string getLodlessLabel(daeElement *element);
|
||||
|
||||
static std::string preprocessDAE(std::string filename);
|
||||
|
||||
private:
|
||||
U32 mGeneratedModelLimit; // Attempt to limit amount of generated submodels
|
||||
bool mForceIdNaming;
|
||||
bool mPreprocessDAE;
|
||||
|
||||
};
|
||||
#endif // LL_LLDAELLOADER_H
|
||||
|
|
|
|||
|
|
@ -94,26 +94,33 @@ BOOL LLFontGL::loadFace(const std::string& filename, F32 point_size, F32 vert_dp
|
|||
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_FONTS("Fonts");
|
||||
|
||||
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
|
||||
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
|
||||
ShadowType shadow, S32 max_chars, F32* right_x, BOOL use_ellipses) const
|
||||
{
|
||||
LLRectf rect_float(rect.mLeft, rect.mTop, rect.mRight, rect.mBottom);
|
||||
return render(wstr, begin_offset, rect_float, color, halign, valign, style, shadow, max_chars, right_x, use_ellipses);
|
||||
}
|
||||
|
||||
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRectf& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
|
||||
ShadowType shadow, S32 max_chars, F32* right_x, BOOL use_ellipses) const
|
||||
{
|
||||
F32 x = (F32)rect.mLeft;
|
||||
F32 x = rect.mLeft;
|
||||
F32 y = 0.f;
|
||||
|
||||
switch(valign)
|
||||
{
|
||||
case TOP:
|
||||
y = (F32)rect.mTop;
|
||||
y = rect.mTop;
|
||||
break;
|
||||
case VCENTER:
|
||||
y = (F32)rect.getCenterY();
|
||||
y = rect.getCenterY();
|
||||
break;
|
||||
case BASELINE:
|
||||
case BOTTOM:
|
||||
y = (F32)rect.mBottom;
|
||||
y = rect.mBottom;
|
||||
break;
|
||||
default:
|
||||
y = (F32)rect.mBottom;
|
||||
y = rect.mBottom;
|
||||
break;
|
||||
}
|
||||
return render(wstr, begin_offset, x, y, color, halign, valign, style, shadow, max_chars, rect.getWidth(), right_x, use_ellipses);
|
||||
|
|
@ -357,7 +364,12 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
|
|||
|
||||
if (right_x)
|
||||
{
|
||||
*right_x = (cur_x - origin.mV[VX]) / sScaleX;
|
||||
F32 cr_x = (cur_x - origin.mV[VX]) / sScaleX;
|
||||
if (*right_x < cr_x)
|
||||
{
|
||||
// rightmost edge of previously drawn text, don't draw over previous text
|
||||
*right_x = cr_x;
|
||||
}
|
||||
}
|
||||
|
||||
//FIXME: add underline as glyph?
|
||||
|
|
|
|||
|
|
@ -98,6 +98,15 @@ public:
|
|||
F32* right_x=NULL,
|
||||
BOOL use_ellipses = FALSE) const;
|
||||
|
||||
S32 render(const LLWString &text, S32 begin_offset,
|
||||
const LLRectf& rect,
|
||||
const LLColor4 &color,
|
||||
HAlign halign = LEFT, VAlign valign = BASELINE,
|
||||
U8 style = NORMAL, ShadowType shadow = NO_SHADOW,
|
||||
S32 max_chars = S32_MAX,
|
||||
F32* right_x=NULL,
|
||||
BOOL use_ellipses = FALSE) const;
|
||||
|
||||
S32 render(const LLWString &text, S32 begin_offset,
|
||||
F32 x, F32 y,
|
||||
const LLColor4 &color,
|
||||
|
|
|
|||
|
|
@ -327,6 +327,14 @@ LLGLSLShader::~LLGLSLShader()
|
|||
}
|
||||
|
||||
void LLGLSLShader::unload()
|
||||
{
|
||||
mShaderFiles.clear();
|
||||
mDefines.clear();
|
||||
|
||||
unloadInternal();
|
||||
}
|
||||
|
||||
void LLGLSLShader::unloadInternal()
|
||||
{
|
||||
sInstances.erase(this);
|
||||
|
||||
|
|
@ -334,8 +342,6 @@ void LLGLSLShader::unload()
|
|||
mAttribute.clear();
|
||||
mTexture.clear();
|
||||
mUniform.clear();
|
||||
mShaderFiles.clear();
|
||||
mDefines.clear();
|
||||
|
||||
if (mProgramObject)
|
||||
{
|
||||
|
|
@ -357,13 +363,13 @@ void LLGLSLShader::unload()
|
|||
|
||||
mProgramObject = 0;
|
||||
}
|
||||
|
||||
|
||||
if (mTimerQuery)
|
||||
{
|
||||
glDeleteQueriesARB(1, &mTimerQuery);
|
||||
mTimerQuery = 0;
|
||||
}
|
||||
|
||||
|
||||
if (mSamplesQuery)
|
||||
{
|
||||
glDeleteQueriesARB(1, &mSamplesQuery);
|
||||
|
|
@ -372,7 +378,7 @@ void LLGLSLShader::unload()
|
|||
|
||||
//hack to make apple not complain
|
||||
glGetError();
|
||||
|
||||
|
||||
stop_glerror();
|
||||
}
|
||||
|
||||
|
|
@ -381,6 +387,8 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
|
|||
U32 varying_count,
|
||||
const char** varyings)
|
||||
{
|
||||
unloadInternal();
|
||||
|
||||
sInstances.insert(this);
|
||||
|
||||
//reloading, reset matrix hash values
|
||||
|
|
|
|||
|
|
@ -198,7 +198,9 @@ public:
|
|||
bool mTextureStateFetched;
|
||||
std::vector<U32> mTextureMagFilter;
|
||||
std::vector<U32> mTextureMinFilter;
|
||||
|
||||
|
||||
private:
|
||||
void unloadInternal();
|
||||
};
|
||||
|
||||
//UI shader (declared here so llui_libtest will link properly)
|
||||
|
|
|
|||
|
|
@ -112,7 +112,8 @@ void LLGLTexture::setBoostLevel(S32 level)
|
|||
if(mBoostLevel != level)
|
||||
{
|
||||
mBoostLevel = level ;
|
||||
if(mBoostLevel != LLGLTexture::BOOST_NONE)
|
||||
if(mBoostLevel != LLGLTexture::BOOST_NONE
|
||||
&& mBoostLevel != LLGLTexture::BOOST_ICON)
|
||||
{
|
||||
setNoDelete() ;
|
||||
}
|
||||
|
|
@ -130,13 +131,6 @@ void LLGLTexture::setActive()
|
|||
{
|
||||
mTextureState = ACTIVE ;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Try to plug the profile icon memory hole
|
||||
if (mBoostLevel == BOOST_ICON)
|
||||
{
|
||||
setNoDelete();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
//set the texture to stay in memory
|
||||
|
|
|
|||
|
|
@ -54,7 +54,9 @@ LLIconCtrl::LLIconCtrl(const LLIconCtrl::Params& p)
|
|||
mUseDrawContextAlpha(p.use_draw_context_alpha),
|
||||
mPriority(0),
|
||||
mMinWidth(p.min_width),
|
||||
mMinHeight(p.min_height)
|
||||
mMinHeight(p.min_height),
|
||||
mMaxWidth(0),
|
||||
mMaxHeight(0)
|
||||
{
|
||||
if (mImagep.notNull())
|
||||
{
|
||||
|
|
@ -104,7 +106,15 @@ void LLIconCtrl::setValue(const LLSD& value )
|
|||
&& mMinWidth
|
||||
&& mMinHeight)
|
||||
{
|
||||
mImagep->getImage()->setKnownDrawSize(llmax(mMinWidth, mImagep->getWidth()), llmax(mMinHeight, mImagep->getHeight()));
|
||||
S32 desired_draw_width = llmax(mMinWidth, mImagep->getWidth());
|
||||
S32 desired_draw_height = llmax(mMinHeight, mImagep->getHeight());
|
||||
if (mMaxWidth && mMaxHeight)
|
||||
{
|
||||
desired_draw_width = llmin(desired_draw_width, mMaxWidth);
|
||||
desired_draw_height = llmin(desired_draw_height, mMaxHeight);
|
||||
}
|
||||
|
||||
mImagep->getImage()->setKnownDrawSize(desired_draw_width, desired_draw_height);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,9 @@ protected:
|
|||
|
||||
//the output size of the icon image if set.
|
||||
S32 mMinWidth,
|
||||
mMinHeight;
|
||||
mMinHeight,
|
||||
mMaxWidth,
|
||||
mMaxHeight;
|
||||
|
||||
// If set to true (default), use the draw context transparency.
|
||||
// If false, will use transparency returned by getCurrentTransparency(). See STORM-698.
|
||||
|
|
|
|||
|
|
@ -179,6 +179,18 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (index < -1)
|
||||
{
|
||||
// less then minimum value
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (index < 0 && mSelectedIndex >= 0 && !mAllowDeselect)
|
||||
{
|
||||
// -1 is "nothing selected"
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (mSelectedIndex >= 0)
|
||||
{
|
||||
LLRadioCtrl* old_radio_item = mRadioButtons[mSelectedIndex];
|
||||
|
|
|
|||
|
|
@ -751,7 +751,7 @@ void LLTextBase::drawText()
|
|||
line_end = next_start;
|
||||
}
|
||||
|
||||
LLRect text_rect(line.mRect);
|
||||
LLRectf text_rect(line.mRect.mLeft, line.mRect.mTop, line.mRect.mRight, line.mRect.mBottom);
|
||||
text_rect.mRight = mDocumentView->getRect().getWidth(); // clamp right edge to document extents
|
||||
text_rect.translate(mDocumentView->getRect().mLeft, mDocumentView->getRect().mBottom); // adjust by scroll position
|
||||
|
||||
|
|
@ -824,7 +824,7 @@ void LLTextBase::drawText()
|
|||
++misspell_it;
|
||||
}
|
||||
|
||||
text_rect.mLeft = (S32)(cur_segment->draw(seg_start - cur_segment->getStart(), clipped_end, selection_left, selection_right, text_rect));
|
||||
text_rect.mLeft = cur_segment->draw(seg_start - cur_segment->getStart(), clipped_end, selection_left, selection_right, text_rect);
|
||||
|
||||
seg_start = clipped_end + cur_segment->getStart();
|
||||
}
|
||||
|
|
@ -3314,7 +3314,7 @@ bool LLTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32
|
|||
S32 LLTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const { return 0; }
|
||||
S32 LLTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const { return 0; }
|
||||
void LLTextSegment::updateLayout(const LLTextBase& editor) {}
|
||||
F32 LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect) { return draw_rect.mLeft; }
|
||||
F32 LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect) { return draw_rect.mLeft; }
|
||||
bool LLTextSegment::canEdit() const { return false; }
|
||||
void LLTextSegment::unlinkFromDocument(LLTextBase*) {}
|
||||
void LLTextSegment::linkToDocument(LLTextBase*) {}
|
||||
|
|
@ -3380,7 +3380,7 @@ LLNormalTextSegment::~LLNormalTextSegment()
|
|||
}
|
||||
|
||||
|
||||
F32 LLNormalTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
F32 LLNormalTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
if( end - start > 0 )
|
||||
{
|
||||
|
|
@ -3390,7 +3390,7 @@ F32 LLNormalTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selec
|
|||
}
|
||||
|
||||
// Draws a single text segment, reversing the color for selection if needed.
|
||||
F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 selection_start, S32 selection_end, LLRect rect)
|
||||
F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 selection_start, S32 selection_end, LLRectf rect)
|
||||
{
|
||||
F32 alpha = LLViewDrawContext::getCurrentContext().mAlpha;
|
||||
|
||||
|
|
@ -3422,7 +3422,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
|
|||
&right_x,
|
||||
mEditor.getUseEllipses());
|
||||
}
|
||||
rect.mLeft = (S32)ceil(right_x);
|
||||
rect.mLeft = right_x;
|
||||
|
||||
if( (selection_start < seg_end) && (selection_end > seg_start) )
|
||||
{
|
||||
|
|
@ -3441,7 +3441,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
|
|||
&right_x,
|
||||
mEditor.getUseEllipses());
|
||||
}
|
||||
rect.mLeft = (S32)ceil(right_x);
|
||||
rect.mLeft = right_x;
|
||||
if( selection_end < seg_end )
|
||||
{
|
||||
// Draw normally
|
||||
|
|
@ -3458,7 +3458,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
|
|||
&right_x,
|
||||
mEditor.getUseEllipses());
|
||||
}
|
||||
return right_x;
|
||||
return right_x;
|
||||
}
|
||||
|
||||
BOOL LLNormalTextSegment::handleHover(S32 x, S32 y, MASK mask)
|
||||
|
|
@ -3702,7 +3702,7 @@ LLOnHoverChangeableTextSegment::LLOnHoverChangeableTextSegment( LLStyleConstSP s
|
|||
mNormalStyle(normal_style){}
|
||||
|
||||
/*virtual*/
|
||||
F32 LLOnHoverChangeableTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
F32 LLOnHoverChangeableTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
F32 result = LLNormalTextSegment::draw(start, end, selection_start, selection_end, draw_rect);
|
||||
if (end == mEnd - mStart)
|
||||
|
|
@ -3780,7 +3780,7 @@ void LLInlineViewSegment::updateLayout(const LLTextBase& editor)
|
|||
mView->setOrigin(start_rect.mLeft + mLeftPad, start_rect.mBottom + mBottomPad);
|
||||
}
|
||||
|
||||
F32 LLInlineViewSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
F32 LLInlineViewSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
// return padded width of widget
|
||||
// widget is actually drawn during mDocumentView's draw()
|
||||
|
|
@ -3821,7 +3821,7 @@ S32 LLLineBreakTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
F32 LLLineBreakTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
F32 LLLineBreakTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
return draw_rect.mLeft;
|
||||
}
|
||||
|
|
@ -3887,7 +3887,7 @@ void LLImageTextSegment::setToolTip(const std::string& tooltip)
|
|||
mTooltip = tooltip;
|
||||
}
|
||||
|
||||
F32 LLImageTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
F32 LLImageTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
if ( (start >= 0) && (end <= mEnd - mStart))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public:
|
|||
virtual S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const;
|
||||
virtual S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
|
||||
virtual void updateLayout(const class LLTextBase& editor);
|
||||
virtual F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
|
||||
virtual F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
virtual bool canEdit() const;
|
||||
virtual void unlinkFromDocument(class LLTextBase* editor);
|
||||
virtual void linkToDocument(class LLTextBase* editor);
|
||||
|
|
@ -117,7 +117,7 @@ public:
|
|||
/*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
/*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const;
|
||||
/*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
/*virtual*/ bool canEdit() const { return true; }
|
||||
/*virtual*/ const LLColor4& getColor() const { return mStyle->getColor(); }
|
||||
/*virtual*/ LLStyleConstSP getStyle() const { return mStyle; }
|
||||
|
|
@ -135,7 +135,7 @@ public:
|
|||
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
|
||||
|
||||
protected:
|
||||
F32 drawClippedSegment(S32 seg_start, S32 seg_end, S32 selection_start, S32 selection_end, LLRect rect);
|
||||
F32 drawClippedSegment(S32 seg_start, S32 seg_end, S32 selection_start, S32 selection_end, LLRectf rect);
|
||||
|
||||
virtual const LLWString& getWText() const;
|
||||
virtual const S32 getLength() const;
|
||||
|
|
@ -169,7 +169,7 @@ class LLOnHoverChangeableTextSegment : public LLNormalTextSegment
|
|||
{
|
||||
public:
|
||||
LLOnHoverChangeableTextSegment( LLStyleConstSP style, LLStyleConstSP normal_style, S32 start, S32 end, LLTextBase& editor );
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
|
||||
protected:
|
||||
// Style used for text when mouse pointer is over segment
|
||||
|
|
@ -203,7 +203,7 @@ public:
|
|||
/*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
/*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
|
||||
/*virtual*/ void updateLayout(const class LLTextBase& editor);
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
/*virtual*/ bool canEdit() const { return false; }
|
||||
/*virtual*/ void unlinkFromDocument(class LLTextBase* editor);
|
||||
/*virtual*/ void linkToDocument(class LLTextBase* editor);
|
||||
|
|
@ -226,7 +226,7 @@ public:
|
|||
~LLLineBreakTextSegment();
|
||||
bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
|
||||
F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
|
||||
F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
|
||||
private:
|
||||
S32 mFontHeight;
|
||||
|
|
@ -239,7 +239,7 @@ public:
|
|||
~LLImageTextSegment();
|
||||
bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
|
||||
F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
|
||||
F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
|
||||
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ void setToolTip(const std::string& tooltip);
|
||||
|
|
|
|||
|
|
@ -233,8 +233,8 @@ LLUrlEntryHTTP::LLUrlEntryHTTP()
|
|||
: LLUrlEntryBase()
|
||||
{
|
||||
// <FS:Ansariel> FIRE-1715: Links using FTP protocol are not recognized
|
||||
//mPattern = boost::regex("https?://([-\\w\\.]+)+(:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?\\.[a-z](:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?/?\\S*",
|
||||
mPattern = boost::regex("(https?|ftp)://([-\\w\\.]+)+(:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?\\.[a-z](:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?/?\\S*",
|
||||
//mPattern = boost::regex("https?://([^\\s/?\\.#]+\\.?)+\\.\\w+(:\\d+)?(/\\S*)?",
|
||||
mPattern = boost::regex("(https?|ftp)://([^\\s/?\\.#]+\\.?)+\\.\\w+(:\\d+)?(/\\S*)?",
|
||||
// </FS:Ansariel>
|
||||
boost::regex::perl|boost::regex::icase);
|
||||
mMenuName = "menu_url_http.xml";
|
||||
|
|
|
|||
|
|
@ -232,6 +232,14 @@ namespace tut
|
|||
testRegex("http url with newlines", url,
|
||||
"XX\nhttp://www.secondlife.com/\nXX",
|
||||
"http://www.secondlife.com/");
|
||||
|
||||
testRegex("http url without tld shouldn't be decorated (1)", url,
|
||||
"http://test",
|
||||
"");
|
||||
|
||||
testRegex("http url without tld shouldn't be decorated (2)", url,
|
||||
"http://test .com",
|
||||
"");
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ private:
|
|||
bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password);
|
||||
void onCursorChangedCallback(LLCEFLib::ECursorType type, unsigned int handle);
|
||||
void onFileDownloadCallback(std::string filename);
|
||||
const std::string onFileDialogCallback();
|
||||
|
||||
void postDebugMessage(const std::string& msg);
|
||||
void authResponse(LLPluginMessage &message);
|
||||
|
|
@ -102,6 +103,7 @@ private:
|
|||
bool mCanPaste;
|
||||
std::string mCachePath;
|
||||
std::string mCookiePath;
|
||||
std::string mPickedFile;
|
||||
LLCEFLib* mLLCEFLib;
|
||||
|
||||
VolumeCatcher mVolumeCatcher;
|
||||
|
|
@ -142,6 +144,7 @@ MediaPluginBase(host_send_func, host_user_data)
|
|||
mCanPaste = false;
|
||||
mCachePath = "";
|
||||
mCookiePath = "";
|
||||
mPickedFile = "";
|
||||
mLLCEFLib = new LLCEFLib();
|
||||
|
||||
// <FS:ND> FS specific CEF settings
|
||||
|
|
@ -393,6 +396,20 @@ void MediaPluginCEF::onFileDownloadCallback(const std::string filename)
|
|||
sendMessage(message);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
const std::string MediaPluginCEF::onFileDialogCallback()
|
||||
{
|
||||
mPickedFile.clear();
|
||||
|
||||
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "pick_file");
|
||||
message.setValueBoolean("blocking_request", true);
|
||||
|
||||
sendMessage(message);
|
||||
|
||||
return mPickedFile;
|
||||
}
|
||||
|
||||
void MediaPluginCEF::onCursorChangedCallback(LLCEFLib::ECursorType type, unsigned int handle)
|
||||
{
|
||||
std::string name = "";
|
||||
|
|
@ -533,6 +550,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
mLLCEFLib->setOnNavigateURLCallback(boost::bind(&MediaPluginCEF::onNavigateURLCallback, this, _1, _2));
|
||||
mLLCEFLib->setOnHTTPAuthCallback(boost::bind(&MediaPluginCEF::onHTTPAuthCallback, this, _1, _2, _3, _4));
|
||||
mLLCEFLib->setOnFileDownloadCallback(boost::bind(&MediaPluginCEF::onFileDownloadCallback, this, _1));
|
||||
mLLCEFLib->setOnFileDialogCallback(boost::bind(&MediaPluginCEF::onFileDialogCallback, this));
|
||||
mLLCEFLib->setOnCursorChangedCallback(boost::bind(&MediaPluginCEF::onCursorChangedCallback, this, _1, _2));
|
||||
mLLCEFLib->setOnRequestExitCallback(boost::bind(&MediaPluginCEF::onRequestExitCallback, this));
|
||||
|
||||
|
|
@ -749,6 +767,10 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
{
|
||||
mEnableMediaPluginDebugging = message_in.getValueBoolean("enable");
|
||||
}
|
||||
if (message_name == "pick_file_response")
|
||||
{
|
||||
mPickedFile = message_in.getValue("file");
|
||||
}
|
||||
if (message_name == "auth_response")
|
||||
{
|
||||
authResponse(message_in);
|
||||
|
|
|
|||
|
|
@ -1446,6 +1446,17 @@
|
|||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>768</integer>
|
||||
</map>
|
||||
<key>ImporterPreprocessDAE</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable preprocessing for DAE files to fix some ColladaDOM related problems (like support for space characters within names and ids).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>IMShowTime</key>
|
||||
<map>
|
||||
|
|
@ -10568,6 +10579,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>256</integer>
|
||||
</map>
|
||||
<key>RegionCheckTextureHeights</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Don't allow user to set low heights greater than high</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RememberPassword</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -109,7 +109,18 @@
|
|||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
</map>
|
||||
<key>NavigationBarRatio</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>The ratio between the width of Navigation layout panel and the width of whole Navigation layout stack</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>0.6</real>
|
||||
</map>
|
||||
<key>FSAutorespondMode</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@
|
|||
#include "llviewercontrol.h"
|
||||
#include "llviewernetwork.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llvovolume.h"
|
||||
#include "fsexportperms.h"
|
||||
|
||||
|
|
@ -485,7 +486,7 @@ void ColladaExportFloater::CacheReadResponder::saveTexturesWorker(void* data)
|
|||
}
|
||||
|
||||
LLUUID id = me->mTexturesToSave.begin()->first;
|
||||
LLViewerTexture* imagep = LLViewerTextureManager::findTexture(id);
|
||||
LLViewerTexture* imagep = LLViewerTextureManager::findFetchedTexture(id, TEX_LIST_DISCARD);
|
||||
if (!imagep)
|
||||
{
|
||||
me->mTexturesToSave.erase(id);
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@
|
|||
<file>ヒラギノ角ゴシック W3.ttc</file>
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<!-- <FS:TS> FIRE-17481: Add El Capitan Korean font -->
|
||||
<file>AppleSDGothicNeo.ttc</file>
|
||||
<!-- </FS:TS> FIRE-17481 -->
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
<file>ヒラギノ角ゴシック W3.ttc</file>
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
<file>ヒラギノ角ゴシック W3.ttc</file>
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
<file>ヒラギノ角ゴシック W3.ttc</file>
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
<file>ヒラギノ角ゴシック W3.ttc</file>
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
<file>ヒラギノ角ゴシック W3.ttc</file>
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
<file>ヒラギノ角ゴシック W3.ttc</file>
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
<file>ヒラギノ角ゴシック W3.ttc</file>
|
||||
<file>ヒラギノ角ゴ Pro W3.otf</file>
|
||||
<file>ヒラギノ角ゴ ProN W3.otf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>AppleGothic.dfont</file>
|
||||
<file>AppleGothic.ttf</file>
|
||||
<file>AppleSDGothicNeo-Regular.otf</file>
|
||||
<file>华文细黑.ttf</file>
|
||||
</os>
|
||||
</font>
|
||||
|
|
|
|||
|
|
@ -862,7 +862,8 @@ void FSPanelLogin::onClickConnect(void *)
|
|||
// The start location SLURL has already been sent to LLStartUp::setStartSLURL
|
||||
|
||||
std::string username = sInstance->getChild<LLUICtrl>("username_combo")->getValue().asString();
|
||||
gSavedSettings.setString("UserLoginInfo", credentialName()); // <FS:CR>
|
||||
std::string password = sInstance->getChild<LLUICtrl>("password_edit")->getValue().asString();
|
||||
gSavedSettings.setString("UserLoginInfo", credentialName());
|
||||
|
||||
LLSD blocked = FSData::instance().allowedLogin();
|
||||
if (!blocked.isMap()) //hack for testing for an empty LLSD
|
||||
|
|
@ -870,8 +871,11 @@ void FSPanelLogin::onClickConnect(void *)
|
|||
if(username.empty())
|
||||
{
|
||||
// user must type in something into the username field
|
||||
LLSD args;
|
||||
LLNotificationsUtil::add("MustHaveAccountToLogIn", args);
|
||||
LLNotificationsUtil::add("MustHaveAccountToLogIn");
|
||||
}
|
||||
else if(password.empty())
|
||||
{
|
||||
LLNotificationsUtil::add("MustEnterPasswordToLogIn");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -502,7 +502,7 @@ void FSPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data
|
|||
std::string text;
|
||||
if (flags & (FSData::DEVELOPER | FSData::SUPPORT | FSData::QA | FSData::GATEWAY))
|
||||
{
|
||||
args["[FIRESTORM]"] = "Firestorm";
|
||||
args["[FIRESTORM]"] = LLTrans::getString("APP_NAME");
|
||||
}
|
||||
|
||||
if (flags & FSData::DEVELOPER)
|
||||
|
|
|
|||
|
|
@ -3761,7 +3761,7 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global)
|
|||
}
|
||||
|
||||
BOOL LLAgent::leftButtonGrabbed() const
|
||||
{
|
||||
{
|
||||
const BOOL camera_mouse_look = gAgentCamera.cameraMouselook();
|
||||
return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
|
||||
|| (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0)
|
||||
|
|
@ -3769,6 +3769,13 @@ BOOL LLAgent::leftButtonGrabbed() const
|
|||
|| (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0);
|
||||
}
|
||||
|
||||
BOOL LLAgent::leftButtonBlocked() const
|
||||
{
|
||||
const BOOL camera_mouse_look = gAgentCamera.cameraMouselook();
|
||||
return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0)
|
||||
|| (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0);
|
||||
}
|
||||
|
||||
BOOL LLAgent::rotateGrabbed() const
|
||||
{
|
||||
return (mControlsTakenCount[CONTROL_YAW_POS_INDEX] > 0)
|
||||
|
|
@ -4319,7 +4326,14 @@ BOOL LLAgent::anyControlGrabbed() const
|
|||
|
||||
BOOL LLAgent::isControlGrabbed(S32 control_index) const
|
||||
{
|
||||
return mControlsTakenCount[control_index] > 0;
|
||||
if (gAgent.mControlsTakenCount[control_index] > 0)
|
||||
return TRUE;
|
||||
return gAgent.mControlsTakenPassedOnCount[control_index] > 0;
|
||||
}
|
||||
|
||||
BOOL LLAgent::isControlBlocked(S32 control_index) const
|
||||
{
|
||||
return mControlsTakenCount[control_index] > 0;
|
||||
}
|
||||
|
||||
void LLAgent::forceReleaseControls()
|
||||
|
|
@ -4543,6 +4557,7 @@ void LLAgent::startTeleportRequest()
|
|||
}
|
||||
if (hasPendingTeleportRequest())
|
||||
{
|
||||
mTeleportCanceled.reset();
|
||||
if (!isMaturityPreferenceSyncedWithServer())
|
||||
{
|
||||
gTeleportDisplay = TRUE;
|
||||
|
|
@ -4572,6 +4587,7 @@ void LLAgent::startTeleportRequest()
|
|||
void LLAgent::handleTeleportFinished()
|
||||
{
|
||||
clearTeleportRequest();
|
||||
mTeleportCanceled.reset();
|
||||
if (mIsMaturityRatingChangingDuringTeleport)
|
||||
{
|
||||
// notify user that the maturity preference has been changed
|
||||
|
|
@ -4727,13 +4743,25 @@ void LLAgent::teleportCancel()
|
|||
msg->addUUIDFast(_PREHASH_AgentID, getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
|
||||
sendReliableMessage();
|
||||
}
|
||||
}
|
||||
mTeleportCanceled = mTeleportRequest;
|
||||
}
|
||||
clearTeleportRequest();
|
||||
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
|
||||
gPipeline.resetVertexBuffers();
|
||||
}
|
||||
|
||||
void LLAgent::restoreCanceledTeleportRequest()
|
||||
{
|
||||
if (mTeleportCanceled != NULL)
|
||||
{
|
||||
gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED );
|
||||
mTeleportRequest = mTeleportCanceled;
|
||||
mTeleportCanceled.reset();
|
||||
gTeleportDisplay = TRUE;
|
||||
gTeleportDisplayTimer.reset();
|
||||
}
|
||||
}
|
||||
|
||||
void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -513,7 +513,8 @@ private:
|
|||
// Grab
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
BOOL leftButtonGrabbed() const;
|
||||
BOOL leftButtonGrabbed() const;
|
||||
BOOL leftButtonBlocked() const;
|
||||
BOOL rotateGrabbed() const;
|
||||
BOOL forwardGrabbed() const;
|
||||
BOOL backwardGrabbed() const;
|
||||
|
|
@ -530,8 +531,9 @@ public:
|
|||
BOOL controlFlagsDirty() const;
|
||||
void enableControlFlagReset();
|
||||
void resetControlFlags();
|
||||
BOOL anyControlGrabbed() const; // True iff a script has taken over a control
|
||||
BOOL isControlGrabbed(S32 control_index) const;
|
||||
BOOL anyControlGrabbed() const; // True if a script has taken over any control
|
||||
BOOL isControlGrabbed(S32 control_index) const; // True if a script has taken over a control
|
||||
BOOL isControlBlocked(S32 control_index) const; // Control should be ignored or won't be passed
|
||||
// Send message to simulator to force grabbed controls to be
|
||||
// released, in case of a poorly written script.
|
||||
void forceReleaseControls();
|
||||
|
|
@ -707,6 +709,7 @@ public:
|
|||
void teleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated
|
||||
void teleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
|
||||
void teleportCancel(); // May or may not be allowed by server
|
||||
void restoreCanceledTeleportRequest();
|
||||
bool getTeleportKeepsLookAt() { return mbTeleportKeepsLookAt; } // Whether look-at reset after teleport
|
||||
// <FS:TT> Client LSL Bridge
|
||||
bool teleportBridgeLocal(LLVector3& pos_local); // Teleport using LSL Bridge
|
||||
|
|
@ -736,6 +739,7 @@ private:
|
|||
friend class LLTeleportRequestViaLocationLookAt;
|
||||
|
||||
LLTeleportRequestPtr mTeleportRequest;
|
||||
LLTeleportRequestPtr mTeleportCanceled;
|
||||
boost::signals2::connection mTeleportFinishedSlot;
|
||||
boost::signals2::connection mTeleportFailedSlot;
|
||||
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@ void LLAgentCamera::cameraZoomIn(const F32 fraction)
|
|||
}
|
||||
|
||||
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
|
||||
if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD)
|
||||
if (LLToolMgr::getInstance()->inBuildMode() && selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD)
|
||||
{
|
||||
// just update hud zoom level
|
||||
mHUDTargetZoom /= fraction;
|
||||
|
|
|
|||
|
|
@ -638,13 +638,25 @@ void AISUpdate::parseCategory(const LLSD& category_map)
|
|||
parseDescendentCount(category_id, category_map["_embedded"]);
|
||||
}
|
||||
|
||||
LLPointer<LLViewerInventoryCategory> new_cat(new LLViewerInventoryCategory(category_id));
|
||||
LLPointer<LLViewerInventoryCategory> new_cat;
|
||||
LLViewerInventoryCategory *curr_cat = gInventory.getCategory(category_id);
|
||||
if (curr_cat)
|
||||
{
|
||||
// Default to current values where not provided.
|
||||
new_cat->copyViewerCategory(curr_cat);
|
||||
}
|
||||
new_cat = new LLViewerInventoryCategory(curr_cat);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (category_map.has("agent_id"))
|
||||
{
|
||||
new_cat = new LLViewerInventoryCategory(category_map["agent_id"].asUUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS() << "No owner provided, folder might be assigned wrong owner" << LL_ENDL;
|
||||
new_cat = new LLViewerInventoryCategory(LLUUID::null);
|
||||
}
|
||||
}
|
||||
BOOL rv = new_cat->unpackMessage(category_map);
|
||||
// *NOTE: unpackMessage does not unpack version or descendent count.
|
||||
//if (category_map.has("version"))
|
||||
|
|
|
|||
|
|
@ -745,7 +745,8 @@ namespace action_give_inventory
|
|||
static LLInventoryPanel* get_active_inventory_panel()
|
||||
{
|
||||
LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
|
||||
if (!active_panel)
|
||||
LLFloater* floater_appearance = LLFloaterReg::findInstance("appearance");
|
||||
if (!active_panel || (floater_appearance && floater_appearance->hasFocus()))
|
||||
{
|
||||
active_panel = get_outfit_editor_inventory_panel();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,38 +182,12 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
|
|||
mSymbolPos(p.symbol_pos)
|
||||
{
|
||||
mPriority = LLViewerFetchedTexture::BOOST_ICON;
|
||||
|
||||
LLRect rect = p.rect;
|
||||
|
||||
// BottomRight is the default position
|
||||
S32 left = rect.getWidth() - mSymbolSize - mSymbolHpad;
|
||||
S32 bottom = mSymbolVpad;
|
||||
|
||||
switch(mSymbolPos)
|
||||
{
|
||||
case LLAvatarIconCtrlEnums::BOTTOM_LEFT:
|
||||
{
|
||||
left = mSymbolHpad;
|
||||
bottom = mSymbolVpad;
|
||||
}
|
||||
|
||||
case LLAvatarIconCtrlEnums::TOP_LEFT:
|
||||
{
|
||||
left = mSymbolHpad;
|
||||
bottom = rect.getHeight() - mSymbolSize - mSymbolVpad;
|
||||
}
|
||||
|
||||
case LLAvatarIconCtrlEnums::TOP_RIGHT:
|
||||
{
|
||||
left = rect.getWidth() - mSymbolSize - mSymbolHpad;
|
||||
bottom = rect.getHeight() - mSymbolSize - mSymbolVpad;
|
||||
}
|
||||
|
||||
case LLAvatarIconCtrlEnums::BOTTOM_RIGHT:
|
||||
// fallthrough, is default
|
||||
default:
|
||||
rect.setOriginAndSize(left, bottom, mSymbolSize, mSymbolSize);
|
||||
}
|
||||
// don't request larger image then necessary to save gl memory,
|
||||
// but ensure that quality is sufficient
|
||||
LLRect rect = p.rect;
|
||||
mMaxHeight = llmax((S32)p.min_height, rect.getHeight());
|
||||
mMaxWidth = llmax((S32)p.min_width, rect.getWidth());
|
||||
|
||||
if (p.avatar_id.isProvided())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ public:
|
|||
return mEditor->getDocumentView()->getRect().getWidth();
|
||||
}
|
||||
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
gl_line_2d(draw_rect.mLeft + 5, draw_rect.getCenterY(), draw_rect.mRight - 5, draw_rect.getCenterY(), LLColor4::grey);
|
||||
gl_line_2d((S32)(draw_rect.mLeft + 5), (S32)draw_rect.getCenterY(), (S32)(draw_rect.mRight - 5), (S32)draw_rect.getCenterY(), LLColor4::grey);
|
||||
return draw_rect.getWidth();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op )
|
|||
subject->mColor.mV[VALPHA] ); // keep current alpha
|
||||
subject->mColor = updatedColor;
|
||||
subject->setControlValue(updatedColor.getValue());
|
||||
|
||||
pickerp->setRevertOnCancel(TRUE);
|
||||
if (pick_op == COLOR_CANCEL && subject->mOnCancelCallback)
|
||||
{
|
||||
subject->mOnCancelCallback( subject, LLSD());
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public:
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
|
||||
{
|
||||
F32 right_x;
|
||||
mStyle->getFont()->renderUTF8(mExpanderLabel, start,
|
||||
|
|
|
|||
|
|
@ -1012,6 +1012,7 @@ BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &it
|
|||
{
|
||||
LLFavoritesOrderStorage::instance().setSortIndex((*i), ++sortField);
|
||||
}
|
||||
LLFavoritesOrderStorage::instance().mSaveOnExit = true;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
@ -1584,10 +1585,10 @@ void LLFavoritesOrderStorage::destroyClass()
|
|||
{
|
||||
file.close();
|
||||
LLFile::remove(filename);
|
||||
if(mSaveOnExit)
|
||||
{
|
||||
LLFavoritesOrderStorage::instance().saveFavoritesRecord(true);
|
||||
}
|
||||
}
|
||||
if(mSaveOnExit)
|
||||
{
|
||||
LLFavoritesOrderStorage::instance().saveFavoritesRecord(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1870,6 +1871,16 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
|
|||
}
|
||||
}
|
||||
|
||||
for (std::set<LLUUID>::iterator it = mMissingSLURLs.begin(); it != mMissingSLURLs.end(); it++)
|
||||
{
|
||||
slurls_map_t::iterator slurl_iter = mSLURLs.find(*it);
|
||||
if (slurl_iter != mSLURLs.end())
|
||||
{
|
||||
pref_changed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if((items != mPrevFavorites) || name_changed || pref_changed)
|
||||
{
|
||||
std::string filename = getStoredFavoritesFilename();
|
||||
|
|
@ -1890,6 +1901,7 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
|
|||
|
||||
LLSD user_llsd;
|
||||
S32 fav_iter = 0;
|
||||
mMissingSLURLs.clear();
|
||||
for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++)
|
||||
{
|
||||
LLSD value;
|
||||
|
|
@ -1907,8 +1919,10 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
|
|||
else
|
||||
{
|
||||
getSLURL((*it)->getAssetUUID());
|
||||
value["slurl"] = "";
|
||||
user_llsd[fav_iter] = value;
|
||||
mUpdateRequired = true;
|
||||
return FALSE;
|
||||
mMissingSLURLs.insert((*it)->getAssetUUID());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1944,7 +1958,6 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
|
|||
<< "' at '" << filename << "' " << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
mPrevFavorites = items;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ private:
|
|||
|
||||
typedef std::map<LLUUID, std::string> slurls_map_t;
|
||||
slurls_map_t mSLURLs;
|
||||
|
||||
std::set<LLUUID> mMissingSLURLs;
|
||||
bool mIsDirty;
|
||||
|
||||
struct IsNotInFavorites
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ void LLFloaterColorPicker::showUI ()
|
|||
openFloater(getKey());
|
||||
setVisible ( TRUE );
|
||||
setFocus ( TRUE );
|
||||
setRevertOnCancel(FALSE);
|
||||
|
||||
// HACK: if system color picker is required - close the SL one we made and use default system dialog
|
||||
if ( gSavedSettings.getBOOL ( "UseDefaultColorPicker" ) )
|
||||
|
|
@ -402,7 +403,10 @@ void LLFloaterColorPicker::onClickCancel ( void* data )
|
|||
|
||||
if ( self )
|
||||
{
|
||||
self->cancelSelection ();
|
||||
if(self->getRevertOnCancel())
|
||||
{
|
||||
self->cancelSelection ();
|
||||
}
|
||||
self->closeFloater();
|
||||
}
|
||||
}
|
||||
|
|
@ -459,8 +463,7 @@ void LLFloaterColorPicker::onImmediateCheck( LLUICtrl* ctrl, void* data)
|
|||
if (self)
|
||||
{
|
||||
gSavedSettings.setBOOL("ApplyColorImmediately", self->mApplyImmediateCheck->get());
|
||||
|
||||
if (self->mApplyImmediateCheck->get())
|
||||
if (self->mApplyImmediateCheck->get() && self->isColorChanged())
|
||||
{
|
||||
LLColorSwatchCtrl::onColorChanged ( self->getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
|
||||
}
|
||||
|
|
@ -485,6 +488,11 @@ F32 LLFloaterColorPicker::getSwatchTransparency()
|
|||
return getTransparencyType() == TT_ACTIVE ? 1.f : LLFloater::getCurrentTransparency();
|
||||
}
|
||||
|
||||
BOOL LLFloaterColorPicker::isColorChanged()
|
||||
{
|
||||
return ((getOrigR() != getCurR()) || (getOrigG() != getCurG()) || (getOrigB() != getCurB()));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLFloaterColorPicker::draw()
|
||||
|
|
|
|||
|
|
@ -104,6 +104,11 @@ class LLFloaterColorPicker
|
|||
void setMouseDownInSwatch (BOOL mouse_down_in_swatch);
|
||||
BOOL getMouseDownInSwatch () { return mMouseDownInSwatch; }
|
||||
|
||||
void setRevertOnCancel (BOOL revertOnCancel) { mRevertOnCancel = revertOnCancel; };
|
||||
BOOL getRevertOnCancel () { return mRevertOnCancel; }
|
||||
|
||||
BOOL isColorChanged ();
|
||||
|
||||
// called when text entries (RGB/HSL etc.) are changed by user
|
||||
void onTextEntryChanged ( LLUICtrl* ctrl );
|
||||
|
||||
|
|
@ -144,6 +149,8 @@ class LLFloaterColorPicker
|
|||
BOOL mMouseDownInHueRegion;
|
||||
BOOL mMouseDownInSwatch;
|
||||
|
||||
BOOL mRevertOnCancel;
|
||||
|
||||
const S32 mRGBViewerImageLeft;
|
||||
const S32 mRGBViewerImageTop;
|
||||
const S32 mRGBViewerImageWidth;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
#include "llagent.h"
|
||||
#include "llagentaccess.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcombobox.h"
|
||||
|
|
@ -497,6 +498,30 @@ BOOL LLPanelLandGeneral::postBuild()
|
|||
mBtnBuyLand = getChild<LLButton>("Buy Land...");
|
||||
mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND);
|
||||
|
||||
|
||||
mBtnBuyGroupLand = getChild<LLButton>("Buy For Group...");
|
||||
mBtnBuyGroupLand->setClickedCallback(onClickBuyLand, (void*)&BUY_GROUP_LAND);
|
||||
|
||||
|
||||
mBtnBuyPass = getChild<LLButton>("Buy Pass...");
|
||||
mBtnBuyPass->setClickedCallback(onClickBuyPass, this);
|
||||
|
||||
mBtnReleaseLand = getChild<LLButton>("Abandon Land...");
|
||||
mBtnReleaseLand->setClickedCallback(onClickRelease, NULL);
|
||||
|
||||
mBtnReclaimLand = getChild<LLButton>("Reclaim Land...");
|
||||
mBtnReclaimLand->setClickedCallback(onClickReclaim, NULL);
|
||||
|
||||
mBtnStartAuction = getChild<LLButton>("Linden Sale...");
|
||||
mBtnStartAuction->setClickedCallback(onClickStartAuction, this);
|
||||
|
||||
mBtnScriptLimits = getChild<LLButton>("Scripts...");
|
||||
|
||||
if(gDisconnected)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// note: on region change this will not be re checked, should not matter on Agni as
|
||||
// 99% of the time all regions will return the same caps. In case of an erroneous setting
|
||||
// to enabled the floater will just throw an error when trying to get it's cap
|
||||
|
|
@ -506,7 +531,6 @@ BOOL LLPanelLandGeneral::postBuild()
|
|||
// </FS:Ansariel>
|
||||
if (!url.empty())
|
||||
{
|
||||
mBtnScriptLimits = getChild<LLButton>("Scripts...");
|
||||
if(mBtnScriptLimits)
|
||||
{
|
||||
mBtnScriptLimits->setClickedCallback(onClickScriptLimits, this);
|
||||
|
|
@ -514,28 +538,11 @@ BOOL LLPanelLandGeneral::postBuild()
|
|||
}
|
||||
else
|
||||
{
|
||||
mBtnScriptLimits = getChild<LLButton>("Scripts...");
|
||||
if(mBtnScriptLimits)
|
||||
{
|
||||
mBtnScriptLimits->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
mBtnBuyGroupLand = getChild<LLButton>("Buy For Group...");
|
||||
mBtnBuyGroupLand->setClickedCallback(onClickBuyLand, (void*)&BUY_GROUP_LAND);
|
||||
|
||||
|
||||
mBtnBuyPass = getChild<LLButton>("Buy Pass...");
|
||||
mBtnBuyPass->setClickedCallback(onClickBuyPass, this);
|
||||
|
||||
mBtnReleaseLand = getChild<LLButton>("Abandon Land...");
|
||||
mBtnReleaseLand->setClickedCallback(onClickRelease, NULL);
|
||||
|
||||
mBtnReclaimLand = getChild<LLButton>("Reclaim Land...");
|
||||
mBtnReclaimLand->setClickedCallback(onClickReclaim, NULL);
|
||||
|
||||
mBtnStartAuction = getChild<LLButton>("Linden Sale...");
|
||||
mBtnStartAuction->setClickedCallback(onClickStartAuction, this);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -549,9 +556,61 @@ LLPanelLandGeneral::~LLPanelLandGeneral()
|
|||
// public
|
||||
void LLPanelLandGeneral::refresh()
|
||||
{
|
||||
mBtnStartAuction->setVisible(gAgent.isGodlike());
|
||||
mEditName->setEnabled(FALSE);
|
||||
mEditName->setText(LLStringUtil::null);
|
||||
|
||||
LLParcel *parcel = mParcel->getParcel();
|
||||
mEditUUID->setText(LLStringUtil::null);
|
||||
|
||||
mEditDesc->setEnabled(FALSE);
|
||||
mEditDesc->setText(getString("no_selection_text"));
|
||||
|
||||
mTextSalePending->setText(LLStringUtil::null);
|
||||
mTextSalePending->setEnabled(FALSE);
|
||||
|
||||
mBtnDeedToGroup->setEnabled(FALSE);
|
||||
mBtnSetGroup->setEnabled(FALSE);
|
||||
mBtnStartAuction->setEnabled(FALSE);
|
||||
|
||||
mCheckDeedToGroup ->set(FALSE);
|
||||
mCheckDeedToGroup ->setEnabled(FALSE);
|
||||
mCheckContributeWithDeed->set(FALSE);
|
||||
mCheckContributeWithDeed->setEnabled(FALSE);
|
||||
|
||||
mTextOwner->setText(LLStringUtil::null);
|
||||
mContentRating->setText(LLStringUtil::null);
|
||||
mLandType->setText(LLStringUtil::null);
|
||||
// <FS:Ansariel> Doesn't exists as of 2014-04-14
|
||||
//mBtnProfile->setLabel(getString("profile_text"));
|
||||
//mBtnProfile->setEnabled(FALSE);
|
||||
|
||||
mTextClaimDate->setText(LLStringUtil::null);
|
||||
mTextGroup->setText(LLStringUtil::null);
|
||||
mTextPrice->setText(LLStringUtil::null);
|
||||
|
||||
mSaleInfoForSale1->setVisible(FALSE);
|
||||
mSaleInfoForSale2->setVisible(FALSE);
|
||||
mSaleInfoForSaleObjects->setVisible(FALSE);
|
||||
mSaleInfoForSaleNoObjects->setVisible(FALSE);
|
||||
mSaleInfoNotForSale->setVisible(FALSE);
|
||||
mBtnSellLand->setVisible(FALSE);
|
||||
mBtnStopSellLand->setVisible(FALSE);
|
||||
|
||||
mTextPriceLabel->setText(LLStringUtil::null);
|
||||
mTextDwell->setText(LLStringUtil::null);
|
||||
|
||||
mBtnBuyLand->setEnabled(FALSE);
|
||||
mBtnScriptLimits->setEnabled(FALSE);
|
||||
mBtnBuyGroupLand->setEnabled(FALSE);
|
||||
mBtnReleaseLand->setEnabled(FALSE);
|
||||
mBtnReclaimLand->setEnabled(FALSE);
|
||||
mBtnBuyPass->setEnabled(FALSE);
|
||||
|
||||
if(gDisconnected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mBtnStartAuction->setVisible(gAgent.isGodlike());
|
||||
bool region_owner = false;
|
||||
LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
|
||||
if(regionp && (regionp->getOwner() == gAgent.getID()))
|
||||
|
|
@ -565,59 +624,8 @@ void LLPanelLandGeneral::refresh()
|
|||
mBtnReleaseLand->setVisible(TRUE);
|
||||
mBtnReclaimLand->setVisible(FALSE);
|
||||
}
|
||||
if (!parcel)
|
||||
{
|
||||
// nothing selected, disable panel
|
||||
mEditName->setEnabled(FALSE);
|
||||
mEditName->setText(LLStringUtil::null);
|
||||
|
||||
mEditUUID->setText(LLStringUtil::null);
|
||||
|
||||
mEditDesc->setEnabled(FALSE);
|
||||
mEditDesc->setText(getString("no_selection_text"));
|
||||
|
||||
mTextSalePending->setText(LLStringUtil::null);
|
||||
mTextSalePending->setEnabled(FALSE);
|
||||
|
||||
mBtnDeedToGroup->setEnabled(FALSE);
|
||||
mBtnSetGroup->setEnabled(FALSE);
|
||||
mBtnStartAuction->setEnabled(FALSE);
|
||||
|
||||
mCheckDeedToGroup ->set(FALSE);
|
||||
mCheckDeedToGroup ->setEnabled(FALSE);
|
||||
mCheckContributeWithDeed->set(FALSE);
|
||||
mCheckContributeWithDeed->setEnabled(FALSE);
|
||||
|
||||
mTextOwner->setText(LLStringUtil::null);
|
||||
mContentRating->setText(LLStringUtil::null);
|
||||
mLandType->setText(LLStringUtil::null);
|
||||
// <FS:Ansariel> Doesn't exists as of 2014-04-14
|
||||
//mBtnProfile->setLabel(getString("profile_text"));
|
||||
//mBtnProfile->setEnabled(FALSE);
|
||||
|
||||
mTextClaimDate->setText(LLStringUtil::null);
|
||||
mTextGroup->setText(LLStringUtil::null);
|
||||
mTextPrice->setText(LLStringUtil::null);
|
||||
|
||||
mSaleInfoForSale1->setVisible(FALSE);
|
||||
mSaleInfoForSale2->setVisible(FALSE);
|
||||
mSaleInfoForSaleObjects->setVisible(FALSE);
|
||||
mSaleInfoForSaleNoObjects->setVisible(FALSE);
|
||||
mSaleInfoNotForSale->setVisible(FALSE);
|
||||
mBtnSellLand->setVisible(FALSE);
|
||||
mBtnStopSellLand->setVisible(FALSE);
|
||||
|
||||
mTextPriceLabel->setText(LLStringUtil::null);
|
||||
mTextDwell->setText(LLStringUtil::null);
|
||||
|
||||
mBtnBuyLand->setEnabled(FALSE);
|
||||
mBtnScriptLimits->setEnabled(FALSE);
|
||||
mBtnBuyGroupLand->setEnabled(FALSE);
|
||||
mBtnReleaseLand->setEnabled(FALSE);
|
||||
mBtnReclaimLand->setEnabled(FALSE);
|
||||
mBtnBuyPass->setEnabled(FALSE);
|
||||
}
|
||||
else
|
||||
LLParcel *parcel = mParcel->getParcel();
|
||||
if (parcel)
|
||||
{
|
||||
// something selected, hooray!
|
||||
BOOL is_leased = (LLParcel::OS_LEASED == parcel->getOwnershipStatus());
|
||||
|
|
@ -1342,7 +1350,7 @@ void LLPanelLandObjects::refresh()
|
|||
mOwnerList->deleteAllItems();
|
||||
mOwnerList->setEnabled(FALSE);
|
||||
|
||||
if (!parcel)
|
||||
if (!parcel || gDisconnected)
|
||||
{
|
||||
mSWTotalObjects->setTextArg("[COUNT]", llformat("%d", 0));
|
||||
mSWTotalObjects->setTextArg("[TOTAL]", llformat("%d", 0));
|
||||
|
|
@ -2124,7 +2132,7 @@ void LLPanelLandOptions::refresh()
|
|||
refreshSearch();
|
||||
|
||||
LLParcel *parcel = mParcel->getParcel();
|
||||
if (!parcel)
|
||||
if (!parcel || gDisconnected)
|
||||
{
|
||||
mCheckEditObjects ->set(FALSE);
|
||||
mCheckEditObjects ->setEnabled(FALSE);
|
||||
|
|
@ -2365,7 +2373,7 @@ void LLPanelLandOptions::draw()
|
|||
void LLPanelLandOptions::refreshSearch()
|
||||
{
|
||||
LLParcel *parcel = mParcel->getParcel();
|
||||
if (!parcel)
|
||||
if (!parcel || gDisconnected)
|
||||
{
|
||||
mCheckShowDirectory->set(FALSE);
|
||||
mCheckShowDirectory->setEnabled(FALSE);
|
||||
|
|
@ -2651,7 +2659,7 @@ void LLPanelLandAccess::refresh()
|
|||
LLParcel *parcel = mParcel->getParcel();
|
||||
|
||||
// Display options
|
||||
if (parcel)
|
||||
if (parcel && !gDisconnected)
|
||||
{
|
||||
BOOL use_access_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST);
|
||||
BOOL use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP);
|
||||
|
|
@ -2845,7 +2853,7 @@ void LLPanelLandAccess::refresh_ui()
|
|||
getChildView("remove_banned")->setEnabled(FALSE);
|
||||
|
||||
LLParcel *parcel = mParcel->getParcel();
|
||||
if (parcel)
|
||||
if (parcel && !gDisconnected)
|
||||
{
|
||||
BOOL can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED);
|
||||
BOOL can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED);
|
||||
|
|
@ -3204,7 +3212,7 @@ BOOL LLPanelLandCovenant::postBuild()
|
|||
void LLPanelLandCovenant::refresh()
|
||||
{
|
||||
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
|
||||
if(!region) return;
|
||||
if(!region || gDisconnected) return;
|
||||
|
||||
LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
|
||||
if (region_name)
|
||||
|
|
@ -3429,7 +3437,7 @@ void LLPanelLandExperiences::refreshPanel(LLPanelExperienceListEditor* panel, U3
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (parcel == NULL)
|
||||
if (!parcel || gDisconnected)
|
||||
{
|
||||
// disable the panel
|
||||
panel->setEnabled(FALSE);
|
||||
|
|
|
|||
|
|
@ -667,7 +667,7 @@ void LLFloaterModelPreview::onAutoFillCommit(LLUICtrl* ctrl, void* userdata)
|
|||
{
|
||||
LLFloaterModelPreview* fp = (LLFloaterModelPreview*) userdata;
|
||||
|
||||
fp->mModelPreview->genLODs();
|
||||
fp->mModelPreview->queryLODs();
|
||||
}
|
||||
|
||||
void LLFloaterModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit)
|
||||
|
|
@ -695,7 +695,12 @@ void LLFloaterModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit)
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLFloaterModelPreview::draw()
|
||||
{
|
||||
LLFloater::draw();
|
||||
LLFloater::draw();
|
||||
|
||||
if (!mModelPreview)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mModelPreview->update();
|
||||
|
||||
|
|
@ -725,7 +730,7 @@ void LLFloaterModelPreview::draw()
|
|||
childSetTextArg("prim_cost", "[PRIM_COST]", llformat("%d", mModelPreview->mResourceCost));
|
||||
childSetTextArg("description_label", "[TEXTURES]", llformat("%d", mModelPreview->mTextureSet.size()));
|
||||
|
||||
if (mModelPreview)
|
||||
if (mModelPreview->lodsReady())
|
||||
{
|
||||
gGL.color3f(1.f, 1.f, 1.f);
|
||||
|
||||
|
|
@ -1235,6 +1240,7 @@ void LLFloaterModelPreview::onMouseCaptureLostModelPreview(LLMouseHandler* handl
|
|||
|
||||
LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
|
||||
: LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE), LLMutex(NULL)
|
||||
, mLodsQuery()
|
||||
, mPelvisZOffset( 0.0f )
|
||||
, mLegacyRigValid( false )
|
||||
, mRigValidJointUpload( false )
|
||||
|
|
@ -1611,9 +1617,18 @@ void LLModelPreview::rebuildUploadData()
|
|||
}
|
||||
instance.mLOD[i] = lod_model;
|
||||
}
|
||||
else if (importerDebug)
|
||||
else
|
||||
{
|
||||
LL_INFOS() << "List of models does not include " << instance.mLabel << LL_ENDL;
|
||||
if (i < LLModel::LOD_HIGH && !lodsReady())
|
||||
{
|
||||
// assign a placeholder from previous LOD until lod generation is complete.
|
||||
// Note: we might need to assign it regardless of conditions like named search does, to prevent crashes.
|
||||
instance.mLOD[i] = instance.mLOD[i + 1];
|
||||
}
|
||||
if (importerDebug)
|
||||
{
|
||||
LL_INFOS() << "List of models does not include " << instance.mLabel << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1859,7 +1874,8 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
|
|||
this,
|
||||
mJointTransformMap,
|
||||
mJointsFromNode,
|
||||
gSavedSettings.getU32("ImporterModelLimit"));
|
||||
gSavedSettings.getU32("ImporterModelLimit"),
|
||||
gSavedSettings.getBOOL("ImporterPreprocessDAE"));
|
||||
|
||||
if (force_disable_slm)
|
||||
{
|
||||
|
|
@ -2680,112 +2696,6 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
|
|||
shader->bind();
|
||||
}
|
||||
}
|
||||
void LLModelPreview::genModelBBox()
|
||||
{
|
||||
LLVector3 min, max;
|
||||
min = this->mModelLoader->mExtents[0];
|
||||
max = this->mModelLoader->mExtents[1];
|
||||
std::vector<LLVector3> v_list;
|
||||
v_list.resize(4);
|
||||
std::map<U8, std::vector<LLVector3> > face_list;
|
||||
|
||||
// Face 0
|
||||
v_list[0] = LLVector3(min.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
v_list[1] = LLVector3(min.mV[VX], min.mV[VY], max.mV[VZ]);
|
||||
v_list[2] = LLVector3(max.mV[VX], min.mV[VY], max.mV[VZ]);
|
||||
v_list[3] = LLVector3(max.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
face_list.insert(std::pair<U8, std::vector<LLVector3> >(0, v_list));
|
||||
|
||||
// Face 1
|
||||
v_list[0] = LLVector3(max.mV[VX], min.mV[VY], max.mV[VZ]);
|
||||
v_list[1] = LLVector3(max.mV[VX], min.mV[VY], min.mV[VZ]);
|
||||
v_list[2] = LLVector3(max.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
v_list[3] = LLVector3(max.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
face_list.insert(std::pair<U8, std::vector<LLVector3> >(1, v_list));
|
||||
|
||||
// Face 2
|
||||
v_list[0] = LLVector3(min.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
v_list[1] = LLVector3(min.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
v_list[2] = LLVector3(max.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
v_list[3] = LLVector3(max.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
face_list.insert(std::pair<U8, std::vector<LLVector3> >(2, v_list));
|
||||
|
||||
// Face 3
|
||||
v_list[0] = LLVector3(min.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
v_list[1] = LLVector3(min.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
v_list[2] = LLVector3(min.mV[VX], min.mV[VY], min.mV[VZ]);
|
||||
v_list[3] = LLVector3(min.mV[VX], min.mV[VY], max.mV[VZ]);
|
||||
face_list.insert(std::pair<U8, std::vector<LLVector3> >(3, v_list));
|
||||
|
||||
// Face 4
|
||||
v_list[0] = LLVector3(min.mV[VX], min.mV[VY], max.mV[VZ]);
|
||||
v_list[1] = LLVector3(min.mV[VX], min.mV[VY], min.mV[VZ]);
|
||||
v_list[2] = LLVector3(max.mV[VX], min.mV[VY], min.mV[VZ]);
|
||||
v_list[3] = LLVector3(max.mV[VX], min.mV[VY], max.mV[VZ]);
|
||||
face_list.insert(std::pair<U8, std::vector<LLVector3> >(4, v_list));
|
||||
|
||||
// Face 5
|
||||
v_list[0] = LLVector3(min.mV[VX], min.mV[VY], min.mV[VZ]);
|
||||
v_list[1] = LLVector3(min.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
v_list[2] = LLVector3(max.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
v_list[3] = LLVector3(max.mV[VX], min.mV[VY], min.mV[VZ]);
|
||||
face_list.insert(std::pair<U8, std::vector<LLVector3> >(5, v_list));
|
||||
|
||||
U16 Idx[] = { 0, 1, 2, 3, 0, 2, };
|
||||
|
||||
U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
|
||||
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(type_mask, 0);
|
||||
buff->allocateBuffer(4, 6, true);
|
||||
|
||||
LLStrider<LLVector3> pos;
|
||||
LLStrider<U16> idx;
|
||||
LLStrider<LLVector3> norm;
|
||||
LLStrider<LLVector2> tc;
|
||||
|
||||
buff->getVertexStrider(pos);
|
||||
buff->getIndexStrider(idx);
|
||||
|
||||
buff->getNormalStrider(norm);
|
||||
buff->getTexCoord0Strider(tc);
|
||||
|
||||
for (U32 i = 0; i < 6; ++i)
|
||||
{
|
||||
idx[i] = Idx[i];
|
||||
}
|
||||
|
||||
LLVolumeParams volume_params;
|
||||
volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE);
|
||||
LLModel* mdl = new LLModel(volume_params, 0.f);
|
||||
mdl->mLabel = "BBOX"; // please adopt name from high LOD (mBaseModel) or from original model otherwise it breaks search mechanics which is name based
|
||||
|
||||
mdl->setNumVolumeFaces(6);
|
||||
for (U8 i = 0; i < 6; ++i)
|
||||
{
|
||||
for (U8 j = 0; j < 4; ++j)
|
||||
{
|
||||
pos[j] = face_list[i][j];
|
||||
}
|
||||
|
||||
mdl->setVolumeFaceData(i, pos, norm, tc, idx, buff->getNumVerts(), buff->getNumIndices());
|
||||
}
|
||||
|
||||
if (validate_model(mdl))
|
||||
{
|
||||
LLMatrix4 mat;
|
||||
std::map<std::string, LLImportMaterial> materials;
|
||||
std::vector<LLModelInstance> instance_list;
|
||||
instance_list.push_back(LLModelInstance(mdl, mdl->mLabel, mat, materials));
|
||||
|
||||
for (S32 i = LLModel::LOD_HIGH - 1; i >= 0; i--)
|
||||
{
|
||||
mModel[i].clear();
|
||||
mModel[i].push_back(mdl);
|
||||
|
||||
mScene[i].clear();
|
||||
mScene[i].insert(std::pair<LLMatrix4, std::vector<LLModelInstance> >(mat, instance_list));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLModelPreview::updateStatusMessages()
|
||||
{
|
||||
|
|
@ -3537,14 +3447,25 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
|
|||
void LLModelPreview::update()
|
||||
{
|
||||
if (mGenLOD)
|
||||
{
|
||||
mGenLOD = false;
|
||||
genLODs();
|
||||
refresh();
|
||||
updateStatusMessages();
|
||||
}
|
||||
{
|
||||
bool subscribe_for_generation = mLodsQuery.empty();
|
||||
mGenLOD = false;
|
||||
mDirty = true;
|
||||
mLodsQuery.clear();
|
||||
|
||||
if (mDirty)
|
||||
for (S32 lod = LLModel::LOD_HIGH; lod >= 0; --lod)
|
||||
{
|
||||
// adding all lods into query for generation
|
||||
mLodsQuery.push_back(lod);
|
||||
}
|
||||
|
||||
if (subscribe_for_generation)
|
||||
{
|
||||
doOnIdleRepeating(lodQueryCallback);
|
||||
}
|
||||
}
|
||||
|
||||
if (mDirty && mLodsQuery.empty())
|
||||
{
|
||||
mDirty = false;
|
||||
mResourceCost = calcResourceCost();
|
||||
|
|
@ -4494,6 +4415,29 @@ void LLModelPreview::textureLoadedCallback( BOOL success, LLViewerFetchedTexture
|
|||
}
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLModelPreview::lodQueryCallback()
|
||||
{
|
||||
// not the best solution, but model preview belongs to floater
|
||||
// so it is an easy way to check that preview still exists.
|
||||
LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance;
|
||||
if (fmp && fmp->mModelPreview)
|
||||
{
|
||||
LLModelPreview* preview = fmp->mModelPreview;
|
||||
if (preview->mLodsQuery.size() > 0)
|
||||
{
|
||||
S32 lod = preview->mLodsQuery.back();
|
||||
preview->mLodsQuery.pop_back();
|
||||
preview->genLODs(lod);
|
||||
|
||||
// return false to continue cycle
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// nothing to process
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit)
|
||||
{
|
||||
if (!mLODFrozen)
|
||||
|
|
|
|||
|
|
@ -264,8 +264,9 @@ public:
|
|||
void clearModel(S32 lod);
|
||||
void loadModel(std::string filename, S32 lod, bool force_disable_slm = false);
|
||||
void loadModelCallback(S32 lod);
|
||||
bool lodsReady() { return !mGenLOD && mLodsQuery.empty(); }
|
||||
void queryLODs() { mGenLOD = true; };
|
||||
void genLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false);
|
||||
void genModelBBox(); // Generate just a model BBox if we can't generate proper LOD
|
||||
void generateNormals();
|
||||
void restoreNormals();
|
||||
U32 calcResourceCost();
|
||||
|
|
@ -293,6 +294,7 @@ public:
|
|||
void setLegacyRigValid( bool rigValid ) { mLegacyRigValid = rigValid; }
|
||||
|
||||
static void textureLoadedCallback( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
|
||||
static bool lodQueryCallback();
|
||||
|
||||
boost::signals2::connection setDetailsCallback( const details_signal_t::slot_type& cb ){ return mDetailsSignal.connect(cb); }
|
||||
boost::signals2::connection setModelLoadedCallback( const model_loaded_signal_t::slot_type& cb ){ return mModelLoadedSignal.connect(cb); }
|
||||
|
|
@ -306,6 +308,7 @@ public:
|
|||
LLVector3 getTranslationForJointOffset( std::string joint );
|
||||
|
||||
static bool sIgnoreLoadedCallback;
|
||||
std::vector<S32> mLodsQuery;
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
|||
|
|
@ -703,6 +703,10 @@ BOOL LLFloaterPreference::postBuild()
|
|||
|
||||
LLLogChat::setSaveHistorySignal(boost::bind(&LLFloaterPreference::onLogChatHistorySaved, this));
|
||||
|
||||
LLSliderCtrl* fov_slider = getChild<LLSliderCtrl>("camera_fov");
|
||||
fov_slider->setMinValue(LLViewerCamera::getInstance()->getMinView());
|
||||
fov_slider->setMaxValue(LLViewerCamera::getInstance()->getMaxView());
|
||||
|
||||
// [SL:KB] - Patch: Viewer-CrashReporting | Checked: 2011-06-11 (Catznip-2.6.c) | Added: Catznip-2.6.0c
|
||||
#ifndef LL_SEND_CRASH_REPORTS
|
||||
// Hide the crash report tab if crash reporting isn't enabled
|
||||
|
|
|
|||
|
|
@ -250,10 +250,12 @@ BOOL LLFloaterRegionInfo::postBuild()
|
|||
panel->buildFromFile("panel_region_debug.xml");
|
||||
mTab->addTabPanel(panel);
|
||||
|
||||
// <FS:Ansariel> Crash fix
|
||||
//if(!gAgent.getRegion()->getCapability("RegionExperiences").empty())
|
||||
if (gAgent.getRegion() && !gAgent.getRegion()->getCapability("RegionExperiences").empty())
|
||||
// </FS:Ansariel>
|
||||
if(gDisconnected)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if(!gAgent.getRegion()->getCapability("RegionExperiences").empty())
|
||||
{
|
||||
panel = new LLPanelRegionExperiences;
|
||||
mInfoPanels.push_back(panel);
|
||||
|
|
@ -276,6 +278,11 @@ LLFloaterRegionInfo::~LLFloaterRegionInfo()
|
|||
|
||||
void LLFloaterRegionInfo::onOpen(const LLSD& key)
|
||||
{
|
||||
if(gDisconnected)
|
||||
{
|
||||
disableTabCtrls();
|
||||
return;
|
||||
}
|
||||
refreshFromRegion(gAgent.getRegion());
|
||||
requestRegionInfo();
|
||||
requestMeshRezInfo();
|
||||
|
|
@ -516,7 +523,16 @@ LLPanelRegionExperiences* LLFloaterRegionInfo::getPanelExperiences()
|
|||
return (LLPanelRegionExperiences*)tab->getChild<LLPanel>("Experiences");
|
||||
}
|
||||
|
||||
void LLFloaterRegionInfo::disableTabCtrls()
|
||||
{
|
||||
LLTabContainer* tab = getChild<LLTabContainer>("region_panels");
|
||||
|
||||
tab->getChild<LLPanel>("General")->setCtrlsEnabled(FALSE);
|
||||
tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE);
|
||||
tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE);
|
||||
tab->getChild<LLPanel>("panel_env_info")->setCtrlsEnabled(FALSE);
|
||||
tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE);
|
||||
}
|
||||
|
||||
// <FS:CR> Aurora Sim - Region Settings Console
|
||||
// static
|
||||
|
|
@ -1366,6 +1382,22 @@ BOOL LLPanelRegionTerrainInfo::validateTextureSizes()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLPanelRegionTerrainInfo::validateTextureHeights()
|
||||
{
|
||||
for (S32 i = 0; i < CORNER_COUNT; ++i)
|
||||
{
|
||||
std::string low = llformat("height_start_spin_%d", i);
|
||||
std::string high = llformat("height_range_spin_%d", i);
|
||||
|
||||
if (getChild<LLUICtrl>(low)->getValue().asReal() > getChild<LLUICtrl>(high)->getValue().asReal())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// LLPanelRegionTerrainInfo
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -1398,6 +1430,9 @@ BOOL LLPanelRegionTerrainInfo::postBuild()
|
|||
childSetAction("upload_raw_btn", onClickUploadRaw, this);
|
||||
childSetAction("bake_terrain_btn", onClickBakeTerrain, this);
|
||||
|
||||
mAskedTextureHeights = false;
|
||||
mConfirmedTextureHeights = false;
|
||||
|
||||
return LLPanelRegionInfo::postBuild();
|
||||
}
|
||||
|
||||
|
|
@ -1489,6 +1524,21 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate()
|
|||
#endif // OPENSIM
|
||||
// </FS:CR> Aurora Sim - Region Settings Console
|
||||
|
||||
// Check if terrain Elevation Ranges are correct
|
||||
if (gSavedSettings.getBOOL("RegionCheckTextureHeights") && !validateTextureHeights())
|
||||
{
|
||||
if (!mAskedTextureHeights)
|
||||
{
|
||||
LLNotificationsUtil::add("ConfirmTextureHeights", LLSD(), LLSD(), boost::bind(&LLPanelRegionTerrainInfo::callbackTextureHeights, this, _1, _2));
|
||||
mAskedTextureHeights = true;
|
||||
return FALSE;
|
||||
}
|
||||
else if (!mConfirmedTextureHeights)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
LLTextureCtrl* texture_ctrl;
|
||||
std::string id_str;
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
|
@ -1529,6 +1579,29 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
bool LLPanelRegionTerrainInfo::callbackTextureHeights(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if (option == 0) // ok
|
||||
{
|
||||
mConfirmedTextureHeights = true;
|
||||
}
|
||||
else if (option == 1) // cancel
|
||||
{
|
||||
mConfirmedTextureHeights = false;
|
||||
}
|
||||
else if (option == 2) // don't ask
|
||||
{
|
||||
gSavedSettings.setBOOL("RegionCheckTextureHeights", FALSE);
|
||||
mConfirmedTextureHeights = true;
|
||||
}
|
||||
|
||||
onBtnSet();
|
||||
|
||||
mAskedTextureHeights = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelRegionTerrainInfo::onClickDownloadRaw(void* data)
|
||||
{
|
||||
|
|
@ -2240,6 +2313,8 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
|
|||
BOOL manager = (region && region->isEstateManager());
|
||||
setCtrlsEnabled(god || owner || manager);
|
||||
|
||||
getChildView("apply_btn")->setEnabled(FALSE);
|
||||
|
||||
BOOL has_allowed_avatar = getChild<LLNameListCtrl>("allowed_avatar_name_list")->getFirstSelected() ? TRUE : FALSE;
|
||||
BOOL has_allowed_group = getChild<LLNameListCtrl>("allowed_group_name_list")->getFirstSelected() ? TRUE : FALSE;
|
||||
BOOL has_banned_agent = getChild<LLNameListCtrl>("banned_avatar_name_list")->getFirstSelected() ? TRUE : FALSE;
|
||||
|
|
@ -3261,6 +3336,11 @@ bool LLPanelEnvironmentInfo::refreshFromRegion(LLViewerRegion* region)
|
|||
|
||||
void LLPanelEnvironmentInfo::refresh()
|
||||
{
|
||||
if(gDisconnected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
populateWaterPresetsList();
|
||||
populateSkyPresetsList();
|
||||
populateDayCyclesList();
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ private:
|
|||
|
||||
protected:
|
||||
void onTabSelected(const LLSD& param);
|
||||
void disableTabCtrls();
|
||||
void refreshFromRegion(LLViewerRegion* region);
|
||||
|
||||
// member data
|
||||
|
|
@ -263,6 +264,7 @@ public:
|
|||
void setEnvControls(bool available); // Whether environment settings are available for this region
|
||||
|
||||
BOOL validateTextureSizes();
|
||||
BOOL validateTextureHeights();
|
||||
|
||||
//static void onChangeAnything(LLUICtrl* ctrl, void* userData); // callback for any change, to enable commit button
|
||||
|
||||
|
|
@ -272,6 +274,11 @@ public:
|
|||
static void onClickUploadRaw(void*);
|
||||
static void onClickBakeTerrain(void*);
|
||||
bool callbackBakeTerrain(const LLSD& notification, const LLSD& response);
|
||||
bool callbackTextureHeights(const LLSD& notification, const LLSD& response);
|
||||
|
||||
private:
|
||||
bool mConfirmedTextureHeights;
|
||||
bool mAskedTextureHeights;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -73,7 +73,11 @@ void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
|
|||
LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
|
||||
if ( panel_appearance )
|
||||
{
|
||||
panel_appearance->getWearable()->onClose();
|
||||
LLPanelEditWearable *edit_wearable_ptr = panel_appearance->getWearable();
|
||||
if (edit_wearable_ptr)
|
||||
{
|
||||
edit_wearable_ptr->onClose();
|
||||
}
|
||||
panel_appearance->showOutfitsInventoryPanel();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,10 +197,15 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
|
|||
msg->getU32("DataExtended", "TimeStamp", time_stamp, block);
|
||||
msg->getF32("DataExtended", "MonoScore", mono_score, block);
|
||||
msg->getS32("DataExtended", "PublicURLs", public_urls, block);
|
||||
if (msg->getSize("DataExtended", "ParcelName") > 0)
|
||||
|
||||
std::string parcel_name;
|
||||
F32 script_size = 0.f;
|
||||
msg->getString("DataExtended", "ParcelName", parcel_name, block);
|
||||
msg->getF32("DataExtended", "Size", script_size, block);
|
||||
if (parcel_name.size() > 0 || script_size > 0)
|
||||
{
|
||||
msg->getString("DataExtended", "ParcelName", parcel_buf, block);
|
||||
msg->getF32("DataExtended", "Size", script_memory, block);
|
||||
parcel_buf = parcel_name;
|
||||
script_memory = script_size;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ void LLInitialFriendCardsFetch::done()
|
|||
|
||||
// LLFriendCardsManager Constructor / Destructor
|
||||
LLFriendCardsManager::LLFriendCardsManager()
|
||||
: mState(INIT)
|
||||
{
|
||||
LLAvatarTracker::instance().addObserver(this);
|
||||
}
|
||||
|
|
@ -423,6 +424,7 @@ void LLFriendCardsManager::ensureFriendsFolderExists()
|
|||
LLUUID friends_folder_ID = findFriendFolderUUIDImpl();
|
||||
if (friends_folder_ID.notNull())
|
||||
{
|
||||
mState = LOADING_FRIENDS_FOLDER;
|
||||
fetchAndCheckFolderDescendents(friends_folder_ID,
|
||||
boost::bind(&LLFriendCardsManager::ensureFriendsAllFolderExists, this));
|
||||
}
|
||||
|
|
@ -452,6 +454,7 @@ void LLFriendCardsManager::ensureFriendsAllFolderExists()
|
|||
LLUUID friends_all_folder_ID = findFriendAllSubfolderUUIDImpl();
|
||||
if (friends_all_folder_ID.notNull())
|
||||
{
|
||||
mState = LOADING_ALL_FOLDER;
|
||||
fetchAndCheckFolderDescendents(friends_all_folder_ID,
|
||||
boost::bind(&LLFriendCardsManager::syncFriendsFolder, this));
|
||||
}
|
||||
|
|
@ -506,6 +509,9 @@ void LLFriendCardsManager::syncFriendsFolder()
|
|||
NULL);
|
||||
}
|
||||
|
||||
// All folders created and updated.
|
||||
mState = MANAGER_READY;
|
||||
|
||||
// 2. Add missing Friend Cards for friends
|
||||
LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
|
||||
LL_INFOS() << "try to build friends, count: " << all_buddies.size() << LL_ENDL;
|
||||
|
|
@ -540,6 +546,12 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)
|
|||
<< ", id: " << avatarID
|
||||
<< LL_ENDL;
|
||||
|
||||
if (shouldBeAdded && !isManagerReady())
|
||||
{
|
||||
shouldBeAdded = false;
|
||||
LL_DEBUGS() << "Calling cards manager not ready, state: " << getManagerState() << LL_ENDL;
|
||||
}
|
||||
|
||||
if (shouldBeAdded && findFriendCardInventoryUUIDImpl(avatarID).notNull())
|
||||
{
|
||||
shouldBeAdded = false;
|
||||
|
|
@ -583,13 +595,30 @@ void LLFriendCardsManager::onFriendListUpdate(U32 changed_mask)
|
|||
switch(changed_mask) {
|
||||
case LLFriendObserver::ADD:
|
||||
{
|
||||
const std::set<LLUUID>& changed_items = at.getChangedIDs();
|
||||
std::set<LLUUID>::const_iterator id_it = changed_items.begin();
|
||||
std::set<LLUUID>::const_iterator id_end = changed_items.end();
|
||||
for (;id_it != id_end; ++id_it)
|
||||
{
|
||||
LLFriendCardsManager::instance().addFriendCardToInventory(*id_it);
|
||||
}
|
||||
LLFriendCardsManager& cards_manager = LLFriendCardsManager::instance();
|
||||
if (cards_manager.isManagerReady())
|
||||
{
|
||||
// Try to add cards into inventory.
|
||||
// If cards already exist they won't be created.
|
||||
const std::set<LLUUID>& changed_items = at.getChangedIDs();
|
||||
std::set<LLUUID>::const_iterator id_it = changed_items.begin();
|
||||
std::set<LLUUID>::const_iterator id_end = changed_items.end();
|
||||
for (; id_it != id_end; ++id_it)
|
||||
{
|
||||
cards_manager.addFriendCardToInventory(*id_it);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// User either removed calling cards' folders and manager is loading them
|
||||
// or update came too early, before viewer had chance to load all folders.
|
||||
// Either way don't process 'add' operation - manager will recreate all
|
||||
// cards after fetching folders.
|
||||
LL_INFOS_ONCE() << "Calling cards manager not ready, state: "
|
||||
<< cards_manager.getManagerState()
|
||||
<< ", postponing update."
|
||||
<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LLFriendObserver::REMOVE:
|
||||
|
|
|
|||
|
|
@ -45,6 +45,14 @@ class LLFriendCardsManager
|
|||
public:
|
||||
typedef std::map<LLUUID, uuid_vec_t > folderid_buddies_map_t;
|
||||
|
||||
enum EManagerState
|
||||
{
|
||||
INIT = 1,
|
||||
LOADING_FRIENDS_FOLDER,
|
||||
LOADING_ALL_FOLDER,
|
||||
MANAGER_READY
|
||||
};
|
||||
|
||||
// LLFriendObserver implementation
|
||||
void changed(U32 mask)
|
||||
{
|
||||
|
|
@ -71,7 +79,14 @@ public:
|
|||
/**
|
||||
* Checks is the specified category is a Friend folder or any its subfolder
|
||||
*/
|
||||
bool isAnyFriendCategory(const LLUUID& catID) const;
|
||||
bool isAnyFriendCategory(const LLUUID& catID) const;
|
||||
|
||||
/**
|
||||
* Indicates that all calling card related folders are created or loaded
|
||||
*/
|
||||
bool isManagerReady() const { return mState == MANAGER_READY; }
|
||||
|
||||
EManagerState getManagerState() const { return mState; }
|
||||
|
||||
/**
|
||||
* Checks whether "Friends" and "Friends/All" folders exist in "Calling Cards" category
|
||||
|
|
@ -149,6 +164,8 @@ private:
|
|||
typedef std::set<LLUUID> avatar_uuid_set_t;
|
||||
|
||||
avatar_uuid_set_t mBuddyIDSet;
|
||||
EManagerState mState;
|
||||
|
||||
};
|
||||
|
||||
#endif // LL_LLFRIENDCARD_H
|
||||
|
|
|
|||
|
|
@ -145,8 +145,10 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item)
|
|||
BOOL copyable = false;
|
||||
if (item->getPermissions().allowCopyBy(gAgentID)) copyable = true;
|
||||
|
||||
if (!copyable || get_is_item_worn(item->getUUID()))
|
||||
if (!copyable && get_is_item_worn(item->getUUID()))
|
||||
{
|
||||
// worn no-copy items can't be transfered,
|
||||
// but it is valid to transfer a copy of a worn item
|
||||
acceptable = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,10 @@ LLGroupIconCtrl::Params::Params()
|
|||
: group_id("group_id"),
|
||||
draw_tooltip("draw_tooltip", true),
|
||||
default_icon_name("default_icon_name")
|
||||
{}
|
||||
{
|
||||
changeDefault(min_width, 32);
|
||||
changeDefault(min_height, 32);
|
||||
}
|
||||
|
||||
|
||||
LLGroupIconCtrl::LLGroupIconCtrl(const LLGroupIconCtrl::Params& p)
|
||||
|
|
@ -48,6 +51,12 @@ LLGroupIconCtrl::LLGroupIconCtrl(const LLGroupIconCtrl::Params& p)
|
|||
{
|
||||
mPriority = LLViewerFetchedTexture::BOOST_ICON;
|
||||
|
||||
// don't request larger image then necessary to save gl memory,
|
||||
// but ensure that quality is sufficient
|
||||
LLRect rect = p.rect;
|
||||
mMaxHeight = llmax((S32)p.min_height, rect.getHeight());
|
||||
mMaxWidth = llmax((S32)p.min_width, rect.getWidth());
|
||||
|
||||
if (p.group_id.isProvided())
|
||||
{
|
||||
LLSD value(p.group_id);
|
||||
|
|
|
|||
|
|
@ -1068,6 +1068,11 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
|
|||
void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
|
||||
{
|
||||
LL_DEBUGS() << "LLGroupMgr::processGroupPropertiesReply" << LL_ENDL;
|
||||
if (!msg)
|
||||
{
|
||||
LL_ERRS() << "Can't access the messaging system" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
LLUUID agent_id;
|
||||
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
|
||||
if (gAgent.getID() != agent_id)
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ const F32 VERTICAL_PADDING = 12.f;
|
|||
const F32 BUFFER_SIZE = 2.f;
|
||||
const F32 HUD_TEXT_MAX_WIDTH = 190.f;
|
||||
const F32 HUD_TEXT_MAX_WIDTH_NO_BUBBLE = 1000.f;
|
||||
const F32 MAX_DRAW_DISTANCE = 64.f;
|
||||
|
||||
std::set<LLPointer<LLHUDText> > LLHUDText::sTextObjects;
|
||||
std::vector<LLPointer<LLHUDText> > LLHUDText::sVisibleTextObjects;
|
||||
|
|
@ -412,7 +413,7 @@ void LLHUDText::updateVisibility()
|
|||
mVisible = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (vec_from_camera * LLViewerCamera::getInstance()->getAtAxis() <= LLViewerCamera::getInstance()->getNear() + 0.1f + mSourceObject->getVObjRadius())
|
||||
{
|
||||
mPositionAgent = LLViewerCamera::getInstance()->getOrigin() + vec_from_camera * ((LLViewerCamera::getInstance()->getNear() + 0.1f) / (vec_from_camera * LLViewerCamera::getInstance()->getAtAxis()));
|
||||
|
|
@ -430,6 +431,15 @@ void LLHUDText::updateVisibility()
|
|||
return;
|
||||
}
|
||||
|
||||
LLVector3 pos_agent_center = gAgent.getPosAgentFromGlobal(mPositionGlobal) - dir_from_camera;
|
||||
F32 last_distance_center = (pos_agent_center - LLViewerCamera::getInstance()->getOrigin()).magVec();
|
||||
if(last_distance_center > MAX_DRAW_DISTANCE)
|
||||
{
|
||||
mVisible = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
LLVector3 x_pixel_vec;
|
||||
LLVector3 y_pixel_vec;
|
||||
|
||||
|
|
|
|||
|
|
@ -42,16 +42,13 @@
|
|||
#include "lltrans.h"
|
||||
#include "lluictrl.h"
|
||||
|
||||
class LLFetchGroupData;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// LLInspectGroup
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// Group Inspector, a small information window used when clicking
|
||||
/// on group names in the 2D UI
|
||||
class LLInspectGroup : public LLInspect
|
||||
class LLInspectGroup : public LLInspect, public LLGroupMgrObserver
|
||||
{
|
||||
friend class LLFloaterReg;
|
||||
|
||||
|
|
@ -65,12 +62,16 @@ public:
|
|||
// (for example, inspector about same group but in different position)
|
||||
/*virtual*/ void onOpen(const LLSD& group_id);
|
||||
|
||||
void setGroupID(const LLUUID& group_id);
|
||||
|
||||
// When closing they should close their gear menu
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
|
||||
// Update view based on information from group manager
|
||||
void processGroupData();
|
||||
|
||||
|
||||
virtual void changed(LLGroupChange gc);
|
||||
|
||||
// Make network requests for all the data to display in this view.
|
||||
// Used on construction and if avatar id changes.
|
||||
void requestUpdate();
|
||||
|
|
@ -88,53 +89,12 @@ public:
|
|||
|
||||
private:
|
||||
LLUUID mGroupID;
|
||||
// an in-flight network request for group properties
|
||||
// is represented by this object
|
||||
LLFetchGroupData* mPropertiesRequest;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// LLFetchGroupData
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This object represents a pending request for avatar properties information
|
||||
class LLFetchGroupData : public LLGroupMgrObserver
|
||||
{
|
||||
public:
|
||||
// If the inspector closes it will delete the pending request object, so the
|
||||
// inspector pointer will be valid for the lifetime of this object
|
||||
LLFetchGroupData(const LLUUID& group_id, LLInspectGroup* inspector)
|
||||
: LLGroupMgrObserver(group_id),
|
||||
mInspector(inspector)
|
||||
{
|
||||
LLGroupMgr* mgr = LLGroupMgr::getInstance();
|
||||
// register ourselves as an observer
|
||||
mgr->addObserver(this);
|
||||
// send a request
|
||||
mgr->sendGroupPropertiesRequest(group_id);
|
||||
}
|
||||
|
||||
~LLFetchGroupData()
|
||||
{
|
||||
// remove ourselves as an observer
|
||||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
}
|
||||
|
||||
void changed(LLGroupChange gc)
|
||||
{
|
||||
if (gc == GC_PROPERTIES)
|
||||
{
|
||||
mInspector->processGroupData();
|
||||
}
|
||||
}
|
||||
|
||||
LLInspectGroup* mInspector;
|
||||
};
|
||||
|
||||
LLInspectGroup::LLInspectGroup(const LLSD& sd)
|
||||
: LLInspect( LLSD() ), // single_instance, doesn't really need key
|
||||
mGroupID(), // set in onOpen()
|
||||
mPropertiesRequest(NULL)
|
||||
mGroupID() // set in onOpen()
|
||||
{
|
||||
mCommitCallbackRegistrar.add("InspectGroup.ViewProfile",
|
||||
boost::bind(&LLInspectGroup::onClickViewProfile, this));
|
||||
|
|
@ -149,10 +109,7 @@ LLInspectGroup::LLInspectGroup(const LLSD& sd)
|
|||
|
||||
LLInspectGroup::~LLInspectGroup()
|
||||
{
|
||||
// clean up any pending requests so they don't call back into a deleted
|
||||
// view
|
||||
delete mPropertiesRequest;
|
||||
mPropertiesRequest = NULL;
|
||||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -164,7 +121,7 @@ void LLInspectGroup::onOpen(const LLSD& data)
|
|||
// start fade animation
|
||||
LLInspect::onOpen(data);
|
||||
|
||||
mGroupID = data["group_id"];
|
||||
setGroupID(data["group_id"]);
|
||||
|
||||
// Position the inspector relative to the mouse cursor
|
||||
// Similar to how tooltips are positioned
|
||||
|
|
@ -185,7 +142,8 @@ void LLInspectGroup::onOpen(const LLSD& data)
|
|||
// virtual
|
||||
void LLInspectGroup::onClose(bool app_quitting)
|
||||
{
|
||||
// *TODO: If we add a gear menu, close it here
|
||||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
// *TODO: If we add a gear menu, close it here
|
||||
}
|
||||
|
||||
void LLInspectGroup::requestUpdate()
|
||||
|
|
@ -213,9 +171,15 @@ void LLInspectGroup::requestUpdate()
|
|||
getChild<LLUICtrl>("leave_btn")->setVisible(false);
|
||||
getChild<LLUICtrl>("join_btn")->setVisible(false);
|
||||
|
||||
// Make a new request for properties
|
||||
delete mPropertiesRequest;
|
||||
mPropertiesRequest = new LLFetchGroupData(mGroupID, this);
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
if (!gdatap || !gdatap->isGroupPropertiesDataComplete() )
|
||||
{
|
||||
LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mGroupID);
|
||||
}
|
||||
else
|
||||
{
|
||||
processGroupData();
|
||||
}
|
||||
|
||||
// Name lookup will be faster out of cache, use that
|
||||
gCacheName->getGroup(mGroupID,
|
||||
|
|
@ -223,6 +187,16 @@ void LLInspectGroup::requestUpdate()
|
|||
this, _1, _2, _3));
|
||||
}
|
||||
|
||||
void LLInspectGroup::setGroupID(const LLUUID& group_id)
|
||||
{
|
||||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
|
||||
mID = group_id;
|
||||
mGroupID = group_id;
|
||||
|
||||
LLGroupMgr::getInstance()->addObserver(this);
|
||||
}
|
||||
|
||||
void LLInspectGroup::nameUpdatedCallback(
|
||||
const LLUUID& id,
|
||||
const std::string& name,
|
||||
|
|
@ -236,6 +210,14 @@ void LLInspectGroup::nameUpdatedCallback(
|
|||
// Otherwise possibly a request for an older inspector, ignore it
|
||||
}
|
||||
|
||||
void LLInspectGroup::changed(LLGroupChange gc)
|
||||
{
|
||||
if (gc == GC_PROPERTIES)
|
||||
{
|
||||
processGroupData();
|
||||
}
|
||||
}
|
||||
|
||||
void LLInspectGroup::processGroupData()
|
||||
{
|
||||
LLGroupMgrGroupData* data =
|
||||
|
|
@ -288,10 +270,6 @@ void LLInspectGroup::processGroupData()
|
|||
bool can_join = !is_member && data->mOpenEnrollment;
|
||||
getChild<LLUICtrl>("join_btn")->setEnabled(can_join);
|
||||
}
|
||||
|
||||
// Delete the request object as it has been satisfied
|
||||
delete mPropertiesRequest;
|
||||
mPropertiesRequest = NULL;
|
||||
}
|
||||
|
||||
void LLInspectGroup::onClickViewProfile()
|
||||
|
|
|
|||
|
|
@ -1191,7 +1191,7 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat, U32
|
|||
else
|
||||
{
|
||||
// add this category
|
||||
LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat->getParentUUID());
|
||||
LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat->getOwnerID());
|
||||
new_cat->copyViewerCategory(cat);
|
||||
addCategory(new_cat);
|
||||
|
||||
|
|
@ -3593,6 +3593,11 @@ void LLInventoryModel::removeCategory(const LLUUID& category_id)
|
|||
|
||||
void LLInventoryModel::removeObject(const LLUUID& object_id)
|
||||
{
|
||||
if(object_id.isNull())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLInventoryObject* obj = getObject(object_id);
|
||||
if (dynamic_cast<LLViewerInventoryItem*>(obj))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -306,6 +306,12 @@ void LLInventoryFetchItemsObserver::startFetch()
|
|||
continue;
|
||||
}
|
||||
|
||||
if ((*it).isNull())
|
||||
{
|
||||
LL_WARNS("Inventory") << "Skip fetching for a NULL uuid" << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
|
||||
// It's incomplete, so put it on the incomplete container, and
|
||||
// pack this on the message.
|
||||
mIncomplete.push_back(*it);
|
||||
|
|
|
|||
|
|
@ -1485,6 +1485,11 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
|
|||
}
|
||||
else
|
||||
{
|
||||
LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
|
||||
if (floater_inventory)
|
||||
{
|
||||
floater_inventory->setFocus(TRUE);
|
||||
}
|
||||
active_panel->setSelection(obj_id, TAKE_FOCUS_YES);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ LLLocalBitmap::~LLLocalBitmap()
|
|||
}
|
||||
|
||||
// delete self from gimagelist
|
||||
LLViewerFetchedTexture* image = gTextureList.findImage(mWorldID);
|
||||
LLViewerFetchedTexture* image = gTextureList.findImage(mWorldID, TEX_LIST_DISCARD);
|
||||
gTextureList.deleteImage(image);
|
||||
|
||||
if (image)
|
||||
|
|
@ -216,7 +216,7 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate)
|
|||
texture->setCachedRawImage(LL_LOCAL_DISCARD_LEVEL, raw_image);
|
||||
texture->ref();
|
||||
|
||||
gTextureList.addImage(texture);
|
||||
gTextureList.addImage(texture, TEX_LIST_DISCARD);
|
||||
|
||||
if (optional_firstupdate != UT_FIRSTUSE)
|
||||
{
|
||||
|
|
@ -224,7 +224,7 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate)
|
|||
replaceIDs(old_id, mWorldID);
|
||||
|
||||
// remove old_id from gimagelist
|
||||
LLViewerFetchedTexture* image = gTextureList.findImage(old_id);
|
||||
LLViewerFetchedTexture* image = gTextureList.findImage(old_id, TEX_LIST_DISCARD);
|
||||
if (image != NULL)
|
||||
{
|
||||
gTextureList.deleteImage(image);
|
||||
|
|
@ -393,7 +393,7 @@ void LLLocalBitmap::replaceIDs(LLUUID old_id, LLUUID new_id)
|
|||
std::vector<LLViewerObject*> LLLocalBitmap::prepUpdateObjects(LLUUID old_id, U32 channel)
|
||||
{
|
||||
std::vector<LLViewerObject*> obj_list;
|
||||
LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id);
|
||||
LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_DISCARD);
|
||||
|
||||
for(U32 face_iterator = 0; face_iterator < old_texture->getNumFaces(channel); face_iterator++)
|
||||
{
|
||||
|
|
@ -511,7 +511,7 @@ void LLLocalBitmap::updateUserPrims(LLUUID old_id, LLUUID new_id, U32 channel)
|
|||
|
||||
void LLLocalBitmap::updateUserSculpts(LLUUID old_id, LLUUID new_id)
|
||||
{
|
||||
LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id);
|
||||
LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_DISCARD);
|
||||
for(U32 volume_iter = 0; volume_iter < old_texture->getNumVolumes(); volume_iter++)
|
||||
{
|
||||
LLVOVolume* volume_to_object = (*old_texture->getVolumeList())[volume_iter];
|
||||
|
|
|
|||
|
|
@ -2110,7 +2110,7 @@ BOOL LLManipScale::canAffectSelection()
|
|||
{
|
||||
LLViewerObject *root_object = (objectp == NULL) ? NULL : objectp->getRootEdit();
|
||||
return objectp->permModify() && objectp->permMove() && !objectp->isPermanentEnforced() &&
|
||||
((root_object == NULL) || !root_object->isPermanentEnforced()) &&
|
||||
(root_object == NULL || (!root_object->isPermanentEnforced() && !root_object->isSeat())) &&
|
||||
!objectp->isSeat();
|
||||
}
|
||||
} func;
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#include "lllocationinputctrl.h"
|
||||
#include "llpaneltopinfobar.h"
|
||||
#include "llteleporthistory.h"
|
||||
#include "llresizebar.h"
|
||||
#include "llsearchcombobox.h"
|
||||
#include "llslurl.h"
|
||||
#include "llurlregistry.h"
|
||||
|
|
@ -274,8 +275,11 @@ LLNavigationBar::LLNavigationBar()
|
|||
mBtnForward(NULL),
|
||||
mBtnHome(NULL),
|
||||
mCmbLocation(NULL),
|
||||
mSearchComboBox(NULL),
|
||||
mSaveToLocationHistory(false)
|
||||
mSaveToLocationHistory(false),
|
||||
mNavigationPanel(NULL),
|
||||
mFavoritePanel(NULL),
|
||||
mNavPanWidth(0),
|
||||
mSearchComboBox(NULL)
|
||||
{
|
||||
// buildFromFile( "panel_navigation_bar.xml"); // <FS:Zi> Make navigation bar part of the UI
|
||||
|
||||
|
|
@ -358,6 +362,12 @@ void LLNavigationBar::setupPanel()
|
|||
|
||||
// <FS:Zi> Make navigation bar part of the UI
|
||||
// LLHints::registerHintTarget("nav_bar", getHandle());
|
||||
|
||||
//mNavigationPanel = getChild<LLLayoutPanel>("navigation_layout_panel");
|
||||
//mFavoritePanel = getChild<LLLayoutPanel>("favorites_layout_panel");
|
||||
//mNavigationPanel->getResizeBar()->setResizeListener(boost::bind(&LLNavigationBar::onNavbarResized, this));
|
||||
//mFavoritePanel->getResizeBar()->setResizeListener(boost::bind(&LLNavigationBar::onNavbarResized, this));
|
||||
|
||||
// return TRUE;
|
||||
LLHints::registerHintTarget("nav_bar",mView->getHandle());
|
||||
// </FS:Zi>
|
||||
|
|
@ -434,6 +444,18 @@ void LLNavigationBar::onBackButtonClicked(LLUICtrl* ctrl)
|
|||
gFocusMgr.releaseFocusIfNeeded(ctrl); // [FS:CR] FIRE-12333
|
||||
}
|
||||
|
||||
void LLNavigationBar::onNavbarResized()
|
||||
{
|
||||
S32 new_nav_pan_width = mNavigationPanel->getRect().getWidth();
|
||||
if(mNavPanWidth != new_nav_pan_width)
|
||||
{
|
||||
S32 new_stack_width = new_nav_pan_width + mFavoritePanel->getRect().getWidth();
|
||||
F32 ratio = (F32)new_nav_pan_width / (F32)new_stack_width;
|
||||
gSavedPerAccountSettings.setF32("NavigationBarRatio", ratio);
|
||||
mNavPanWidth = new_nav_pan_width;
|
||||
}
|
||||
}
|
||||
|
||||
void LLNavigationBar::onBackOrForwardButtonHeldDown(LLUICtrl* ctrl, const LLSD& param)
|
||||
{
|
||||
if (param["count"].asInteger() == 0)
|
||||
|
|
@ -792,6 +814,8 @@ void LLNavigationBar::handleLoginComplete()
|
|||
LLPanelTopInfoBar::instance().handleLoginComplete();
|
||||
gStatusBar->handleLoginComplete();
|
||||
mCmbLocation->handleLoginComplete();
|
||||
// <FS:Ansariel> Commented out because we don't have the LL viewer layout
|
||||
//resizeLayoutPanel();
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2014-03-23 (RLVa-1.4.10)
|
||||
|
|
@ -802,6 +826,15 @@ void LLNavigationBar::refreshLocationCtrl()
|
|||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
void LLNavigationBar::resizeLayoutPanel()
|
||||
{
|
||||
LLRect nav_bar_rect = mNavigationPanel->getRect();
|
||||
|
||||
S32 nav_panel_width = (nav_bar_rect.getWidth() + mFavoritePanel->getRect().getWidth()) * gSavedPerAccountSettings.getF32("NavigationBarRatio");
|
||||
|
||||
nav_bar_rect.setLeftTopAndSize(nav_bar_rect.mLeft, nav_bar_rect.mTop, nav_panel_width, nav_bar_rect.getHeight());
|
||||
mNavigationPanel->handleReshape(nav_bar_rect,true);
|
||||
}
|
||||
void LLNavigationBar::invokeSearch(std::string search_text)
|
||||
{
|
||||
LLFloaterReg::showInstance("search", LLSD().with("category", "all").with("query", LLSD(search_text)));
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
// #include "llpanel.h"
|
||||
// </FS:Zi>
|
||||
#include "llbutton.h"
|
||||
#include "lllayoutstack.h"
|
||||
|
||||
class LLLocationInputCtrl;
|
||||
class LLMenuGL;
|
||||
|
|
@ -120,6 +121,7 @@ private:
|
|||
void rebuildTeleportHistoryMenu();
|
||||
void showTeleportHistoryMenu(LLUICtrl* btn_ctrl);
|
||||
void invokeSearch(std::string search_text);
|
||||
void resizeLayoutPanel();
|
||||
// callbacks
|
||||
void onTeleportHistoryMenuItemClicked(const LLSD& userdata);
|
||||
void onTeleportHistoryChanged();
|
||||
|
|
@ -138,6 +140,7 @@ private:
|
|||
void onSearchCommit();
|
||||
void onTeleportFinished(const LLVector3d& global_agent_pos);
|
||||
void onTeleportFailed();
|
||||
void onNavbarResized();
|
||||
void onRegionNameResponse(
|
||||
std::string typed_location,
|
||||
std::string region_name,
|
||||
|
|
@ -159,6 +162,7 @@ private:
|
|||
// }
|
||||
// </FS:Zi>
|
||||
|
||||
S32 mNavPanWidth;
|
||||
LLMenuGL* mTeleportHistoryMenu;
|
||||
LLPullButton* mBtnBack;
|
||||
LLPullButton* mBtnForward;
|
||||
|
|
@ -169,6 +173,8 @@ private:
|
|||
//LLRect mDefaultNbRect;
|
||||
//LLRect mDefaultFpRect;
|
||||
// </FS:Zi>
|
||||
LLLayoutPanel* mNavigationPanel;
|
||||
LLLayoutPanel* mFavoritePanel;
|
||||
boost::signals2::connection mTeleportFailedConnection;
|
||||
boost::signals2::connection mTeleportFinishConnection;
|
||||
boost::signals2::connection mHistoryMenuConnection;
|
||||
|
|
|
|||
|
|
@ -393,10 +393,7 @@ LLGroupNoticeNotificationListItem::LLGroupNoticeNotificationListItem(const Param
|
|||
buildFromFile("panel_notification_list_item.xml");
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Crash fix in LLGroupMgr::notifyObservers()
|
||||
//LLGroupNoticeNotificationListItem::~LLGroupNoticeNotificationListItem()
|
||||
LLGroupNotificationListItem::~LLGroupNotificationListItem()
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
}
|
||||
|
|
@ -587,8 +584,6 @@ void LLGroupNoticeNotificationListItem::close()
|
|||
mInventoryOffer->forceResponse(IOR_DECLINE);
|
||||
mInventoryOffer = NULL;
|
||||
}
|
||||
// <FS:Ansariel> Crash fix in LLGroupMgr::notifyObservers()
|
||||
//LLGroupMgr::getInstance()->removeObserver(this);
|
||||
}
|
||||
|
||||
void LLGroupNoticeNotificationListItem::onClickAttachment()
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ class LLGroupNotificationListItem
|
|||
: public LLNotificationListItem, public LLGroupMgrObserver
|
||||
{
|
||||
public:
|
||||
virtual ~LLGroupNotificationListItem(); // <FS:Ansariel> Crash fix in LLGroupMgr::notifyObservers()
|
||||
virtual ~LLGroupNotificationListItem();
|
||||
virtual BOOL postBuild();
|
||||
|
||||
void setGroupId(const LLUUID& value);
|
||||
|
|
@ -202,7 +202,6 @@ class LLGroupNoticeNotificationListItem
|
|||
: public LLGroupNotificationListItem
|
||||
{
|
||||
public:
|
||||
//~LLGroupNoticeNotificationListItem(); // <FS:Ansariel> Crash fix in LLGroupMgr::notifyObservers()
|
||||
static std::set<std::string> getTypes();
|
||||
virtual BOOL postBuild();
|
||||
|
||||
|
|
|
|||
|
|
@ -2360,7 +2360,7 @@ void LLPanelFace::LLSelectedTE::getTexId(LLUUID& id, bool& identical)
|
|||
LLTextureEntry *te = object->getTE(te_index);
|
||||
if (te)
|
||||
{
|
||||
LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID()) : NULL;
|
||||
LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_DISCARD) : NULL;
|
||||
if(!tex)
|
||||
{
|
||||
tex = LLViewerFetchedTexture::sDefaultImagep;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "lluictrlfactory.h"
|
||||
#include "roles_constants.h"
|
||||
|
||||
#include "llappviewer.h"
|
||||
#include "llhttpclient.h"
|
||||
#include "llagent.h"
|
||||
#include "llviewerregion.h"
|
||||
|
|
@ -38,8 +38,6 @@
|
|||
#include "llpanelexperiences.h"
|
||||
#include "llsd.h"
|
||||
|
||||
#include "llvoavatarself.h"
|
||||
|
||||
|
||||
static LLPanelInjector<LLPanelGroupExperiences> t_panel_group_experiences("panel_group_experiences");
|
||||
|
||||
|
|
@ -98,20 +96,13 @@ BOOL LLPanelGroupExperiences::postBuild()
|
|||
|
||||
void LLPanelGroupExperiences::activate()
|
||||
{
|
||||
if (getGroupID() == LLUUID::null)
|
||||
if ((getGroupID() == LLUUID::null) || gDisconnected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Crash fix
|
||||
if (!isAgentAvatarValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// search for experiences owned by the current group
|
||||
std::string url = gAgent.getRegion()->getCapability("GroupExperiences");
|
||||
std::string url = (gAgent.getRegion()) ? gAgent.getRegion()->getCapability("GroupExperiences") : LLStringUtil::null;
|
||||
if (!url.empty())
|
||||
{
|
||||
url += "?" + getGroupID().asString();
|
||||
|
|
|
|||
|
|
@ -501,27 +501,22 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids)
|
|||
}
|
||||
else
|
||||
{
|
||||
//looks like user try to invite offline friend
|
||||
//looks like user try to invite offline avatar (or the avatar from the other region)
|
||||
//for offline avatar_id gObjectList.findObject() will return null
|
||||
//so we need to do this additional search in avatar tracker, see EXT-4732
|
||||
// <FS:Ansariel> FIRE-4140: Group invite button on profile sometimes doesn't work
|
||||
//if (LLAvatarTracker::instance().isBuddy(agent_id))
|
||||
// </FS:Ansariel>
|
||||
LLAvatarName av_name;
|
||||
if (!LLAvatarNameCache::get(agent_id, &av_name))
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
if (!LLAvatarNameCache::get(agent_id, &av_name))
|
||||
{
|
||||
// actually it should happen, just in case
|
||||
//LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupInvite::addUserCallback, this, _1, _2));
|
||||
// for this special case!
|
||||
//when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
|
||||
// removed id will be added in callback
|
||||
agent_ids.erase(agent_ids.begin() + i);
|
||||
}
|
||||
else
|
||||
{
|
||||
names.push_back(av_name.getAccountName());
|
||||
}
|
||||
// actually it should happen, just in case
|
||||
//LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupInvite::addUserCallback, this, _1, _2));
|
||||
// for this special case!
|
||||
//when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
|
||||
// removed id will be added in callback
|
||||
agent_ids.erase(agent_ids.begin() + i);
|
||||
}
|
||||
else
|
||||
{
|
||||
names.push_back(av_name.getAccountName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -860,12 +860,17 @@ void LLPanelLogin::onClickConnect(void *)
|
|||
// The start location SLURL has already been sent to LLStartUp::setStartSLURL
|
||||
|
||||
std::string username = sInstance->getChild<LLUICtrl>("username_combo")->getValue().asString();
|
||||
std::string password = sInstance->getChild<LLUICtrl>("password_edit")->getValue().asString();
|
||||
|
||||
if(username.empty())
|
||||
{
|
||||
// user must type in something into the username field
|
||||
LLNotificationsUtil::add("MustHaveAccountToLogIn");
|
||||
}
|
||||
else if(password.empty())
|
||||
{
|
||||
LLNotificationsUtil::add("MustEnterPasswordToLogIn");
|
||||
}
|
||||
else
|
||||
{
|
||||
LLPointer<LLCredential> cred;
|
||||
|
|
|
|||
|
|
@ -857,7 +857,7 @@ void LLPanelOutfitEdit::onShopButtonClicked()
|
|||
url = url_resolver.resolveURL(LLWearableType::WT_NONE, SEX_FEMALE);
|
||||
}
|
||||
|
||||
LLWeb::loadURLExternal(url);
|
||||
LLWeb::loadURL(url);
|
||||
}
|
||||
|
||||
LLWearableType::EType LLPanelOutfitEdit::getCOFWearablesSelectionType() const
|
||||
|
|
|
|||
|
|
@ -713,25 +713,49 @@ void LLPanelPermissions::refresh()
|
|||
&next_owner_mask_on,
|
||||
&next_owner_mask_off);
|
||||
|
||||
|
||||
|
||||
if (gSavedSettings.getBOOL("DebugPermissions") )
|
||||
{
|
||||
if (valid_base_perms)
|
||||
{
|
||||
getChild<LLUICtrl>("B:")->setValue("B: " + mask_to_string(base_mask_on));
|
||||
getChildView("B:")->setVisible( TRUE);
|
||||
|
||||
getChildView("B:")->setVisible(TRUE);
|
||||
getChild<LLUICtrl>("O:")->setValue("O: " + mask_to_string(owner_mask_on));
|
||||
getChildView("O:")->setVisible( TRUE);
|
||||
|
||||
getChildView("O:")->setVisible(TRUE);
|
||||
getChild<LLUICtrl>("G:")->setValue("G: " + mask_to_string(group_mask_on));
|
||||
getChildView("G:")->setVisible( TRUE);
|
||||
|
||||
getChildView("G:")->setVisible(TRUE);
|
||||
getChild<LLUICtrl>("E:")->setValue("E: " + mask_to_string(everyone_mask_on));
|
||||
getChildView("E:")->setVisible( TRUE);
|
||||
|
||||
getChildView("E:")->setVisible(TRUE);
|
||||
getChild<LLUICtrl>("N:")->setValue("N: " + mask_to_string(next_owner_mask_on));
|
||||
getChildView("N:")->setVisible( TRUE);
|
||||
getChildView("N:")->setVisible(TRUE);
|
||||
}
|
||||
else if(!root_selected)
|
||||
{
|
||||
if(object_count == 1)
|
||||
{
|
||||
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode();
|
||||
if (node && node->mValid)
|
||||
{
|
||||
getChild<LLUICtrl>("B:")->setValue("B: " + mask_to_string( node->mPermissions->getMaskBase()));
|
||||
getChildView("B:")->setVisible(TRUE);
|
||||
getChild<LLUICtrl>("O:")->setValue("O: " + mask_to_string(node->mPermissions->getMaskOwner()));
|
||||
getChildView("O:")->setVisible(TRUE);
|
||||
getChild<LLUICtrl>("G:")->setValue("G: " + mask_to_string(node->mPermissions->getMaskGroup()));
|
||||
getChildView("G:")->setVisible(TRUE);
|
||||
getChild<LLUICtrl>("E:")->setValue("E: " + mask_to_string(node->mPermissions->getMaskEveryone()));
|
||||
getChildView("E:")->setVisible(TRUE);
|
||||
getChild<LLUICtrl>("N:")->setValue("N: " + mask_to_string(node->mPermissions->getMaskNextOwner()));
|
||||
getChildView("N:")->setVisible(TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView("B:")->setVisible(FALSE);
|
||||
getChildView("O:")->setVisible(FALSE);
|
||||
getChildView("G:")->setVisible(FALSE);
|
||||
getChildView("E:")->setVisible(FALSE);
|
||||
getChildView("N:")->setVisible(FALSE);
|
||||
}
|
||||
|
||||
U32 flag_mask = 0x0;
|
||||
|
|
|
|||
|
|
@ -314,21 +314,14 @@ void LLPanelPrimMediaControls::updateShape()
|
|||
|
||||
if (objectp)
|
||||
{
|
||||
// <FS:ND> VWR-29449; Remeber if user has MEDIA_PERM_CONTROL
|
||||
bool hasPermsControl = true;
|
||||
// </FS:ND>
|
||||
|
||||
bool mini_controls = false;
|
||||
LLMediaEntry *media_data = objectp->getTE(mTargetObjectFace)->getMediaData();
|
||||
if (media_data && NULL != dynamic_cast<LLVOVolume*>(objectp))
|
||||
{
|
||||
// Don't show the media controls if we do not have permissions
|
||||
enabled = dynamic_cast<LLVOVolume*>(objectp)->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL);
|
||||
|
||||
// <FS:ND> VWR-29449; Remeber if user has MEDIA_PERM_CONTROL
|
||||
hasPermsControl = dynamic_cast<LLVOVolume*>(objectp)->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL);
|
||||
// </FS:ND>
|
||||
|
||||
mini_controls = (LLMediaEntry::MINI == media_data->getControls());
|
||||
}
|
||||
const bool is_hud = objectp->isHUDAttachment();
|
||||
|
|
@ -571,10 +564,9 @@ void LLPanelPrimMediaControls::updateShape()
|
|||
}
|
||||
}
|
||||
|
||||
// <FS:ND> VWR-29449; If this is a HUD always set it visible, but hide each control if user has no perms.
|
||||
// When setting it invisible it won't receive any mouse messages anymore, thus eg trying to sroll a webpage with mousewheel has surprising effects.
|
||||
// MAINT-1392 If this is a HUD always set it visible, but hide each control if user has no perms.
|
||||
// When setting it invisible it won't receive any mouse messages anymore
|
||||
|
||||
// setVisible(enabled);
|
||||
if( !is_hud )
|
||||
setVisible(enabled);
|
||||
else
|
||||
|
|
@ -806,20 +798,15 @@ void LLPanelPrimMediaControls::draw()
|
|||
controls_bg_area.mRight -= mRightBookend->getRect().getWidth() - space - 2;
|
||||
|
||||
// draw control background UI image
|
||||
|
||||
// <FS:ND> VWR-29449; Only draw mBackgroundImage when the user has MEDIA_PERM_CONTROL. Otherwise we did hide all media controls above and drawing mBackgroundImage draws a useless grey square.
|
||||
|
||||
// mBackgroundImage->draw( controls_bg_area, UI_VERTEX_COLOR % alpha);
|
||||
|
||||
LLViewerObject* objectp = getTargetObject();
|
||||
LLMediaEntry *media_data(0);
|
||||
|
||||
if( objectp )
|
||||
media_data = objectp->getTE(mTargetObjectFace)->getMediaData();
|
||||
|
||||
if( !dynamic_cast<LLVOVolume*>(objectp) || !media_data || dynamic_cast<LLVOVolume*>(objectp)->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL) )
|
||||
mBackgroundImage->draw( controls_bg_area, UI_VERTEX_COLOR % alpha);
|
||||
|
||||
// </FS:ND>
|
||||
|
||||
// draw volume slider background UI image
|
||||
if (mVolumeSliderCtrl->getVisible())
|
||||
|
|
|
|||
|
|
@ -719,7 +719,7 @@ void LLPanelVolume::onLightCancelTexture(const LLSD& data)
|
|||
|
||||
if (LightTextureCtrl)
|
||||
{
|
||||
LightTextureCtrl->setImageAssetID(LLUUID::null);
|
||||
LightTextureCtrl->setImageAssetID(mLightSavedTexture);
|
||||
}
|
||||
|
||||
LLVOVolume *volobjp = (LLVOVolume *) mObject.get();
|
||||
|
|
@ -728,7 +728,16 @@ void LLPanelVolume::onLightCancelTexture(const LLSD& data)
|
|||
// Cancel the light texture as requested
|
||||
// NORSPEC-292
|
||||
//
|
||||
volobjp->setLightTextureID(LLUUID::null);
|
||||
bool is_spotlight = volobjp->isLightSpotlight();
|
||||
volobjp->setLightTextureID(mLightSavedTexture); //updates spotlight
|
||||
|
||||
if (!is_spotlight && mLightSavedTexture.notNull())
|
||||
{
|
||||
LLVector3 spot_params = volobjp->getSpotLightParams();
|
||||
getChild<LLUICtrl>("Light FOV")->setValue(spot_params.mV[0]);
|
||||
getChild<LLUICtrl>("Light Focus")->setValue(spot_params.mV[1]);
|
||||
getChild<LLUICtrl>("Light Ambiance")->setValue(spot_params.mV[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -827,7 +836,12 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata )
|
|||
self->getChild<LLUICtrl>("Light Ambiance")->setValue(spot_params.mV[2]);
|
||||
}
|
||||
else
|
||||
{ //modifying existing params
|
||||
{ //modifying existing params, this time volobjp won't change params on its own.
|
||||
if (volobjp->getLightTextureID() != id)
|
||||
{
|
||||
volobjp->setLightTextureID(id);
|
||||
}
|
||||
|
||||
LLVector3 spot_params;
|
||||
spot_params.mV[0] = (F32) self->getChild<LLUICtrl>("Light FOV")->getValue().asReal();
|
||||
spot_params.mV[1] = (F32) self->getChild<LLUICtrl>("Light Focus")->getValue().asReal();
|
||||
|
|
|
|||
|
|
@ -126,9 +126,26 @@ void LLPersistentNotificationStorage::loadNotifications()
|
|||
startBulkUpdate(); // <FS:ND>
|
||||
|
||||
S32 processed_notifications = 0;
|
||||
std::vector<LLSD> notifications_array;
|
||||
for (LLSD::reverse_array_iterator notification_it = data.rbeginArray();
|
||||
notification_it != data.rendArray();
|
||||
++notification_it)
|
||||
{
|
||||
LLSD notification_params = *notification_it;
|
||||
notifications_array.push_back(notification_params);
|
||||
|
||||
++processed_notifications;
|
||||
if (processed_notifications >= gSavedSettings.getS32("MaxPersistentNotifications"))
|
||||
{
|
||||
LL_WARNS() << "Too many persistent notifications."
|
||||
<< " Processed " << gSavedSettings.getS32("MaxPersistentNotifications") << " of " << data.size() << " persistent notifications." << LL_ENDL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (LLSD::reverse_array_iterator notification_it = notifications_array.rbegin();
|
||||
notification_it != notifications_array.rend();
|
||||
++notification_it)
|
||||
{
|
||||
LLSD notification_params = *notification_it;
|
||||
LLNotificationPtr notification(new LLNotification(notification_params));
|
||||
|
|
@ -146,14 +163,8 @@ void LLPersistentNotificationStorage::loadNotifications()
|
|||
// hide saved toasts so they don't confuse the user
|
||||
notification_channel->hideToast(notification->getID());
|
||||
}
|
||||
++processed_notifications;
|
||||
if (processed_notifications >= gSavedSettings.getS32("MaxPersistentNotifications"))
|
||||
{
|
||||
LL_WARNS() << "Too many persistent notifications."
|
||||
<< " Processed " << gSavedSettings.getS32("MaxPersistentNotifications") << " of " << data.size() << " persistent notifications." << LL_ENDL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LLNotifications::instance().getChannel("Persistent")->
|
||||
connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1));
|
||||
endBulkUpdate(); // <FS:ND>
|
||||
|
|
|
|||
|
|
@ -2396,7 +2396,8 @@ LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) :
|
|||
mCloseAfterSave(FALSE),
|
||||
mPendingUploads(0),
|
||||
mIsModifiable(FALSE),
|
||||
mIsNew(false)
|
||||
mIsNew(false),
|
||||
mIsSaving(FALSE)
|
||||
{
|
||||
mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this);
|
||||
}
|
||||
|
|
@ -2453,6 +2454,8 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id,
|
|||
}
|
||||
// [/SL:KB]
|
||||
|
||||
getChild<LLCheckBoxCtrl>("running")->set(is_script_running);
|
||||
mIsSaving = FALSE;
|
||||
closeIfNeeded();
|
||||
}
|
||||
|
||||
|
|
@ -2485,6 +2488,7 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors)
|
|||
}
|
||||
// [/SL:KB]
|
||||
|
||||
mIsSaving = FALSE;
|
||||
closeIfNeeded();
|
||||
}
|
||||
|
||||
|
|
@ -2743,13 +2747,13 @@ void LLLiveLSLEditor::draw()
|
|||
if(object->permAnyOwner())
|
||||
{
|
||||
runningCheckbox->setLabel(getString("script_running"));
|
||||
runningCheckbox->setEnabled(TRUE);
|
||||
runningCheckbox->setEnabled(!mIsSaving);
|
||||
|
||||
// <FS:Ansariel> Rev 496 LL merge error
|
||||
//if(object->permAnyOwner())
|
||||
//{
|
||||
// runningCheckbox->setLabel(getString("script_running"));
|
||||
// runningCheckbox->setEnabled(TRUE);
|
||||
// runningCheckbox->setEnabled(!mIsSaving);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
|
|
@ -2898,6 +2902,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)
|
|||
getWindow()->incBusyCount();
|
||||
mPendingUploads++;
|
||||
BOOL is_running = getChild<LLCheckBoxCtrl>( "running")->get();
|
||||
mIsSaving = TRUE;
|
||||
if (!url.empty())
|
||||
{
|
||||
uploadAssetViaCaps(url, filename, mObjectUUID, mItemUUID, is_running, mScriptEd->getAssociatedExperience());
|
||||
|
|
|
|||
|
|
@ -405,6 +405,8 @@ private:
|
|||
// need to save both text and script, so need to decide when done
|
||||
S32 mPendingUploads;
|
||||
|
||||
BOOL mIsSaving;
|
||||
|
||||
BOOL getIsModifiable() const { return mIsModifiable; } // Evaluated on load assert
|
||||
|
||||
LLCheckBoxCtrl* mMonoCheckbox;
|
||||
|
|
|
|||
|
|
@ -137,15 +137,11 @@ LLPreviewTexture::~LLPreviewTexture()
|
|||
getWindow()->decBusyCount();
|
||||
}
|
||||
|
||||
// <FS:ND> mImage can be 0.
|
||||
// mImage->setBoostLevel(mImageOldBoostLevel);
|
||||
|
||||
if( mImage )
|
||||
if (mImage.notNull())
|
||||
{
|
||||
mImage->setBoostLevel(mImageOldBoostLevel);
|
||||
|
||||
// <FS:ND>
|
||||
|
||||
mImage = NULL;
|
||||
mImage = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#include "llviewerwindow.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "lldockablefloater.h"
|
||||
#include "llsyswellwindow.h"
|
||||
#include "llfloaterimsession.h"
|
||||
|
|
@ -306,7 +306,11 @@ void LLScreenChannel::addToast(const LLToast::Params& p)
|
|||
|
||||
if(!show_toast && !store_toast)
|
||||
{
|
||||
LLNotificationPtr notification = LLNotifications::instance().find(p.notif_id);
|
||||
if(gAgent.isDoNotDisturb())
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLNotificationPtr notification = LLNotifications::instance().find(p.notif_id);
|
||||
|
||||
if (notification &&
|
||||
(!notification->canLogToIM() || !notification->hasFormElements()))
|
||||
|
|
|
|||
|
|
@ -1715,7 +1715,11 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid)
|
|||
f(LLViewerInventoryItem* item, const LLUUID& id) : mItem(item), mImageID(id) {}
|
||||
bool apply(LLViewerObject* objectp, S32 te)
|
||||
{
|
||||
if (mItem)
|
||||
if(objectp && !objectp->permModify())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (mItem)
|
||||
{
|
||||
if (te == -1) // all faces
|
||||
{
|
||||
|
|
@ -6972,7 +6976,8 @@ LLBBox LLSelectMgr::getBBoxOfSelection() const
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLSelectMgr::canUndo() const
|
||||
{
|
||||
return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstEditableObject() != NULL; // HACK: casting away constness - MG
|
||||
// Can edit or can move
|
||||
return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstUndoEnabledObject() != NULL; // HACK: casting away constness - MG;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -7967,6 +7972,22 @@ LLViewerObject* LLObjectSelection::getFirstMoveableObject(BOOL get_parent)
|
|||
return getFirstSelectedObject(&func, get_parent);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// getFirstUndoEnabledObject()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLViewerObject* LLObjectSelection::getFirstUndoEnabledObject(BOOL get_parent)
|
||||
{
|
||||
struct f : public LLSelectedNodeFunctor
|
||||
{
|
||||
bool apply(LLSelectNode* node)
|
||||
{
|
||||
LLViewerObject* obj = node->getObject();
|
||||
return obj && (obj->permModify() || (obj->permMove() && !obj->isPermanentEnforced()));
|
||||
}
|
||||
} func;
|
||||
return getFirstSelectedObject(&func, get_parent);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Position + Rotation update methods called from LLViewerJoystick
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -319,6 +319,7 @@ public:
|
|||
LLViewerObject* getFirstCopyableObject(BOOL get_parent = FALSE);
|
||||
LLViewerObject* getFirstDeleteableObject();
|
||||
LLViewerObject* getFirstMoveableObject(BOOL get_parent = FALSE);
|
||||
LLViewerObject* getFirstUndoEnabledObject(BOOL get_parent = FALSE);
|
||||
|
||||
/// Return the object that lead to this selection, possible a child
|
||||
LLViewerObject* getPrimaryObject() { return mPrimaryObject; }
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility)
|
|||
|
||||
if (is_outfit_edit_visible || is_wearable_edit_visible)
|
||||
{
|
||||
const LLViewerWearable *wearable_ptr = mEditWearable->getWearable();
|
||||
const LLViewerWearable *wearable_ptr = mEditWearable ? mEditWearable->getWearable() : NULL;
|
||||
if (!wearable_ptr)
|
||||
{
|
||||
LL_WARNS() << "Visibility change to invalid wearable" << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ void LLSidepanelInventory::onShareButtonClicked()
|
|||
|
||||
void LLSidepanelInventory::onShopButtonClicked()
|
||||
{
|
||||
LLWeb::loadURLExternal(gSavedSettings.getString("MarketplaceURL"));
|
||||
LLWeb::loadURL(gSavedSettings.getString("MarketplaceURL"));
|
||||
}
|
||||
|
||||
void LLSidepanelInventory::performActionOnSelection(const std::string &action)
|
||||
|
|
|
|||
|
|
@ -386,6 +386,10 @@ void LLSidepanelTaskInfo::refresh()
|
|||
// mDACreatorName->setValue(creator_name);
|
||||
// mCreatorID = creator_id;
|
||||
// }
|
||||
// if(mDACreatorName->getValue().asString() == LLStringUtil::null)
|
||||
// {
|
||||
// mDACreatorName->setValue(creator_name);
|
||||
// }
|
||||
// mDACreatorName->setEnabled(TRUE);
|
||||
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
|
||||
|
||||
|
|
@ -426,6 +430,10 @@ void LLSidepanelTaskInfo::refresh()
|
|||
// mDAOwnerName->setValue(owner_name);
|
||||
// mOwnerID = owner_id;
|
||||
// }
|
||||
// if(mDAOwnerName->getValue().asString() == LLStringUtil::null)
|
||||
// {
|
||||
// mDAOwnerName->setValue(owner_name);
|
||||
// }
|
||||
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ BOOL LLStatusBar::postBuild()
|
|||
boost::bind(&LLStatusBar::onClickBuyCurrency, this));
|
||||
|
||||
// <FS:Ansariel> Not used in Firestorm
|
||||
//getChild<LLUICtrl>("goShop")->setCommitCallback(boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL")));
|
||||
//getChild<LLUICtrl>("goShop")->setCommitCallback(boost::bind(&LLWeb::loadURL, gSavedSettings.getString("MarketplaceURL"), LLStringUtil::null, LLStringUtil::null));
|
||||
|
||||
mBoxBalance = getChild<LLTextBox>("balance");
|
||||
mBoxBalance->setClickedCallback( &LLStatusBar::onClickBalance, this );
|
||||
|
|
|
|||
|
|
@ -1496,6 +1496,7 @@ void LLTextureCache::readHeaderCache()
|
|||
new_entries.push_back(entry);
|
||||
}
|
||||
}
|
||||
mFreeList.clear(); // recreating list, no longer valid.
|
||||
llassert_always(new_entries.size() <= sCacheMaxEntries);
|
||||
mHeaderEntriesInfo.mEntries = new_entries.size();
|
||||
writeEntriesHeader();
|
||||
|
|
|
|||
|
|
@ -2082,11 +2082,18 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe
|
|||
|
||||
if (log_texture_traffic && data_size > 0)
|
||||
{
|
||||
LLViewerTexture* tex = LLViewerTextureManager::findTexture(mID);
|
||||
if (tex)
|
||||
{
|
||||
gTotalTextureBytesPerBoostLevel[tex->getBoostLevel()] += data_size ;
|
||||
}
|
||||
// one worker per multiple textures
|
||||
std::vector<LLViewerTexture*> textures;
|
||||
LLViewerTextureManager::findTextures(mID, textures);
|
||||
std::vector<LLViewerTexture*>::iterator iter = textures.begin();
|
||||
while (iter != textures.end())
|
||||
{
|
||||
LLViewerTexture* tex = *iter++;
|
||||
if (tex)
|
||||
{
|
||||
gTotalTextureBytesPerBoostLevel[tex->getBoostLevel()] += data_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mFetcher->removeFromHTTPQueue(mID, data_size);
|
||||
|
|
@ -4342,26 +4349,33 @@ bool LLTextureFetchDebugger::processStartDebug(F32 max_time)
|
|||
fetched_textures.insert(mFetchingHistory[i].mID);
|
||||
in_list = false;
|
||||
}
|
||||
|
||||
LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(mFetchingHistory[i].mID);
|
||||
if(tex && tex->isJustBound()) //visible
|
||||
{
|
||||
if(!in_list)
|
||||
{
|
||||
mNumVisibleFetchedTextures++;
|
||||
}
|
||||
mNumVisibleFetchingRequests++;
|
||||
|
||||
mVisibleFetchedData += mFetchingHistory[i].mFetchedSize;
|
||||
mVisibleDecodedData += mFetchingHistory[i].mDecodedSize;
|
||||
|
||||
if(tex->getDiscardLevel() >= mFetchingHistory[i].mDecodedLevel)
|
||||
{
|
||||
mRenderedData += mFetchingHistory[i].mFetchedSize;
|
||||
mRenderedDecodedData += mFetchingHistory[i].mDecodedSize;
|
||||
mRenderedPixels += tex->getWidth() * tex->getHeight();
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<LLViewerFetchedTexture*> textures;
|
||||
LLViewerTextureManager::findFetchedTextures(mFetchingHistory[i].mID, textures);
|
||||
std::vector<LLViewerFetchedTexture*>::iterator iter = textures.begin();
|
||||
while (iter != textures.end())
|
||||
{
|
||||
LLViewerFetchedTexture* tex = *iter++;
|
||||
// fetched data will be counted for both ui and regular elements
|
||||
if (tex && tex->isJustBound()) //visible
|
||||
{
|
||||
if (!in_list)
|
||||
{
|
||||
mNumVisibleFetchedTextures++;
|
||||
}
|
||||
mNumVisibleFetchingRequests++;
|
||||
|
||||
mVisibleFetchedData += mFetchingHistory[i].mFetchedSize;
|
||||
mVisibleDecodedData += mFetchingHistory[i].mDecodedSize;
|
||||
|
||||
if (tex->getDiscardLevel() >= mFetchingHistory[i].mDecodedLevel)
|
||||
{
|
||||
mRenderedData += mFetchingHistory[i].mFetchedSize;
|
||||
mRenderedDecodedData += mFetchingHistory[i].mDecodedSize;
|
||||
mRenderedPixels += tex->getWidth() * tex->getHeight();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mNumFetchedTextures = fetched_textures.size();
|
||||
|
|
@ -4461,7 +4475,8 @@ void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker)
|
|||
mRefetchedAllPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight();
|
||||
mRefetchedAllData += worker->mFormattedImage->getDataSize();
|
||||
|
||||
LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(worker->mID);
|
||||
// refetch list only requests/creates normal images, so requesting ui='false'
|
||||
LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(worker->mID, TEX_LIST_DISCARD);
|
||||
if(tex && mRefetchList[tex].begin() != mRefetchList[tex].end())
|
||||
{
|
||||
if(worker->mDecodedDiscard == mFetchingHistory[mRefetchList[tex][0]].mDecodedLevel)
|
||||
|
|
@ -4688,12 +4703,18 @@ void LLTextureFetchDebugger::debugGLTextureCreation()
|
|||
{
|
||||
if(mFetchingHistory[i].mRawImage.notNull())
|
||||
{
|
||||
LLViewerFetchedTexture* tex = gTextureList.findImage(mFetchingHistory[i].mID) ;
|
||||
if(tex && !tex->isForSculptOnly())
|
||||
{
|
||||
tex->destroyGLTexture() ;
|
||||
mTempTexList.push_back(tex);
|
||||
}
|
||||
std::vector<LLViewerFetchedTexture*> textures;
|
||||
gTextureList.findTexturesByID(mFetchingHistory[i].mID, textures);
|
||||
std::vector<LLViewerFetchedTexture*>::iterator iter = textures.begin();
|
||||
while (iter != textures.end())
|
||||
{
|
||||
LLViewerFetchedTexture* tex = *iter++;
|
||||
if (tex && !tex->isForSculptOnly())
|
||||
{
|
||||
tex->destroyGLTexture();
|
||||
mTempTexList.push_back(tex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4748,11 +4769,17 @@ void LLTextureFetchDebugger::clearTextures()
|
|||
S32 size = mFetchingHistory.size();
|
||||
for(S32 i = 0 ; i < size ; i++)
|
||||
{
|
||||
LLViewerFetchedTexture* tex = gTextureList.findImage(mFetchingHistory[i].mID) ;
|
||||
if(tex)
|
||||
{
|
||||
tex->clearFetchedResults() ;
|
||||
}
|
||||
std::vector<LLViewerFetchedTexture*> textures;
|
||||
gTextureList.findTexturesByID(mFetchingHistory[i].mID, textures);
|
||||
std::vector<LLViewerFetchedTexture*>::iterator iter = textures.begin();
|
||||
while (iter != textures.end())
|
||||
{
|
||||
LLViewerFetchedTexture* tex = *iter++;
|
||||
if (tex)
|
||||
{
|
||||
tex->clearFetchedResults();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4768,6 +4795,8 @@ void LLTextureFetchDebugger::makeRefetchList()
|
|||
continue; //the texture fetch pipeline will take care of visible textures.
|
||||
}
|
||||
|
||||
// todo: Will attempt to refetch icons and ui elements as normal images (boost_none)
|
||||
// thus will create unnecessary LLViewerFetchedTexture, consider supporting separate UI textures
|
||||
mRefetchList[tex].push_back(i);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ private:
|
|||
S32 mNbCurlRequests;
|
||||
S32 mNbCurlCompleted;
|
||||
|
||||
std::map< LLPointer<LLViewerFetchedTexture>, std::vector<S32> > mRefetchList;
|
||||
std::map< LLPointer<LLViewerFetchedTexture>, std::vector<S32> > mRefetchList; // treats UI textures as normal textures
|
||||
std::vector< LLPointer<LLViewerFetchedTexture> > mTempTexList;
|
||||
S32 mTempIndex;
|
||||
S32 mHistoryListIndex;
|
||||
|
|
|
|||
|
|
@ -390,10 +390,6 @@ void LLToast::setVisible(BOOL show)
|
|||
{
|
||||
mTimer->start();
|
||||
}
|
||||
if (!getVisible())
|
||||
{
|
||||
LLModalDialog::setFrontmost(FALSE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "lltoolfocus.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llviewerjoystick.h"
|
||||
|
||||
extern BOOL gDebugClicks;
|
||||
|
|
@ -84,7 +85,14 @@ BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
}
|
||||
// by default, didn't handle it
|
||||
// LL_INFOS() << "LLTool::handleMouseDown" << LL_ENDL;
|
||||
gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN);
|
||||
if (gAgentCamera.cameraMouselook())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -95,8 +103,15 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask)
|
|||
LL_INFOS() << "LLTool left mouse up" << LL_ENDL;
|
||||
}
|
||||
// by default, didn't handle it
|
||||
// LL_INFOS() << "LLTool::handleMouseUp" << LL_ENDL;
|
||||
gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP);
|
||||
// LL_INFOS() << "LLTool::handleMouseUp" << LL_ENDL;
|
||||
if (gAgentCamera.cameraMouselook())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_UP);
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -760,12 +760,13 @@ BOOL LLToolCompGun::handleHover(S32 x, S32 y, MASK mask)
|
|||
|
||||
BOOL LLToolCompGun::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
// if the left button is grabbed, don't put up the pie menu
|
||||
if (gAgent.leftButtonGrabbed())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
|
||||
return FALSE;
|
||||
}
|
||||
// if the left button is blocked, don't put up the pie menu
|
||||
if (gAgent.leftButtonBlocked())
|
||||
{
|
||||
// in case of "grabbed" control flag will be set later
|
||||
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// On mousedown, start grabbing
|
||||
gGrabTransientTool = this;
|
||||
|
|
@ -777,12 +778,13 @@ BOOL LLToolCompGun::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
|
||||
BOOL LLToolCompGun::handleDoubleClick(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
// if the left button is grabbed, don't put up the pie menu
|
||||
if (gAgent.leftButtonGrabbed())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
|
||||
return FALSE;
|
||||
}
|
||||
// if the left button is blocked, don't put up the pie menu
|
||||
if (gAgent.leftButtonBlocked())
|
||||
{
|
||||
// in case of "grabbed" control flag will be set later
|
||||
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// On mousedown, start grabbing
|
||||
gGrabTransientTool = this;
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
// call the base class to propogate info to sim
|
||||
LLTool::handleMouseDown(x, y, mask);
|
||||
|
||||
if (!gAgent.leftButtonGrabbed())
|
||||
if (!gAgent.leftButtonBlocked())
|
||||
{
|
||||
// can grab transparent objects (how touch event propagates, scripters rely on this)
|
||||
gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE);
|
||||
|
|
|
|||
|
|
@ -419,11 +419,9 @@ void LLToolMgr::clearTransientTool()
|
|||
|
||||
void LLToolMgr::onAppFocusLost()
|
||||
{
|
||||
// <FS:ND> During shutdown the viewer might be in a state that leads to crashes.
|
||||
if( LLApp::isQuitting() )
|
||||
if (LLApp::isQuitting())
|
||||
return;
|
||||
// </FS:ND>
|
||||
|
||||
|
||||
if (mSelectedTool)
|
||||
{
|
||||
mSelectedTool->handleDeselect();
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue