summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcorehttp/_httpoprequest.cpp14
-rw-r--r--indra/llimage/llimage.cpp34
-rw-r--r--indra/llimage/llimage.h32
-rw-r--r--indra/llimage/llimagej2c.cpp4
-rw-r--r--indra/llmessage/llavatarnamecache.cpp17
-rw-r--r--indra/llmessage/llavatarnamecache.h4
-rw-r--r--indra/llmessage/llproxy.cpp45
-rw-r--r--indra/llmessage/llproxy.h8
-rw-r--r--indra/llplugin/llpluginprocessparent.cpp14
-rw-r--r--indra/llprimitive/lldaeloader.cpp3
-rw-r--r--indra/llprimitive/llmaterial.cpp40
-rw-r--r--indra/llprimitive/llmaterial.h11
-rw-r--r--indra/llrender/llfontregistry.cpp3
-rw-r--r--indra/llrender/llrender2dutils.h1
-rw-r--r--indra/llui/llmenugl.cpp4
-rw-r--r--indra/llui/llscrolllistctrl.cpp40
-rw-r--r--indra/llui/llurlentry.cpp39
-rw-r--r--indra/llui/llurlentry.h13
-rw-r--r--indra/llui/llurlregistry.cpp1
-rw-r--r--indra/llui/tests/llurlentry_test.cpp34
-rw-r--r--indra/llwindow/llwindow.h4
-rw-r--r--indra/llwindow/llwindowwin32.cpp41
-rw-r--r--indra/llwindow/llwindowwin32.h3
-rw-r--r--indra/llxml/llcontrol.cpp18
-rw-r--r--indra/llxml/llcontrol.h2
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llappviewer.cpp13
-rw-r--r--indra/newview/lldrawpoolavatar.cpp4
-rw-r--r--indra/newview/llface.cpp4
-rw-r--r--indra/newview/llfloaterjoystick.cpp148
-rw-r--r--indra/newview/llfloaterjoystick.h9
-rw-r--r--indra/newview/llgiveinventory.cpp13
-rw-r--r--indra/newview/llimview.cpp8
-rw-r--r--indra/newview/llinventorybridge.cpp3
-rw-r--r--indra/newview/llinventoryfunctions.cpp17
-rw-r--r--indra/newview/llmutelist.cpp78
-rw-r--r--indra/newview/llmutelist.h6
-rw-r--r--indra/newview/llpanelcontents.cpp11
-rw-r--r--indra/newview/llpanelcontents.h1
-rw-r--r--indra/newview/llpanelgroupnotices.cpp9
-rw-r--r--indra/newview/llpanelmaininventory.cpp1
-rw-r--r--indra/newview/llpaneloutfitedit.cpp1
-rw-r--r--indra/newview/llpanelpermissions.cpp38
-rw-r--r--indra/newview/llpreviewtexture.cpp2
-rw-r--r--indra/newview/llviewerassetupload.cpp11
-rw-r--r--indra/newview/llviewerjoystick.cpp358
-rw-r--r--indra/newview/llviewerjoystick.h10
-rw-r--r--indra/newview/llviewermenu.cpp166
-rw-r--r--indra/newview/llviewermenu.h6
-rw-r--r--indra/newview/llviewermenufile.cpp9
-rw-r--r--indra/newview/llviewermessage.cpp7
-rw-r--r--indra/newview/llviewerstats.cpp20
-rw-r--r--indra/newview/llviewerstats.h2
-rw-r--r--indra/newview/llviewerwindow.h2
-rw-r--r--indra/newview/llvoavatarself.cpp8
-rw-r--r--indra/newview/llvovolume.cpp294
-rw-r--r--indra/newview/llwearableitemslist.cpp58
-rw-r--r--indra/newview/llwearableitemslist.h7
-rw-r--r--indra/newview/pipeline.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_joystick.xml165
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_appearance.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_scripts.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml13
-rw-r--r--indra/newview/skins/default/xui/en/menu_attachment_other.xml5
-rw-r--r--indra/newview/skins/default/xui/en/menu_attachment_self.xml307
-rw-r--r--indra/newview/skins/default/xui/en/menu_avatar_other.xml5
-rw-r--r--indra/newview/skins/default/xui/en/menu_avatar_self.xml451
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml461
-rw-r--r--indra/newview/skins/default/xui/en/menu_wearable_list_item.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_wearable.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_notices.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_edit.xml2
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml4
74 files changed, 2191 insertions, 1010 deletions
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index 408adbde2b..04617792a2 100644
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -567,16 +567,9 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
// Use the viewer-based thread-safe API which has a
// fast/safe check for proxy enable. Would like to
// encapsulate this someway...
- if (LLProxy::instanceExists())
- {
- // Make sure proxy won't be initialized from here,
- // it might conflict with LLStartUp::startLLProxy()
- LLProxy::getInstance()->applyProxySettings(mCurlHandle);
- }
- else
- {
- LL_WARNS() << "Proxy is not initialized!" << LL_ENDL;
- }
+ // Make sure proxy won't be getInstance() from here,
+ // it is not thread safe
+ LLProxy::applyProxySettings(mCurlHandle);
}
else if (gpolicy.mHttpProxy.size())
@@ -817,6 +810,7 @@ size_t HttpOpRequest::readCallback(void * data, size_t size, size_t nmemb, void
const size_t do_size((std::min)(req_size, body_size - op->mCurlBodyPos));
const size_t read_size(op->mReqBody->read(op->mCurlBodyPos, static_cast<char *>(data), do_size));
+ // FIXME: singleton's instance() is Thread unsafe! Even if stats accumulators inside are.
HTTPStats::instance().recordDataUp(read_size);
op->mCurlBodyPos += read_size;
return read_size;
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 7a0c8cd8f5..aed8943439 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -583,29 +583,39 @@ static void bilinear_scale(const U8 *src, U32 srcW, U32 srcH, U32 srcCh, U32 src
// LLImage
//---------------------------------------------------------------------------
-LLImage::LLImage(bool use_new_byte_range, S32 minimal_reverse_byte_range_percent)
+//static
+std::string LLImage::sLastErrorMessage;
+LLMutex* LLImage::sMutex = NULL;
+bool LLImage::sUseNewByteRange = false;
+S32 LLImage::sMinimalReverseByteRangePercent = 75;
+
+//static
+void LLImage::initClass(bool use_new_byte_range, S32 minimal_reverse_byte_range_percent)
{
- mMutex = new LLMutex();
- mUseNewByteRange = use_new_byte_range;
- mMinimalReverseByteRangePercent = minimal_reverse_byte_range_percent;
+ sUseNewByteRange = use_new_byte_range;
+ sMinimalReverseByteRangePercent = minimal_reverse_byte_range_percent;
+ sMutex = new LLMutex();
}
-LLImage::~LLImage()
+//static
+void LLImage::cleanupClass()
{
- delete mMutex;
- mMutex = NULL;
+ delete sMutex;
+ sMutex = NULL;
}
-const std::string& LLImage::getLastErrorMessage()
+//static
+const std::string& LLImage::getLastError()
{
static const std::string noerr("No Error");
- return mLastErrorMessage.empty() ? noerr : mLastErrorMessage;
+ return sLastErrorMessage.empty() ? noerr : sLastErrorMessage;
}
-void LLImage::setLastErrorMessage(const std::string& message)
+//static
+void LLImage::setLastError(const std::string& message)
{
- LLMutexLock m(mMutex);
- mLastErrorMessage = message;
+ LLMutexLock m(sMutex);
+ sLastErrorMessage = message;
}
//---------------------------------------------------------------------------
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index 9f8d061293..f66b1666d7 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -30,7 +30,6 @@
#include "lluuid.h"
#include "llstring.h"
#include "llpointer.h"
-#include "llsingleton.h"
#include "lltrace.h"
const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2
@@ -88,26 +87,25 @@ typedef enum e_image_codec
//============================================================================
// library initialization class
+// LLImage is frequently used in threads so do not convert it to LLSingleton
-class LLImage : public LLParamSingleton<LLImage>
+class LLImage
{
- LLSINGLETON(LLImage, bool use_new_byte_range = false, S32 minimal_reverse_byte_range_percent = 75);
- ~LLImage();
public:
+ static void initClass(bool use_new_byte_range = false, S32 minimal_reverse_byte_range_percent = 75);
+ static void cleanupClass();
- const std::string& getLastErrorMessage();
- static const std::string& getLastError() { return getInstance()->getLastErrorMessage(); };
- void setLastErrorMessage(const std::string& message);
- static void setLastError(const std::string& message) { getInstance()->setLastErrorMessage(message); }
-
- bool useNewByteRange() { return mUseNewByteRange; }
- S32 getReverseByteRangePercent() { return mMinimalReverseByteRangePercent; }
-
-private:
- LLMutex* mMutex;
- std::string mLastErrorMessage;
- bool mUseNewByteRange;
- S32 mMinimalReverseByteRangePercent;
+ static const std::string& getLastError();
+ static void setLastError(const std::string& message);
+
+ static bool useNewByteRange() { return sUseNewByteRange; }
+ static S32 getReverseByteRangePercent() { return sMinimalReverseByteRangePercent; }
+
+protected:
+ static LLMutex* sMutex;
+ static std::string sLastErrorMessage;
+ static bool sUseNewByteRange;
+ static S32 sMinimalReverseByteRangePercent;
};
//============================================================================
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 71cab0554d..4bff21610f 100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
@@ -281,7 +281,7 @@ S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 r
S32 bytes;
S32 new_bytes = (S32) (sqrt((F32)(w*h))*(F32)(comp)*rate*1000.f/layer_factor);
S32 old_bytes = (S32)((F32)(w*h*comp)*rate);
- bytes = (LLImage::getInstance()->useNewByteRange() && (new_bytes < old_bytes) ? new_bytes : old_bytes);
+ bytes = (LLImage::useNewByteRange() && (new_bytes < old_bytes) ? new_bytes : old_bytes);
bytes = llmax(bytes, calcHeaderSizeJ2C());
return bytes;
}
@@ -322,7 +322,7 @@ S32 LLImageJ2C::calcDiscardLevelBytes(S32 bytes)
{
S32 bytes_needed = calcDataSize(discard_level);
// Use TextureReverseByteRange percent (see settings.xml) of the optimal size to qualify as correct rendering for the given discard level
- if (bytes >= (bytes_needed*LLImage::getInstance()->getReverseByteRangePercent()/100))
+ if (bytes >= (bytes_needed*LLImage::getReverseByteRangePercent()/100))
{
break;
}
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index fbd65cc67b..7380df041d 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -285,12 +285,27 @@ void LLAvatarNameCache::processName(const LLUUID& agent_id, const LLAvatarName&
return;
}
+ bool updated_account = true; // assume obsolete value for new arrivals by default
+
+ std::map<LLUUID, LLAvatarName>::iterator it = mCache.find(agent_id);
+ if (it != mCache.end()
+ && (*it).second.getAccountName() == av_name.getAccountName())
+ {
+ updated_account = false;
+ }
+
// Add to the cache
mCache[agent_id] = av_name;
// Suppress request from the queue
mPendingQueue.erase(agent_id);
+ // notify mute list about changes
+ if (updated_account && mAccountNameChangedCallback)
+ {
+ mAccountNameChangedCallback(agent_id, av_name);
+ }
+
// Signal everyone waiting on this name
signal_map_t::iterator sig_it = mSignalMap.find(agent_id);
if (sig_it != mSignalMap.end())
@@ -303,6 +318,8 @@ void LLAvatarNameCache::processName(const LLUUID& agent_id, const LLAvatarName&
delete signal;
signal = NULL;
}
+
+
}
void LLAvatarNameCache::requestNamesViaCapability()
diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h
index ba89d569f3..549d1703fa 100644
--- a/indra/llmessage/llavatarnamecache.h
+++ b/indra/llmessage/llavatarnamecache.h
@@ -42,6 +42,7 @@ class LLAvatarNameCache : public LLSingleton<LLAvatarNameCache>
~LLAvatarNameCache();
public:
typedef boost::signals2::signal<void (void)> use_display_name_signal_t;
+ typedef boost::function<void (const LLUUID id, const LLAvatarName& av_name)> account_name_changed_callback_t;
// Import/export the name cache to file.
bool importFile(std::istream& istr);
@@ -103,6 +104,8 @@ public:
void addUseDisplayNamesCallback(const use_display_name_signal_t::slot_type& cb);
+ void setAccountNameChangedCallback(const account_name_changed_callback_t& cb) { mAccountNameChangedCallback = cb; }
+
private:
// Handle name response off network.
void processName(const LLUUID& agent_id,
@@ -141,6 +144,7 @@ private:
private:
use_display_name_signal_t mUseDisplayNamesSignal;
+ account_name_changed_callback_t mAccountNameChangedCallback;
// Cache starts in a paused state until we can determine if the
// current region supports display names.
diff --git a/indra/llmessage/llproxy.cpp b/indra/llmessage/llproxy.cpp
index 86bcfe6881..749e599c66 100644
--- a/indra/llmessage/llproxy.cpp
+++ b/indra/llmessage/llproxy.cpp
@@ -40,6 +40,7 @@
// incoming packet just to do a simple bool test. The getter for this
// member is also static
bool LLProxy::sUDPProxyEnabled = false;
+LLProxy* LLProxy::sProxyInstance = NULL;
// Some helpful TCP static functions.
static apr_status_t tcp_blocking_handshake(LLSocket::ptr_t handle, char * dataout, apr_size_t outlen, char * datain, apr_size_t maxinlen); // Do a TCP data handshake
@@ -60,11 +61,21 @@ LLProxy::LLProxy():
LLProxy::~LLProxy()
{
- if (ll_apr_is_initialized())
- {
- stopSOCKSProxy();
- disableHTTPProxy();
- }
+ if (ll_apr_is_initialized())
+ {
+ // locks mutex
+ stopSOCKSProxy();
+ disableHTTPProxy();
+ }
+ // The primary safety of sProxyInstance is the fact that by the
+ // point SUBSYSTEM_CLEANUP(LLProxy) gets called, nothing should
+ // be capable of using proxy
+ sProxyInstance = NULL;
+}
+
+void LLProxy::initSingleton()
+{
+ sProxyInstance = this;
}
/**
@@ -424,28 +435,28 @@ void LLProxy::cleanupClass()
void LLProxy::applyProxySettings(CURL* handle)
{
// Do a faster unlocked check to see if we are supposed to proxy.
- if (mHTTPProxyEnabled)
+ if (sProxyInstance && sProxyInstance->mHTTPProxyEnabled)
{
- // We think we should proxy, lock the proxy mutex.
- LLMutexLock lock(&mProxyMutex);
+ // We think we should proxy, lock the proxy mutex. sProxyInstance is not protected by mutex
+ LLMutexLock lock(&sProxyInstance->mProxyMutex);
// Now test again to verify that the proxy wasn't disabled between the first check and the lock.
- if (mHTTPProxyEnabled)
+ if (sProxyInstance->mHTTPProxyEnabled)
{
- LLCore::LLHttp::check_curl_code(curl_easy_setopt(handle, CURLOPT_PROXY, mHTTPProxy.getIPString().c_str()), CURLOPT_PROXY);
- LLCore::LLHttp::check_curl_code(curl_easy_setopt(handle, CURLOPT_PROXYPORT, mHTTPProxy.getPort()), CURLOPT_PROXYPORT);
+ LLCore::LLHttp::check_curl_code(curl_easy_setopt(handle, CURLOPT_PROXY, sProxyInstance->mHTTPProxy.getIPString().c_str()), CURLOPT_PROXY);
+ LLCore::LLHttp::check_curl_code(curl_easy_setopt(handle, CURLOPT_PROXYPORT, sProxyInstance->mHTTPProxy.getPort()), CURLOPT_PROXYPORT);
- if (mProxyType == LLPROXY_SOCKS)
+ if (sProxyInstance->mProxyType == LLPROXY_SOCKS)
{
- LLCore::LLHttp::check_curl_code(curl_easy_setopt(handle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5), CURLOPT_PROXYTYPE);
- if (mAuthMethodSelected == METHOD_PASSWORD)
+ LLCore::LLHttp::check_curl_code(curl_easy_setopt(handle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5), CURLOPT_PROXYTYPE);
+ if (sProxyInstance->mAuthMethodSelected == METHOD_PASSWORD)
{
- std::string auth_string = mSocksUsername + ":" + mSocksPassword;
- LLCore::LLHttp::check_curl_code(curl_easy_setopt(handle, CURLOPT_PROXYUSERPWD, auth_string.c_str()), CURLOPT_PROXYUSERPWD);
+ std::string auth_string = sProxyInstance->mSocksUsername + ":" + sProxyInstance->mSocksPassword;
+ LLCore::LLHttp::check_curl_code(curl_easy_setopt(handle, CURLOPT_PROXYUSERPWD, auth_string.c_str()), CURLOPT_PROXYUSERPWD);
}
}
else
{
- LLCore::LLHttp::check_curl_code(curl_easy_setopt(handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP), CURLOPT_PROXYTYPE);
+ LLCore::LLHttp::check_curl_code(curl_easy_setopt(handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP), CURLOPT_PROXYTYPE);
}
}
}
diff --git a/indra/llmessage/llproxy.h b/indra/llmessage/llproxy.h
index a1ffa9e5d5..25f6977e14 100644
--- a/indra/llmessage/llproxy.h
+++ b/indra/llmessage/llproxy.h
@@ -226,6 +226,8 @@ class LLProxy: public LLSingleton<LLProxy>
LLSINGLETON(LLProxy);
LOG_CLASS(LLProxy);
+ /*virtual*/ void initSingleton();
+
public:
// Static check for enabled status for UDP packets. Call from main thread only.
static bool isSOCKSProxyEnabled() { return sUDPProxyEnabled; }
@@ -251,7 +253,7 @@ public:
// Apply the current proxy settings to a curl request. Doesn't do anything if mHTTPProxyEnabled is false.
// Safe to call from any thread.
- void applyProxySettings(CURL* handle);
+ static void applyProxySettings(CURL* handle);
// Start a connection to the SOCKS 5 proxy. Call from main thread only.
S32 startSOCKSProxy(LLHost host);
@@ -344,6 +346,10 @@ private:
/*###########################################################################################
END OF SHARED MEMBERS
###########################################################################################*/
+
+ // A hack to get arround getInstance() and capture_dependency() which are unsafe to use inside threads
+ // set/reset on init/cleanup, strictly for use in applyProxySettings
+ static LLProxy* sProxyInstance;
};
#endif
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index eb6cb1b503..7d18bae947 100644
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -152,8 +152,18 @@ void LLPluginProcessParent::shutdown()
mapInstances_t::iterator it;
for (it = sInstances.begin(); it != sInstances.end(); ++it)
{
- (*it).second->setState(STATE_GOODBYE);
- (*it).second->idle();
+ EState state = (*it).second->mState;
+ if (state != STATE_CLEANUP
+ || state != STATE_EXITING
+ || state != STATE_DONE
+ || state != STATE_ERROR)
+ {
+ (*it).second->setState(STATE_GOODBYE);
+ }
+ if (state != STATE_DONE)
+ {
+ (*it).second->idle();
+ }
}
sInstances.clear();
}
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index 139f48fef8..f18f112153 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -1458,7 +1458,8 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
std::string lookingForJoint = (*jointIt).c_str();
//Look for the joint xform that we extracted from the skeleton, using the jointIt as the key
//and store it in the alternate bind matrix
- if ( mJointMap.find( lookingForJoint ) != mJointMap.end() )
+ if (mJointMap.find(lookingForJoint) != mJointMap.end()
+ && model->mSkinInfo.mInvBindMatrix.size() > i)
{
LLMatrix4 newInverse = model->mSkinInfo.mInvBindMatrix[i];
newInverse.setTranslation( mJointList[lookingForJoint].getTranslation() );
diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp
index a219ac1450..a1bfc4edd9 100644
--- a/indra/llprimitive/llmaterial.cpp
+++ b/indra/llprimitive/llmaterial.cpp
@@ -28,6 +28,8 @@
#include "llmaterial.h"
+#include "../llrender/llglheaders.h"
+
/**
* Materials cap parameters
*/
@@ -105,6 +107,8 @@ LLMaterial::LLMaterial()
, mSpecularLightExponent(LLMaterial::DEFAULT_SPECULAR_LIGHT_EXPONENT)
, mEnvironmentIntensity(LLMaterial::DEFAULT_ENV_INTENSITY)
, mDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
+ , mDiffuseFormatPrimary(GL_RGBA)
+ , mDiffuseBaked(false)
, mAlphaMaskCutoff(0)
{
}
@@ -311,6 +315,20 @@ void LLMaterial::setEnvironmentIntensity(U8 intensity)
mEnvironmentIntensity = intensity;
}
+U8 LLMaterial::getDiffuseAlphaModeRender() const
+{
+ if (mDiffuseBaked
+ || mDiffuseFormatPrimary == GL_RGBA
+ || mDiffuseFormatPrimary == GL_ALPHA)
+ {
+ return mDiffuseAlphaMode;
+ }
+ else
+ {
+ return DIFFUSE_ALPHA_MODE_NONE;
+ }
+}
+
U8 LLMaterial::getDiffuseAlphaMode() const
{
return mDiffuseAlphaMode;
@@ -321,6 +339,26 @@ void LLMaterial::setDiffuseAlphaMode(U8 alpha_mode)
mDiffuseAlphaMode = alpha_mode;
}
+U32 LLMaterial::getDiffuseFormatPrimary() const
+{
+ return mDiffuseFormatPrimary;
+}
+
+void LLMaterial::setDiffuseFormatPrimary(U32 format_primary)
+{
+ mDiffuseFormatPrimary = format_primary;
+}
+
+bool LLMaterial::getIsDiffuseBaked() const
+{
+ return mDiffuseBaked;
+}
+
+void LLMaterial::setDiffuseBaked(bool baked)
+{
+ mDiffuseBaked = baked;
+}
+
U8 LLMaterial::getAlphaMaskCutoff() const
{
return mAlphaMaskCutoff;
@@ -437,7 +475,7 @@ U32 LLMaterial::getShaderMask(U32 alpha_mode)
}
else
{
- ret = getDiffuseAlphaMode();
+ ret = getDiffuseAlphaModeRender();
}
llassert(ret < SHADER_COUNT);
diff --git a/indra/llprimitive/llmaterial.h b/indra/llprimitive/llmaterial.h
index d58b7ee812..1207917568 100644
--- a/indra/llprimitive/llmaterial.h
+++ b/indra/llprimitive/llmaterial.h
@@ -115,8 +115,17 @@ public:
void setSpecularLightExponent(U8 exponent);
U8 getEnvironmentIntensity() const;
void setEnvironmentIntensity(U8 intensity);
+
+ // getDiffuseAlphaModeRender takes into account if image supports alpha
+ // and returns value apropriate for render
+ // getDiffuseAlphaMode() returns value as is
+ U8 getDiffuseAlphaModeRender() const;
U8 getDiffuseAlphaMode() const;
void setDiffuseAlphaMode(U8 alpha_mode);
+ U32 getDiffuseFormatPrimary() const;
+ void setDiffuseFormatPrimary(U32 format_primary);
+ bool getIsDiffuseBaked() const;
+ void setDiffuseBaked(bool baked);
U8 getAlphaMaskCutoff() const;
void setAlphaMaskCutoff(U8 cutoff);
@@ -147,6 +156,8 @@ protected:
U8 mSpecularLightExponent;
U8 mEnvironmentIntensity;
U8 mDiffuseAlphaMode;
+ U32 mDiffuseFormatPrimary; // value from texture, LLGLenum, is not included in fromLLSD/asLLSD
+ bool mDiffuseBaked; // is not included in fromLLSD/asLLSD
U8 mAlphaMaskCutoff;
};
diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp
index dbe71e2882..33a33af160 100644
--- a/indra/llrender/llfontregistry.cpp
+++ b/indra/llrender/llfontregistry.cpp
@@ -45,6 +45,7 @@ bool font_desc_init_from_xml(LLXMLNodePtr node, LLFontDescriptor& desc);
bool init_from_xml(LLFontRegistry* registry, LLXMLNodePtr node);
const std::string MACOSX_FONT_PATH_LIBRARY = "/Library/Fonts/";
+const std::string MACOSX_FONT_SUPPLEMENTAL = "Supplemental/";
LLFontDescriptor::LLFontDescriptor():
mStyle(0)
@@ -473,6 +474,8 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
font_paths.push_back(sys_path + *file_name_it);
#if LL_DARWIN
font_paths.push_back(MACOSX_FONT_PATH_LIBRARY + *file_name_it);
+ font_paths.push_back(MACOSX_FONT_PATH_LIBRARY + MACOSX_FONT_SUPPLEMENTAL + *file_name_it);
+ font_paths.push_back(sys_path + MACOSX_FONT_SUPPLEMENTAL + *file_name_it);
#endif
bool is_ft_collection = (std::find(ft_collection_list.begin(), ft_collection_list.end(), *file_name_it) != ft_collection_list.end());
diff --git a/indra/llrender/llrender2dutils.h b/indra/llrender/llrender2dutils.h
index 70ab006fd6..8c01784071 100644
--- a/indra/llrender/llrender2dutils.h
+++ b/indra/llrender/llrender2dutils.h
@@ -32,6 +32,7 @@
#include "llpointer.h" // LLPointer<>
#include "llrect.h"
+#include "llsingleton.h"
#include "llglslshader.h"
class LLColor4;
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 5568a84494..c2698fa648 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -79,7 +79,7 @@ const U32 LEFT_PAD_PIXELS = 3;
const U32 LEFT_WIDTH_PIXELS = 15;
const U32 LEFT_PLAIN_PIXELS = LEFT_PAD_PIXELS + LEFT_WIDTH_PIXELS;
-const U32 RIGHT_PAD_PIXELS = 2;
+const U32 RIGHT_PAD_PIXELS = 7;
const U32 RIGHT_WIDTH_PIXELS = 15;
const U32 RIGHT_PLAIN_PIXELS = RIGHT_PAD_PIXELS + RIGHT_WIDTH_PIXELS;
@@ -95,7 +95,7 @@ const std::string SEPARATOR_NAME("separator");
const std::string VERTICAL_SEPARATOR_LABEL( "|" );
const std::string LLMenuGL::BOOLEAN_TRUE_PREFIX( "\xE2\x9C\x94" ); // U+2714 HEAVY CHECK MARK
-const std::string LLMenuGL::BRANCH_SUFFIX( "\xE2\x96\xB6" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE
+const std::string LLMenuGL::BRANCH_SUFFIX( "\xe2\x96\xb8" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE
const std::string LLMenuGL::ARROW_UP ("^^^^^^^");
const std::string LLMenuGL::ARROW_DOWN("vvvvvvv");
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 763c3aeb81..8570dcf318 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1380,18 +1380,34 @@ BOOL LLScrollListCtrl::setSelectedByValue(const LLSD& value, BOOL selected)
for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{
LLScrollListItem* item = *iter;
- if (item->getEnabled() && (item->getValue().asString() == value.asString()))
- {
- if (selected)
- {
- selectItem(item);
- }
- else
- {
- deselectItem(item);
- }
- found = TRUE;
- break;
+ if (item->getEnabled())
+ {
+ if (value.isBinary())
+ {
+ if (item->getValue().isBinary())
+ {
+ LLSD::Binary data1 = value.asBinary();
+ LLSD::Binary data2 = item->getValue().asBinary();
+ found = std::equal(data1.begin(), data1.end(), data2.begin()) ? TRUE : FALSE;
+ }
+ }
+ else
+ {
+ found = item->getValue().asString() == value.asString() ? TRUE : FALSE;
+ }
+
+ if (found)
+ {
+ if (selected)
+ {
+ selectItem(item);
+ }
+ else
+ {
+ deselectItem(item);
+ }
+ break;
+ }
}
}
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 333d03f208..ac86101f69 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -1475,4 +1475,43 @@ void LLUrlEntryExperienceProfile::onExperienceDetails( const LLSD& experience_de
callObservers(experience_details[LLExperienceCache::EXPERIENCE_ID].asString(), name, LLStringUtil::null);
}
+//
+// LLUrlEntryEmail Describes an IPv6 address
+//
+LLUrlEntryIPv6::LLUrlEntryIPv6()
+ : LLUrlEntryBase()
+{
+ mHostPath = "https?://\\[([a-f0-9:]+:+)+[a-f0-9]+]";
+ mPattern = boost::regex(mHostPath + "(:\\d{1,5})?(/\\S*)?",
+ boost::regex::perl | boost::regex::icase);
+ mMenuName = "menu_url_http.xml";
+ mTooltip = LLTrans::getString("TooltipHttpUrl");
+}
+std::string LLUrlEntryIPv6::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
+{
+ boost::regex regex = boost::regex(mHostPath, boost::regex::perl | boost::regex::icase);
+ boost::match_results<std::string::const_iterator> matches;
+
+ if (boost::regex_search(url, matches, regex))
+ {
+ return url.substr(0, matches[0].length());
+ }
+ else
+ {
+ return url;
+ }
+}
+
+std::string LLUrlEntryIPv6::getQuery(const std::string &url) const
+{
+ boost::regex regex = boost::regex(mHostPath, boost::regex::perl | boost::regex::icase);
+ boost::match_results<std::string::const_iterator> matches;
+
+ return boost::regex_replace(url, regex, "");
+}
+
+std::string LLUrlEntryIPv6::getUrl(const std::string &string) const
+{
+ return string;
+}
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 78c149d9fd..0a0c247a6a 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -513,5 +513,18 @@ public:
/*virtual*/ std::string getUrl(const std::string &string) const;
};
+///
+/// LLUrlEntryEmail Describes an IPv6 address
+///
+class LLUrlEntryIPv6 : public LLUrlEntryBase
+{
+public:
+ LLUrlEntryIPv6();
+ /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
+ /*virtual*/ std::string getUrl(const std::string &string) const;
+ /*virtual*/ std::string getQuery(const std::string &url) const;
+
+ std::string mHostPath;
+};
#endif
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index ba6fa1e2e9..321a0ec5b9 100644
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -79,6 +79,7 @@ LLUrlRegistry::LLUrlRegistry()
mUrlEntrySLLabel = new LLUrlEntrySLLabel();
registerUrl(mUrlEntrySLLabel);
registerUrl(new LLUrlEntryEmail());
+ registerUrl(new LLUrlEntryIPv6());
}
LLUrlRegistry::~LLUrlRegistry()
diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp
index 3c34fd269e..4a4fdb72e3 100644
--- a/indra/llui/tests/llurlentry_test.cpp
+++ b/indra/llui/tests/llurlentry_test.cpp
@@ -903,4 +903,38 @@ namespace tut
"and even no www something lindenlab.com",
"");
}
+
+ template<> template<>
+ void object::test<16>()
+ {
+ //
+ // test LLUrlEntryIPv6
+ //
+ LLUrlEntryIPv6 url;
+
+ // Regex tests.
+ testRegex("match urls with a protocol", url,
+ "this url should match http://[::1]",
+ "http://[::1]");
+
+ testRegex("match urls with a protocol and query", url,
+ "this url should match http://[::1]/file.mp3",
+ "http://[::1]/file.mp3");
+
+ testRegex("match urls with a protocol", url,
+ "this url should match http://[2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d]",
+ "http://[2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d]");
+
+ testRegex("match urls with port", url,
+ "let's specify some port http://[2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d]:8080",
+ "http://[2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d]:8080");
+
+ testRegex("don't match urls w/o protocol", url,
+ "looks like an url something [2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d] but no https prefix",
+ "");
+
+ testRegex("don't match incorrect urls", url,
+ "http://[ 2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d ]",
+ "");
+ }
}
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index a05ba8cbba..f1113acd5f 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -168,6 +168,10 @@ public:
// Get system UI size based on DPI (for 96 DPI UI size should be 1.0)
virtual F32 getSystemUISize() { return 1.0; }
+
+ // windows only DirectInput8 for joysticks
+ virtual void* getDirectInput8() { return NULL; };
+ virtual bool getInputDevices(U32 device_type_filter, void * devices_callback, void* userdata) { return false; };
protected:
LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags);
virtual ~LLWindow();
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 7783505c27..3da41af7d2 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -59,6 +59,9 @@
#include <dinput.h>
#include <Dbt.h.>
+#include <InitGuid.h> // needed for llurlentry test to build on some systems
+#pragma comment(lib, "dxguid.lib") // needed for llurlentry test to build on some systems
+#pragma comment(lib, "dinput8")
const S32 MAX_MESSAGE_PER_UPDATE = 20;
const S32 BITS_PER_PIXEL = 32;
@@ -76,6 +79,7 @@ const F32 ICON_FLASH_TIME = 0.5f;
extern BOOL gDebugWindowProc;
LPWSTR gIconResource = IDI_APPLICATION;
+LPDIRECTINPUT8 gDirectInput8;
LLW32MsgCallback gAsyncMsgCallback = NULL;
@@ -482,6 +486,21 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
mhInstance = GetModuleHandle(NULL);
mWndProc = NULL;
+ // Init Direct Input - needed for joystick / Spacemouse
+
+ LPDIRECTINPUT8 di8_interface;
+ HRESULT status = DirectInput8Create(
+ mhInstance, // HINSTANCE hinst,
+ DIRECTINPUT_VERSION, // DWORD dwVersion,
+ IID_IDirectInput8, // REFIID riidltf,
+ (LPVOID*)&di8_interface, // LPVOID * ppvOut,
+ NULL // LPUNKNOWN punkOuter
+ );
+ if (status == DI_OK)
+ {
+ gDirectInput8 = di8_interface;
+ }
+
mSwapMethod = SWAP_METHOD_UNDEFINED;
// No WPARAM yet.
@@ -4170,6 +4189,28 @@ void LLWindowWin32::setDPIAwareness()
}
}
+void* LLWindowWin32::getDirectInput8()
+{
+ return &gDirectInput8;
+}
+
+bool LLWindowWin32::getInputDevices(U32 device_type_filter, void * di8_devices_callback, void* userdata)
+{
+ if (gDirectInput8 != NULL)
+ {
+ // Enumerate devices
+ HRESULT status = gDirectInput8->EnumDevices(
+ (DWORD) device_type_filter, // DWORD dwDevType,
+ (LPDIENUMDEVICESCALLBACK)di8_devices_callback, // LPDIENUMDEVICESCALLBACK lpCallback, // BOOL DIEnumDevicesCallback( LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef ) // BOOL CALLBACK DinputDevice::DevicesCallback
+ (LPVOID*)userdata, // LPVOID pvRef
+ DIEDFL_ATTACHEDONLY // DWORD dwFlags
+ );
+
+ return status == DI_OK;
+ }
+ return false;
+}
+
F32 LLWindowWin32::getSystemUISize()
{
F32 scale_value = 1.f;
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index 9cd16eb993..ee0df570e9 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -116,6 +116,9 @@ public:
static std::vector<std::string> getDynamicFallbackFontList();
static void setDPIAwareness();
+
+ /*virtual*/ void* getDirectInput8();
+ /*virtual*/ bool getInputDevices(U32 device_type_filter, void * di8_devices_callback, void* userdata);
protected:
LLWindowWin32(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags,
diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp
index 80a414d00f..ead8634df4 100644
--- a/indra/llxml/llcontrol.cpp
+++ b/indra/llxml/llcontrol.cpp
@@ -641,6 +641,24 @@ LLSD LLControlGroup::getLLSD(const std::string& name)
return get<LLSD>(name);
}
+LLSD LLControlGroup::asLLSD(bool diffs_only)
+{
+ // Dump all stored values as LLSD
+ LLSD result = LLSD::emptyArray();
+ for (ctrl_name_table_t::iterator iter = mNameTable.begin();
+ iter != mNameTable.end(); iter++)
+ {
+ LLControlVariable *control = iter->second;
+ if (!control || control->isType(TYPE_STRING) || (diffs_only && control->isDefault()))
+ {
+ continue;
+ }
+ const std::string& name = iter->first;
+ result[name] = getLLSD(name);
+ }
+ return result;
+}
+
BOOL LLControlGroup::controlExists(const std::string& name)
{
ctrl_name_table_t::iterator iter = mNameTable.find(name);
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index 99946607f4..19508becc3 100644
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -242,6 +242,8 @@ public:
LLColor4 getColor4(const std::string& name);
LLColor3 getColor3(const std::string& name);
+ LLSD asLLSD(bool diffs_only);
+
// generic getter
template<typename T> T get(const std::string& name)
{
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 8d5a97d1cb..62c73c0e45 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5231,6 +5231,17 @@
<key>Value</key>
<string />
</map>
+ <key>JoystickDeviceUUID</key>
+ <map>
+ <key>Comment</key>
+ <string>Preffered device ID.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
<key>JoystickMouselookYaw</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 70b41a0a5f..ee055c48d4 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -286,7 +286,7 @@ extern BOOL gHiDPISupport;
////////////////////////////////////////////////////////////
// All from the last globals push...
-F32 gSimLastTime; // Used in LLAppViewer::init and send_stats()
+F32 gSimLastTime; // Used in LLAppViewer::init and send_viewer_stats()
F32 gSimFrames;
BOOL gShowObjectUpdates = FALSE;
@@ -2047,6 +2047,7 @@ bool LLAppViewer::cleanup()
LLUIImageList::getInstance()->cleanUp();
// This should eventually be done in LLAppViewer
+ SUBSYSTEM_CLEANUP(LLImage);
SUBSYSTEM_CLEANUP(LLVFSThread);
SUBSYSTEM_CLEANUP(LLLFSThread);
@@ -2090,6 +2091,7 @@ bool LLAppViewer::cleanup()
LLWeb::loadURLExternal( gLaunchFileOnQuit, false );
LL_INFOS() << "File launched." << LL_ENDL;
}
+ // make sure nothing uses applyProxySettings by this point.
LL_INFOS() << "Cleaning up LLProxy." << LL_ENDL;
SUBSYSTEM_CLEANUP(LLProxy);
LLCore::LLHttp::cleanup();
@@ -2149,7 +2151,7 @@ bool LLAppViewer::initThreads()
{
static const bool enable_threads = true;
- LLImage::initParamSingleton(gSavedSettings.getBOOL("TextureNewByteRange"),gSavedSettings.getS32("TextureReverseByteRange"));
+ LLImage::initClass(gSavedSettings.getBOOL("TextureNewByteRange"),gSavedSettings.getS32("TextureReverseByteRange"));
LLVFSThread::initClass(enable_threads && false);
LLLFSThread::initClass(enable_threads && false);
@@ -3953,7 +3955,9 @@ void LLAppViewer::requestQuit()
gFloaterView->closeAllChildren(true);
}
- send_stats();
+ // Send preferences once, when exiting
+ bool include_preferences = true;
+ send_viewer_stats(include_preferences);
gLogoutTimer.reset();
mQuitRequested = true;
@@ -4752,7 +4756,8 @@ void LLAppViewer::idle()
if (viewer_stats_timer.getElapsedTimeF32() >= SEND_STATS_PERIOD && !gDisconnected)
{
LL_INFOS() << "Transmitting sessions stats" << LL_ENDL;
- send_stats();
+ bool include_preferences = false;
+ send_viewer_stats(include_preferences);
viewer_stats_timer.reset();
}
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 6fc39f213e..e6f75b2b8b 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -2121,7 +2121,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
if (mat)
{
- switch (LLMaterial::eDiffuseAlphaMode(mat->getDiffuseAlphaMode()))
+ switch (LLMaterial::eDiffuseAlphaMode(mat->getDiffuseAlphaModeRender()))
{
case LLMaterial::DIFFUSE_ALPHA_MODE_MASK:
{
@@ -2259,7 +2259,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
sVertexProgram->uniform4f(LLShaderMgr::SPECULAR_COLOR, col.mV[0], col.mV[1], col.mV[2], spec);
sVertexProgram->uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, env);
- if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (mat->getDiffuseAlphaModeRender() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
F32 cutoff = mat->getAlphaMaskCutoff()/255.f;
sVertexProgram->setMinimumAlpha(cutoff);
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 4a802ad9aa..01d8b6775b 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1165,7 +1165,7 @@ bool LLFace::canRenderAsMask()
}
LLMaterial* mat = te->getMaterialParams();
- if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
+ if (mat && mat->getDiffuseAlphaModeRender() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
{
return false;
}
@@ -1412,7 +1412,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
else
{
- if (!mat || mat->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (!mat || mat->getDiffuseAlphaModeRender() != LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
shiny_in_alpha = true;
}
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index 2b672bc890..93a26f31cc 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -40,7 +40,17 @@
#include "llviewercontrol.h"
#include "llappviewer.h"
#include "llviewerjoystick.h"
+#include "llviewerwindow.h"
+#include "llwindow.h"
#include "llcheckboxctrl.h"
+#include "llcombobox.h"
+
+#if LL_WINDOWS && !LL_MESA_HEADLESS
+// Require DirectInput version 8
+#define DIRECTINPUT_VERSION 0x0800
+
+#include <dinput.h>
+#endif
static LLTrace::SampleStatHandle<> sJoystickAxis0("Joystick axis 0"),
sJoystickAxis1("Joystick axis 1"),
@@ -58,8 +68,33 @@ static LLTrace::SampleStatHandle<>* sJoystickAxes[6] =
&sJoystickAxis5
};
+
+#if LL_WINDOWS && !LL_MESA_HEADLESS
+
+BOOL CALLBACK di8_list_devices_callback(LPCDIDEVICEINSTANCE device_instance_ptr, LPVOID pvRef)
+{
+ // Note: If a single device can function as more than one DirectInput
+ // device type, it is enumerated as each device type that it supports.
+ // Capable of detecting devices like Oculus Rift
+ if (device_instance_ptr && pvRef)
+ {
+ std::string product_name = utf16str_to_utf8str(llutf16string(device_instance_ptr->tszProductName));
+ S32 size = sizeof(GUID);
+ LLSD::Binary data; //just an std::vector
+ data.resize(size);
+ memcpy(&data[0], &device_instance_ptr->guidInstance /*POD _GUID*/, size);
+
+ LLFloaterJoystick * floater = (LLFloaterJoystick*)pvRef;
+ LLSD value = data;
+ floater->addDevice(product_name, value);
+ }
+ return DIENUM_CONTINUE;
+}
+#endif
+
LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
- : LLFloater(data)
+ : LLFloater(data),
+ mHasDeviceList(false)
{
if (!LLViewerJoystick::getInstance()->isJoystickInitialized())
{
@@ -71,14 +106,13 @@ LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
void LLFloaterJoystick::draw()
{
- bool joystick_inited = LLViewerJoystick::getInstance()->isJoystickInitialized();
- getChildView("enable_joystick")->setEnabled(joystick_inited);
- getChildView("joystick_type")->setEnabled(joystick_inited);
- std::string desc = LLViewerJoystick::getInstance()->getDescription();
- if (desc.empty()) desc = getString("NoDevice");
- getChild<LLUICtrl>("joystick_type")->setValue(desc);
-
- LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
+ LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
+ bool joystick_inited = joystick->isJoystickInitialized();
+ if (joystick_inited != mHasDeviceList)
+ {
+ refreshListOfDevices();
+ }
+
for (U32 i = 0; i < 6; i++)
{
F32 value = joystick->getJoystickAxis(i);
@@ -115,8 +149,8 @@ BOOL LLFloaterJoystick::postBuild()
}
}
- mCheckJoystickEnabled = getChild<LLCheckBoxCtrl>("enable_joystick");
- childSetCommitCallback("enable_joystick",onCommitJoystickEnabled,this);
+ mJoysticksCombo = getChild<LLComboBox>("joystick_combo");
+ childSetCommitCallback("joystick_combo",onCommitJoystickEnabled,this);
mCheckFlycamEnabled = getChild<LLCheckBoxCtrl>("JoystickFlycamEnabled");
childSetCommitCallback("JoystickFlycamEnabled",onCommitJoystickEnabled,this);
@@ -125,6 +159,7 @@ BOOL LLFloaterJoystick::postBuild()
childSetAction("ok_btn", onClickOK, this);
refresh();
+ refreshListOfDevices();
return TRUE;
}
@@ -141,6 +176,7 @@ void LLFloaterJoystick::apply()
void LLFloaterJoystick::initFromSettings()
{
mJoystickEnabled = gSavedSettings.getBOOL("JoystickEnabled");
+ mJoystickId = gSavedSettings.getLLSD("JoystickDeviceUUID");
mJoystickAxis[0] = gSavedSettings.getS32("JoystickAxis0");
mJoystickAxis[1] = gSavedSettings.getS32("JoystickAxis1");
@@ -210,12 +246,80 @@ void LLFloaterJoystick::initFromSettings()
void LLFloaterJoystick::refresh()
{
LLFloater::refresh();
+
initFromSettings();
}
+void LLFloaterJoystick::addDevice(std::string &name, LLSD& value)
+{
+ mJoysticksCombo->add(name, value, ADD_BOTTOM, 1);
+}
+
+void LLFloaterJoystick::refreshListOfDevices()
+{
+ mJoysticksCombo->removeall();
+ std::string no_device = getString("JoystickDisabled");
+ LLSD value = LLSD::Integer(0);
+ addDevice(no_device, value);
+
+ mHasDeviceList = false;
+
+ // di8_devices_callback callback is immediate and happens in scope of getInputDevices()
+#if LL_WINDOWS && !LL_MESA_HEADLESS
+ // space navigator is marked as DI8DEVCLASS_GAMECTRL in ndof lib
+ U32 device_type = DI8DEVCLASS_GAMECTRL;
+ void* callback = &di8_list_devices_callback;
+#else
+ // MAC doesn't support device search yet
+ // On MAC there is an ndof_idsearch and it is possible to specify product
+ // and manufacturer in NDOF_Device for ndof_init_first to pick specific one
+ U32 device_type = 0;
+ void* callback = NULL;
+#endif
+ if (gViewerWindow->getWindow()->getInputDevices(device_type, callback, this))
+ {
+ mHasDeviceList = true;
+ }
+
+ bool is_device_id_set = LLViewerJoystick::getInstance()->isDeviceUUIDSet();
+
+ if (LLViewerJoystick::getInstance()->isJoystickInitialized() &&
+ (!mHasDeviceList || !is_device_id_set))
+ {
+#if LL_WINDOWS && !LL_MESA_HEADLESS
+ LL_WARNS() << "NDOF connected to device without using SL provided handle" << LL_ENDL;
+#endif
+ std::string desc = LLViewerJoystick::getInstance()->getDescription();
+ if (!desc.empty())
+ {
+ LLSD value = LLSD::Integer(0);
+ addDevice(desc, value);
+ mHasDeviceList = true;
+ }
+ }
+
+ if (gSavedSettings.getBOOL("JoystickEnabled") && mHasDeviceList)
+ {
+ if (is_device_id_set)
+ {
+ LLSD guid = LLViewerJoystick::getInstance()->getDeviceUUID();
+ mJoysticksCombo->selectByValue(guid);
+ }
+ else
+ {
+ mJoysticksCombo->selectByValue(LLSD::Integer(1));
+ }
+ }
+ else
+ {
+ mJoysticksCombo->selectByValue(LLSD::Integer(0));
+ }
+}
+
void LLFloaterJoystick::cancel()
{
gSavedSettings.setBOOL("JoystickEnabled", mJoystickEnabled);
+ gSavedSettings.setLLSD("JoystickDeviceUUID", mJoystickId);
gSavedSettings.setS32("JoystickAxis0", mJoystickAxis[0]);
gSavedSettings.setS32("JoystickAxis1", mJoystickAxis[1]);
@@ -285,7 +389,21 @@ void LLFloaterJoystick::cancel()
void LLFloaterJoystick::onCommitJoystickEnabled(LLUICtrl*, void *joy_panel)
{
LLFloaterJoystick* self = (LLFloaterJoystick*)joy_panel;
- BOOL joystick_enabled = self->mCheckJoystickEnabled->get();
+
+ LLSD value = self->mJoysticksCombo->getValue();
+ bool joystick_enabled = true;
+ if (value.isInteger())
+ {
+ // ndof already has a device selected, we are just setting it enabled or disabled
+ joystick_enabled = value.asInteger();
+ }
+ else
+ {
+ LLViewerJoystick::getInstance()->initDevice(value);
+ // else joystick is enabled, because combobox holds id of device
+ joystick_enabled = true;
+ }
+ gSavedSettings.setBOOL("JoystickEnabled", joystick_enabled);
BOOL flycam_enabled = self->mCheckFlycamEnabled->get();
if (!joystick_enabled || !flycam_enabled)
@@ -297,6 +415,12 @@ void LLFloaterJoystick::onCommitJoystickEnabled(LLUICtrl*, void *joy_panel)
joystick->toggleFlycam();
}
}
+
+ std::string device_id = LLViewerJoystick::getInstance()->getDeviceUUIDString();
+ gSavedSettings.setString("JoystickDeviceUUID", device_id);
+ LL_DEBUGS("Joystick") << "Selected " << device_id << " as joystick." << LL_ENDL;
+
+ self->refreshListOfDevices();
}
void LLFloaterJoystick::onClickRestoreSNDefaults(void *joy_panel)
diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h
index a1b5951389..1d46efd3f6 100644
--- a/indra/newview/llfloaterjoystick.h
+++ b/indra/newview/llfloaterjoystick.h
@@ -31,6 +31,7 @@
#include "llstatview.h"
class LLCheckBoxCtrl;
+class LLComboBox;
class LLFloaterJoystick : public LLFloater
{
@@ -45,8 +46,11 @@ public:
virtual void draw();
static void setSNDefaults();
+ void addDevice(std::string &name, LLSD& value);
+
protected:
+ void refreshListOfDevices();
void onClose(bool app_quitting);
void onClickCloseBtn(bool app_quitting);
@@ -65,6 +69,7 @@ private:
private:
// Device prefs
bool mJoystickEnabled;
+ LLSD mJoystickId;
S32 mJoystickAxis[7];
bool m3DCursor;
bool mAutoLeveling;
@@ -85,8 +90,10 @@ private:
F32 mFlycamFeathering;
// Controls that can disable the flycam
- LLCheckBoxCtrl *mCheckJoystickEnabled;
LLCheckBoxCtrl *mCheckFlycamEnabled;
+ LLComboBox *mJoysticksCombo;
+
+ bool mHasDeviceList;
// stats view
LLStatBar* mAxisStatsBar[6];
diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp
index 3ab8fed2c6..127055459d 100644
--- a/indra/newview/llgiveinventory.cpp
+++ b/indra/newview/llgiveinventory.cpp
@@ -129,23 +129,14 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item)
switch(item->getType())
{
case LLAssetType::AT_OBJECT:
- if (get_is_item_worn(item->getUUID()))
- {
- acceptable = false;
- }
- break;
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_CLOTHING:
{
- BOOL copyable = false;
- if (item->getPermissions().allowCopyBy(gAgentID)) copyable = true;
-
- if (!copyable && get_is_item_worn(item->getUUID()))
+ if (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;
}
+ break;
}
break;
default:
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index d17bb982e1..c91e705d03 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -2694,6 +2694,14 @@ void LLIMMgr::addMessage(
bool new_session = !hasSession(new_session_id);
if (new_session)
{
+ // Group chat session was initiated by muted resident, do not start this session viewerside
+ // do not send leave msg either, so we are able to get group messages from other participants
+ if ((IM_SESSION_INVITE == dialog) && gAgent.isInGroup(new_session_id) &&
+ LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !from_linden)
+ {
+ return;
+ }
+
LLAvatarName av_name;
if (LLAvatarNameCache::get(other_participant_id, &av_name) && !name_is_setted)
{
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 539d80532c..3802527ead 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -7649,8 +7649,7 @@ bool LLFolderViewGroupedItemBridge::canWearSelected(uuid_vec_t item_ids)
for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it)
{
LLViewerInventoryItem* item = gInventory.getItem(*it);
- LLAssetType::EType asset_type = item->getType();
- if (!item || (asset_type >= LLAssetType::AT_COUNT) || (asset_type <= LLAssetType::AT_NONE))
+ if (!item || (item->getType() >= LLAssetType::AT_COUNT) || (item->getType() <= LLAssetType::AT_NONE))
{
return false;
}
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 646d92b9e1..0083ab0397 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -2397,16 +2397,19 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
{
bool open_multi_preview = true;
- for (std::set<LLFolderViewItem*>::iterator set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter)
+ if ("open" == action)
{
- LLFolderViewItem* folder_item = *set_iter;
- if (folder_item)
+ for (std::set<LLFolderViewItem*>::iterator set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter)
{
- LLInvFVBridge* bridge = dynamic_cast<LLInvFVBridge*>(folder_item->getViewModelItem());
- if (!bridge || !bridge->isMultiPreviewAllowed())
+ LLFolderViewItem* folder_item = *set_iter;
+ if (folder_item)
{
- open_multi_preview = false;
- break;
+ LLInvFVBridge* bridge = dynamic_cast<LLInvFVBridge*>(folder_item->getViewModelItem());
+ if (!bridge || !bridge->isMultiPreviewAllowed())
+ {
+ open_multi_preview = false;
+ break;
+ }
}
}
}
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 64df449c26..8a10a38b37 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -169,6 +169,14 @@ LLMuteList::LLMuteList() :
gMessageSystem.callWhenReady(boost::bind(&LLMessageSystem::setHandlerFuncFast, _1,
_PREHASH_UseCachedMuteList, processUseCachedMuteList,
static_cast<void**>(NULL)));
+
+ // make sure mute list's instance gets initialized before we start any name requests
+ LLAvatarNameCache::getInstance()->setAccountNameChangedCallback([this](const LLUUID& id, const LLAvatarName& av_name)
+ {
+ // it would be better to just pass LLAvatarName instead of doing unnesssesary copies
+ // but this way is just more convinient
+ onAccountNameChanged(id, av_name.getUserName());
+ });
}
//-----------------------------------------------------------------------------
@@ -179,6 +187,11 @@ LLMuteList::~LLMuteList()
}
+void LLMuteList::cleanupSingleton()
+{
+ LLAvatarNameCache::getInstance()->setAccountNameChangedCallback(NULL);
+}
+
BOOL LLMuteList::isLinden(const std::string& name) const
{
std::string username = boost::replace_all_copy(name, ".", " ");
@@ -232,8 +245,8 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
LL_WARNS() << "Trying to self; ignored" << LL_ENDL;
return FALSE;
}
-
- S32 mute_list_limit = gSavedSettings.getS32("MuteListLimit");
+
+ static LLCachedControl<S32> mute_list_limit(gSavedSettings, "MuteListLimit", 1000);
if (getMutes().size() >= mute_list_limit)
{
LL_WARNS() << "Mute limit is reached; ignored" << LL_ENDL;
@@ -358,6 +371,10 @@ void LLMuteList::updateAdd(const LLMute& mute)
msg->addU32("MuteFlags", mute.mFlags);
gAgent.sendReliableMessage();
+ if (!mIsLoaded)
+ {
+ LL_WARNS() << "Added elements to non-initialized block list" << LL_ENDL;
+ }
mIsLoaded = TRUE; // why is this here? -MG
}
@@ -412,7 +429,6 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags)
// Must be after erase.
notifyObserversDetailed(localmute);
- setLoaded(); // why is this here? -MG
}
else
{
@@ -426,7 +442,6 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags)
mLegacyMutes.erase(legacy_it);
// Must be after erase.
notifyObserversDetailed(mute);
- setLoaded(); // why is this here? -MG
}
}
@@ -584,6 +599,19 @@ BOOL LLMuteList::loadFromFile(const std::string& filename)
}
fclose(fp);
setLoaded();
+
+ // server does not maintain up-to date account names (not display names!)
+ // in this list, so it falls to viewer.
+ pending_names_t::iterator iter = mPendingAgentNameUpdates.begin();
+ pending_names_t::iterator end = mPendingAgentNameUpdates.end();
+ while (iter != end)
+ {
+ // this will send updates to server, make sure mIsLoaded is set
+ onAccountNameChanged(iter->first, iter->second);
+ iter++;
+ }
+ mPendingAgentNameUpdates.clear();
+
return TRUE;
}
@@ -767,6 +795,48 @@ void LLMuteList::onFileMuteList(void** user_data, S32 error_code, LLExtStat ext_
delete local_filename_and_path;
}
+void LLMuteList::onAccountNameChanged(const LLUUID& id, const std::string& username)
+{
+ if (mIsLoaded)
+ {
+ LLMute mute(id, username, LLMute::AGENT);
+ mute_set_t::iterator mute_it = mMutes.find(mute);
+ if (mute_it != mMutes.end()
+ && mute_it->mName != mute.mName
+ && mute_it->mType == LLMute::AGENT) // just in case, it is std::set, not map
+ {
+ // existing mute, but name changed, copy data
+ mute.mFlags = mute_it->mFlags;
+
+ // erase old variant
+ mMutes.erase(mute_it);
+
+ // (re)add the mute entry.
+ {
+ std::pair<mute_set_t::iterator, bool> result = mMutes.insert(mute);
+ if (result.second)
+ {
+ LL_INFOS() << "Muting " << mute.mName << " id " << mute.mID << " flags " << mute.mFlags << LL_ENDL;
+ updateAdd(mute);
+ // Do not notify observers here, observers do not know or need to handle name changes
+ // Example: block list considers notifyObserversDetailed as a selection update;
+ // Various chat/voice statuses care only about id and flags
+ // Since apropriate update time for account names is considered to be in 'hours' it is
+ // fine not to update UI (will be fine after restart or couple other changes)
+
+ }
+ }
+ }
+ }
+ else
+ {
+ // Delay update until we load file
+ // Ex: Buddies list can arrive too early since we prerequest
+ // names from Buddies list before we load blocklist
+ mPendingAgentNameUpdates[id] = username;
+ }
+}
+
void LLMuteList::addObserver(LLMuteListObserver* observer)
{
mObservers.insert(observer);
diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h
index f2fcf3dbb3..0d426fbd48 100644
--- a/indra/newview/llmutelist.h
+++ b/indra/newview/llmutelist.h
@@ -73,6 +73,7 @@ class LLMuteList : public LLSingleton<LLMuteList>
{
LLSINGLETON(LLMuteList);
~LLMuteList();
+ /*virtual*/ void cleanupSingleton();
public:
// reasons for auto-unmuting a resident
enum EAutoReason
@@ -131,6 +132,7 @@ private:
static void processUseCachedMuteList(LLMessageSystem* msg, void**);
static void onFileMuteList(void** user_data, S32 code, LLExtStat ext_status);
+ void onAccountNameChanged(const LLUUID& id, const std::string& username);
private:
struct compare_by_name
@@ -155,7 +157,9 @@ private:
};
typedef std::set<LLMute, compare_by_id> mute_set_t;
mute_set_t mMutes;
-
+ typedef std::map<LLUUID, std::string> pending_names_t;
+ pending_names_t mPendingAgentNameUpdates;
+
typedef std::set<std::string> string_set_t;
string_set_t mLegacyMutes;
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index 3bae0cebfb..116b23e595 100644
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -54,6 +54,7 @@
#include "lltrans.h"
#include "llviewerassettype.h"
#include "llviewerinventory.h"
+#include "llviewermenu.h"
#include "llviewerobject.h"
#include "llviewerregion.h"
#include "llviewerwindow.h"
@@ -82,6 +83,7 @@ BOOL LLPanelContents::postBuild()
childSetAction("button new script",&LLPanelContents::onClickNewScript, this);
childSetAction("button permissions",&LLPanelContents::onClickPermissions, this);
+ childSetAction("btn_reset_scripts", &LLPanelContents::onClickResetScripts, this);
mPanelInventoryObject = getChild<LLPanelObjectInventory>("contents_inventory");
@@ -106,6 +108,7 @@ void LLPanelContents::getState(LLViewerObject *objectp )
if( !objectp )
{
getChildView("button new script")->setEnabled(FALSE);
+ getChildView("btn_reset_scripts")->setEnabled(FALSE);
return;
}
@@ -125,6 +128,8 @@ void LLPanelContents::getState(LLViewerObject *objectp )
((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1)
|| (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)));
+ getChildView("btn_reset_scripts")->setEnabled(editable);
+
getChildView("button permissions")->setEnabled(!objectp->isPermanentEnforced());
mPanelInventoryObject->setEnabled(!objectp->isPermanentEnforced());
}
@@ -206,3 +211,9 @@ void LLPanelContents::onClickPermissions(void *userdata)
LLPanelContents* self = (LLPanelContents*)userdata;
gFloaterView->getParentFloater(self)->addDependentFloater(LLFloaterReg::showInstance("bulk_perms"));
}
+
+// static
+void LLPanelContents::onClickResetScripts(void *userdata)
+{
+ handle_selected_script_action("reset");
+}
diff --git a/indra/newview/llpanelcontents.h b/indra/newview/llpanelcontents.h
index 6ecc78afa0..5b1a57de42 100644
--- a/indra/newview/llpanelcontents.h
+++ b/indra/newview/llpanelcontents.h
@@ -53,6 +53,7 @@ public:
static void onClickNewScript(void*);
static void onClickPermissions(void*);
+ static void onClickResetScripts(void*);
// Key suffix for "tentative" fields
static const char* TENTATIVE_SUFFIX;
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 7373c7412c..c63d04cd55 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -201,9 +201,12 @@ std::string build_notice_date(const U32& the_time)
time(&t);
}
- std::string dateStr = "["+LLTrans::getString("LTimeMthNum")+"]/["
- +LLTrans::getString("LTimeDay")+"]/["
- +LLTrans::getString("LTimeYear")+"]";
+ std::string dateStr = "["+ LLTrans::getString("LTimeYear") + "]/["
+ + LLTrans::getString("LTimeMthNum") + "]/["
+ + LLTrans::getString("LTimeDay") + "] ["
+ + LLTrans::getString("LTimeHour") + "]:["
+ + LLTrans::getString("LTimeMin") + "]:["
+ + LLTrans::getString("LTimeSec") + "]";
LLSD substitution;
substitution["datetime"] = (S32) t;
LLStringUtil::format (dateStr, substitution);
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 02cd22c307..fbc1b80857 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -165,6 +165,7 @@ BOOL LLPanelMainInventory::postBuild()
recent_items_panel->setSinceLogoff(TRUE);
recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE);
recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
+ recent_items_panel->setFilterLinks(LLInventoryFilter::FILTERLINK_EXCLUDE_LINKS);
LLInventoryFilter& recent_filter = recent_items_panel->getFilter();
recent_filter.setFilterObjectTypes(recent_filter.getFilterObjectTypes() & ~(0x1 << LLInventoryType::IT_CATEGORY));
recent_filter.setEmptyLookupMessage("InventoryNoMatchingRecentItems");
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 1d87aa6f5d..dd1130aeba 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -1282,6 +1282,7 @@ void LLPanelOutfitEdit::showFilteredWearablesListView(LLWearableType::EType type
//e_list_view_item_type implicitly contains LLWearableType::EType starting from LVIT_SHAPE
applyListViewFilter(static_cast<EListViewItemType>(LVIT_SHAPE + type));
+ mWearableItemsList->setMenuWearableType(type);
}
static void update_status_widget_rect(LLView * widget, S32 right_border)
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index ef16427713..3e770958da 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -972,13 +972,45 @@ void LLPanelPermissions::refresh()
getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume);
}
+// Shorten name if it doesn't fit into max_pixels of two lines
+void shorten_name(std::string &name, const LLStyle::Params& style_params, S32 max_pixels)
+{
+ const LLFontGL* font = style_params.font();
+
+ LLWString wline = utf8str_to_wstring(name);
+ // panel supports two lines long names
+ S32 segment_length = font->maxDrawableChars(wline.c_str(), max_pixels, wline.length(), LLFontGL::WORD_BOUNDARY_IF_POSSIBLE);
+ if (segment_length == wline.length())
+ {
+ // no work needed
+ return;
+ }
+
+ S32 first_line_length = segment_length;
+ segment_length = font->maxDrawableChars(wline.substr(first_line_length).c_str(), max_pixels, wline.length(), LLFontGL::ANYWHERE);
+ if (segment_length + first_line_length == wline.length())
+ {
+ // no work needed
+ return;
+ }
+
+ // name does not fit, cut it, add ...
+ const LLWString dots_pad(utf8str_to_wstring(std::string("....")));
+ S32 elipses_width = font->getWidthF32(dots_pad.c_str());
+ segment_length = font->maxDrawableChars(wline.substr(first_line_length).c_str(), max_pixels - elipses_width, wline.length(), LLFontGL::ANYWHERE);
+
+ name = name.substr(0, segment_length + first_line_length) + std::string("...");
+}
+
void LLPanelPermissions::updateOwnerName(const LLUUID& owner_id, const LLAvatarName& owner_name, const LLStyle::Params& style_params)
{
if (mOwnerCacheConnection.connected())
{
mOwnerCacheConnection.disconnect();
}
- mLabelOwnerName->setText(owner_name.getCompleteName(), style_params);
+ std::string name = owner_name.getCompleteName();
+ shorten_name(name, style_params, mLabelOwnerName->getLocalRect().getWidth());
+ mLabelOwnerName->setText(name, style_params);
}
void LLPanelPermissions::updateCreatorName(const LLUUID& creator_id, const LLAvatarName& creator_name, const LLStyle::Params& style_params)
@@ -987,7 +1019,9 @@ void LLPanelPermissions::updateCreatorName(const LLUUID& creator_id, const LLAva
{
mCreatorCacheConnection.disconnect();
}
- mLabelCreatorName->setText(creator_name.getCompleteName(), style_params);
+ std::string name = creator_name.getCompleteName();
+ shorten_name(name, style_params, mLabelCreatorName->getLocalRect().getWidth());
+ mLabelCreatorName->setText(name, style_params);
}
// static
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 9d8be4b2fe..1e91da529c 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -401,7 +401,7 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success,
{
const U32 ext_length = 3;
std::string extension = self->mSaveFileName.substr( self->mSaveFileName.length() - ext_length);
-
+ LLStringUtil::toLower(extension);
// We only support saving in PNG or TGA format
LLPointer<LLImageFormatted> image;
if(extension == "png")
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index d53cc3f745..bc07821ccd 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -316,24 +316,25 @@ bool LLResourceUploadInfo::findAssetTypeOfExtension(const std::string& exten, LL
bool LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(const std::string& exten, LLAssetType::EType& asset_type, U32& codec, bool bulk_upload)
{
bool succ = false;
-
- codec = LLImageBase::getCodecFromExtension(exten);
+ std::string exten_lc(exten);
+ LLStringUtil::toLower(exten_lc);
+ codec = LLImageBase::getCodecFromExtension(exten_lc);
if (codec != IMG_CODEC_INVALID)
{
asset_type = LLAssetType::AT_TEXTURE;
succ = true;
}
- else if (exten == "wav")
+ else if (exten_lc == "wav")
{
asset_type = LLAssetType::AT_SOUND;
succ = true;
}
- else if (exten == "anim")
+ else if (exten_lc == "anim")
{
asset_type = LLAssetType::AT_ANIMATION;
succ = true;
}
- else if (!bulk_upload && (exten == "bvh"))
+ else if (!bulk_upload && (exten_lc == "bvh"))
{
asset_type = LLAssetType::AT_ANIMATION;
succ = true;
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index 491ad7e3b2..e35cb26ce1 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -36,10 +36,19 @@
#include "lltoolmgr.h"
#include "llselectmgr.h"
#include "llviewermenu.h"
+#include "llviewerwindow.h"
+#include "llwindow.h"
#include "llagent.h"
#include "llagentcamera.h"
#include "llfocusmgr.h"
+#if LL_WINDOWS && !LL_MESA_HEADLESS
+// Require DirectInput version 8
+#define DIRECTINPUT_VERSION 0x0800
+
+#include <dinput.h>
+#endif
+
// ----------------------------------------------------------------------------
// Constants
@@ -62,6 +71,7 @@ F32 LLViewerJoystick::sDelta[] = {0,0,0,0,0,0,0};
#define MAX_SPACENAVIGATOR_INPUT 3000.0f
#define MAX_JOYSTICK_INPUT_VALUE MAX_SPACENAVIGATOR_INPUT
+
#if LIB_NDOF
std::ostream& operator<<(std::ostream& out, NDOF_Device* ptr)
{
@@ -99,6 +109,126 @@ std::ostream& operator<<(std::ostream& out, NDOF_Device* ptr)
}
#endif // LIB_NDOF
+
+#if LL_WINDOWS && !LL_MESA_HEADLESS
+// this should reflect ndof and set axises, see ndofdev_win.cpp from ndof package
+BOOL CALLBACK EnumObjectsCallback(const DIDEVICEOBJECTINSTANCE* inst, VOID* user_data)
+{
+ if (inst->dwType & DIDFT_AXIS)
+ {
+ LPDIRECTINPUTDEVICE8 device = *((LPDIRECTINPUTDEVICE8 *)user_data);
+ DIPROPRANGE diprg;
+ diprg.diph.dwSize = sizeof(DIPROPRANGE);
+ diprg.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ diprg.diph.dwHow = DIPH_BYID;
+ diprg.diph.dwObj = inst->dwType; // specify the enumerated axis
+
+ // Set the range for the axis
+ diprg.lMin = (long)-MAX_JOYSTICK_INPUT_VALUE;
+ diprg.lMax = (long)+MAX_JOYSTICK_INPUT_VALUE;
+ HRESULT hr = device->SetProperty(DIPROP_RANGE, &diprg.diph);
+
+ if (FAILED(hr))
+ {
+ return DIENUM_STOP;
+ }
+ }
+
+ return DIENUM_CONTINUE;
+}
+
+BOOL CALLBACK di8_devices_callback(LPCDIDEVICEINSTANCE device_instance_ptr, LPVOID pvRef)
+{
+ // Note: If a single device can function as more than one DirectInput
+ // device type, it is enumerated as each device type that it supports.
+ // Capable of detecting devices like Oculus Rift
+ if (device_instance_ptr)
+ {
+ std::string product_name = utf16str_to_utf8str(llutf16string(device_instance_ptr->tszProductName));
+
+ LLSD guid = LLViewerJoystick::getInstance()->getDeviceUUID();
+
+ bool init_device = false;
+ if (guid.isBinary())
+ {
+ std::vector<U8> bin_bucket = guid.asBinary();
+ init_device = memcmp(&bin_bucket[0], &device_instance_ptr->guidInstance, sizeof(GUID)) == 0;
+ }
+ else
+ {
+ // It might be better to init space navigator here, but if system doesn't has one,
+ // ndof will pick a random device, it is simpler to pick first device now to have an id
+ init_device = true;
+ }
+
+ if (init_device)
+ {
+ LL_DEBUGS("Joystick") << "Found and attempting to use device: " << product_name << LL_ENDL;
+ LPDIRECTINPUT8 di8_interface = *((LPDIRECTINPUT8 *)gViewerWindow->getWindow()->getDirectInput8());
+ LPDIRECTINPUTDEVICE8 device = NULL;
+
+ HRESULT status = di8_interface->CreateDevice(
+ device_instance_ptr->guidInstance, // REFGUID rguid,
+ &device, // LPDIRECTINPUTDEVICE * lplpDirectInputDevice,
+ NULL // LPUNKNOWN pUnkOuter
+ );
+
+ if (status == DI_OK)
+ {
+ // prerequisite for aquire()
+ LL_DEBUGS("Joystick") << "Device created" << LL_ENDL;
+ status = device->SetDataFormat(&c_dfDIJoystick); // c_dfDIJoystick2
+ }
+
+ if (status == DI_OK)
+ {
+ // set properties
+ LL_DEBUGS("Joystick") << "Format set" << LL_ENDL;
+ status = device->EnumObjects(EnumObjectsCallback, &device, DIDFT_ALL);
+ }
+
+ if (status == DI_OK)
+ {
+ LL_DEBUGS("Joystick") << "Properties updated" << LL_ENDL;
+
+ S32 size = sizeof(GUID);
+ LLSD::Binary data; //just an std::vector
+ data.resize(size);
+ memcpy(&data[0], &device_instance_ptr->guidInstance /*POD _GUID*/, size);
+ LLViewerJoystick::getInstance()->initDevice(&device, product_name, LLSD(data));
+ return DIENUM_STOP;
+ }
+ }
+ else
+ {
+ LL_DEBUGS("Joystick") << "Found device: " << product_name << LL_ENDL;
+ }
+ }
+ return DIENUM_CONTINUE;
+}
+
+// Windows guids
+// This is GUID2 so teoretically it can be memcpy copied into LLUUID
+void guid_from_string(GUID &guid, const std::string &input)
+{
+ CLSIDFromString(utf8str_to_utf16str(input).c_str(), &guid);
+}
+
+std::string string_from_guid(const GUID &guid)
+{
+ OLECHAR* guidString; //wchat
+ StringFromCLSID(guid, &guidString);
+
+ // use guidString...
+
+ std::string res = utf16str_to_utf8str(llutf16string(guidString));
+ // ensure memory is freed
+ ::CoTaskMemFree(guidString);
+
+ return res;
+}
+#endif
+
// -----------------------------------------------------------------------------
void LLViewerJoystick::updateEnabled(bool autoenable)
{
@@ -108,7 +238,8 @@ void LLViewerJoystick::updateEnabled(bool autoenable)
}
else
{
- if (isLikeSpaceNavigator() && autoenable)
+ // autoenable if user specifically chose this device
+ if (autoenable && (isLikeSpaceNavigator() || isDeviceUUIDSet()))
{
gSavedSettings.setBOOL("JoystickEnabled", TRUE );
}
@@ -144,7 +275,7 @@ NDOF_HotPlugResult LLViewerJoystick::HotPlugAddCallback(NDOF_Device *dev)
LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
if (joystick->mDriverState == JDS_UNINITIALIZED)
{
- LL_INFOS("joystick") << "HotPlugAddCallback: will use device:" << LL_ENDL;
+ LL_INFOS("Joystick") << "HotPlugAddCallback: will use device:" << LL_ENDL;
ndof_dump(stderr, dev);
joystick->mNdofDev = dev;
joystick->mDriverState = JDS_INITIALIZED;
@@ -162,7 +293,7 @@ void LLViewerJoystick::HotPlugRemovalCallback(NDOF_Device *dev)
LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
if (joystick->mNdofDev == dev)
{
- LL_INFOS("joystick") << "HotPlugRemovalCallback: joystick->mNdofDev="
+ LL_INFOS("Joystick") << "HotPlugRemovalCallback: joystick->mNdofDev="
<< joystick->mNdofDev << "; removed device:" << LL_ENDL;
ndof_dump(stderr, dev);
joystick->mDriverState = JDS_UNINITIALIZED;
@@ -189,6 +320,8 @@ LLViewerJoystick::LLViewerJoystick()
// factor in bandwidth? bandwidth = gViewerStats->mKBitStat
mPerfScale = 4000.f / gSysCPU.getMHz(); // hmm. why?
+
+ mLastDeviceUUID = LLSD::Integer(1);
}
// -----------------------------------------------------------------------------
@@ -207,12 +340,14 @@ void LLViewerJoystick::init(bool autoenable)
static bool libinit = false;
mDriverState = JDS_INITIALIZING;
+ loadDeviceIdFromSettings();
+
if (libinit == false)
{
// Note: The HotPlug callbacks are not actually getting called on Windows
if (ndof_libinit(HotPlugAddCallback,
HotPlugRemovalCallback,
- NULL))
+ gViewerWindow->getWindow()->getDirectInput8()))
{
mDriverState = JDS_UNINITIALIZED;
}
@@ -229,39 +364,33 @@ void LLViewerJoystick::init(bool autoenable)
if (libinit)
{
if (mNdofDev)
- {
- LL_DEBUGS("joystick") << "ndof_create() returned: " << mNdofDev << LL_ENDL;
- // Different joysticks will return different ranges of raw values.
- // Since we want to handle every device in the same uniform way,
- // we initialize the mNdofDev struct and we set the range
- // of values we would like to receive.
- //
- // HACK: On Windows, libndofdev passes our range to DI with a
- // SetProperty call. This works but with one notable exception, the
- // SpaceNavigator, who doesn't seem to care about the SetProperty
- // call. In theory, we should handle this case inside libndofdev.
- // However, the range we're setting here is arbitrary anyway,
- // so let's just use the SpaceNavigator range for our purposes.
- mNdofDev->axes_min = (long)-MAX_JOYSTICK_INPUT_VALUE;
- mNdofDev->axes_max = (long)+MAX_JOYSTICK_INPUT_VALUE;
-
- // libndofdev could be used to return deltas. Here we choose to
- // just have the absolute values instead.
- mNdofDev->absolute = 1;
-
- LL_DEBUGS("joystick") << "ndof_init_first() received: " << mNdofDev << LL_ENDL;
- // init & use the first suitable NDOF device found on the USB chain
- if (ndof_init_first(mNdofDev, NULL))
- {
- mDriverState = JDS_UNINITIALIZED;
- LL_WARNS("joystick") << "ndof_init_first FAILED" << LL_ENDL;
- ndof_dump_list(stderr);
- }
- else
- {
- mDriverState = JDS_INITIALIZED;
- }
- LL_DEBUGS("joystick") << "ndof_init_first() left: " << mNdofDev << LL_ENDL;
+ {
+ // di8_devices_callback callback is immediate and happens in scope of getInputDevices()
+#if LL_WINDOWS && !LL_MESA_HEADLESS
+ // space navigator is marked as DI8DEVCLASS_GAMECTRL in ndof lib
+ U32 device_type = DI8DEVCLASS_GAMECTRL;
+ void* callback = &di8_devices_callback;
+#else
+ // MAC doesn't support device search yet
+ // On MAC there is an ndof_idsearch and it is possible to specify product
+ // and manufacturer in NDOF_Device for ndof_init_first to pick specific one
+ U32 device_type = 0;
+ void* callback = NULL;
+#endif
+ if (!gViewerWindow->getWindow()->getInputDevices(device_type, callback, NULL))
+ {
+ LL_INFOS("Joystick") << "Failed to gather devices from window. Falling back to ndof's init" << LL_ENDL;
+ // Failed to gather devices from windows, init first suitable one
+ mLastDeviceUUID = LLSD();
+ void *preffered_device = NULL;
+ initDevice(preffered_device);
+ }
+
+ if (mDriverState == JDS_INITIALIZING)
+ {
+ LL_INFOS("Joystick") << "Found no matching joystick devices." << LL_ENDL;
+ mDriverState = JDS_UNINITIALIZED;
+ }
}
else
{
@@ -300,11 +429,92 @@ void LLViewerJoystick::init(bool autoenable)
// No device connected, don't change any settings
}
- LL_INFOS("joystick") << "ndof: mDriverState=" << mDriverState << "; mNdofDev="
+ LL_INFOS("Joystick") << "ndof: mDriverState=" << mDriverState << "; mNdofDev="
<< mNdofDev << "; libinit=" << libinit << LL_ENDL;
#endif
}
+void LLViewerJoystick::initDevice(LLSD &guid)
+{
+#if LIB_NDOF
+ mLastDeviceUUID = guid;
+
+#if LL_WINDOWS && !LL_MESA_HEADLESS
+ // space navigator is marked as DI8DEVCLASS_GAMECTRL in ndof lib
+ U32 device_type = DI8DEVCLASS_GAMECTRL;
+ void* callback = &di8_devices_callback;
+#else
+ // MAC doesn't support device search yet
+ // On MAC there is an ndof_idsearch and it is possible to specify product
+ // and manufacturer in NDOF_Device for ndof_init_first to pick specific one
+ U32 device_type = 0;
+ void* callback = NULL;
+#endif
+
+ mDriverState = JDS_INITIALIZING;
+ if (!gViewerWindow->getWindow()->getInputDevices(device_type, callback, NULL))
+ {
+ LL_INFOS("Joystick") << "Failed to gather devices from window. Falling back to ndof's init" << LL_ENDL;
+ // Failed to gather devices from windows, init first suitable one
+ void *preffered_device = NULL;
+ mLastDeviceUUID = LLSD();
+ initDevice(preffered_device);
+ }
+
+ if (mDriverState == JDS_INITIALIZING)
+ {
+ LL_INFOS("Joystick") << "Found no matching joystick devices." << LL_ENDL;
+ mDriverState = JDS_UNINITIALIZED;
+ }
+#endif
+}
+
+void LLViewerJoystick::initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, std::string &name, LLSD &guid)
+{
+#if LIB_NDOF
+ mLastDeviceUUID = guid;
+
+ strncpy(mNdofDev->product, name.c_str(), sizeof(mNdofDev->product));
+ mNdofDev->manufacturer[0] = '\0';
+
+ initDevice(preffered_device);
+#endif
+}
+
+void LLViewerJoystick::initDevice(void * preffered_device /* LPDIRECTINPUTDEVICE8* */)
+{
+#if LIB_NDOF
+ // Different joysticks will return different ranges of raw values.
+ // Since we want to handle every device in the same uniform way,
+ // we initialize the mNdofDev struct and we set the range
+ // of values we would like to receive.
+ //
+ // HACK: On Windows, libndofdev passes our range to DI with a
+ // SetProperty call. This works but with one notable exception, the
+ // SpaceNavigator, who doesn't seem to care about the SetProperty
+ // call. In theory, we should handle this case inside libndofdev.
+ // However, the range we're setting here is arbitrary anyway,
+ // so let's just use the SpaceNavigator range for our purposes.
+ mNdofDev->axes_min = (long)-MAX_JOYSTICK_INPUT_VALUE;
+ mNdofDev->axes_max = (long)+MAX_JOYSTICK_INPUT_VALUE;
+
+ // libndofdev could be used to return deltas. Here we choose to
+ // just have the absolute values instead.
+ mNdofDev->absolute = 1;
+ // init & use the first suitable NDOF device found on the USB chain
+ // On windows preffered_device needs to be a pointer to LPDIRECTINPUTDEVICE8
+ if (ndof_init_first(mNdofDev, preffered_device))
+ {
+ mDriverState = JDS_UNINITIALIZED;
+ LL_WARNS() << "ndof_init_first FAILED" << LL_ENDL;
+ }
+ else
+ {
+ mDriverState = JDS_INITIALIZED;
+ }
+#endif
+}
+
// -----------------------------------------------------------------------------
void LLViewerJoystick::terminate()
{
@@ -314,7 +524,7 @@ void LLViewerJoystick::terminate()
ndof_libcleanup(); // frees alocated memory in mNdofDev
mDriverState = JDS_UNINITIALIZED;
mNdofDev = NULL;
- LL_INFOS("joystick") << "Terminated connection with NDOF device." << LL_ENDL;
+ LL_INFOS("Joystick") << "Terminated connection with NDOF device." << LL_ENDL;
}
#endif
}
@@ -1105,6 +1315,74 @@ void LLViewerJoystick::scanJoystick()
}
// -----------------------------------------------------------------------------
+bool LLViewerJoystick::isDeviceUUIDSet()
+{
+#if LL_WINDOWS && !LL_MESA_HEADLESS
+ // for ease of comparison and to dial less with platform specific variables, we store id as LLSD binary
+ return mLastDeviceUUID.isBinary();
+#else
+ return false;
+#endif
+}
+
+LLSD LLViewerJoystick::getDeviceUUID()
+{
+ return mLastDeviceUUID;
+}
+
+std::string LLViewerJoystick::getDeviceUUIDString()
+{
+#if LL_WINDOWS && !LL_MESA_HEADLESS
+ // Might be simpler to just convert _GUID into string everywhere, store and compare as string
+ if (mLastDeviceUUID.isBinary())
+ {
+ S32 size = sizeof(GUID);
+ LLSD::Binary data = mLastDeviceUUID.asBinary();
+ GUID guid;
+ memcpy(&guid, &data[0], size);
+ return string_from_guid(guid);
+ }
+ else
+ {
+ return std::string();
+ }
+#else
+ return std::string();
+ // return mLastDeviceUUID;
+#endif
+}
+
+void LLViewerJoystick::loadDeviceIdFromSettings()
+{
+#if LL_WINDOWS && !LL_MESA_HEADLESS
+ // We can't save binary data to gSavedSettings, somebody editing the file will corrupt it,
+ // so _GUID data gets converted to string (we probably can convert it to LLUUID with memcpy)
+ // and here we need to convert it back to binary from string
+ std::string device_string = gSavedSettings.getString("JoystickDeviceUUID");
+ if (device_string.empty())
+ {
+ mLastDeviceUUID = LLSD();
+ }
+ else
+ {
+ LL_DEBUGS("Joystick") << "Looking for device by id: " << device_string << LL_ENDL;
+ GUID guid;
+ guid_from_string(guid, device_string);
+ S32 size = sizeof(GUID);
+ LLSD::Binary data; //just an std::vector
+ data.resize(size);
+ memcpy(&data[0], &guid /*POD _GUID*/, size);
+ // We store this data in LLSD since LLSD is versatile and will be able to handle both GUID2
+ // and any data MAC will need for device selection
+ mLastDeviceUUID = LLSD(data);
+ }
+#else
+ mLastDeviceUUID = LLSD();
+ //mLastDeviceUUID = gSavedSettings.getLLSD("JoystickDeviceUUID");
+#endif
+}
+
+// -----------------------------------------------------------------------------
std::string LLViewerJoystick::getDescription()
{
std::string res;
@@ -1145,7 +1423,7 @@ void LLViewerJoystick::setSNDefaults()
#endif
//gViewerWindow->alertXml("CacheWillClear");
- LL_INFOS("joystick") << "restoring SpaceNavigator defaults..." << LL_ENDL;
+ LL_INFOS("Joystick") << "restoring SpaceNavigator defaults..." << LL_ENDL;
gSavedSettings.setS32("JoystickAxis0", 1); // z (at)
gSavedSettings.setS32("JoystickAxis1", 0); // x (slide)
diff --git a/indra/newview/llviewerjoystick.h b/indra/newview/llviewerjoystick.h
index 016b435ee8..782c523d4f 100644
--- a/indra/newview/llviewerjoystick.h
+++ b/indra/newview/llviewerjoystick.h
@@ -50,6 +50,9 @@ class LLViewerJoystick : public LLSingleton<LLViewerJoystick>
public:
void init(bool autoenable);
+ void initDevice(LLSD &guid);
+ void initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/);
+ void initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, std::string &name, LLSD &guid);
void terminate();
void updateStatus();
@@ -68,8 +71,11 @@ public:
void setOverrideCamera(bool val);
bool toggleFlycam();
void setSNDefaults();
+ bool isDeviceUUIDSet();
+ LLSD getDeviceUUID(); //unconverted, OS dependent value wrapped into LLSD, for comparison/search
+ std::string getDeviceUUIDString(); // converted readable value for settings
std::string getDescription();
-
+
protected:
void updateEnabled(bool autoenable);
void handleRun(F32 inc);
@@ -80,6 +86,7 @@ protected:
void agentYaw(F32 yaw_inc);
void agentJump();
void resetDeltas(S32 axis[]);
+ void loadDeviceIdFromSettings();
#if LIB_NDOF
static NDOF_HotPlugResult HotPlugAddCallback(NDOF_Device *dev);
static void HotPlugRemovalCallback(NDOF_Device *dev);
@@ -95,6 +102,7 @@ private:
bool mCameraUpdated;
bool mOverrideCamera;
U32 mJoystickRun;
+ LLSD mLastDeviceUUID; // _GUID as U8 binary map, integer 1 for no device/ndof's device
static F32 sLastDelta[7];
static F32 sDelta[7];
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index e6bd20b58f..ee5e0b07f3 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -185,11 +185,15 @@ const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents"
LLMenuGL* gAttachSubMenu = NULL;
LLMenuGL* gDetachSubMenu = NULL;
LLMenuGL* gTakeOffClothes = NULL;
+LLMenuGL* gDetachAvatarMenu = NULL;
+LLMenuGL* gDetachHUDAvatarMenu = NULL;
LLContextMenu* gAttachScreenPieMenu = NULL;
LLContextMenu* gAttachPieMenu = NULL;
LLContextMenu* gAttachBodyPartPieMenus[9];
LLContextMenu* gDetachPieMenu = NULL;
LLContextMenu* gDetachScreenPieMenu = NULL;
+LLContextMenu* gDetachAttSelfMenu = NULL;
+LLContextMenu* gDetachHUDAttSelfMenu = NULL;
LLContextMenu* gDetachBodyPartPieMenus[9];
//
@@ -458,6 +462,9 @@ void init_menus()
gMenuAttachmentOther = LLUICtrlFactory::createFromFile<LLContextMenu>(
"menu_attachment_other.xml", gMenuHolder, registry);
+ gDetachHUDAttSelfMenu = gMenuHolder->getChild<LLContextMenu>("Detach Self HUD", true);
+ gDetachAttSelfMenu = gMenuHolder->getChild<LLContextMenu>("Detach Self", true);
+
gMenuLand = LLUICtrlFactory::createFromFile<LLContextMenu>(
"menu_land.xml", gMenuHolder, registry);
@@ -514,6 +521,9 @@ void init_menus()
gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE);
gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE);
+ gDetachAvatarMenu = gMenuHolder->getChild<LLMenuGL>("Avatar Detach", true);
+ gDetachHUDAvatarMenu = gMenuHolder->getChild<LLMenuGL>("Avatar Detach HUD", true);
+
// Don't display the Memory console menu if the feature is turned off
LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild<LLMenuItemCheckGL>("Memory", TRUE);
if (memoryMenu)
@@ -690,19 +700,6 @@ class LLAdvancedCheckHUDInfo : public view_listener_t
};
-//////////////
-// FLYING //
-//////////////
-
-class LLAdvancedAgentFlyingInfo : public view_listener_t
-{
- bool handleEvent(const LLSD&)
- {
- return gAgent.getFlying();
- }
-};
-
-
///////////////////////
// CLEAR GROUP CACHE //
///////////////////////
@@ -3706,6 +3703,35 @@ bool enable_sitdown_self()
return show_sitdown_self() && !gAgentAvatarp->isEditingAppearance() && !gAgent.getFlying();
}
+class LLSelfToggleSitStand : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ if (isAgentAvatarValid())
+ {
+ if (gAgentAvatarp->isSitting())
+ {
+ gAgent.standUp();
+ }
+ else
+ {
+ gAgent.sitDown();
+ }
+ }
+ return true;
+ }
+};
+
+bool enable_sit_stand()
+{
+ return enable_sitdown_self() || enable_standup_self();
+}
+
+bool enable_fly_land()
+{
+ return gAgent.getFlying() || LLAgent::enableFlying();
+}
+
class LLCheckPanelPeopleTab : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -4108,7 +4134,7 @@ void handle_reset_view()
// switching to outfit selector should automagically save any currently edited wearable
LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "my_outfits"));
}
-
+ gAgentCamera.setFocusOnAvatar(TRUE, FALSE, FALSE);
reset_view_final( TRUE );
LLFloaterCamera::resetCameraMode();
}
@@ -7206,58 +7232,62 @@ class LLToolsSelectedScriptAction : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- std::string action = userdata.asString();
- bool mono = false;
- std::string msg, name;
- std::string title;
- if (action == "compile mono")
- {
- name = "compile_queue";
- mono = true;
- msg = "Recompile";
- title = LLTrans::getString("CompileQueueTitle");
- }
- if (action == "compile lsl")
- {
- name = "compile_queue";
- msg = "Recompile";
- title = LLTrans::getString("CompileQueueTitle");
- }
- else if (action == "reset")
- {
- name = "reset_queue";
- msg = "Reset";
- title = LLTrans::getString("ResetQueueTitle");
- }
- else if (action == "start")
- {
- name = "start_queue";
- msg = "SetRunning";
- title = LLTrans::getString("RunQueueTitle");
- }
- else if (action == "stop")
- {
- name = "stop_queue";
- msg = "SetRunningNot";
- title = LLTrans::getString("NotRunQueueTitle");
- }
- LLUUID id; id.generate();
-
- LLFloaterScriptQueue* queue =LLFloaterReg::getTypedInstance<LLFloaterScriptQueue>(name, LLSD(id));
- if (queue)
- {
- queue->setMono(mono);
- queue_actions(queue, msg);
- queue->setTitle(title);
- }
- else
- {
- LL_WARNS() << "Failed to generate LLFloaterScriptQueue with action: " << action << LL_ENDL;
- }
+ handle_selected_script_action(userdata.asString());
return true;
}
};
+void handle_selected_script_action(const std::string& action)
+{
+ bool mono = false;
+ std::string msg, name;
+ std::string title;
+ if (action == "compile mono")
+ {
+ name = "compile_queue";
+ mono = true;
+ msg = "Recompile";
+ title = LLTrans::getString("CompileQueueTitle");
+ }
+ if (action == "compile lsl")
+ {
+ name = "compile_queue";
+ msg = "Recompile";
+ title = LLTrans::getString("CompileQueueTitle");
+ }
+ else if (action == "reset")
+ {
+ name = "reset_queue";
+ msg = "Reset";
+ title = LLTrans::getString("ResetQueueTitle");
+ }
+ else if (action == "start")
+ {
+ name = "start_queue";
+ msg = "SetRunning";
+ title = LLTrans::getString("RunQueueTitle");
+ }
+ else if (action == "stop")
+ {
+ name = "stop_queue";
+ msg = "SetRunningNot";
+ title = LLTrans::getString("NotRunQueueTitle");
+ }
+ LLUUID id; id.generate();
+
+ LLFloaterScriptQueue* queue = LLFloaterReg::getTypedInstance<LLFloaterScriptQueue>(name, LLSD(id));
+ if (queue)
+ {
+ queue->setMono(mono);
+ queue_actions(queue, msg);
+ queue->setTitle(title);
+ }
+ else
+ {
+ LL_WARNS() << "Failed to generate LLFloaterScriptQueue with action: " << action << LL_ENDL;
+ }
+}
+
void handle_selected_texture_info(void*)
{
for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin();
@@ -8888,7 +8918,7 @@ void initialize_menus()
// Agent
commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying));
- enable.add("Agent.enableFlying", boost::bind(&LLAgent::enableFlying));
+ enable.add("Agent.enableFlyLand", boost::bind(&enable_fly_land));
commit.add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2));
commit.add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2));
commit.add("Agent.ToggleMicrophone", boost::bind(&LLAgent::toggleMicrophone, _2));
@@ -8936,9 +8966,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLViewStatusDoNotDisturb(), "View.Status.CheckDoNotDisturb");
view_listener_t::addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments");
- // Me > Movement
- view_listener_t::addMenu(new LLAdvancedAgentFlyingInfo(), "Agent.getFlying");
-
//Communicate Nearby chat
view_listener_t::addMenu(new LLCommunicateNearbyChat(), "Communicate.NearbyChat");
@@ -9202,11 +9229,8 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdminOnSaveState(), "Admin.OnSaveState");
// Self context menu
- view_listener_t::addMenu(new LLSelfStandUp(), "Self.StandUp");
- enable.add("Self.EnableStandUp", boost::bind(&enable_standup_self));
- view_listener_t::addMenu(new LLSelfSitDown(), "Self.SitDown");
- enable.add("Self.EnableSitDown", boost::bind(&enable_sitdown_self));
- enable.add("Self.ShowSitDown", boost::bind(&show_sitdown_self));
+ view_listener_t::addMenu(new LLSelfToggleSitStand(), "Self.ToggleSitStand");
+ enable.add("Self.EnableSitStand", boost::bind(&enable_sit_stand));
view_listener_t::addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments");
view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments");
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index 6882405407..f2c52913a8 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -110,6 +110,8 @@ void handle_object_return();
void handle_object_delete();
void handle_object_edit();
+void handle_selected_script_action(const std::string& action);
+
void handle_buy_land();
// Takes avatar UUID, or if no UUID passed, uses last selected object
@@ -185,10 +187,14 @@ extern LLContextMenu *gMenuMuteParticle;
extern LLMenuGL* gAttachSubMenu;
extern LLMenuGL* gDetachSubMenu;
extern LLMenuGL* gTakeOffClothes;
+extern LLMenuGL* gDetachAvatarMenu;
+extern LLMenuGL* gDetachHUDAvatarMenu;
extern LLContextMenu* gAttachScreenPieMenu;
extern LLContextMenu* gDetachScreenPieMenu;
+extern LLContextMenu* gDetachHUDAttSelfMenu;
extern LLContextMenu* gAttachPieMenu;
extern LLContextMenu* gDetachPieMenu;
+extern LLContextMenu* gDetachAttSelfMenu;
extern LLContextMenu* gAttachBodyPartPieMenus[9];
extern LLContextMenu* gDetachBodyPartPieMenus[9];
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index cd48b1e8e7..142108f069 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -686,11 +686,12 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
bool render_ui = gSavedSettings.getBOOL("RenderUIInSnapshot");
bool render_hud = gSavedSettings.getBOOL("RenderHUDInSnapshot");
- if (gSavedSettings.getBOOL("HighResSnapshot"))
+ BOOL high_res = gSavedSettings.getBOOL("HighResSnapshot");
+ if (high_res)
{
width *= 2;
height *= 2;
- // not compatible wirh UI/HUD
+ // not compatible with UI/HUD
render_ui = false;
render_hud = false;
}
@@ -702,7 +703,9 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
FALSE,
render_ui,
render_hud,
- FALSE))
+ FALSE,
+ LLSnapshotModel::SNAPSHOT_TYPE_COLOR,
+ high_res ? S32_MAX : MAX_SNAPSHOT_IMAGE_SIZE)) //per side
{
LLPointer<LLImageFormatted> formatted;
LLSnapshotModel::ESnapshotFormat fmt = (LLSnapshotModel::ESnapshotFormat) gSavedSettings.getS32("SnapshotFormat");
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ea9dba3c4e..c909b911c8 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5719,8 +5719,9 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
// so we'll reuse the same namespace for both throttle types.
std::string throttle_name = owner_name;
std::string self_name;
- LLAgentUI::buildFullname( self_name );
- if( owner_name == self_name )
+ LLAgentUI::buildFullname( self_name ); // does not include ' Resident'
+ std::string clean_owner_name = LLCacheName::cleanFullName(owner_name); // removes ' Resident'
+ if( clean_owner_name == self_name )
{
throttle_name = taskid.getString();
}
@@ -5755,7 +5756,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
S32 count = 0;
LLSD args;
args["OBJECTNAME"] = object_name;
- args["NAME"] = LLCacheName::cleanFullName(owner_name);
+ args["NAME"] = clean_owner_name;
S32 known_questions = 0;
bool has_not_only_debit = questions ^ SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_DEBIT].permbit;
// check the received permission flags against each permission
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index f7ded00318..013757589c 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -60,6 +60,7 @@
#include "llviewernetwork.h"
#include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived
#include "llsdserialize.h"
+#include "llsdutil.h"
#include "llcorehttputil.h"
#include "llvoicevivox.h"
@@ -425,7 +426,7 @@ void update_statistics()
* If you move stats around here, make the corresponding changes in
* those locations, too.
*/
-void send_stats()
+void send_viewer_stats(bool include_preferences)
{
// IW 9/23/02 I elected not to move this into LLViewerStats
// because it depends on too many viewer.cpp globals.
@@ -617,10 +618,25 @@ void send_stats()
body["DisplayNamesEnabled"] = gSavedSettings.getBOOL("UseDisplayNames");
body["DisplayNamesShowUsername"] = gSavedSettings.getBOOL("NameTagShowUsernames");
-
+
+ // Preferences
+ if (include_preferences)
+ {
+ bool diffs_only = true; // only log preferences that differ from default
+ body["preferences"]["settings"] = gSavedSettings.asLLSD(diffs_only);
+ body["preferences"]["settings_per_account"] = gSavedPerAccountSettings.asLLSD(diffs_only);
+ }
+
body["MinimalSkin"] = false;
+
LL_INFOS("LogViewerStatsPacket") << "Sending viewer statistics: " << body << LL_ENDL;
+ if (debugLoggingEnabled("LogViewerStatsPacket"))
+ {
+ std::string filename("viewer_stats_packet.xml");
+ llofstream of(filename.c_str());
+ LLSDSerialize::toPrettyXML(body,of);
+ }
// The session ID token must never appear in logs
body["session_id"] = gAgentSessionID;
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index d8d92d61d3..04870e0c26 100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -294,7 +294,7 @@ static const F32 SEND_STATS_PERIOD = 300.0f;
// The following are from (older?) statistics code found in appviewer.
void update_statistics();
-void send_stats();
+void send_viewer_stats(bool include_preferences);
extern LLFrameTimer gTextureTimer;
extern U32Bytes gTotalTextureData;
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index e901245f92..e282905a1c 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -137,7 +137,7 @@ private:
};
-static const U32 MAX_SNAPSHOT_IMAGE_SIZE = 6 * 1024; // max snapshot image size 6144 * 6144
+static const U32 MAX_SNAPSHOT_IMAGE_SIZE = 7680; // max snapshot image size 7680 * 7680 UHDTV2
class LLViewerWindow : public LLWindowCallbacks
{
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index aea12380e8..d2dc139d4b 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -465,6 +465,8 @@ BOOL LLVOAvatarSelf::buildMenus()
if (gDetachBodyPartPieMenus[i])
{
gDetachPieMenu->appendContextSubMenu( gDetachBodyPartPieMenus[i] );
+ gDetachAttSelfMenu->appendContextSubMenu(gDetachBodyPartPieMenus[i]);
+ gDetachAvatarMenu->appendContextSubMenu(gDetachBodyPartPieMenus[i]);
}
else
{
@@ -493,12 +495,14 @@ BOOL LLVOAvatarSelf::buildMenus()
LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
gDetachPieMenu->addChild(item);
-
+ gDetachAttSelfMenu->addChild(LLUICtrlFactory::create<LLMenuItemCallGL>(item_params));
+ gDetachAvatarMenu->addChild(LLUICtrlFactory::create<LLMenuItemCallGL>(item_params));
break;
}
}
}
}
+
// add screen attachments
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
@@ -532,6 +536,8 @@ BOOL LLVOAvatarSelf::buildMenus()
item_params.on_enable.parameter = iter->first;
item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
gDetachScreenPieMenu->addChild(item);
+ gDetachHUDAttSelfMenu->addChild(LLUICtrlFactory::create<LLMenuItemCallGL>(item_params));
+ gDetachHUDAvatarMenu->addChild(LLUICtrlFactory::create<LLMenuItemCallGL>(item_params));
}
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index ef39faa814..5dd662f03d 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2286,50 +2286,34 @@ bool LLVOVolume::notifyAboutCreatingTexture(LLViewerTexture *texture)
std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID());
- typedef std::map<U8, LLMaterialPtr> map_te_material;
- map_te_material new_material;
+ bool refresh_materials = false;
- for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it)
- {
- LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
-
- //here we just interesting in DIFFUSE_MAP only!
- if(NULL != cur_material.get() && LLRender::DIFFUSE_MAP == range_it->second.map && GL_RGBA != texture->getPrimaryFormat())
- { //ok let's check the diffuse mode
- switch(cur_material->getDiffuseAlphaMode())
- {
- case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND:
- case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE:
- case LLMaterial::DIFFUSE_ALPHA_MODE_MASK:
- { //uups... we have non 32 bit texture with LLMaterial::DIFFUSE_ALPHA_MODE_* => LLMaterial::DIFFUSE_ALPHA_MODE_NONE
-
- LLMaterialPtr mat = NULL;
- map_te_material::iterator it = new_material.find(range_it->second.te);
- if(new_material.end() == it) {
- mat = new LLMaterial(cur_material->asLLSD());
- new_material.insert(map_te_material::value_type(range_it->second.te, mat));
- } else {
- mat = it->second;
- }
-
- mat->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
-
- } break;
- } //switch
- } //if
- } //for
+ // RGB textures without alpha channels won't work right with alpha,
+ // we provide format to material for material to decide when to drop alpha
+ for (mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it)
+ {
+ LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
+ if (cur_material.notNull()
+ && LLRender::DIFFUSE_MAP == range_it->second.map)
+ {
+ U32 format = texture->getPrimaryFormat();
+ if (format != cur_material->getDiffuseFormatPrimary())
+ {
+ cur_material->setDiffuseFormatPrimary(format);
+ refresh_materials = true;
+ }
+ }
+ } //for
- //setup new materials
- for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it)
- {
- LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second);
- LLViewerObject::setTEMaterialParams(it->first, it->second);
- }
+ if (refresh_materials)
+ {
+ LLViewerObject::refreshMaterials();
+ }
//clear wait-list
- mWaitingTextureInfo.erase(range.first, range.second);
+ mWaitingTextureInfo.erase(range.first, range.second);
- return 0 != new_material.size();
+ return refresh_materials;
}
bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture)
@@ -2339,184 +2323,84 @@ bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture)
std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID());
if(range.first == range.second) return false;
- typedef std::map<U8, LLMaterialPtr> map_te_material;
- map_te_material new_material;
-
+ bool refresh_materials = false;
+
for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it)
{
LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
if (cur_material.isNull())
continue;
- switch(range_it->second.map)
- {
- case LLRender::DIFFUSE_MAP:
- {
- if(LLMaterial::DIFFUSE_ALPHA_MODE_NONE != cur_material->getDiffuseAlphaMode())
- { //missing texture + !LLMaterial::DIFFUSE_ALPHA_MODE_NONE => LLMaterial::DIFFUSE_ALPHA_MODE_NONE
- LLMaterialPtr mat = NULL;
- map_te_material::iterator it = new_material.find(range_it->second.te);
- if(new_material.end() == it) {
- mat = new LLMaterial(cur_material->asLLSD());
- new_material.insert(map_te_material::value_type(range_it->second.te, mat));
- } else {
- mat = it->second;
- }
-
- mat->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
- }
- } break;
- case LLRender::NORMAL_MAP:
- { //missing texture => reset material texture id
- LLMaterialPtr mat = NULL;
- map_te_material::iterator it = new_material.find(range_it->second.te);
- if(new_material.end() == it) {
- mat = new LLMaterial(cur_material->asLLSD());
- new_material.insert(map_te_material::value_type(range_it->second.te, mat));
- } else {
- mat = it->second;
- }
-
- mat->setNormalID(LLUUID::null);
- } break;
- case LLRender::SPECULAR_MAP:
- { //missing texture => reset material texture id
- LLMaterialPtr mat = NULL;
- map_te_material::iterator it = new_material.find(range_it->second.te);
- if(new_material.end() == it) {
- mat = new LLMaterial(cur_material->asLLSD());
- new_material.insert(map_te_material::value_type(range_it->second.te, mat));
- } else {
- mat = it->second;
- }
-
- mat->setSpecularID(LLUUID::null);
- } break;
- case LLRender::NUM_TEXTURE_CHANNELS:
- //nothing to do, make compiler happy
- break;
- } //switch
- } //for
+ if (range_it->second.map == LLRender::DIFFUSE_MAP)
+ {
+ LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
+ if (cur_material.notNull()
+ && LLRender::DIFFUSE_MAP == range_it->second.map)
+ {
+ if (0 != cur_material->getDiffuseFormatPrimary())
+ {
+ cur_material->setDiffuseFormatPrimary(0);
+ refresh_materials = true;
+ }
+ }
+ }
+ } //for
- //setup new materials
- for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it)
- {
- LLMaterialMgr::getInstance()->setLocalMaterial(getRegion()->getRegionID(), it->second);
- LLViewerObject::setTEMaterialParams(it->first, it->second);
- }
+ if (refresh_materials)
+ {
+ LLViewerObject::refreshMaterials();
+ }
//clear wait-list
mWaitingTextureInfo.erase(range.first, range.second);
- return 0 != new_material.size();
+ return refresh_materials;
}
S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)
{
- LLMaterialPtr pMaterial = const_cast<LLMaterialPtr&>(pMaterialParams);
-
- if(pMaterialParams)
- { //check all of them according to material settings
-
- LLViewerTexture *img_diffuse = getTEImage(te);
- LLViewerTexture *img_normal = getTENormalMap(te);
- LLViewerTexture *img_specular = getTESpecularMap(te);
-
- llassert(NULL != img_diffuse);
-
- LLMaterialPtr new_material = NULL;
-
- //diffuse
- if(NULL != img_diffuse)
- { //guard
- if(0 == img_diffuse->getPrimaryFormat() && !img_diffuse->isMissingAsset())
- { //ok here we don't have information about texture, let's belief and leave material settings
- //but we remember this case
- mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(img_diffuse->getID(), material_info(LLRender::DIFFUSE_MAP, te)));
- }
- else
- {
- bool bSetDiffuseNone = false;
- if(img_diffuse->isMissingAsset())
- {
- bSetDiffuseNone = true;
- }
- else
- {
- switch(pMaterialParams->getDiffuseAlphaMode())
- {
- case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND:
- case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE:
- case LLMaterial::DIFFUSE_ALPHA_MODE_MASK:
- { //all of them modes available only for 32 bit textures
- LLTextureEntry* tex_entry = getTE(te);
- bool bIsBakedImageId = false;
- if (tex_entry && LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(tex_entry->getID()))
- {
- bIsBakedImageId = true;
- }
- if (GL_RGBA != img_diffuse->getPrimaryFormat() && !bIsBakedImageId)
- {
- bSetDiffuseNone = true;
- }
- } break;
- }
- } //else
-
-
- if(bSetDiffuseNone)
- { //upps... we should substitute this material with LLMaterial::DIFFUSE_ALPHA_MODE_NONE
- new_material = new LLMaterial(pMaterialParams->asLLSD());
- new_material->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
- }
- }
- }
-
- //normal
- if(LLUUID::null != pMaterialParams->getNormalID())
- {
- if(img_normal && img_normal->isMissingAsset() && img_normal->getID() == pMaterialParams->getNormalID())
- {
- if(!new_material) {
- new_material = new LLMaterial(pMaterialParams->asLLSD());
- }
- new_material->setNormalID(LLUUID::null);
- }
- else if(NULL == img_normal || 0 == img_normal->getPrimaryFormat())
- { //ok here we don't have information about texture, let's belief and leave material settings
- //but we remember this case
- mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getNormalID(), material_info(LLRender::NORMAL_MAP,te)));
- }
-
- }
+ LLMaterialPtr material = pMaterialParams;
+ if (material.notNull())
+ {
+ LLTextureEntry* tex_entry = getTE(te);
+ bool is_baked = tex_entry && LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(tex_entry->getID());
+ material->setDiffuseBaked(is_baked);
- //specular
- if(LLUUID::null != pMaterialParams->getSpecularID())
- {
- if(img_specular && img_specular->isMissingAsset() && img_specular->getID() == pMaterialParams->getSpecularID())
- {
- if(!new_material) {
- new_material = new LLMaterial(pMaterialParams->asLLSD());
- }
- new_material->setSpecularID(LLUUID::null);
- }
- else if(NULL == img_specular || 0 == img_specular->getPrimaryFormat())
- { //ok here we don't have information about texture, let's belief and leave material settings
- //but we remember this case
- mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getSpecularID(), material_info(LLRender::SPECULAR_MAP, te)));
- }
- }
+ LLViewerTexture *img_diffuse = getTEImage(te);
+ llassert(NULL != img_diffuse);
- if(new_material) {
- pMaterial = new_material;
- LLMaterialMgr::getInstance()->setLocalMaterial(getRegion()->getRegionID(), pMaterial);
- }
+ //diffuse
+ if (!is_baked && NULL != img_diffuse)
+ {
+ if (0 == img_diffuse->getPrimaryFormat() && !img_diffuse->isMissingAsset())
+ {
+ // we don't have information about this texture, wait for it
+ mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(img_diffuse->getID(), material_info(LLRender::DIFFUSE_MAP, te)));
+ // Temporary assume RGBA image
+ material->setDiffuseFormatPrimary(GL_RGBA);
+ }
+ else
+ {
+ if (img_diffuse->isMissingAsset())
+ {
+ material->setDiffuseFormatPrimary(0);
+ }
+ else
+ {
+ material->setDiffuseFormatPrimary(img_diffuse->getPrimaryFormat());
+ }
+ }
+ }
+ else
+ {
+ material->setDiffuseFormatPrimary(0);
+ }
}
- S32 res = LLViewerObject::setTEMaterialParams(te, pMaterial);
+ S32 res = LLViewerObject::setTEMaterialParams(te, material);
- LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterial) ? pMaterial->asLLSD() : LLSD("null")) << " res " << res
+ LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((material) ? material->asLLSD() : LLSD("null")) << " res " << res
<< ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" )
<< LL_ENDL;
setChanged(ALL_CHANGED);
@@ -4583,7 +4467,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
LLMaterial* mat = te->getMaterialParams();
if (mat)
{
- U8 mode = mat->getDiffuseAlphaMode();
+ U8 mode = mat->getDiffuseAlphaModeRender();
if (mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE
|| mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE
@@ -5229,7 +5113,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
}
draw_info->mAlphaMaskCutoff = mat->getAlphaMaskCutoff() * (1.f / 255.f);
- draw_info->mDiffuseAlphaMode = mat->getDiffuseAlphaMode();
+ draw_info->mDiffuseAlphaMode = mat->getDiffuseAlphaModeRender();
draw_info->mNormalMap = facep->getViewerObject()->getTENormalMap(facep->getTEOffset());
}
else
@@ -5591,7 +5475,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (mat && LLPipeline::sRenderDeferred)
{
- U8 alpha_mode = mat->getDiffuseAlphaMode();
+ U8 alpha_mode = mat->getDiffuseAlphaModeRender();
bool is_alpha = type == LLDrawPool::POOL_ALPHA &&
(alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND ||
@@ -5620,7 +5504,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
else if (mat)
{
bool is_alpha = type == LLDrawPool::POOL_ALPHA;
- U8 mode = mat->getDiffuseAlphaMode();
+ U8 mode = mat->getDiffuseAlphaModeRender();
bool can_be_shiny = mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE ||
mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE;
@@ -6518,7 +6402,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
bool can_be_shiny = true;
if (mat)
{
- U8 mode = mat->getDiffuseAlphaMode();
+ U8 mode = mat->getDiffuseAlphaModeRender();
can_be_shiny = mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE ||
mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE;
}
@@ -6540,7 +6424,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
//
if (te->getFullbright())
{
- if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (mat->getDiffuseAlphaModeRender() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
if (opaque)
{
@@ -6625,7 +6509,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
}
else if (mat)
{
- U8 mode = mat->getDiffuseAlphaMode();
+ U8 mode = mat->getDiffuseAlphaModeRender();
is_alpha = (is_alpha || (mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND));
@@ -6724,7 +6608,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
}
else if (fullbright || bake_sunlight)
{ //fullbright
- if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (mat && mat->getDiffuseAlphaModeRender() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK);
}
@@ -6746,7 +6630,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
else
{ //all around simple
llassert(mask & LLVertexBuffer::MAP_NORMAL);
- if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (mat && mat->getDiffuseAlphaModeRender() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{ //material alpha mask can be respected in non-deferred
registerFace(group, facep, LLRenderPass::PASS_ALPHA_MASK);
}
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index e7bbee5efd..3d1bc5249d 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -639,6 +639,7 @@ LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p)
: LLInventoryItemsList(p)
{
setSortOrder(E_SORT_BY_TYPE_LAYER, false);
+ mMenuWearableType = LLWearableType::WT_NONE;
mIsStandalone = p.standalone;
if (mIsStandalone)
{
@@ -730,10 +731,15 @@ void LLWearableItemsList::onRightClick(S32 x, S32 y)
getSelectedUUIDs(selected_uuids);
if (selected_uuids.empty())
{
- return;
+ if ((mMenuWearableType != LLWearableType::WT_NONE) && (size() == 0))
+ {
+ ContextMenu::instance().show(this, mMenuWearableType, x, y);
+ }
+ }
+ else
+ {
+ ContextMenu::instance().show(this, selected_uuids, x, y);
}
-
- ContextMenu::instance().show(this, selected_uuids, x, y);
}
void LLWearableItemsList::setSortOrder(ESortOrder sort_order, bool sort_now)
@@ -784,6 +790,46 @@ void LLWearableItemsList::ContextMenu::show(LLView* spawning_view, const uuid_ve
mParent = NULL; // to avoid dereferencing an invalid pointer
}
+void LLWearableItemsList::ContextMenu::show(LLView* spawning_view, LLWearableType::EType w_type, S32 x, S32 y)
+{
+ mParent = dynamic_cast<LLWearableItemsList*>(spawning_view);
+ LLContextMenu* menup = mMenuHandle.get();
+ if (menup)
+ {
+ //preventing parent (menu holder) from deleting already "dead" context menus on exit
+ LLView* parent = menup->getParent();
+ if (parent)
+ {
+ parent->removeChild(menup);
+ }
+ delete menup;
+ mUUIDs.clear();
+ }
+
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+ registrar.add("Wearable.CreateNew", boost::bind(createNewWearableByType, w_type));
+ menup = createFromFile("menu_wearable_list_item.xml");
+ if (!menup)
+ {
+ LL_WARNS() << "Context menu creation failed" << LL_ENDL;
+ return;
+ }
+ setMenuItemVisible(menup, "create_new", true);
+ setMenuItemEnabled(menup, "create_new", true);
+ setMenuItemVisible(menup, "wearable_attach_to", false);
+ setMenuItemVisible(menup, "wearable_attach_to_hud", false);
+
+ std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getTypeName(w_type));
+ LLMenuItemGL* menu_item = menup->getChild<LLMenuItemGL>("create_new");
+ menu_item->setLabel(new_label);
+
+ mMenuHandle = menup->getHandle();
+ menup->show(x, y);
+ LLMenuGL::showPopup(spawning_view, menup, x, y);
+
+ mParent = NULL; // to avoid dereferencing an invalid pointer
+}
+
// virtual
LLContextMenu* LLWearableItemsList::ContextMenu::createMenu()
{
@@ -1004,4 +1050,10 @@ void LLWearableItemsList::ContextMenu::createNewWearable(const LLUUID& item_id)
LLAgentWearables::createWearable(item->getWearableType(), true);
}
+// static
+void LLWearableItemsList::ContextMenu::createNewWearableByType(LLWearableType::EType type)
+{
+ LLAgentWearables::createWearable(type, true);
+}
+
// EOF
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index f3182ed163..ba8488b237 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -415,6 +415,8 @@ public:
public:
/*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y);
+ void show(LLView* spawning_view, LLWearableType::EType w_type, S32 x, S32 y);
+
protected:
enum {
MASK_CLOTHING = 0x01,
@@ -431,6 +433,7 @@ public:
static void setMenuItemEnabled(LLContextMenu* menu, const std::string& name, bool val);
static void updateMask(U32& mask, LLAssetType::EType at);
static void createNewWearable(const LLUUID& item_id);
+ static void createNewWearableByType(LLWearableType::EType type);
LLWearableItemsList* mParent;
};
@@ -469,6 +472,8 @@ public:
void setSortOrder(ESortOrder sort_order, bool sort_now = true);
+ void setMenuWearableType(LLWearableType::EType type) { mMenuWearableType = type; }
+
protected:
friend class LLUICtrlFactory;
LLWearableItemsList(const LLWearableItemsList::Params& p);
@@ -479,6 +484,8 @@ protected:
bool mWornIndicationEnabled;
ESortOrder mSortOrder;
+
+ LLWearableType::EType mMenuWearableType;
};
#endif //LL_LLWEARABLEITEMSLIST_H
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index f565573935..898ac63939 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1669,7 +1669,7 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
if (alpha && mat)
{
- switch (mat->getDiffuseAlphaMode())
+ switch (mat->getDiffuseAlphaModeRender())
{
case 1:
alpha = true; // Material's alpha mode is set to blend. Toss it into the alpha draw pool.
diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml
index 92c5d8bcbe..3df2683ca8 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar.xml
@@ -14,7 +14,7 @@
help_topic="avatar"
save_rect="true"
save_visibility="true"
- title="CHOOSE AN AVATAR"
+ title="COMPLETE AVATARS"
width="700">
<web_browser
top="25"
diff --git a/indra/newview/skins/default/xui/en/floater_joystick.xml b/indra/newview/skins/default/xui/en/floater_joystick.xml
index 3dfdf8e1a5..7d2cea1fe5 100644
--- a/indra/newview/skins/default/xui/en/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/en/floater_joystick.xml
@@ -8,27 +8,32 @@
title="JOYSTICK CONFIGURATION"
width="569">
<floater.string
- name="NoDevice">
- no device detected
+ name="JoystickDisabled">
+ None
</floater.string>
- <check_box
- bottom="38"
- height="10"
- control_name="JoystickEnabled"
- halign="left"
- label="Enable Joystick:"
+ <text
+ type="string"
layout="topleft"
+ follows="left|top"
+ halign="left"
+ height="12"
+ top="22"
left="14"
- name="enable_joystick"
- width="60" />
- <text
- bottom="32"
+ width="50"
+ mouse_opaque="false"
+ name="joystick_lbl">
+ Joystick:
+ </text>
+ <combo_box
+ allow_text_entry="false"
+ follows="left|top"
layout="topleft"
- left="120"
- name="joystick_type"
- width="380" />
+ name="joystick_combo"
+ top="19"
+ left_pad="4"
+ width="300"/>
<spinner
- bottom="48"
+ bottom="56"
height="10"
control_name="JoystickAxis1"
decimal_digits="0"
@@ -42,7 +47,7 @@
name="JoystickAxis1"
width="140" />
<spinner
- bottom="48"
+ bottom_delta="0"
height="10"
control_name="JoystickAxis2"
decimal_digits="0"
@@ -56,7 +61,7 @@
name="JoystickAxis2"
width="140" />
<spinner
- bottom="48"
+ bottom_delta="0"
height="10"
control_name="JoystickAxis0"
decimal_digits="0"
@@ -70,7 +75,7 @@
name="JoystickAxis0"
width="140" />
<spinner
- bottom="68"
+ bottom="76"
height="10"
control_name="JoystickAxis4"
decimal_digits="0"
@@ -84,7 +89,7 @@
name="JoystickAxis4"
width="140" />
<spinner
- bottom="68"
+ bottom_delta="0"
height="10"
control_name="JoystickAxis5"
decimal_digits="0"
@@ -98,7 +103,7 @@
name="JoystickAxis5"
width="140" />
<spinner
- bottom="68"
+ bottom_delta="0"
height="10"
control_name="JoystickAxis3"
decimal_digits="0"
@@ -112,7 +117,7 @@
name="JoystickAxis3"
width="140" />
<spinner
- bottom="88"
+ bottom="96"
height="10"
control_name="JoystickAxis6"
decimal_digits="0"
@@ -162,12 +167,12 @@
left="37"
mouse_opaque="false"
name="Control Modes:"
- top="110"
+ top="118"
width="102">
Control Modes:
</text>
<check_box
- bottom="127"
+ bottom="134"
height="10"
control_name="JoystickAvatarEnabled"
halign="center"
@@ -177,7 +182,7 @@
name="JoystickAvatarEnabled"
width="60" />
<check_box
- bottom="127"
+ bottom_delta="0"
height="10"
control_name="JoystickBuildEnabled"
halign="center"
@@ -187,7 +192,7 @@
name="JoystickBuildEnabled"
width="60" />
<check_box
- bottom="127"
+ bottom_delta="0"
height="10"
control_name="JoystickFlycamEnabled"
halign="center"
@@ -203,7 +208,7 @@
left="359"
name="axis_view"
show_label="true"
- top="135"
+ top="143"
width="200">
<stat_bar
bar_max="2"
@@ -266,7 +271,7 @@
<text
type="string"
length="1"
- bottom="144"
+ bottom="152"
halign="right"
layout="topleft"
left="3"
@@ -275,7 +280,7 @@
X Scale
</text>
<spinner
- bottom="144"
+ bottom_delta="0"
height="10"
control_name="AvatarAxisScale1"
decimal_digits="2"
@@ -287,7 +292,7 @@
name="AvatarAxisScale1"
width="56" />
<spinner
- bottom="144"
+ bottom_delta="0"
height="10"
control_name="BuildAxisScale1"
decimal_digits="2"
@@ -299,7 +304,7 @@
name="BuildAxisScale1"
width="56" />
<spinner
- bottom="144"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisScale1"
decimal_digits="2"
@@ -313,7 +318,7 @@
<text
type="string"
length="1"
- bottom="164"
+ bottom="172"
halign="right"
layout="topleft"
left="3"
@@ -322,7 +327,7 @@
Y Scale
</text>
<spinner
- bottom="164"
+ bottom_delta="0"
height="10"
control_name="AvatarAxisScale2"
decimal_digits="2"
@@ -334,7 +339,7 @@
name="AvatarAxisScale2"
width="56" />
<spinner
- bottom="164"
+ bottom_delta="0"
height="10"
control_name="BuildAxisScale2"
decimal_digits="2"
@@ -346,7 +351,7 @@
name="BuildAxisScale2"
width="56" />
<spinner
- bottom="164"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisScale2"
decimal_digits="2"
@@ -360,7 +365,7 @@
<text
type="string"
length="1"
- bottom="184"
+ bottom="192"
halign="right"
layout="topleft"
left="3"
@@ -369,7 +374,7 @@
Z Scale
</text>
<spinner
- bottom="184"
+ bottom_delta="0"
height="10"
control_name="AvatarAxisScale0"
decimal_digits="2"
@@ -381,7 +386,7 @@
name="AvatarAxisScale0"
width="56" />
<spinner
- bottom="184"
+ bottom_delta="0"
height="10"
control_name="BuildAxisScale0"
decimal_digits="2"
@@ -393,7 +398,7 @@
name="BuildAxisScale0"
width="56" />
<spinner
- bottom="184"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisScale0"
decimal_digits="2"
@@ -407,7 +412,7 @@
<text
type="string"
length="1"
- bottom="204"
+ bottom="212"
halign="right"
layout="topleft"
left="3"
@@ -416,7 +421,7 @@
Pitch Scale
</text>
<spinner
- bottom="204"
+ bottom_delta="0"
height="10"
control_name="AvatarAxisScale4"
decimal_digits="2"
@@ -428,7 +433,7 @@
name="AvatarAxisScale4"
width="56" />
<spinner
- bottom="204"
+ bottom_delta="0"
height="10"
control_name="BuildAxisScale4"
decimal_digits="2"
@@ -440,7 +445,7 @@
name="BuildAxisScale4"
width="56" />
<spinner
- bottom="204"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisScale4"
decimal_digits="2"
@@ -454,7 +459,7 @@
<text
type="string"
length="1"
- bottom="224"
+ bottom="232"
halign="right"
layout="topleft"
left="3"
@@ -463,7 +468,7 @@
Yaw Scale
</text>
<spinner
- bottom="224"
+ bottom_delta="0"
height="10"
control_name="AvatarAxisScale5"
decimal_digits="2"
@@ -475,7 +480,7 @@
name="AvatarAxisScale5"
width="56" />
<spinner
- bottom="224"
+ bottom_delta="0"
height="10"
control_name="BuildAxisScale5"
decimal_digits="2"
@@ -487,7 +492,7 @@
name="BuildAxisScale5"
width="56" />
<spinner
- bottom="224"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisScale5"
decimal_digits="2"
@@ -501,7 +506,7 @@
<text
type="string"
length="1"
- bottom="244"
+ bottom="252"
halign="right"
layout="topleft"
left="3"
@@ -510,7 +515,7 @@
Roll Scale
</text>
<spinner
- bottom="244"
+ bottom_delta="0"
height="10"
control_name="BuildAxisScale3"
decimal_digits="2"
@@ -522,7 +527,7 @@
name="BuildAxisScale3"
width="56" />
<spinner
- bottom="244"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisScale3"
decimal_digits="2"
@@ -536,7 +541,7 @@
<text
type="string"
length="1"
- bottom="274"
+ bottom="282"
halign="right"
layout="topleft"
left="3"
@@ -545,7 +550,7 @@
X Dead Zone
</text>
<spinner
- bottom="274"
+ bottom_delta="0"
height="10"
control_name="AvatarAxisDeadZone1"
decimal_digits="2"
@@ -556,7 +561,7 @@
name="AvatarAxisDeadZone1"
width="56" />
<spinner
- bottom="274"
+ bottom_delta="0"
height="10"
control_name="BuildAxisDeadZone1"
decimal_digits="2"
@@ -567,7 +572,7 @@
name="BuildAxisDeadZone1"
width="56" />
<spinner
- bottom="274"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisDeadZone1"
decimal_digits="2"
@@ -580,7 +585,7 @@
<text
type="string"
length="1"
- bottom="294"
+ bottom="302"
halign="right"
layout="topleft"
left="3"
@@ -589,7 +594,7 @@
Y Dead Zone
</text>
<spinner
- bottom="294"
+ bottom_delta="0"
height="10"
control_name="AvatarAxisDeadZone2"
decimal_digits="2"
@@ -600,7 +605,7 @@
name="AvatarAxisDeadZone2"
width="56" />
<spinner
- bottom="294"
+ bottom_delta="0"
height="10"
control_name="BuildAxisDeadZone2"
decimal_digits="2"
@@ -611,7 +616,7 @@
name="BuildAxisDeadZone2"
width="56" />
<spinner
- bottom="294"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisDeadZone2"
decimal_digits="2"
@@ -624,7 +629,7 @@
<text
type="string"
length="1"
- bottom="314"
+ bottom="322"
halign="right"
layout="topleft"
left="3"
@@ -633,7 +638,7 @@
Z Dead Zone
</text>
<spinner
- bottom="314"
+ bottom_delta="0"
height="10"
control_name="AvatarAxisDeadZone0"
decimal_digits="2"
@@ -644,7 +649,7 @@
name="AvatarAxisDeadZone0"
width="56" />
<spinner
- bottom="314"
+ bottom_delta="0"
height="10"
control_name="BuildAxisDeadZone0"
decimal_digits="2"
@@ -655,7 +660,7 @@
name="BuildAxisDeadZone0"
width="56" />
<spinner
- bottom="314"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisDeadZone0"
decimal_digits="2"
@@ -668,7 +673,7 @@
<text
type="string"
length="1"
- bottom="334"
+ bottom="342"
halign="right"
layout="topleft"
left="2"
@@ -677,7 +682,7 @@
Pitch Dead Zone
</text>
<spinner
- bottom="334"
+ bottom_delta="0"
height="10"
control_name="AvatarAxisDeadZone4"
decimal_digits="2"
@@ -688,7 +693,7 @@
name="AvatarAxisDeadZone4"
width="56" />
<spinner
- bottom="334"
+ bottom_delta="0"
height="10"
control_name="BuildAxisDeadZone4"
decimal_digits="2"
@@ -699,7 +704,7 @@
name="BuildAxisDeadZone4"
width="56" />
<spinner
- bottom="334"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisDeadZone4"
decimal_digits="2"
@@ -712,7 +717,7 @@
<text
type="string"
length="1"
- bottom="354"
+ bottom="362"
halign="right"
layout="topleft"
left="3"
@@ -721,7 +726,7 @@
Yaw Dead Zone
</text>
<spinner
- bottom="354"
+ bottom_delta="0"
height="10"
control_name="AvatarAxisDeadZone5"
decimal_digits="2"
@@ -732,7 +737,7 @@
name="AvatarAxisDeadZone5"
width="56" />
<spinner
- bottom="354"
+ bottom_delta="0"
height="10"
control_name="BuildAxisDeadZone5"
decimal_digits="2"
@@ -743,7 +748,7 @@
name="BuildAxisDeadZone5"
width="56" />
<spinner
- bottom="354"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisDeadZone5"
decimal_digits="2"
@@ -756,7 +761,7 @@
<text
type="string"
length="1"
- bottom="374"
+ bottom="382"
halign="right"
layout="topleft"
left="3"
@@ -765,7 +770,7 @@
Roll Dead Zone
</text>
<spinner
- bottom="374"
+ bottom_delta="0"
height="10"
control_name="BuildAxisDeadZone3"
decimal_digits="2"
@@ -776,7 +781,7 @@
name="BuildAxisDeadZone3"
width="56" />
<spinner
- bottom="374"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisDeadZone3"
decimal_digits="2"
@@ -789,7 +794,7 @@
<text
type="string"
length="1"
- bottom="402"
+ bottom="410"
halign="right"
layout="topleft"
left="3"
@@ -810,7 +815,7 @@
min_val="1"
name="AvatarFeathering"
show_text="false"
- top="402"
+ top="410"
width="73" />
<slider
control_name="BuildFeathering"
@@ -845,7 +850,7 @@
<text
type="string"
length="1"
- bottom="430"
+ bottom="438"
halign="right"
layout="topleft"
left="3"
@@ -854,7 +859,7 @@
Zoom Scale
</text>
<spinner
- bottom="430"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisScale6"
decimal_digits="2"
@@ -868,7 +873,7 @@
<text
type="string"
length="1"
- bottom="450"
+ bottom="458"
halign="right"
layout="topleft"
left="3"
@@ -877,7 +882,7 @@
Zoom Dead Zone
</text>
<spinner
- bottom="450"
+ bottom_delta="0"
height="10"
control_name="FlycamAxisDeadZone6"
decimal_digits="2"
@@ -894,7 +899,7 @@
layout="topleft"
left="359"
name="SpaceNavigatorDefaults"
- top="429"
+ top="437"
width="200" />
<button
follows="right|bottom"
diff --git a/indra/newview/skins/default/xui/en/floater_my_appearance.xml b/indra/newview/skins/default/xui/en/floater_my_appearance.xml
index fdea7a821a..35ad87ceb0 100644
--- a/indra/newview/skins/default/xui/en/floater_my_appearance.xml
+++ b/indra/newview/skins/default/xui/en/floater_my_appearance.xml
@@ -11,7 +11,7 @@
save_rect="true"
single_instance="true"
reuse_instance="true"
- title="APPEARANCE"
+ title="AVATAR"
min_height="440"
min_width="333"
width="333">
diff --git a/indra/newview/skins/default/xui/en/floater_my_scripts.xml b/indra/newview/skins/default/xui/en/floater_my_scripts.xml
index 3b0b6723c7..ee6defce9d 100644
--- a/indra/newview/skins/default/xui/en/floater_my_scripts.xml
+++ b/indra/newview/skins/default/xui/en/floater_my_scripts.xml
@@ -7,7 +7,7 @@
layout="topleft"
name="myscripts"
save_rect="true"
- title="My Scripts"
+ title="ATTACHMENT SCRIPTS"
min_width="620"
width="620">
<panel
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 0abee2ff80..1377bad6cf 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -2575,13 +2575,22 @@ even though the user gets a free copy.
border_visible="true"
bevel_style="in"
follows="left|top|right"
- height="325"
+ height="300"
layout="topleft"
left="10"
name="contents_inventory"
top="50"
width="275" />
- </panel>
+ <button
+ follows="left|bottom"
+ height="23"
+ label="Reset Scripts"
+ layout="topleft"
+ left="10"
+ name="btn_reset_scripts"
+ bottom="-1"
+ width="118" />
+ </panel>
</tab_container>
<panel
follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
index 38f4b7715f..7ad692038e 100644
--- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
@@ -173,16 +173,13 @@
parameter="avatar_render_settings" />
</menu_item_call>
</context_menu>
- <menu_item_separator
- layout="topleft" name="Impostor seperator"/>
-
<menu_item_call
enabled="false"
label="Block Particle Owner"
name="Mute Particle">
<menu_item_call.on_click
function="Particle.Mute" />
- <menu_item_call.on_enable
+ <menu_item_call.on_visible
function="EnableMuteParticle" />
</menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
index 59faf6a9f5..856bf4ce73 100644
--- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
@@ -4,28 +4,7 @@
name="Attachment Pie">
<menu_item_call
enabled="false"
- label="Touch"
- layout="topleft"
- name="Attachment Object Touch">
- <menu_item_call.on_click
- function="Object.Touch" />
- <menu_item_call.on_enable
- function="Object.EnableTouch"
- name="EnableTouch"/>
- </menu_item_call>
- <!--menu_item_call
- label="Stand Up"
- layout="topleft"
- name="Stand Up">
- <menu_item_call.on_click
- function="Self.StandUp"
- parameter="" />
- <menu_item_call.on_enable
- function="Self.EnableStandUp" />
- </menu_item_call-->
- <menu_item_call
- enabled="false"
- label="Edit"
+ label="Edit item"
layout="topleft"
name="Edit...">
<menu_item_call.on_click
@@ -35,7 +14,7 @@
</menu_item_call>
<menu_item_call
enabled="false"
- label="Detach"
+ label="Detach item"
layout="topleft"
name="Detach">
<menu_item_call.on_click
@@ -43,39 +22,29 @@
<menu_item_call.on_enable
function="Attachment.EnableDetach" />
</menu_item_call>
- <menu_item_separator
- layout="topleft" />
-
<menu_item_call
- label="Sit Down"
+ enabled="false"
+ label="Touch item"
layout="topleft"
- name="Sit Down Here">
+ name="Attachment Object Touch">
<menu_item_call.on_click
- function="Self.SitDown"
- parameter="" />
+ function="Object.Touch" />
<menu_item_call.on_enable
- function="Self.EnableSitDown" />
+ function="Object.EnableTouch"
+ name="EnableTouch"/>
</menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
<menu_item_call
-label="Stand Up"
-layout="topleft"
-name="Stand Up">
- <menu_item_call.on_click
- function="Self.StandUp"
- parameter="" />
- <menu_item_call.on_enable
- function="Self.EnableStandUp" />
- </menu_item_call>
- <menu_item_call
- label="My Appearance"
+ label="Outfits..."
name="Change Outfit">
<menu_item_call.on_click
function="CustomizeAvatar" />
<menu_item_call.on_enable
function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
- <menu_item_call label="Edit My Outfit"
+ <menu_item_call label="Current outfit..."
layout="topleft"
name="Edit Outfit">
<menu_item_call.on_click
@@ -83,7 +52,7 @@ name="Edit Outfit">
<menu_item_call.on_enable
function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
- <menu_item_call label="Edit My Shape"
+ <menu_item_call label="Shape..."
layout="topleft"
name="Edit My Shape">
<menu_item_call.on_click
@@ -91,7 +60,7 @@ name="Edit Outfit">
<menu_item_call.on_enable
function="Edit.EnableEditShape" />
</menu_item_call>
- <menu_item_call label="Hover Height"
+ <menu_item_call label="Hover height..."
layout="topleft"
name="Hover Height">
<menu_item_call.on_click
@@ -99,42 +68,224 @@ name="Edit Outfit">
<menu_item_call.on_enable
function="Edit.EnableHoverHeight" />
</menu_item_call>
- <menu_item_call label="Reset Skeleton"
+ <context_menu
+ label="Take Off"
+ layout="topleft"
+ name="Take Off &gt;">
+ <context_menu
+ label="Clothes"
+ layout="topleft"
+ name="Clothes &gt;">
+ <menu_item_call
+ enabled="false"
+ label="Shirt"
layout="topleft"
- name="Reset Skeleton">
- <menu_item_call.on_click
- function="Avatar.ResetSkeleton" />
- </menu_item_call>
- <menu_item_call label="Reset Skeleton And Animations"
+ name="Shirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="shirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="shirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Pants"
layout="topleft"
- name="Reset Skeleton And Animations">
- <menu_item_call.on_click
- function="Avatar.ResetSkeletonAndAnimations" />
- </menu_item_call>
-
+ name="Pants">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="pants" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="pants" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Skirt"
+ layout="topleft"
+ name="Skirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="skirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="skirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Shoes"
+ layout="topleft"
+ name="Shoes">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="shoes" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="shoes" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Socks"
+ layout="topleft"
+ name="Socks">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="socks" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="socks" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Jacket"
+ layout="topleft"
+ name="Jacket">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="jacket" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="jacket" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Gloves"
+ layout="topleft"
+ name="Gloves">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="gloves" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="gloves" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Undershirt"
+ layout="topleft"
+ name="Self Undershirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="undershirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="undershirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Underpants"
+ layout="topleft"
+ name="Self Underpants">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="underpants" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="underpants" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Tattoo"
+ layout="topleft"
+ name="Self Tattoo">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="tattoo" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="tattoo" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Physics"
+ layout="topleft"
+ name="Self Physics">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="physics" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="physics" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Alpha"
+ layout="topleft"
+ name="Self Alpha">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="alpha" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="alpha" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ label="All Clothes"
+ layout="topleft"
+ name="All Clothes">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="all" />
+ </menu_item_call>
+ </context_menu>
+ <context_menu
+ label="HUD"
+ layout="topleft"
+ name="Detach Self HUD" />
+ <context_menu
+ label="Detach"
+ layout="topleft"
+ name="Detach Self" />
+ <menu_item_call
+ label="Detach All"
+ layout="topleft"
+ name="Detach All">
+ <menu_item_call.on_click
+ function="Self.RemoveAllAttachments"
+ parameter="" />
+ <menu_item_call.on_enable
+ function="Self.EnableRemoveAllAttachments" />
+ </menu_item_call>
+ </context_menu>
+ <menu_item_separator/>
<menu_item_call
- label="My Friends"
+ label="Sit / stand"
layout="topleft"
- name="Friends...">
+ name="Sit stand">
<menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="friends_panel" />
+ function="Self.ToggleSitStand"/>
+ <menu_item_call.on_enable
+ function="Self.EnableSitStand" />
</menu_item_call>
<menu_item_call
- label="My Groups"
- layout="topleft"
- name="Groups...">
+ label="Fly / land"
+ name="Fly land">
<menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="groups_panel" />
+ function="Agent.toggleFlying" />
+ <menu_item_call.on_enable
+ function="Agent.enableFlyLand" />
</menu_item_call>
<menu_item_call
- label="My Profile"
- layout="topleft"
- name="Profile...">
+ label="Stop animations"
+ name="Stop Animating My Avatar">
<menu_item_call.on_click
- function="ShowAgentProfile"
- parameter="agent" />
+ function="Tools.StopAllAnimations" />
+ </menu_item_call>
+ <menu_item_separator/>
+ <menu_item_call label="Reset skeleton"
+ layout="topleft"
+ name="Reset Skeleton">
+ <menu_item_call.on_click
+ function="Avatar.ResetSkeleton" />
+ </menu_item_call>
+ <menu_item_call label="Reset skeleton and animations"
+ layout="topleft"
+ name="Reset Skeleton And Animations">
+ <menu_item_call.on_click
+ function="Avatar.ResetSkeletonAndAnimations" />
</menu_item_call>
<menu_item_call
label="Debug Textures"
@@ -152,27 +303,13 @@ name="Edit Outfit">
<menu_item_call.on_visible
function="Advanced.EnableAppearanceToXML"/>
</menu_item_call>
- <menu_item_separator
- layout="topleft" />
- <menu_item_call
- enabled="false"
- label="Drop"
- layout="topleft"
- name="Drop">
- <menu_item_call.on_click
- function="Attachment.Drop" />
- <menu_item_call.on_enable
- function="Attachment.EnableDrop" />
- </menu_item_call>
- <menu_item_separator
- layout="topleft" />
<menu_item_call
enabled="false"
label="Block Particle Owner"
name="Mute Particle">
<menu_item_call.on_click
function="Particle.Mute" />
- <menu_item_call.on_enable
+ <menu_item_call.on_visible
function="EnableMuteParticle" />
</menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index f9fb847910..acbb9b860d 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -165,16 +165,13 @@
</menu_item_call>
</context_menu>
- <menu_item_separator
- layout="topleft" name="Impostor seperator"/>
-
<menu_item_call
enabled="false"
label="Block Particle Owner"
name="Mute Particle">
<menu_item_call.on_click
function="Particle.Mute" />
- <menu_item_call.on_enable
+ <menu_item_call.on_visible
function="EnableMuteParticle" />
</menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
index 9e181d0b6d..a46d9aed55 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
@@ -3,209 +3,7 @@
layout="topleft"
name="Self Pie">
<menu_item_call
- label="Sit Down"
- layout="topleft"
- name="Sit Down Here">
- <menu_item_call.on_click
- function="Self.SitDown"
- parameter="" />
- <menu_item_call.on_enable
- function="Self.EnableSitDown" />
- </menu_item_call>
- <menu_item_call
- label="Stand Up"
- layout="topleft"
- name="Stand Up">
- <menu_item_call.on_click
- function="Self.StandUp"
- parameter="" />
- <menu_item_call.on_enable
- function="Self.EnableStandUp" />
- </menu_item_call>
- <context_menu
- label="Take Off"
- layout="topleft"
- name="Take Off &gt;">
- <context_menu
- label="Clothes"
- layout="topleft"
- name="Clothes &gt;">
- <menu_item_call
- enabled="false"
- label="Shirt"
- layout="topleft"
- name="Shirt">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="shirt" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="shirt" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Pants"
- layout="topleft"
- name="Pants">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="pants" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="pants" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Skirt"
- layout="topleft"
- name="Skirt">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="skirt" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="skirt" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Shoes"
- layout="topleft"
- name="Shoes">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="shoes" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="shoes" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Socks"
- layout="topleft"
- name="Socks">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="socks" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="socks" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Jacket"
- layout="topleft"
- name="Jacket">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="jacket" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="jacket" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Gloves"
- layout="topleft"
- name="Gloves">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="gloves" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="gloves" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Undershirt"
- layout="topleft"
- name="Self Undershirt">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="undershirt" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="undershirt" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Underpants"
- layout="topleft"
- name="Self Underpants">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="underpants" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="underpants" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Tattoo"
- layout="topleft"
- name="Self Tattoo">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="tattoo" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="tattoo" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Physics"
- layout="topleft"
- name="Self Physics">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="physics" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="physics" />
- </menu_item_call>
- <menu_item_call
- enabled="false"
- label="Alpha"
- layout="topleft"
- name="Self Alpha">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="alpha" />
- <menu_item_call.on_enable
- function="Edit.EnableTakeOff"
- parameter="alpha" />
- </menu_item_call>
- <menu_item_separator
- layout="topleft" />
- <menu_item_call
- label="All Clothes"
- layout="topleft"
- name="All Clothes">
- <menu_item_call.on_click
- function="Edit.TakeOff"
- parameter="all" />
- </menu_item_call>
- </context_menu>
- <context_menu
- label="HUD"
- layout="topleft"
- name="Object Detach HUD" />
- <context_menu
- label="Detach"
- layout="topleft"
- name="Object Detach" />
- <menu_item_call
- label="Detach All"
- layout="topleft"
- name="Detach All">
- <menu_item_call.on_click
- function="Self.RemoveAllAttachments"
- parameter="" />
- <menu_item_call.on_enable
- function="Self.EnableRemoveAllAttachments" />
- </menu_item_call>
- </context_menu>
- <menu_item_call
- label="My Appearance"
+ label="Outfits..."
layout="topleft"
name="Chenge Outfit">
<menu_item_call.on_click
@@ -213,7 +11,7 @@
<menu_item_call.on_enable
function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
- <menu_item_call label="Edit My Outfit"
+ <menu_item_call label="Current outfit..."
layout="topleft"
name="Edit Outfit">
<menu_item_call.on_click
@@ -221,7 +19,7 @@
<menu_item_call.on_enable
function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
- <menu_item_call label="Edit My Shape"
+ <menu_item_call label="Shape..."
layout="topleft"
name="Edit My Shape">
<menu_item_call.on_click
@@ -229,7 +27,7 @@
<menu_item_call.on_enable
function="Edit.EnableEditShape" />
</menu_item_call>
- <menu_item_call label="Hover Height"
+ <menu_item_call label="Hover height..."
layout="topleft"
name="Hover Height">
<menu_item_call.on_click
@@ -237,42 +35,225 @@
<menu_item_call.on_enable
function="Edit.EnableHoverHeight" />
</menu_item_call>
- <menu_item_call label="Reset Skeleton"
+ <context_menu
+ label="Take Off"
+ layout="topleft"
+ name="Take Off &gt;">
+ <context_menu
+ label="Clothes"
+ layout="topleft"
+ name="Clothes &gt;">
+ <menu_item_call
+ enabled="false"
+ label="Shirt"
+ layout="topleft"
+ name="Shirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="shirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="shirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Pants"
+ layout="topleft"
+ name="Pants">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="pants" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="pants" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Skirt"
+ layout="topleft"
+ name="Skirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="skirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="skirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Shoes"
+ layout="topleft"
+ name="Shoes">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="shoes" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="shoes" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Socks"
+ layout="topleft"
+ name="Socks">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="socks" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="socks" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Jacket"
+ layout="topleft"
+ name="Jacket">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="jacket" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="jacket" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Gloves"
+ layout="topleft"
+ name="Gloves">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="gloves" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="gloves" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Undershirt"
+ layout="topleft"
+ name="Self Undershirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="undershirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="undershirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Underpants"
+ layout="topleft"
+ name="Self Underpants">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="underpants" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="underpants" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Tattoo"
+ layout="topleft"
+ name="Self Tattoo">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="tattoo" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="tattoo" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Physics"
+ layout="topleft"
+ name="Self Physics">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="physics" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="physics" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Alpha"
+ layout="topleft"
+ name="Self Alpha">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="alpha" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="alpha" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ label="All Clothes"
+ layout="topleft"
+ name="All Clothes">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="all" />
+ </menu_item_call>
+ </context_menu>
+ <context_menu
+ label="HUD"
+ layout="topleft"
+ name="Object Detach HUD" />
+ <context_menu
+ label="Detach"
+ layout="topleft"
+ name="Object Detach" />
+ <menu_item_call
+ label="Detach All"
+ layout="topleft"
+ name="Detach All">
+ <menu_item_call.on_click
+ function="Self.RemoveAllAttachments"
+ parameter="" />
+ <menu_item_call.on_enable
+ function="Self.EnableRemoveAllAttachments" />
+ </menu_item_call>
+ </context_menu>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Sit / stand"
+ layout="topleft"
+ name="Sit stand">
+ <menu_item_call.on_click
+ function="Self.ToggleSitStand"/>
+ <menu_item_call.on_enable
+ function="Self.EnableSitStand" />
+ </menu_item_call>
+ <menu_item_call
+ label="Fly / land"
+ name="Fly land">
+ <menu_item_call.on_click
+ function="Agent.toggleFlying" />
+ <menu_item_call.on_enable
+ function="Agent.enableFlyLand" />
+ </menu_item_call>
+ <menu_item_call
+ label="Stop animations"
+ name="Stop Animating My Avatar">
+ <menu_item_call.on_click
+ function="Tools.StopAllAnimations" />
+ </menu_item_call>
+ <menu_item_separator/>
+ <menu_item_call label="Reset skeleton"
layout="topleft"
name="Reset Skeleton">
<menu_item_call.on_click
function="Avatar.ResetSkeleton" />
- </menu_item_call>
- <menu_item_call label="Reset Skeleton And Animations"
+ </menu_item_call>
+ <menu_item_call label="Reset skeleton and animations"
layout="topleft"
name="Reset Skeleton And Animations">
<menu_item_call.on_click
function="Avatar.ResetSkeletonAndAnimations" />
</menu_item_call>
- <menu_item_call
- label="My Friends"
- layout="topleft"
- name="Friends...">
- <menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="friends_panel" />
- </menu_item_call>
- <menu_item_call
- label="My Groups"
- layout="topleft"
- name="Groups...">
- <menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="groups_panel" />
- </menu_item_call>
- <menu_item_call
- label="My Profile"
- layout="topleft"
- name="Profile...">
- <menu_item_call.on_click
- function="ShowAgentProfile"
- parameter="agent" />
- </menu_item_call>
<menu_item_call
label="Debug Textures"
name="Debug...">
@@ -289,8 +270,6 @@
<menu_item_call.on_visible
function="Advanced.EnableAppearanceToXML"/>
</menu_item_call>
- <menu_item_separator
- layout="topleft" />
<menu_item_call
enabled="false"
label="Block Particle Owner"
@@ -298,7 +277,7 @@
<menu_item_call.on_click
function="Particle.Mute" />
- <menu_item_call.on_enable
+ <menu_item_call.on_visible
function="EnableMuteParticle" />
</menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 5fa1847d1b..270e267fd4 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -15,24 +15,6 @@
function="ShowAgentProfile"
parameter="agent" />
</menu_item_call>
- <menu_item_call
- label="Appearance..."
- name="ChangeOutfit"
- shortcut="control|O">
- <menu_item_call.on_click
- function="Floater.ToggleOrBringToFront"
- parameter="appearance" />
- <menu_item_call.on_enable
- function="Edit.EnableCustomizeAvatar" />
- </menu_item_call>
- <menu_item_call
- label="Choose an avatar..."
- name="Avatar Picker">
- <menu_item_call.on_click
- function="Floater.ToggleOrBringToFront"
- parameter="avatar" />
- </menu_item_call>
- <menu_item_separator/>
<menu_item_check
label="Inventory..."
name="Inventory"
@@ -76,119 +58,29 @@
parameter="experiences"/>
</menu_item_call>
<menu_item_call
- label="My Scripts..."
- name="MyScripts">
- <menu_item_call.on_click
- function="Floater.ToggleOrBringToFront"
- parameter="my_scripts"/>
- </menu_item_call>
- <menu_item_separator/>
- <menu_item_call
label="Camera Controls..."
name="Camera Controls">
<menu_item_call.on_click
function="Floater.ToggleOrBringToFront"
parameter="camera" />
</menu_item_call>
- <menu
- create_jump_keys="true"
- label="Movement"
- name="Movement"
- tear_off="true">
- <menu_item_call
- label="Sit Down"
- layout="topleft"
- shortcut="alt|shift|S"
- name="Sit Down Here">
- <menu_item_call.on_click
- function="Self.SitDown"/>
- <menu_item_call.on_visible
- function="Self.ShowSitDown"/>
- <menu_item_call.on_enable
- function="Self.EnableSitDown" />
- </menu_item_call>
- <menu_item_call
- label="Stand Up"
- layout="topleft"
- shortcut="alt|shift|S"
- name="Stand up">
- <menu_item_call.on_click
- function="Self.StandUp"/>
- <menu_item_call.on_visible
- function="Self.EnableStandUp"/>
- <menu_item_call.on_enable
- function="Self.EnableStandUp" />
- </menu_item_call>
- <menu_item_check
- label="Fly"
- name="Fly"
- shortcut="HOME">
- <menu_item_check.on_check
- function="Agent.getFlying" />
- <menu_item_check.on_click
- function="Agent.toggleFlying" />
- <menu_item_check.on_enable
- function="Agent.enableFlying" />
- </menu_item_check>
- <menu_item_call
- label="Stop flying"
- name="Stop flying"
- shortcut="HOME">
- <menu_item_call.on_click
- function="Agent.toggleFlying" />
- <menu_item_call.on_enable
- function="Agent.getFlying" />
- </menu_item_call>
- <menu_item_check
- label="Always Run"
- name="Always Run"
- shortcut="control|R">
- <menu_item_check.on_check
- function="World.CheckAlwaysRun" />
- <menu_item_check.on_click
- function="World.AlwaysRun" />
- </menu_item_check>
- <menu_item_call
- label="Stop Animating Me"
- name="Stop Animating My Avatar">
- <menu_item_call.on_click
- function="Tools.StopAllAnimations" />
- </menu_item_call>
- <menu_item_check
- label="Walk / run / fly..."
- name="WalkRunFly">
- <menu_item_check.on_check
- function="Floater.Visible"
- parameter="moveview" />
- <menu_item_check.on_click
- function="Floater.ToggleOrBringToFront"
- parameter="moveview" />
- </menu_item_check>
- </menu>
-
- <menu
- create_jump_keys="true"
- label="Status"
- name="Status"
- tear_off="true">
- <menu_item_check
- name="Away"
- label="Away">
- <menu_item_check.on_check
- function="View.Status.CheckAway" />
- <menu_item_check.on_click
- function="World.SetAway" />
- </menu_item_check>
- <menu_item_check
- name="Do Not Disturb"
- label="Do Not Disturb">
- <menu_item_check.on_check
- function="View.Status.CheckDoNotDisturb" />
- <menu_item_check.on_click
- function="World.SetDoNotDisturb"/>
- </menu_item_check>
-
- </menu>
+ <menu_item_separator/>
+ <menu_item_check
+ name="Away"
+ label="Away">
+ <menu_item_check.on_check
+ function="View.Status.CheckAway" />
+ <menu_item_check.on_click
+ function="World.SetAway" />
+ </menu_item_check>
+ <menu_item_check
+ name="Do Not Disturb"
+ label="Do Not Disturb">
+ <menu_item_check.on_check
+ function="View.Status.CheckDoNotDisturb" />
+ <menu_item_check.on_click
+ function="World.SetDoNotDisturb"/>
+ </menu_item_check>
<menu_item_separator/>
@@ -260,6 +152,325 @@
</menu>
<menu
create_jump_keys="true"
+ label="Avatar"
+ name="Avatar"
+ tear_off="true">
+ <menu_item_call
+ label="Complete avatars..."
+ name="Avatar Picker">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="avatar" />
+ </menu_item_call>
+ <menu_item_call
+ label="Outfits..."
+ name="ChangeOutfit"
+ shortcut="control|O">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="appearance" />
+ <menu_item_call.on_enable
+ function="Edit.EnableCustomizeAvatar" />
+ </menu_item_call>
+ <menu_item_call
+ label="Current outfit..."
+ layout="topleft"
+ name="Edit Outfit">
+ <menu_item_call.on_click
+ function="EditOutfit" />
+ <menu_item_call.on_enable
+ function="Edit.EnableCustomizeAvatar" />
+ </menu_item_call>
+ <menu_item_call
+ label="Shape..."
+ layout="topleft"
+ name="Edit My Shape">
+ <menu_item_call.on_click
+ function="EditShape" />
+ <menu_item_call.on_enable
+ function="Edit.EnableEditShape" />
+ </menu_item_call>
+ <menu_item_call label="Hover height..."
+ layout="topleft"
+ name="Hover Height">
+ <menu_item_call.on_click
+ function="HoverHeight" />
+ <menu_item_call.on_enable
+ function="Edit.EnableHoverHeight" />
+ </menu_item_call>
+ <menu
+ label="Take Off"
+ layout="topleft"
+ name="Take Off &gt;">
+ <menu
+ label="Clothes"
+ layout="topleft"
+ name="Clothes &gt;">
+ <menu_item_call
+ enabled="false"
+ label="Shirt"
+ layout="topleft"
+ name="Shirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="shirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="shirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Pants"
+ layout="topleft"
+ name="Pants">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="pants" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="pants" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Skirt"
+ layout="topleft"
+ name="Skirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="skirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="skirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Shoes"
+ layout="topleft"
+ name="Shoes">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="shoes" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="shoes" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Socks"
+ layout="topleft"
+ name="Socks">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="socks" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="socks" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Jacket"
+ layout="topleft"
+ name="Jacket">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="jacket" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="jacket" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Gloves"
+ layout="topleft"
+ name="Gloves">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="gloves" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="gloves" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Undershirt"
+ layout="topleft"
+ name="Self Undershirt">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="undershirt" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="undershirt" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Underpants"
+ layout="topleft"
+ name="Self Underpants">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="underpants" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="underpants" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Tattoo"
+ layout="topleft"
+ name="Self Tattoo">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="tattoo" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="tattoo" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Physics"
+ layout="topleft"
+ name="Self Physics">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="physics" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="physics" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Alpha"
+ layout="topleft"
+ name="Self Alpha">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="alpha" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="alpha" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ label="All Clothes"
+ layout="topleft"
+ name="All Clothes">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="all" />
+ </menu_item_call>
+ </menu>
+ <menu
+ label="HUD"
+ layout="topleft"
+ name="Avatar Detach HUD" />
+ <menu
+ label="Detach"
+ layout="topleft"
+ name="Avatar Detach" />
+ <menu_item_call
+ label="Detach All"
+ layout="topleft"
+ name="Detach All">
+ <menu_item_call.on_click
+ function="Self.RemoveAllAttachments"
+ parameter="" />
+ <menu_item_call.on_enable
+ function="Self.EnableRemoveAllAttachments" />
+ </menu_item_call>
+ </menu>
+ <menu_item_separator/>
+
+ <menu_item_call
+ label="Sit / stand"
+ layout="topleft"
+ shortcut="alt|shift|S"
+ name="Sit stand">
+ <menu_item_call.on_click
+ function="Self.ToggleSitStand"/>
+ <menu_item_call.on_enable
+ function="Self.EnableSitStand" />
+ </menu_item_call>
+ <menu_item_call
+ label="Fly / land"
+ name="Fly land"
+ shortcut="HOME">
+ <menu_item_call.on_click
+ function="Agent.toggleFlying" />
+ <menu_item_call.on_enable
+ function="Agent.enableFlyLand" />
+ </menu_item_call>
+ <menu_item_call
+ label="Stop animations"
+ name="Stop Animating My Avatar">
+ <menu_item_call.on_click
+ function="Tools.StopAllAnimations" />
+ </menu_item_call>
+ <menu_item_check
+ label="Walk / run / fly..."
+ name="WalkRunFly">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="moveview" />
+ <menu_item_check.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="moveview" />
+ </menu_item_check>
+ <menu_item_check
+ label="Always run"
+ name="Always Run"
+ shortcut="control|R">
+ <menu_item_check.on_check
+ function="World.CheckAlwaysRun" />
+ <menu_item_check.on_click
+ function="World.AlwaysRun" />
+ </menu_item_check>
+ <menu_item_separator/>
+ <menu_item_check
+ label="Gestures..."
+ name="Gestures"
+ shortcut="control|G">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="gestures" />
+ <menu_item_check.on_click
+ function="Floater.Toggle"
+ parameter="gestures" />
+ </menu_item_check>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Reset skeleton"
+ layout="topleft"
+ name="Reset Skeleton">
+ <menu_item_call.on_click
+ function="Avatar.ResetSkeleton" />
+ </menu_item_call>
+ <menu_item_call
+ label="Reset skeleton and animations"
+ layout="topleft"
+ name="Reset Skeleton And Animations">
+ <menu_item_call.on_click
+ function="Avatar.ResetSkeletonAndAnimations" />
+ </menu_item_call>
+ <menu_item_call
+ label="Attachment scripts..."
+ name="MyScripts">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="my_scripts"/>
+ </menu_item_call>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Help with avatars..."
+ name="Help with avatars">
+ <menu_item_call.on_click
+ function="Advanced.ShowURL"
+ parameter="https://community.secondlife.com/search/?type=cms_records3&amp;tags=avatar&amp;nodes=30&amp;search_and_or=or"/>
+ </menu_item_call>
+ </menu>
+ <menu
+ create_jump_keys="true"
label="Communicate"
name="Communicate"
tear_off="true">
diff --git a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
index aa56b4ba63..7370dace7f 100644
--- a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
+++ b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
@@ -4,6 +4,7 @@
<menu_item_call
label="Replace"
layout="topleft"
+ visible="false"
name="wear_replace">
<on_click
function="Wearable.Wear" />
@@ -11,6 +12,7 @@
<menu_item_call
label="Wear"
layout="topleft"
+ visible="false"
name="wear_wear">
<on_click
function="Wearable.Wear" />
@@ -18,6 +20,7 @@
<menu_item_call
label="Add"
layout="topleft"
+ visible="false"
name="wear_add">
<on_click
function="Wearable.Add" />
@@ -25,6 +28,7 @@
<menu_item_call
label="Take Off / Detach"
layout="topleft"
+ visible="false"
name="take_off_or_detach">
<on_click
function="Wearable.TakeOffDetach" />
@@ -32,6 +36,7 @@
<menu_item_call
label="Detach"
layout="topleft"
+ visible="false"
name="detach">
<on_click
function="Attachment.Detach" />
@@ -47,6 +52,7 @@
<menu_item_call
label="Take Off"
layout="topleft"
+ visible="false"
name="take_off">
<on_click
function="Clothing.TakeOff" />
@@ -54,6 +60,7 @@
<menu_item_call
label="Edit"
layout="topleft"
+ visible="false"
name="edit">
<on_click
function="Wearable.Edit" />
@@ -61,6 +68,7 @@
<menu_item_call
label="Item Profile"
layout="topleft"
+ visible="false"
name="object_profile">
<on_click
function="Attachment.Profile" />
@@ -68,6 +76,7 @@
<menu_item_call
label="Show Original"
layout="topleft"
+ visible="false"
name="show_original">
<on_click
function="Wearable.ShowOriginal" />
@@ -75,6 +84,7 @@
<menu_item_call
label="Create New"
layout="topleft"
+ visible="false"
name="create_new"
translate="false">
<on_click
@@ -83,6 +93,7 @@
<menu_item_call
label="--no options--"
layout="topleft"
+ visible="false"
name="--no options--"
translate="false">
</menu_item_call>
diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
index dc1553e6a3..85d73ece48 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -13,7 +13,7 @@
width="333">
<string
name="edit_shape_title">
- Editing Shape
+ Shape
</string>
<string
name="edit_skin_title">
diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml
index 47aceb2c2e..a5aca5c72b 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml
@@ -59,7 +59,8 @@ Maximum 200 per group daily
<scroll_list.columns
label="Date"
name="date"
- width="60" />
+ sort_column="sort"
+ width="100" />
<scroll_list.columns
name="sort"
width="-1" />
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index afce9f6eb5..adbeb09935 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -81,7 +81,7 @@
name="title"
text_color="LtGray"
top="0"
- value="Edit Outfit"
+ value="Current Outfit"
use_ellipses="true"
width="275" />
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index f9f12e7f5c..81390447e9 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -4104,8 +4104,8 @@ Try enclosing path to the editor with double quotes.
<!-- commands -->
<string name="Command_AboutLand_Label">About land</string>
- <string name="Command_Appearance_Label">Appearance</string>
- <string name="Command_Avatar_Label">Avatar</string>
+ <string name="Command_Appearance_Label">Outfits</string>
+ <string name="Command_Avatar_Label">Complete avatars</string>
<string name="Command_Build_Label">Build</string>
<string name="Command_Chat_Label">Chat</string>
<string name="Command_Conversations_Label">Conversations</string>