diff --git a/indra/llcharacter/llbvhconsts.h b/indra/llcharacter/llbvhconsts.h index d5876aa07..b77732de1 100644 --- a/indra/llcharacter/llbvhconsts.h +++ b/indra/llcharacter/llbvhconsts.h @@ -33,7 +33,7 @@ #ifndef LL_LLBVHCONSTS_H #define LL_LLBVHCONSTS_H -const F32 MAX_ANIM_DURATION = 30.f; +const F32 MAX_ANIM_DURATION = 60.f; typedef enum e_constraint_type { diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 5c715d3ff..b193c22b2 100644 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -316,7 +316,8 @@ void LLRadioGroup::setValue( const LLSD& value ) } else { - llwarns << "LLRadioGroup::setValue: value not found: " << value_name << llendl; + llwarns << "LLRadioGroup::setValue: radio_item with name=\"" << value_name << "\" not found, radio_group values are set by radio_item name not value. Falling back on LLUICtrl::setValue." << llendl; + LLUICtrl::setValue(value); } } } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 423207776..871753d0e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -749,6 +749,61 @@ Found in Advanced->Rendering->Info Displays Value 1 + ContactsUseHorizontalButtons + + Comment + Whether or not groups and friends lists use horizontal buttons at the bottom of the panel or vertical ones on the right, requires a restart. + Persist + 1 + Type + Boolean + Value + 0 + + UseConciseIMButtons + + Comment + Whether or not IMs use buttons concisely on the same line as the name of the receiver, changes apply to new IMs only. + Persist + 1 + Type + Boolean + Value + 0 + + UseConciseGroupChatButtons + + Comment + Whether or not group chats use buttons concisely on the same line as the group name, changes apply to new group chats only. + Persist + 1 + Type + Boolean + Value + 0 + + UseConciseConferenceButtons + + Comment + Whether or not conferences use buttons concisely on the same line as the name of the conference, changes apply to new conferences only. + Persist + 1 + Type + Boolean + Value + 0 + + ShowLocalChatFloaterBar + + Comment + Whether or not local chat should have an input bar, requires a restart. + Persist + 1 + Type + Boolean + Value + 1 + OtherChatsTornOff Comment @@ -769,6 +824,17 @@ Found in Advanced->Rendering->Info Displays Type Boolean Value + 1 + + CommunicateSpecificShortcut + + Comment + When true, the keyboard shortcut for Communicate will not bring up the torn off Friends List. + Persist + 1 + Type + Boolean + Value 0 MarketImporterUpdateFreq @@ -6114,6 +6180,22 @@ This should be as low as possible, but too low may break functionality 0 + FloaterChatBarlessRect + + Comment + Rectangle for chat history without input bar + Persist + 1 + Type + Rect + Value + + 0 + 172 + 500 + 0 + + FloaterClothingRect Comment @@ -6133,7 +6215,23 @@ This should be as low as possible, but too low may break functionality FloaterContactsRect Comment - Rectangle for chat history + Rectangle for contacts floater + Persist + 1 + Type + Rect + Value + + 0 + 390 + 395 + 0 + + + FloaterContactsHorizRect + + Comment + Rectangle for contacts floater in horizontal mode Persist 1 Type @@ -6178,6 +6276,22 @@ This should be as low as possible, but too low may break functionality 0 + FloaterDebugSettingsRect + + Comment + Rectangle for the Debug Settings floater + Persist + 1 + Type + Rect + Value + + 0 + 300 + 245 + 0 + + FloaterEnvRect Comment @@ -6629,7 +6743,18 @@ This should be as low as possible, but too low may break functionality RadarChatKeys Comment - Enable private chat alerts for avatars entering the region + Enable alerting scripts about avatars detected by the radar + Persist + 1 + Type + Boolean + Value + 0 + + RadarChatKeysStopAsking + + Comment + Do not ask if RadarChatKeys should be enabled when a script requests for the radar's keys. Persist 1 Type @@ -7689,7 +7814,7 @@ This should be as low as possible, but too low may break functionality WebProfileURL Comment - URL for SL Web Profiles + URL for Web Profiles Persist 0 Type @@ -7697,17 +7822,6 @@ This should be as low as possible, but too low may break functionality Value https://my.secondlife.com/[AGENT_NAME] - WebProfileNonProductionURL - - Comment - URL for SL Web Profiles on Non-Production grids - Persist - 0 - Type - String - Value - https://my-demo.secondlife.com/[AGENT_NAME] - HighResSnapshot Comment diff --git a/indra/newview/app_settings/settings_ascent_coa.xml b/indra/newview/app_settings/settings_ascent_coa.xml index f9cf9e010..2cb809679 100644 --- a/indra/newview/app_settings/settings_ascent_coa.xml +++ b/indra/newview/app_settings/settings_ascent_coa.xml @@ -31,7 +31,7 @@ 1 - MoyMiniMapCustomColor + MoyMiniMapCustomColor Comment Custom minimap color you wish to have. @@ -256,6 +256,20 @@ IsCOA 1 + AscentReportClientUUID Comment diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index b422fae32..d30cb4343 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -357,22 +357,6 @@ This is an autoresponse! - MoyMiniMapCustomColor - - Comment - Custom minimap color you wish to have. - Persist - 1 - Type - Color4 - Value - - 0.375 - 1.0 - 1.0 - 1.0 - - rkeastInventoryPreviousCount diff --git a/indra/newview/ascentprefschat.cpp b/indra/newview/ascentprefschat.cpp index d4b8c3407..dd8531965 100644 --- a/indra/newview/ascentprefschat.cpp +++ b/indra/newview/ascentprefschat.cpp @@ -325,7 +325,6 @@ void LLPrefsAscentChat::onCommitKeywords(LLUICtrl* ctrl, void* user_data) void LLPrefsAscentChat::refreshValues() { //Chat/IM ----------------------------------------------------------------------------- - mWoLfVerticalIMTabs = gSavedSettings.getBOOL("WoLfVerticalIMTabs"); mIMAnnounceIncoming = gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming"); mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification"); mShowGroupNameInChatIM = gSavedSettings.getBOOL("OptionShowGroupNameInChatIM"); @@ -336,7 +335,6 @@ void LLPrefsAscentChat::refreshValues() mLinksForChattingObjects = gSavedSettings.getU32("LinksForChattingObjects"); mSecondsInChatAndIMs = gSavedSettings.getBOOL("SecondsInChatAndIMs"); mSecondsInLog = gSavedSettings.getBOOL("SecondsInLog"); - mOtherChatsTornOff = gSavedSettings.getBOOL("OtherChatsTornOff"); std::string format = gSavedSettings.getString("ShortTimeFormat"); if (format.find("%p") == -1) @@ -374,6 +372,16 @@ void LLPrefsAscentChat::refreshValues() mIMResponseItem = gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseItem"); mIMResponseText = gSavedPerAccountSettings.getString("AscentInstantMessageResponse"); + //Chat UI ----------------------------------------------------------------------------- + mWoLfVerticalIMTabs = gSavedSettings.getBOOL("WoLfVerticalIMTabs"); + mOtherChatsTornOff = gSavedSettings.getBOOL("OtherChatsTornOff"); + mShowLocalChatFloaterBar = gSavedSettings.getBOOL("ShowLocalChatFloaterBar"); + mHorizButt = gSavedSettings.getBOOL("ContactsUseHorizontalButtons"); + mOneLineIMButt = gSavedSettings.getBOOL("UseConciseIMButtons"); + mOneLineGroupButt = gSavedSettings.getBOOL("UseConciseGroupChatButtons"); + mOneLineConfButt = gSavedSettings.getBOOL("UseConciseConferenceButtons"); + mOnlyComm = gSavedSettings.getBOOL("CommunicateSpecificShortcut"); + //Spam -------------------------------------------------------------------------------- mEnableAS = gSavedSettings.getBOOL("AntiSpamEnabled"); mGlobalQueue = gSavedSettings.getBOOL("_NACL_AntiSpamGlobalQueue"); @@ -532,7 +540,6 @@ void LLPrefsAscentChat::refresh() void LLPrefsAscentChat::cancel() { //Chat/IM ----------------------------------------------------------------------------- - gSavedSettings.setBOOL("WoLfVerticalIMTabs", mWoLfVerticalIMTabs); gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming", mIMAnnounceIncoming); gSavedSettings.setBOOL("AscentHideTypingNotification", mHideTypingNotification); gSavedSettings.setBOOL("OptionShowGroupNameInChatIM", mShowGroupNameInChatIM); @@ -543,7 +550,6 @@ void LLPrefsAscentChat::cancel() gSavedSettings.setU32("LinksForChattingObjects", mLinksForChattingObjects); gSavedSettings.setBOOL("SecondsInChatAndIMs", mSecondsInChatAndIMs); gSavedSettings.setBOOL("SecondsInLog", mSecondsInLog); - gSavedSettings.setBOOL("OtherChatsTornOff", mOtherChatsTornOff); std::string short_date, long_date, short_time, long_time, timestamp; @@ -594,6 +600,16 @@ void LLPrefsAscentChat::cancel() gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseItem", mIMResponseItem); gSavedPerAccountSettings.setString("AscentInstantMessageResponse", mIMResponseText); + //Chat UI ----------------------------------------------------------------------------- + gSavedSettings.setBOOL("WoLfVerticalIMTabs", mWoLfVerticalIMTabs); + gSavedSettings.setBOOL("OtherChatsTornOff", mOtherChatsTornOff); + gSavedSettings.setBOOL("ShowLocalChatFloaterBar", mShowLocalChatFloaterBar); + gSavedSettings.setBOOL("ContactsUseHorizontalButtons", mHorizButt); + gSavedSettings.setBOOL("UseConciseIMButtons", mOneLineIMButt); + gSavedSettings.setBOOL("UseConciseGroupChatButtons", mOneLineGroupButt); + gSavedSettings.setBOOL("UseConciseConferenceButtons", mOneLineConfButt); + gSavedSettings.setBOOL("CommunicateSpecificShortcut", mOnlyComm); + //Spam -------------------------------------------------------------------------------- gSavedSettings.setBOOL("AntiSpamEnabled", mEnableAS); gSavedSettings.setBOOL("_NACL_AntiSpamGlobalQueue", mGlobalQueue); diff --git a/indra/newview/ascentprefschat.h b/indra/newview/ascentprefschat.h index 03e980c3f..63cedf611 100644 --- a/indra/newview/ascentprefschat.h +++ b/indra/newview/ascentprefschat.h @@ -62,7 +62,6 @@ protected: static void onCommitKeywords(LLUICtrl* ctrl, void* user_data); //Chat/IM ----------------------------------------------------------------------------- - BOOL mWoLfVerticalIMTabs; BOOL mIMAnnounceIncoming; BOOL mHideTypingNotification; BOOL mShowGroupNameInChatIM; @@ -77,7 +76,6 @@ protected: U32 tempDateFormat; BOOL mSecondsInChatAndIMs; BOOL mSecondsInLog; - BOOL mOtherChatsTornOff; BOOL mIMResponseAnyone; BOOL mIMResponseFriends; @@ -88,6 +86,16 @@ protected: BOOL mIMResponseItem; std::string mIMResponseText; + //Chat UI ----------------------------------------------------------------------------- + bool mWoLfVerticalIMTabs; + bool mOtherChatsTornOff; + bool mShowLocalChatFloaterBar; + bool mHorizButt; + bool mOneLineIMButt; + bool mOneLineGroupButt; + bool mOneLineConfButt; + bool mOnlyComm; + //Spam -------------------------------------------------------------------------------- BOOL mEnableAS; BOOL mGlobalQueue; diff --git a/indra/newview/ascentprefsvan.cpp b/indra/newview/ascentprefsvan.cpp index e80be45d3..824566c78 100644 --- a/indra/newview/ascentprefsvan.cpp +++ b/indra/newview/ascentprefsvan.cpp @@ -211,11 +211,12 @@ void LLPrefsAscentVan::refreshValues() mEstateOwnerColor = gSavedSettings.getColor4("AscentEstateOwnerColor"); mLindenColor = gSavedSettings.getColor4("AscentLindenColor"); mMutedColor = gSavedSettings.getColor4("AscentMutedColor"); - //mCustomColor = gSavedSettings.getColor4("MoyMiniMapCustomColor"); + mCustomColor = gSavedSettings.getColor4("MoyMiniMapCustomColor"); mColorFriendChat = gSavedSettings.getBOOL("ColorFriendChat"); mColorEOChat = gSavedSettings.getBOOL("ColorEstateOwnerChat"); mColorLindenChat = gSavedSettings.getBOOL("ColorLindenChat"); mColorMutedChat = gSavedSettings.getBOOL("ColorMutedChat"); +// mColorCustomChat = gSavedSettings.getBOOL("ColorCustomChat"); //Body Dynamics -------------------------------------------------------------------------- mBreastPhysicsToggle = gSavedSettings.getBOOL("EmeraldBreastPhysicsToggle"); @@ -293,11 +294,12 @@ void LLPrefsAscentVan::cancel() gSavedSettings.setColor4("AscentEstateOwnerColor", mEstateOwnerColor); gSavedSettings.setColor4("AscentLindenColor", mLindenColor); gSavedSettings.setColor4("AscentMutedColor", mMutedColor); -// gSavedSettings.setColor4("MoyMiniMapCustomColor", mCustomColor); + gSavedSettings.setColor4("MoyMiniMapCustomColor", mCustomColor); gSavedSettings.setBOOL("ColorFriendChat", mColorFriendChat); gSavedSettings.setBOOL("ColorEstateOwnerChat", mColorEOChat); gSavedSettings.setBOOL("ColorLindenChat", mColorLindenChat); gSavedSettings.setBOOL("ColorMutedChat", mColorMutedChat); +// gSavedSettings.setBOOL("ColorCustomChat", mColorCustomChat); //Body Dynamics -------------------------------------------------------------------------- gSavedSettings.setBOOL("EmeraldBreastPhysicsToggle", mBreastPhysicsToggle); diff --git a/indra/newview/ascentprefsvan.h b/indra/newview/ascentprefsvan.h index 0c84ce432..62600a264 100644 --- a/indra/newview/ascentprefsvan.h +++ b/indra/newview/ascentprefsvan.h @@ -82,10 +82,12 @@ protected: LLColor4 mEstateOwnerColor; LLColor4 mLindenColor; LLColor4 mMutedColor; + LLColor4 mCustomColor; bool mColorFriendChat; bool mColorEOChat; bool mColorLindenChat; bool mColorMutedChat; +// bool mColorCustomChat; //Body Dynamics BOOL mBreastPhysicsToggle; F32 mBoobMass; diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index 7dcd34a59..6d19d693c 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -461,7 +461,7 @@ bool cmd_line_chat(std::string revised_text, EChatType type) return true; } -//case insensative search for avatar in draw distance +//case insensitive search for avatar in draw distance //TODO: make this use the avatar list floaters list so we have EVERYONE // even if they are out of draw distance. LLUUID cmdline_partial_name2key(std::string partial_name) @@ -471,7 +471,7 @@ LLUUID cmdline_partial_name2key(std::string partial_name) LLStringUtil::toLower(partial_name); LLWorld::getInstance()->getAvatars(&avatars); typedef std::vector::const_iterator av_iter; - bool has_avatarlist = (LLFloaterAvatarList::getInstance() ? true : false); + bool has_avatarlist = LLFloaterAvatarList::instanceExists(); if(has_avatarlist) LLFloaterAvatarList::getInstance()->updateAvatarList(); for(av_iter i = avatars.begin(); i != avatars.end(); ++i) @@ -511,7 +511,7 @@ void cmdline_tp2name(std::string target) cmdline_printchat("Avatar not found."); return; } - LLFloaterAvatarList* avlist = LLFloaterAvatarList::getInstance(); + LLFloaterAvatarList* avlist = LLFloaterAvatarList::instanceExists() ? LLFloaterAvatarList::getInstance() : NULL; LLVOAvatar* avatarp = gObjectList.findAvatar(avkey); if(avatarp) { diff --git a/indra/newview/hippogridmanager.cpp b/indra/newview/hippogridmanager.cpp index 222969450..674206e79 100644 --- a/indra/newview/hippogridmanager.cpp +++ b/indra/newview/hippogridmanager.cpp @@ -73,7 +73,7 @@ HippoGridInfo::Platform HippoGridInfo::getPlatform() bool HippoGridInfo::isOpenSimulator() const { - return (mPlatform == HippoGridInfo::PLATFORM_OPENSIM); + return (mPlatform == HippoGridInfo::PLATFORM_OPENSIM || mPlatform == HippoGridInfo::PLATFORM_AURORA); } bool HippoGridInfo::isAurora() const diff --git a/indra/newview/hippolimits.cpp b/indra/newview/hippolimits.cpp index c5aa2c7b1..2ee9a7344 100644 --- a/indra/newview/hippolimits.cpp +++ b/indra/newview/hippolimits.cpp @@ -52,9 +52,9 @@ void HippoLimits::setAuroraLimits() { mMaxAgentGroups = gHippoGridManager->getConnectedGrid()->getMaxAgentGroups(); if (mMaxAgentGroups < 0) mMaxAgentGroups = 50; - mMaxPrimScale = 256.0f; + mMaxPrimScale = 8192.0f; mMinPrimScale = 0.001f; - mMaxHeight = 8192.0f; + mMaxHeight = 10000.0f; mMinHoleSize = 0.001f; mMaxHollow = 99.0f; } diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 858c26909..26d3aa0a9 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -55,6 +55,7 @@ #include "llviewerobject.h" #include "llviewerregion.h" #include "llresmgr.h" + #include "llbutton.h" #include "lldir.h" #include "llnotificationsutil.h" @@ -207,8 +208,7 @@ BOOL LLFloaterScriptQueue::start() args["[COUNT]"] = llformat ("%d", mObjectIDs.count()); buffer = getString ("Starting", args); - LLScrollListCtrl* list = getChild("queue output"); - list->setCommentText(buffer); + getChild("queue output")->addSimpleElement(buffer, ADD_BOTTOM); return nextObject(); } @@ -240,12 +240,9 @@ BOOL LLFloaterScriptQueue::nextObject() } while((mObjectIDs.count() > 0) && !successful_start); if(isDone() && !mDone) { - - LLScrollListCtrl* list = getChild("queue output"); - - mDone = TRUE; - list->setCommentText(getString("Done")); - childSetEnabled("close",TRUE); + mDone = true; + getChild("queue output")->addSimpleElement(getString("Done"), ADD_BOTTOM); + getChildView("close")->setEnabled(TRUE); } return successful_start; } @@ -283,6 +280,40 @@ BOOL LLFloaterScriptQueue::popNext() /// Class LLFloaterCompileQueue ///---------------------------------------------------------------------------- +class LLCompileFloaterUploadQueueSupplier : public LLAssetUploadQueueSupplier +{ +public: + + LLCompileFloaterUploadQueueSupplier(const LLUUID& queue_id) : + mQueueId(queue_id) + { + } + + virtual LLAssetUploadQueue* get() const + { + LLFloaterCompileQueue* queue = (LLFloaterCompileQueue*) LLFloaterScriptQueue::findInstance(mQueueId); + if(NULL == queue) + { + return NULL; + } + return queue->getUploadQueue(); + } + + virtual void log(std::string message) const + { + LLFloaterCompileQueue* queue = (LLFloaterCompileQueue*) LLFloaterScriptQueue::findInstance(mQueueId); + if(NULL == queue) + { + return; + } + + queue->getChild("queue output")->addSimpleElement(message, ADD_BOTTOM); + } + +private: + LLUUID mQueueId; +}; + // static LLFloaterCompileQueue* LLFloaterCompileQueue::create(BOOL mono) { @@ -291,48 +322,8 @@ LLFloaterCompileQueue* LLFloaterCompileQueue::create(BOOL mono) LLRect rect = gSavedSettings.getRect("CompileOutputRect"); rect.translate(left - rect.mLeft, top - rect.mTop); LLFloaterCompileQueue* new_queue = new LLFloaterCompileQueue("queue", rect); - - class LLCompileFloaterUploadQueueSupplier : public LLAssetUploadQueueSupplier - { - public: - - LLCompileFloaterUploadQueueSupplier(const LLUUID& queue_id) : - mQueueId(queue_id) - { - } - - virtual LLAssetUploadQueue* get() const - { - LLFloaterCompileQueue* queue = - (LLFloaterCompileQueue*) LLFloaterScriptQueue::findInstance(mQueueId); - - if(NULL == queue) - { - return NULL; - } - - return queue->mUploadQueue; - } - virtual void log(std::string message) const - { - LLFloaterCompileQueue* queue = - (LLFloaterCompileQueue*) LLFloaterScriptQueue::findInstance(mQueueId); - - if(NULL == queue) - { - return; - } - - LLScrollListCtrl* list = queue->getChild("queue output"); - list->setCommentText(message.c_str()); - } - - private: - LLUUID mQueueId; - }; - - new_queue->mUploadQueue = new LLAssetUploadQueue(new LLCompileFloaterUploadQueueSupplier(new_queue->getID())); + new_queue->mUploadQueue = new LLAssetUploadQueue(new LLCompileFloaterUploadQueueSupplier(new_queue->getID())); new_queue->mMono = mono; new_queue->open(); return new_queue; @@ -414,8 +405,8 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, llinfos << "LLFloaterCompileQueue::scriptArrived()" << llendl; LLScriptQueueData* data = (LLScriptQueueData*)user_data; if(!data) return; - LLFloaterCompileQueue* queue = static_cast - (LLFloaterScriptQueue::findInstance(data->mQueueID)); + LLFloaterCompileQueue* queue = static_cast (LLFloaterScriptQueue::findInstance(data->mQueueID)); + std::string buffer; if(queue && (0 == status)) { @@ -519,8 +510,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, } if(queue && (buffer.size() > 0)) { - LLScrollListCtrl* list = queue->getChild("queue output"); - list->setCommentText(buffer); + queue->getChild("queue output")->addSimpleElement(buffer, ADD_BOTTOM); } delete data; } @@ -543,8 +533,7 @@ void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* { llinfos << "LLFloaterCompileQueue::onSaveBytecodeComplete()" << llendl; LLCompileQueueData* data = (LLCompileQueueData*)user_data; - LLFloaterCompileQueue* queue = static_cast - (LLFloaterScriptQueue::findInstance(data->mQueueID)); + LLFloaterCompileQueue* queue = static_cast (LLFloaterScriptQueue::findInstance(data->mQueueID)); if(queue && (0 == status) && data) { queue->saveItemByItemID(data->mItemId); @@ -692,7 +681,7 @@ void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj, // find all of the lsl, leaving off duplicates. We'll remove // all matching asset uuids on compilation success. LLDynamicArray names; - + LLInventoryObject::object_list_t::const_iterator it = inv->begin(); LLInventoryObject::object_list_t::const_iterator end = inv->end(); for ( ; it != end; ++it) @@ -704,10 +693,9 @@ void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj, if (object) { LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); - LLScrollListCtrl* list = getChild("queue output"); std::string buffer; buffer = getString("Resetting") + LLTrans::getString(":") + " " + item->getName(); - list->setCommentText(buffer); + getChild("queue output")->addSimpleElement(buffer, ADD_BOTTOM); LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_ScriptReset); msg->nextBlockFast(_PREHASH_AgentData); @@ -754,7 +742,7 @@ void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj, // find all of the lsl, leaving off duplicates. We'll remove // all matching asset uuids on compilation success. LLDynamicArray names; - + LLInventoryObject::object_list_t::const_iterator it = inv->begin(); LLInventoryObject::object_list_t::const_iterator end = inv->end(); for ( ; it != end; ++it) @@ -769,7 +757,7 @@ void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj, LLScrollListCtrl* list = getChild("queue output"); std::string buffer; buffer = getString("Running") + LLTrans::getString(":") + " " + item->getName(); - list->setCommentText(buffer); + list->addSimpleElement(buffer, ADD_BOTTOM); LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_SetScriptRunning); @@ -818,7 +806,7 @@ void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj, // find all of the lsl, leaving off duplicates. We'll remove // all matching asset uuids on compilation success. LLDynamicArray names; - + LLInventoryObject::object_list_t::const_iterator it = inv->begin(); LLInventoryObject::object_list_t::const_iterator end = inv->end(); for ( ; it != end; ++it) @@ -833,8 +821,8 @@ void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj, LLScrollListCtrl* list = getChild("queue output"); std::string buffer; buffer = getString("NotRunning") + LLTrans::getString(":") + " " + item->getName(); - list->setCommentText(buffer); - + list->addSimpleElement(buffer, ADD_BOTTOM); + LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_SetScriptRunning); msg->nextBlockFast(_PREHASH_AgentData); diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index e4bccff52..ee49ac574 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -79,7 +79,7 @@ protected: LLInventoryObject::object_list_t* inv, S32 serial_num, void* queue); - + // This is called by inventoryChanged virtual void handleInventory(LLViewerObject* viewer_obj, LLInventoryObject::object_list_t* inv) = 0; @@ -105,7 +105,7 @@ protected: // Object Queue LLDynamicArray mObjectIDs; LLUUID mCurrentObjectID; - BOOL mDone; + bool mDone; LLUUID mID; static LLMap sInstances; @@ -143,6 +143,8 @@ public: // remove any object in mScriptScripts with the matching uuid. void removeItemByItemID(const LLUUID& item_id); + LLAssetUploadQueue* getUploadQueue() { return mUploadQueue; } + protected: LLFloaterCompileQueue(const std::string& name, const LLRect& rect); virtual ~LLFloaterCompileQueue(); @@ -200,12 +202,10 @@ public: protected: LLFloaterResetQueue(const std::string& name, const LLRect& rect); virtual ~LLFloaterResetQueue(); - + // This is called by inventoryChanged virtual void handleInventory(LLViewerObject* viewer_obj, - LLInventoryObject::object_list_t* inv); - -protected: + LLInventoryObject::object_list_t* inv); }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -224,12 +224,10 @@ public: protected: LLFloaterRunQueue(const std::string& name, const LLRect& rect); virtual ~LLFloaterRunQueue(); - + // This is called by inventoryChanged virtual void handleInventory(LLViewerObject* viewer_obj, LLInventoryObject::object_list_t* inv); - -protected: }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -252,8 +250,6 @@ protected: // This is called by inventoryChanged virtual void handleInventory(LLViewerObject* viewer_obj, LLInventoryObject::object_list_t* inv); - -protected: }; #endif // LL_LLCOMPILEQUEUE_H diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index e12b95156..5a191551b 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -84,6 +84,8 @@ typedef enum e_radar_alert_type ALERT_TYPE_AGE = 16, } ERadarAlertType; +namespace +{ void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool entering) { if(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) return; //RLVa:LF Don't announce people are around when blind, that cheats the system. @@ -94,7 +96,6 @@ void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool static LLCachedControl radar_alert_shout_range(gSavedSettings, "RadarAlertShoutRange"); static LLCachedControl radar_alert_chat_range(gSavedSettings, "RadarAlertChatRange"); static LLCachedControl radar_alert_age(gSavedSettings, "RadarAlertAge"); - static LLCachedControl radar_chat_keys(gSavedSettings, "RadarChatKeys"); LLFloaterAvatarList* self = LLFloaterAvatarList::getInstance(); LLStringUtil::format_map_t args; @@ -153,6 +154,21 @@ void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool } } + void send_keys_message(const int transact_num, const int num_ids, const std::string ids) + { + gMessageSystem->newMessage("ScriptDialogReply"); + gMessageSystem->nextBlock("AgentData"); + gMessageSystem->addUUID("AgentID", gAgent.getID()); + gMessageSystem->addUUID("SessionID", gAgent.getSessionID()); + gMessageSystem->nextBlock("Data"); + gMessageSystem->addUUID("ObjectID", gAgent.getID()); + gMessageSystem->addS32("ChatChannel", -777777777); + gMessageSystem->addS32("ButtonIndex", 1); + gMessageSystem->addString("ButtonLabel", llformat("%d,%d", transact_num, num_ids) + ids); + gAgent.sendReliableMessage(); + } +} //namespace + LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string &name, const LLVector3d &position) : mID(id), mName(name), mPosition(position), mDrawPosition(), mMarked(false), mFocused(false), mUpdateTimer(), mFrame(gFrameCount), mInSimFrame(U32_MAX), mInDrawFrame(U32_MAX), @@ -476,6 +492,15 @@ void LLFloaterAvatarList::assessColumns() mAvatarList->getColumn(LIST_AVATAR_NAME)->mDynamicWidth = TRUE; mAvatarList->getColumn(LIST_AVATAR_NAME)->mRelWidth = -1; } + else if (!hide_client) + { + mAvatarList->getColumn(LIST_CLIENT)->setWidth(0); + mAvatarList->getColumn(LIST_AVATAR_NAME)->setWidth(0); + mAvatarList->getColumn(LIST_AVATAR_NAME)->mDynamicWidth = FALSE; + mAvatarList->getColumn(LIST_AVATAR_NAME)->mRelWidth = 0; + mAvatarList->getColumn(LIST_CLIENT)->mDynamicWidth = TRUE; + mAvatarList->getColumn(LIST_CLIENT)->mRelWidth = -1; + } mAvatarList->updateLayout(); } @@ -558,7 +583,7 @@ void LLFloaterAvatarList::updateAvatarList() size_t i; size_t count = avatar_ids.size(); - bool announce = gSavedSettings.getBOOL("RadarChatKeys"); + static LLCachedControl announce(gSavedSettings, "RadarChatKeys"); std::queue announce_keys; for (i = 0; i < count; ++i) @@ -650,8 +675,9 @@ void LLFloaterAvatarList::updateAvatarList() } } //let us send the keys in a more timely fashion - if(announce && !announce_keys.empty()) + if (announce && !announce_keys.empty()) { + // NOTE: This fragment is repeated in sendKey std::ostringstream ids; int transact_num = (int)gFrameCount; int num_ids = 0; @@ -663,37 +689,17 @@ void LLFloaterAvatarList::updateAvatarList() ids << "," << id.asString(); ++num_ids; - if(ids.tellp() > 200) + if (ids.tellp() > 200) { - gMessageSystem->newMessage("ScriptDialogReply"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgent.getID()); - gMessageSystem->addUUID("SessionID", gAgent.getSessionID()); - gMessageSystem->nextBlock("Data"); - gMessageSystem->addUUID("ObjectID", gAgent.getID()); - gMessageSystem->addS32("ChatChannel", -777777777); - gMessageSystem->addS32("ButtonIndex", 1); - gMessageSystem->addString("ButtonLabel",llformat("%d,%d", transact_num, num_ids) + ids.str()); - gAgent.sendReliableMessage(); + send_keys_message(transact_num, num_ids, ids.str()); num_ids = 0; ids.seekp(0); ids.str(""); } } - if(num_ids > 0) - { - gMessageSystem->newMessage("ScriptDialogReply"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgent.getID()); - gMessageSystem->addUUID("SessionID", gAgent.getSessionID()); - gMessageSystem->nextBlock("Data"); - gMessageSystem->addUUID("ObjectID", gAgent.getID()); - gMessageSystem->addS32("ChatChannel", -777777777); - gMessageSystem->addS32("ButtonIndex", 1); - gMessageSystem->addString("ButtonLabel",llformat("%d,%d", transact_num, num_ids) + ids.str()); - gAgent.sendReliableMessage(); - } + if (num_ids > 0) + send_keys_message(transact_num, num_ids, ids.str()); } } @@ -1387,19 +1393,17 @@ void LLFloaterAvatarList::onClickGetKey() void LLFloaterAvatarList::sendKeys() { + // This would break for send_keys_btn callback, check this beforehand, if it matters. + //static LLCachedControl radar_chat_keys(gSavedSettings, "RadarChatKeys"); + //if (radar_chat_keys) return; + LLViewerRegion* regionp = gAgent.getRegion(); - if(!regionp)return;//ALWAYS VALIDATE DATA - std::ostringstream ids; + if (!regionp) return;//ALWAYS VALIDATE DATA + static int last_transact_num = 0; int transact_num = (int)gFrameCount; - int num_ids = 0; - if(!gSavedSettings.getBOOL("RadarChatKeys")) - { - return; - } - - if(transact_num > last_transact_num) + if (transact_num > last_transact_num) { last_transact_num = transact_num; } @@ -1410,7 +1414,9 @@ void LLFloaterAvatarList::sendKeys() return; } - if (!regionp) return; // caused crash if logged out/connection lost + std::ostringstream ids; + int num_ids = 0; + for (int i = 0; i < regionp->mMapAvatarIDs.count(); i++) { const LLUUID &id = regionp->mMapAvatarIDs.get(i); @@ -1419,67 +1425,54 @@ void LLFloaterAvatarList::sendKeys() ++num_ids; - if(ids.tellp() > 200) + if (ids.tellp() > 200) { - gMessageSystem->newMessage("ScriptDialogReply"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgent.getID()); - gMessageSystem->addUUID("SessionID", gAgent.getSessionID()); - gMessageSystem->nextBlock("Data"); - gMessageSystem->addUUID("ObjectID", gAgent.getID()); - gMessageSystem->addS32("ChatChannel", -777777777); - gMessageSystem->addS32("ButtonIndex", 1); - gMessageSystem->addString("ButtonLabel",llformat("%d,%d", transact_num, num_ids) + ids.str()); - gAgent.sendReliableMessage(); + send_keys_message(transact_num, num_ids, ids.str()); num_ids = 0; ids.seekp(0); ids.str(""); } } - if(num_ids > 0) - { - gMessageSystem->newMessage("ScriptDialogReply"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgent.getID()); - gMessageSystem->addUUID("SessionID", gAgent.getSessionID()); - gMessageSystem->nextBlock("Data"); - gMessageSystem->addUUID("ObjectID", gAgent.getID()); - gMessageSystem->addS32("ChatChannel", -777777777); - gMessageSystem->addS32("ButtonIndex", 1); - gMessageSystem->addString("ButtonLabel",llformat("%d,%d", transact_num, num_ids) + ids.str()); - gAgent.sendReliableMessage(); - } + if (num_ids > 0) + send_keys_message(transact_num, num_ids, ids.str()); } //static void LLFloaterAvatarList::sound_trigger_hook(LLMessageSystem* msg,void **) { + if (!LLFloaterAvatarList::instanceExists()) return; // Don't bother if we're closed. + LLUUID sound_id,owner_id; msg->getUUIDFast(_PREHASH_SoundData, _PREHASH_SoundID, sound_id); msg->getUUIDFast(_PREHASH_SoundData, _PREHASH_OwnerID, owner_id); - if(owner_id == gAgent.getID() && sound_id == LLUUID("76c78607-93f9-f55a-5238-e19b1a181389")) + if (owner_id == gAgent.getID() && sound_id == LLUUID("76c78607-93f9-f55a-5238-e19b1a181389")) { - //let's ask if they want to turn it on. - if(gSavedSettings.getBOOL("RadarChatKeys")) - { + static LLCachedControl on("RadarChatKeys"); + static LLCachedControl do_not_ask("RadarChatKeysStopAsking"); + if (on) LLFloaterAvatarList::getInstance()->sendKeys(); - }else - { - LLSD args; - args["MESSAGE"] = "An object owned by you has request the keys from your radar.\nWould you like to enable announcing keys to objects in the sim?"; - LLNotificationsUtil::add("GenericAlertYesCancel", args, LLSD(), onConfirmRadarChatKeys); - } + else if (!do_not_ask) // Let's ask if they want to turn it on, but not pester them. + LLNotificationsUtil::add("RadarChatKeysRequest", LLSD(), LLSD(), onConfirmRadarChatKeys); } } // static bool LLFloaterAvatarList::onConfirmRadarChatKeys(const LLSD& notification, const LLSD& response ) { S32 option = LLNotification::getSelectedOption(notification, response); - if(option == 0) // yes + if (option == 1) // no { - gSavedSettings.setBOOL("RadarChatKeys",TRUE); + return false; + } + else if (option == 0) // yes + { + gSavedSettings.setBOOL("RadarChatKeys", true); LLFloaterAvatarList::getInstance()->sendKeys(); } + else if (option == 2) // No, and stop asking!! + { + gSavedSettings.setBOOL("RadarChatKeysStopAsking", true); + } + return false; } diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index bfb4892c6..db38f8009 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -108,7 +108,8 @@ LLFloaterChat::LLFloaterChat(const LLSD& seed) mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, NULL); // do not automatically open singleton floaters (as result of getInstance()) BOOL no_open = FALSE; - LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml",&getFactoryMap(),no_open); + bool show_bar = gSavedSettings.getBOOL("ShowLocalChatFloaterBar"); + LLUICtrlFactory::getInstance()->buildFloater(this, (show_bar ? "floater_chat_history.xml" : "floater_chat_history_barless.xml"), &getFactoryMap(), no_open); childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes childSetCommitCallback("translate chat",onClickToggleTranslateChat,this); diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp index 9e41340fe..876e2c321 100644 --- a/indra/newview/llfloaterchatterbox.cpp +++ b/indra/newview/llfloaterchatterbox.cpp @@ -54,7 +54,8 @@ LLFloaterMyFriends::LLFloaterMyFriends(const LLSD& seed) mFactoryMap["groups_panel"] = LLCallbackMap(LLFloaterMyFriends::createGroupsPanel, NULL); // do not automatically open singleton floaters (as result of getInstance()) BOOL no_open = FALSE; - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_my_friends.xml", &getFactoryMap(), no_open); + static LLCachedControl horiz("ContactsUseHorizontalButtons"); + LLUICtrlFactory::getInstance()->buildFloater(this, (horiz ? "floater_my_friends_horiz.xml" : "floater_my_friends.xml"), &getFactoryMap(), no_open); } LLFloaterMyFriends::~LLFloaterMyFriends() diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 2d7ce1da4..5bd332024 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -31,117 +31,129 @@ */ #include "llviewerprecompiledheaders.h" + #include "llfloatersettingsdebug.h" -#include "llfloater.h" -#include "lluictrlfactory.h" -#include "llfirstuse.h" -#include "llcombobox.h" -#include "llspinctrl.h" + #include "llcolorswatch.h" +//#include "llfirstuse.h" +#include "llfloater.h" +#include "llscrolllistctrl.h" +#include "llspinctrl.h" +#include "lltexteditor.h" +#include "lluictrlfactory.h" #include "llviewercontrol.h" +#include "llwindow.h" // [RLVa:KB] #include "rlvhandler.h" #include "rlvextensions.h" // [/RLVa:KB] -LLFloaterSettingsDebug* LLFloaterSettingsDebug::sInstance = NULL; - -LLFloaterSettingsDebug::LLFloaterSettingsDebug() : LLFloater(std::string("Configuration Editor")) +LLFloaterSettingsDebug::LLFloaterSettingsDebug() +: LLFloater(std::string("Configuration Editor")) +, mCurrentControlVariable(NULL) +, mOldControlVariable(NULL) +, mOldSearchTerm(std::string("---")) { + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml"); } LLFloaterSettingsDebug::~LLFloaterSettingsDebug() { - sInstance = NULL; + if (mOldControlVariable) + mOldControlVariable->getCommitSignal()->disconnect(boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this)); } BOOL LLFloaterSettingsDebug::postBuild() { - LLComboBox* settings_combo = getChild("settings_combo"); + mSettingsScrollList = getChild("settings_scroll_list"); struct f : public LLControlGroup::ApplyFunctor { - LLComboBox* combo; - f(LLComboBox* c) : combo(c) {} + settings_map_t* map; + f(settings_map_t* m) : map(m) {} virtual void apply(const std::string& name, LLControlVariable* control) { if (!control->isHiddenFromSettingsEditor()) { - combo->add(name, (void*)control); + (*map)[name]=control; } } - } func(settings_combo); + } func(&mSettingsMap); gSavedSettings.applyToAll(&func); gSavedPerAccountSettings.applyToAll(&func); gColors.applyToAll(&func); - settings_combo->sortByName(); - settings_combo->setCommitCallback(onSettingSelect); - settings_combo->setCallbackUserData(this); - settings_combo->updateSelection(); + // Populate the list + { + for(settings_map_t::iterator it = mSettingsMap.begin(); it != mSettingsMap.end(); it++) + { + LLSD item; + item["columns"][0]["value"] = it->second->getName(); + mSettingsScrollList->addElement(item, ADD_BOTTOM, it->second); + } + } + mSettingsScrollList->sortByColumnIndex(0, true); + mSettingsScrollList->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this)); - childSetCommitCallback("val_spinner_1", onCommitSettings); - childSetUserData("val_spinner_1", this); - childSetCommitCallback("val_spinner_2", onCommitSettings); - childSetUserData("val_spinner_2", this); - childSetCommitCallback("val_spinner_3", onCommitSettings); - childSetUserData("val_spinner_3", this); - childSetCommitCallback("val_spinner_4", onCommitSettings); - childSetUserData("val_spinner_4", this); - childSetCommitCallback("val_text", onCommitSettings); - childSetUserData("val_text", this); - childSetCommitCallback("boolean_combo", onCommitSettings); - childSetUserData("boolean_combo", this); - childSetCommitCallback("color_swatch", onCommitSettings); - childSetUserData("color_swatch", this); - childSetAction("default_btn", onClickDefault, this); + llinfos << mSettingsScrollList->getItemCount() << " total debug settings displayed." << llendl; + + getChild("val_spinner_1")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); + getChild("val_spinner_2")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); + getChild("val_spinner_3")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); + getChild("val_spinner_4")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); + getChild("val_text")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); + getChild("boolean_combo")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); + getChild("color_swatch")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); + getChild("copy_btn")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCopyToClipboard, this)); + getChild("default_btn")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onClickDefault, this)); + getChild("search_settings_input")->setSearchCallback(onUpdateFilter, this); mComment = getChild("comment_text"); return TRUE; } void LLFloaterSettingsDebug::draw() { - LLComboBox* settings_combo = getChild("settings_combo"); - LLControlVariable* controlp = static_cast(settings_combo->getCurrentUserdata()); - updateControl(controlp ? controlp->getCOAActive() : NULL); + // check for changes in control visibility, like RLVa does + if(mCurrentControlVariable && mCurrentControlVariable->isHiddenFromSettingsEditor() != mOldVisibility) + updateControl(); LLFloater::draw(); } -//static -void LLFloaterSettingsDebug::show(void*) +LLControlVariable* LLFloaterSettingsDebug::getControlVariable() { - if (sInstance == NULL) - { - sInstance = new LLFloaterSettingsDebug(); + LLScrollListItem* item = mSettingsScrollList->getFirstSelected(); + if (!item) return NULL; - LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_settings_debug.xml"); - } + LLControlVariable* controlp = static_cast(item->getUserdata()); - sInstance->open(); /* Flawfinder: ignore */ + return controlp ? controlp->getCOAActive() : NULL; } -//static -void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data) +void LLFloaterSettingsDebug::onSettingSelect() { - LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; - LLComboBox* combo_box = static_cast(ctrl); - LLControlVariable* controlp = static_cast(combo_box->getCurrentUserdata()); + mCurrentControlVariable = getControlVariable(); - floaterp->updateControl(controlp ? controlp->getCOAActive() : NULL); + if (mOldControlVariable == mCurrentControlVariable) return; + + // unbind change control signal from previously selected control + if(mOldControlVariable) + mOldControlVariable->getCommitSignal()->disconnect(boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this)); + + // bind change control signal, so we can see updates to the current control in realtime + if(mCurrentControlVariable) + mCurrentControlVariable->getCommitSignal()->connect(boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this)); + + mOldControlVariable = mCurrentControlVariable; + + updateControl(); } -//static -void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) +void LLFloaterSettingsDebug::onCommitSettings() { - LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; - - LLComboBox* settings_combo = floaterp->getChild("settings_combo"); - LLControlVariable* controlp = static_cast(settings_combo->getCurrentUserdata()); - controlp = controlp ? controlp->getCOAActive() : NULL; - if(!controlp)//Uh oh! + if (!mCurrentControlVariable) return; LLVector3 vector; @@ -152,88 +164,89 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) LLColor4U col4U; LLColor4 color_with_alpha; - switch(controlp->type()) + switch(mCurrentControlVariable->type()) { case TYPE_U32: - controlp->set(floaterp->childGetValue("val_spinner_1")); + mCurrentControlVariable->set(getChild("val_spinner_1")->getValue()); break; case TYPE_S32: - controlp->set(floaterp->childGetValue("val_spinner_1")); + mCurrentControlVariable->set(getChild("val_spinner_1")->getValue()); break; case TYPE_F32: - controlp->set(LLSD(floaterp->childGetValue("val_spinner_1").asReal())); + mCurrentControlVariable->set(LLSD(getChild("val_spinner_1")->getValue().asReal())); break; case TYPE_BOOLEAN: - controlp->set(floaterp->childGetValue("boolean_combo")); + mCurrentControlVariable->set(getChild("boolean_combo")->getValue()); break; case TYPE_STRING: - controlp->set(LLSD(floaterp->childGetValue("val_text").asString())); + mCurrentControlVariable->set(LLSD(getChild("val_text")->getValue().asString())); break; case TYPE_VEC3: - vector.mV[VX] = (F32)floaterp->childGetValue("val_spinner_1").asReal(); - vector.mV[VY] = (F32)floaterp->childGetValue("val_spinner_2").asReal(); - vector.mV[VZ] = (F32)floaterp->childGetValue("val_spinner_3").asReal(); - controlp->set(vector.getValue()); + vector.mV[VX] = (F32)getChild("val_spinner_1")->getValue().asReal(); + vector.mV[VY] = (F32)getChild("val_spinner_2")->getValue().asReal(); + vector.mV[VZ] = (F32)getChild("val_spinner_3")->getValue().asReal(); + mCurrentControlVariable->set(vector.getValue()); break; case TYPE_VEC3D: - vectord.mdV[VX] = floaterp->childGetValue("val_spinner_1").asReal(); - vectord.mdV[VY] = floaterp->childGetValue("val_spinner_2").asReal(); - vectord.mdV[VZ] = floaterp->childGetValue("val_spinner_3").asReal(); - controlp->set(vectord.getValue()); + vectord.mdV[VX] = getChild("val_spinner_1")->getValue().asReal(); + vectord.mdV[VY] = getChild("val_spinner_2")->getValue().asReal(); + vectord.mdV[VZ] = getChild("val_spinner_3")->getValue().asReal(); + mCurrentControlVariable->set(vectord.getValue()); break; case TYPE_RECT: - rect.mLeft = floaterp->childGetValue("val_spinner_1").asInteger(); - rect.mRight = floaterp->childGetValue("val_spinner_2").asInteger(); - rect.mBottom = floaterp->childGetValue("val_spinner_3").asInteger(); - rect.mTop = floaterp->childGetValue("val_spinner_4").asInteger(); - controlp->set(rect.getValue()); + rect.mLeft = getChild("val_spinner_1")->getValue().asInteger(); + rect.mRight = getChild("val_spinner_2")->getValue().asInteger(); + rect.mBottom = getChild("val_spinner_3")->getValue().asInteger(); + rect.mTop = getChild("val_spinner_4")->getValue().asInteger(); + mCurrentControlVariable->set(rect.getValue()); break; case TYPE_COL4: - col3.setValue(floaterp->childGetValue("color_swatch")); - col4 = LLColor4(col3, (F32)floaterp->childGetValue("val_spinner_4").asReal()); - controlp->set(col4.getValue()); + col3.setValue(getChild("val_color_swatch")->getValue()); + col4 = LLColor4(col3, (F32)getChild("val_spinner_4")->getValue().asReal()); + mCurrentControlVariable->set(col4.getValue()); break; case TYPE_COL3: - controlp->set(floaterp->childGetValue("color_swatch")); - //col3.mV[VRED] = (F32)floaterp->childGetValue("val_spinner_1").asC(); - //col3.mV[VGREEN] = (F32)floaterp->childGetValue("val_spinner_2").asReal(); - //col3.mV[VBLUE] = (F32)floaterp->childGetValue("val_spinner_3").asReal(); - //controlp->set(col3.getValue()); + mCurrentControlVariable->set(getChild("val_color_swatch")->getValue()); + //col3.mV[VRED] = (F32)getChild("val_spinner_1")->getValue().asC(); + //col3.mV[VGREEN] = (F32)getChild("val_spinner_2")->getValue().asReal(); + //col3.mV[VBLUE] = (F32)getChild("val_spinner_3")->getValue().asReal(); + //mCurrentControlVariable->set(col3.getValue()); break; case TYPE_COL4U: - col3.setValue(floaterp->childGetValue("color_swatch")); + col3.setValue(getChild("val_color_swatch")->getValue()); col4U.setVecScaleClamp(col3); - col4U.mV[VALPHA] = floaterp->childGetValue("val_spinner_4").asInteger(); - controlp->set(col4U.getValue()); + col4U.mV[VALPHA] = getChild("val_spinner_4")->getValue().asInteger(); + mCurrentControlVariable->set(col4U.getValue()); break; default: break; } } -// static -void LLFloaterSettingsDebug::onClickDefault(void* user_data) +void LLFloaterSettingsDebug::onClickDefault() { - LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; - LLComboBox* settings_combo = floaterp->getChild("settings_combo"); - LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); - - if (controlp) + if (mCurrentControlVariable) { - controlp = controlp->getCOAActive(); - controlp->resetToDefault(true); - floaterp->updateControl(controlp); + mCurrentControlVariable->resetToDefault(true); + updateControl(); } } -// we've switched controls, or doing per-frame update, so update spinners, etc. -void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) +void LLFloaterSettingsDebug::onCopyToClipboard() +{ + if (mCurrentControlVariable) + getWindow()->copyTextToClipboard(utf8str_to_wstring(mCurrentControlVariable->getName())); +} + +// we've switched controls, so update spinners, etc. +void LLFloaterSettingsDebug::updateControl() { LLSpinCtrl* spinner1 = getChild("val_spinner_1"); LLSpinCtrl* spinner2 = getChild("val_spinner_2"); LLSpinCtrl* spinner3 = getChild("val_spinner_3"); LLSpinCtrl* spinner4 = getChild("val_spinner_4"); - LLColorSwatchCtrl* color_swatch = getChild("color_swatch"); + LLColorSwatchCtrl* color_swatch = getChild("val_color_swatch"); + LLUICtrl* bool_ctrl = getChild("boolean_combo"); if (!spinner1 || !spinner2 || !spinner3 || !spinner4 || !color_swatch) { @@ -247,45 +260,33 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) spinner3->setVisible(FALSE); spinner4->setVisible(FALSE); color_swatch->setVisible(FALSE); - childSetVisible("val_text", FALSE); + getChildView("val_text")->setVisible( FALSE); mComment->setText(LLStringUtil::null); + childSetEnabled("copy_btn", false); + childSetEnabled("default_btn", false); + bool_ctrl->setVisible(false); - if (controlp) + if (mCurrentControlVariable) { -// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.1d - if (rlv_handler_t::isEnabled()) - { - // Don't allow changing DBG_WRITE debug settings under @setdebug=n - bool fEnable = !( (gRlvHandler.hasBehaviour(RLV_BHVR_SETDEBUG)) && - (RlvExtGetSet::getDebugSettingFlags(controlp->getName()) & RlvExtGetSet::DBG_WRITE) ); - // Don't allow toggling "Basic Shaders" and/or "Atmopsheric Shaders" through the debug settings under @setenv=n - fEnable &= !((gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) && - (("VertexShaderEnable" == controlp->getName()) || ("WindLightUseAtmosShaders" == controlp->getName()))); - #ifdef RLV_EXTENSION_STARTLOCATION - // Don't allow toggling RLVaLoginLastLocation - fEnable &= !(RLV_SETTING_LOGINLASTLOCATION == controlp->getName()); - #endif // RLV_EXTENSION_STARTLOCATION - - // NOTE: this runs per-frame so there's no need to explictly handle onCommitSettings() or onClickDefault() - spinner1->setEnabled(fEnable); - spinner2->setEnabled(fEnable); - spinner3->setEnabled(fEnable); - spinner4->setEnabled(fEnable); - color_swatch->setEnabled(fEnable); - childSetEnabled("val_text", fEnable); - childSetEnabled("boolean_combo", fEnable); - childSetEnabled("default_btn", fEnable); - } +// [RLVa:KB] - Checked: 2011-05-28 (RLVa-1.4.0a) | Modified: RLVa-1.4.0a + // If "HideFromEditor" was toggled while the floater is open then we need to manually disable access to the control + mOldVisibility = mCurrentControlVariable->isHiddenFromSettingsEditor(); + spinner1->setEnabled(!mOldVisibility); + spinner2->setEnabled(!mOldVisibility); + spinner3->setEnabled(!mOldVisibility); + spinner4->setEnabled(!mOldVisibility); + color_swatch->setEnabled(!mOldVisibility); + childSetEnabled("val_text", !mOldVisibility); + bool_ctrl->setEnabled(!mOldVisibility); + childSetEnabled("default_btn", !mOldVisibility); // [/RLVa:KB] - controlp = controlp->getCOAActive(); - eControlType type = controlp->type(); + childSetEnabled("copy_btn", true); - //hide combo box only for non booleans, otherwise this will result in the combo box closing every frame - childSetVisible("boolean_combo", type == TYPE_BOOLEAN); - + eControlType type = mCurrentControlVariable->type(); + + mComment->setText(mCurrentControlVariable->getName() + std::string(": ") + mCurrentControlVariable->getComment()); - mComment->setText(controlp->getComment()); spinner1->setMaxValue(F32_MAX); spinner2->setMaxValue(F32_MAX); spinner3->setMaxValue(F32_MAX); @@ -311,7 +312,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) spinner4->setIncrement(0.1f); } - LLSD sd = controlp->get(); + LLSD sd = mCurrentControlVariable->get(); switch(type) { case TYPE_U32: @@ -348,23 +349,24 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) } break; case TYPE_BOOLEAN: - if (!childHasFocus("boolean_combo")) + bool_ctrl->setVisible(true); + if (!bool_ctrl->hasFocus()) { if (sd.asBoolean()) { - childSetValue("boolean_combo", LLSD("true")); + bool_ctrl->setValue(LLSD("TRUE")); } else { - childSetValue("boolean_combo", LLSD("")); + bool_ctrl->setValue(LLSD("FALSE")); } } break; case TYPE_STRING: - childSetVisible("val_text", TRUE); - if (!childHasFocus("val_text")) + getChildView("val_text")->setVisible( TRUE); + if (!getChild("val_text")->hasFocus()) { - childSetValue("val_text", sd); + getChild("val_text")->setValue(sd); } break; case TYPE_VEC3: @@ -530,3 +532,58 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) } } + +void LLFloaterSettingsDebug::onUpdateFilter(const std::string& searchTerm, void*) +{ + LLFloaterSettingsDebug::getInstance()->updateFilter(searchTerm); +} + +void LLFloaterSettingsDebug::updateFilter(std::string searchTerm) +{ + // make sure not to reselect the first item in the list on focus restore + if (searchTerm == mOldSearchTerm) return; + + mOldSearchTerm = searchTerm; + + LLStringUtil::toLower(searchTerm); + + mSettingsScrollList->deleteAllItems(); + + for(settings_map_t::iterator it = mSettingsMap.begin(); it != mSettingsMap.end(); it++) + { + bool addItem = searchTerm.empty(); + if (!addItem) + { + std::string itemValue = it->second->getName(); + + LLStringUtil::toLower(itemValue); + + if (itemValue.find(searchTerm, 0) != std::string::npos) + { + addItem = true; + } + else // performance: broken out to save toLower calls on comments + { + std::string itemComment = it->second->getComment(); + LLStringUtil::toLower(itemComment); + if (itemComment.find(searchTerm, 0) != std::string::npos) + addItem = true; + } + } + + if (addItem) + { + LLSD item; + item["columns"][0]["value"] = it->second->getName(); + mSettingsScrollList->addElement(item, ADD_BOTTOM, it->second); + } + } + mSettingsScrollList->sortByColumnIndex(0, true); + + // if at least one match was found, highlight and select the topmost entry in the list + // but only if actually a search term was given + if (mSettingsScrollList->getItemCount() && !searchTerm.empty()) + mSettingsScrollList->selectFirstItem(); + + onSettingSelect(); +} diff --git a/indra/newview/llfloatersettingsdebug.h b/indra/newview/llfloatersettingsdebug.h index e08e6b5d7..cce8fa481 100644 --- a/indra/newview/llfloatersettingsdebug.h +++ b/indra/newview/llfloatersettingsdebug.h @@ -35,9 +35,13 @@ #include "llcontrol.h" #include "llfloater.h" -#include "lltexteditor.h" -class LLFloaterSettingsDebug : public LLFloater +class LLScrollListCtrl; +class LLTextEditor; + +class LLFloaterSettingsDebug +: public LLFloater +, public LLSingleton { public: LLFloaterSettingsDebug(); @@ -46,17 +50,33 @@ public: virtual BOOL postBuild(); virtual void draw(); - void updateControl(LLControlVariable* control); + void updateControl(); - static void show(void*); - static void onSettingSelect(LLUICtrl* ctrl, void* user_data); - static void onCommitSettings(LLUICtrl* ctrl, void* user_data); - static void onClickDefault(void* user_data); + // updates control filter to display in the controls list on keystroke + static void onUpdateFilter(const std::string& searchTerm, void*); + void updateFilter(std::string searchTerm); + + void onSettingSelect(); + void onCommitSettings(); + void onClickDefault(); + void onCopyToClipboard(); + +private: + // returns a pointer to the currently selected control variable, or NULL + LLControlVariable* getControlVariable(); protected: - static LLFloaterSettingsDebug* sInstance; + typedef std::map settings_map_t; + + settings_map_t mSettingsMap; + + std::string mOldSearchTerm; + LLControlVariable* mCurrentControlVariable; + LLControlVariable* mOldControlVariable; + bool mOldVisibility; + + LLScrollListCtrl* mSettingsScrollList; LLTextEditor* mComment; }; #endif //LLFLOATERDEBUGSETTINGS_H - diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 2cbe64c02..1c9d70e4b 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1184,40 +1184,43 @@ void LLFloaterIMPanel::init(const std::string& session_label) // [Ansariel: Display name support] mProfileButtonEnabled = FALSE; // [/Ansariel: Display name support] - + + static LLCachedControl concise_im("UseConciseIMButtons"); + static LLCachedControl concise_group("UseConciseGroupChatButtons"); + static LLCachedControl concise_conf("UseConciseConferenceButtons"); std::string xml_filename; switch(mDialog) { case IM_SESSION_GROUP_START: mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this); - xml_filename = "floater_instant_message_group.xml"; + xml_filename = concise_group ? "floater_instant_message_group_concisebuttons.xml" : "floater_instant_message_group.xml"; mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; case IM_SESSION_INVITE: mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this); if (gAgent.isInGroup(mSessionUUID)) { - xml_filename = "floater_instant_message_group.xml"; + xml_filename = concise_group ? "floater_instant_message_group_concisebuttons.xml" : "floater_instant_message_group.xml"; } else // must be invite to ad hoc IM { - xml_filename = "floater_instant_message_ad_hoc.xml"; + xml_filename = concise_conf ? "floater_instant_message_ad_hoc_concisebuttons.xml" : "floater_instant_message_ad_hoc.xml"; } mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; case IM_SESSION_P2P_INVITE: - xml_filename = "floater_instant_message.xml"; + xml_filename = concise_im ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; mVoiceChannel = new LLVoiceChannelP2P(mSessionUUID, mSessionLabel, mOtherParticipantUUID); break; case IM_SESSION_CONFERENCE_START: mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this); - xml_filename = "floater_instant_message_ad_hoc.xml"; + xml_filename = concise_conf ? "floater_instant_message_ad_hoc_concisebuttons.xml" : "floater_instant_message_ad_hoc.xml"; mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; // just received text from another user case IM_NOTHING_SPECIAL: - xml_filename = "floater_instant_message.xml"; + xml_filename = concise_im ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionUUID); mProfileButtonEnabled = LLVoiceClient::getInstance()->isParticipantAvatar(mSessionUUID); @@ -1227,7 +1230,7 @@ void LLFloaterIMPanel::init(const std::string& session_label) break; default: llwarns << "Unknown session type" << llendl; - xml_filename = "floater_instant_message.xml"; + xml_filename = concise_im ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; break; } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 92f5cd320..fb8a783ba 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1137,11 +1137,17 @@ LLFloaterIMPanel* LLIMMgr::createFloater( gFloaterView->addChild(floater); // reparent to floater view LLFloater* focused_floater = gFloaterView->getFocusedFloater(); // obtain the focused floater floater->open(); // make the new chat floater appear + static LLCachedControl minimize("OtherChatsTornOffAndMinimized"); if (focused_floater != NULL) // there was a focused floater { - floater->setMinimized(true); // so minimize this one, for now + floater->setMinimized(minimize); // so minimize this one, for now, if desired focused_floater->setFocus(true); // and work around focus being removed by focusing on the last } + else if (minimize) + { + floater->setFocus(false); // work around focus being granted to new floater + floater->setMinimized(true); + } } mFloaters.insert(floater->getHandle()); return floater; @@ -1179,11 +1185,12 @@ LLFloaterIMPanel* LLIMMgr::createFloater( static LLCachedControl minimize("OtherChatsTornOffAndMinimized"); if (focused_floater != NULL) // there was a focused floater { - floater->setMinimized(true); // so minimize this one, for now + floater->setMinimized(minimize); // so minimize this one, for now, if desired focused_floater->setFocus(true); // and work around focus being removed by focusing on the last } else if (minimize) { + floater->setFocus(false); // work around focus being granted to new floater floater->setMinimized(true); } } diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 7c86889a1..bfc7a3ad8 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -67,6 +67,7 @@ #include "llworld.h" #include "llui.h" #include "pipeline.h" +#include "hippogridmanager.h" // [RLVa:KB] #include "rlvhandler.h" @@ -547,6 +548,9 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) { F32 max_drag_distance = gSavedSettings.getF32("MaxDragDistance"); + if (gHippoGridManager->getConnectedGrid()->isAurora()) + max_drag_distance = llmin(10000.f, max_drag_distance); + if (relative_move.magVecSquared() > max_drag_distance * max_drag_distance) { lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (too far)" << llendl; diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 904a809c9..ef3bb65f4 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -385,7 +385,7 @@ void LLPanelAvatarFirstLife::onClickImage(void* data) S32 left, top; gFloaterView->getNewFloaterPosition(&left, &top); LLRect rect = gSavedSettings.getRect("PreviewTextureRect"); - rect.translate( left - rect.mLeft, top - rect.mTop ); + rect.translate( left - rect.mLeft, rect.mTop - top ); // Changed to avoid textures being sunken below the window border. LLPreviewTexture* preview = new LLPreviewTexture("preview task texture", rect, std::string("Profile First Life Picture"), @@ -433,7 +433,7 @@ void LLPanelAvatarSecondLife::onClickImage(void* data) S32 left, top; gFloaterView->getNewFloaterPosition(&left, &top); LLRect rect = gSavedSettings.getRect("PreviewTextureRect"); - rect.translate( left - rect.mLeft, top - rect.mTop ); + rect.translate( left - rect.mLeft, rect.mTop - top ); // Changed to avoid textures being sunken below the window border. LLPreviewTexture* preview = new LLPreviewTexture("preview task texture", rect, std::string("Profile Picture: ") + name_text, diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 88871d4cc..eb690720e 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -130,6 +130,10 @@ LLVector3 LLPanelObject::mClipboardPos; LLVector3 LLPanelObject::mClipboardSize; LLVector3 LLPanelObject::mClipboardRot; LLVolumeParams LLPanelObject::mClipboardVolumeParams; +LLFlexibleObjectData* LLPanelObject::mClipboardFlexiParams = NULL; +LLLightParams* LLPanelObject::mClipboardLightParams = NULL; +LLSculptParams* LLPanelObject::mClipboardSculptParams = NULL; +LLLightImageParams* LLPanelObject::mClipboardLightImageParams = NULL; BOOL LLPanelObject::hasParamClipboard = FALSE; BOOL LLPanelObject::postBuild() @@ -2493,15 +2497,65 @@ void LLPanelObject::onCopyRot(void* user_data) void LLPanelObject::onCopyParams(void* user_data) { LLPanelObject* self = (LLPanelObject*) user_data; + if (!self) return; + self->getVolumeParams(mClipboardVolumeParams); hasParamClipboard = TRUE; + + LLViewerObject* objp = self->mObject; + + mClipboardFlexiParams = (LLFlexibleObjectData*)objp->getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE); + mClipboardLightParams = (LLLightParams*)objp->getParameterEntry(LLNetworkData::PARAMS_LIGHT); + mClipboardSculptParams = (LLSculptParams*)objp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); + if (mClipboardSculptParams) + { + LLUUID id = mClipboardSculptParams->getSculptTexture(); + + // Texture perms check + if (!(id.isNull() || gInventory.isObjectDescendentOf(id, gInventory.getLibraryRootFolderID()) + || id == LLUUID(gSavedSettings.getString("UIImgWhiteUUID")) + || id == LLUUID(gSavedSettings.getString("UIImgInvisibleUUID")) + || id == LLUUID(std::string("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"))) // alpha + && findItemID(id).isNull()) + { + mClipboardSculptParams->setSculptTexture(LLUUID(SCULPT_DEFAULT_TEXTURE)); + } + } + mClipboardLightImageParams = (LLLightImageParams*)objp->getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE); + if (mClipboardLightImageParams) + { + LLUUID id = mClipboardLightImageParams->getLightTexture(); + + // Texture perms check + if (!(id.isNull() || gInventory.isObjectDescendentOf(id, gInventory.getLibraryRootFolderID()) + || id == LLUUID(gSavedSettings.getString("UIImgWhiteUUID")) + || id == LLUUID(gSavedSettings.getString("UIImgInvisibleUUID")) + || id == LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"))) // alpha + { + mClipboardLightImageParams->setLightTexture(findItemID(id)); + } + } } void LLPanelObject::onPasteParams(void* user_data) { + if(!hasParamClipboard) return; + LLPanelObject* self = (LLPanelObject*) user_data; - if(hasParamClipboard) - self->mObject->updateVolume(mClipboardVolumeParams); + if(!self) return; + + LLViewerObject* objp = self->mObject; + + objp->updateVolume(mClipboardVolumeParams); + + if (mClipboardFlexiParams) + objp->setParameterEntry(LLNetworkData::PARAMS_FLEXIBLE, *mClipboardFlexiParams, true); + if (mClipboardLightParams) + objp->setParameterEntry(LLNetworkData::PARAMS_LIGHT, *mClipboardLightParams, true); + if (mClipboardSculptParams) + objp->setParameterEntry(LLNetworkData::PARAMS_SCULPT, *mClipboardSculptParams, true); + if (mClipboardLightImageParams) + objp->setParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE, *mClipboardLightImageParams, true); } void LLPanelObject::onLinkObj(void* user_data) diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h index ae2397294..e34d318c6 100644 --- a/indra/newview/llpanelobject.h +++ b/indra/newview/llpanelobject.h @@ -50,6 +50,10 @@ class LLColorSwatchCtrl; class LLTextureCtrl; class LLInventoryItem; class LLUUID; +class LLFlexibleObjectData; +class LLLightParams; +class LLLightImageParams; +class LLSculptParams; class LLPanelObject : public LLPanel { @@ -119,6 +123,10 @@ protected: static LLVector3 mClipboardSize; static LLVector3 mClipboardRot; static LLVolumeParams mClipboardVolumeParams; + static LLFlexibleObjectData* mClipboardFlexiParams; + static LLLightParams* mClipboardLightParams; + static LLSculptParams* mClipboardSculptParams; + static LLLightImageParams* mClipboardLightImageParams; static BOOL hasParamClipboard; S32 mComboMaterialItemCount; diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 42db9fdd6..d3110bcde 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -47,16 +47,7 @@ static const std::string PANEL_PICKS = "panel_picks"; std::string getProfileURL(const std::string& agent_name) { - std::string url; - - if (gHippoGridManager->getConnectedGrid()->isInProductionGrid()) - { - url = gSavedSettings.getString("WebProfileURL"); - } - else - { - url = gSavedSettings.getString("WebProfileNonProductionURL"); - } + std::string url = gSavedSettings.getString("WebProfileURL"); LLSD subs; subs["AGENT_NAME"] = agent_name; url = LLWeb::expandURLSubstitutions(url,subs); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 4a4b3863b..ec425421b 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4655,8 +4655,8 @@ void LLSelectMgr::packObjectName(LLSelectNode* node, void* user_data) void LLSelectMgr::packObjectDescription(LLSelectNode* node, void* user_data) { const std::string* desc = (const std::string*)user_data; - if(!desc->empty()) - { + if(desc) + { // Empty (non-null, but zero length) descriptions are OK gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU32Fast(_PREHASH_LocalID, node->getObject()->getLocalID()); gMessageSystem->addStringFast(_PREHASH_Description, *desc); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3a86800f5..19119300a 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1076,7 +1076,7 @@ bool idle_startup() gSavedSettings.getControl("_NACL_AntiSpamAmount")->getSignal()->connect(boost::bind(&NACLAntiSpamRegistry::handleNaclAntiSpamAmountChanged, _2)); // NaCl End - //good as place as any to create user windlight directories + //good a place as any to create user windlight directories std::string user_windlight_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight", "")); LLFile::mkdir(user_windlight_path_name.c_str()); @@ -4284,6 +4284,18 @@ bool process_login_success_response(std::string& password) gSavedSettings.setString("MapServerURL", map_server_url); LLWorldMap::gotMapServerURL(true); } + + if(gHippoGridManager->getConnectedGrid()->isOpenSimulator()) + { + std::string web_profile_url = response["web_profile_url"]; + if(!web_profile_url.empty()) + gSavedSettings.setString("WebProfileURL", web_profile_url); + } + else if(!gHippoGridManager->getConnectedGrid()->isInProductionGrid()) + { + gSavedSettings.setString("WebProfileURL", "https://my-demo.secondlife.com/[AGENT_NAME]"); + } + // Initial outfit for the user. LLSD initial_outfit = response["initial-outfit"][0]; if(initial_outfit.size()) diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index c1814874d..ac6ac0227 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -24,7 +24,7 @@ * $/LicenseInfo$ */ -#ifndef LL_LLTEXTURECACHE_ +#ifndef LL_LLTEXTURECACHE_H #define LL_LLTEXTURECACHE_H #include "lldir.h" diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 12fcfc77d..d13ec619a 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -217,6 +217,7 @@ protected: BOOL mNoCopyTextureSelected; F32 mContextConeOpacity; LLSaveFolderState mSavedFolderState; + BOOL mSelectedItemPinned; LLScrollListCtrl* mLocalScrollCtrl; // tag: vaa emerald local_asset_browser }; @@ -249,7 +250,8 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mSearchEdit(NULL), mImmediateFilterPermMask(immediate_filter_perm_mask), mNonImmediateFilterPermMask(non_immediate_filter_perm_mask), - mContextConeOpacity(0.f) + mContextConeOpacity(0.f), + mSelectedItemPinned(FALSE) { mCanApplyImmediately = can_apply_immediately; LLUICtrlFactory::getInstance()->buildFloater(this,"floater_texture_ctrl.xml"); @@ -506,8 +508,13 @@ BOOL LLFloaterTexturePicker::postBuild() mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); mInventoryPanel->setAllowMultiSelect(FALSE); - // store this filter as the default one - mInventoryPanel->getRootFolder()->getFilter()->markDefault(); + // Disable auto selecting first filtered item because it takes away + // selection from the item set by LLTextureCtrl owning this floater. + mInventoryPanel->getRootFolder()->setAutoSelectOverride(TRUE); + + // Commented out to scroll to currently selected texture. See EXT-5403. + // // store this filter as the default one + // mInventoryPanel->getRootFolder()->getFilter()->markDefault(); // Commented out to stop opening all folders with textures // mInventoryPanel->openDefaultFolderForType(LLAssetType::AT_TEXTURE); @@ -675,6 +682,31 @@ void LLFloaterTexturePicker::draw() // Draw X gl_draw_x(interior, LLColor4::black ); } + + if (mSelectedItemPinned) return; + + LLFolderView* folder_view = mInventoryPanel->getRootFolder(); + if (!folder_view) return; + + LLInventoryFilter* filter = folder_view->getFilter(); + if (!filter) return; + + bool is_filter_active = folder_view->getCompletedFilterGeneration() < filter->getCurrentGeneration() && + filter->isNotDefault(); + + // After inventory panel filter is applied we have to update + // constraint rect for the selected item because of folder view + // AutoSelectOverride set to TRUE. We force PinningSelectedItem + // flag to FALSE state and setting filter "dirty" to update + // scroll container to show selected item (see LLFolderView::doIdle()). + if (!is_filter_active && !mSelectedItemPinned) + { + folder_view->setPinningSelectedItem(mSelectedItemPinned); + folder_view->dirtyFilter(); + folder_view->arrangeFromRoot(); + + mSelectedItemPinned = TRUE; + } } } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c8fa64f01..ac0ece092 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -860,6 +860,7 @@ void init_menus() menu->setCanTearOff(TRUE); init_client_menu(menu); gMenuBarView->addChild( menu ); + rlvMenuToggleVisible(); menu = new LLMenuGL(SERVER_MENU_NAME); menu->setCanTearOff(TRUE); @@ -880,7 +881,7 @@ void init_menus() menu = new LLMenuGL(CLIENT_MENU_NAME); menu->setCanTearOff(FALSE); - menu->addChild(new LLMenuItemCallGL("Debug Settings...", LLFloaterSettingsDebug::show, NULL, NULL)); + menu->addChild(new LLMenuItemCallGL("Debug Settings...", handle_singleton_toggle, NULL, NULL)); gLoginMenuBarView->addChild(menu); menu->updateParent(LLMenuGL::sMenuContainer); @@ -1064,15 +1065,13 @@ void init_client_menu(LLMenuGL* menu) // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.1b | OK #ifdef RLV_ADVANCED_MENU - if (rlv_handler_t::isEnabled()) - { - sub_menu = new LLMenuGL("RLVa"); - sub_menu->setCanTearOff(TRUE); - init_debug_rlva_menu(sub_menu); - menu->addChild(sub_menu); - sub_menu->setVisible(rlv_handler_t::isEnabled()); - sub_menu->setEnabled(rlv_handler_t::isEnabled()); - } + sub_menu = new LLMenuGL("RLVa Embedded"); + init_debug_rlva_menu(sub_menu); + menu->addChild(sub_menu); + // Top Level Menu as well + sub_menu = new LLMenuGL("RLVa Main"); + init_debug_rlva_menu(sub_menu); + gMenuBarView->addChild(sub_menu); #endif // RLV_ADVANCED_MENU // [/RLVa:KB] @@ -1223,7 +1222,7 @@ void init_client_menu(LLMenuGL* menu) &menu_check_control, (void*)"SaveMinidump")); - menu->addChild(new LLMenuItemCallGL("Debug Settings...", LLFloaterSettingsDebug::show, NULL, NULL)); + menu->addChild(new LLMenuItemCallGL("Debug Settings...", handle_singleton_toggle, NULL, NULL)); menu->addChild(new LLMenuItemCheckGL("View Admin Options", &handle_admin_override_toggle, NULL, &check_admin_override, NULL, 'V', MASK_CONTROL | MASK_ALT)); menu->addChild(new LLMenuItemCallGL("Request Admin Status", @@ -1697,6 +1696,9 @@ void init_debug_avatar_menu(LLMenuGL* menu) // [RLVa:KB] - Checked: 2009-11-17 (RLVa-1.1.0d) | Modified: RLVa-1.1.0d | OK void init_debug_rlva_menu(LLMenuGL* menu) { + menu->setLabel(std::string("RLVa")); // Same menu, same label + menu->setCanTearOff(true); + // Debug options { LLMenuGL* pDbgMenu = new LLMenuGL("Debug"); @@ -2062,7 +2064,8 @@ class LLViewCommunicate : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - if (LLFloaterChatterBox::getInstance()->getFloaterCount() == 0) + static LLCachedControl only_comm("CommunicateSpecificShortcut"); + if (!only_comm && LLFloaterChatterBox::getInstance()->getFloaterCount() == 0) { LLFloaterMyFriends::toggleInstance(); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 64e0d40f9..6e15be904 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2011,7 +2011,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // BOOL is_busy = gAgent.getBusy(); - BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat); + BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat) + // object IMs contain sender object id in session_id (STORM-1209) + || dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id); BOOL is_linden = LLMuteList::getInstance()->isLinden(name); BOOL is_owned_by_me = FALSE; @@ -2509,7 +2511,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType)); std::string from_name; - from_name += "A group member named "; + from_name += LLTrans::getString("AGroupMemberNamed") + " "; from_name += name; info->mFromName = from_name; diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index 4a4e1ff81..2f01d4a84 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -129,6 +129,8 @@ void RlvSettings::initClass() if (gSavedSettings.controlExists(RLV_SETTING_AVATAROFFSET_Z)) gSavedSettings.getControl(RLV_SETTING_AVATAROFFSET_Z)->getSignal()->connect(boost::bind(&onChangedAvatarOffset, _2)); + if (gSavedSettings.controlExists(RLV_SETTING_TOPLEVELMENU)) + gSavedSettings.getControl(RLV_SETTING_TOPLEVELMENU)->getSignal()->connect(boost::bind(&onChangedMenuLevel)); fInitialized = true; } } @@ -155,6 +157,14 @@ bool RlvSettings::onChangedAvatarOffset(const LLSD& sdValue) gAgent.sendAgentSetAppearance(); return true; } +// Checked: 2011-08-16 (RLVa-1.4.0b) | Added: RLVa-1.4.0b +bool RlvSettings::onChangedMenuLevel() +{ + rlvMenuToggleVisible(); + return true; +} + +// Checked: 2010-02-27 (RLVa-1.2.0a) | Added: RLVa-1.1.0i bool RlvSettings::onChangedSettingBOOL(const LLSD& sdValue, bool* pfSetting) { if (pfSetting) @@ -526,6 +536,36 @@ void rlvMenuToggleEnabled(void*) return; } +// Checked: 2011-08-16 (RLVa-1.4.0b) | Added: RLVa-1.4.0b +void rlvMenuToggleVisible() +{ + bool fTopLevel = rlvGetSetting(RLV_SETTING_TOPLEVELMENU, true); + bool fRlvEnabled = rlv_handler_t::isEnabled(); + + //LLMenuGL* pRLVaMenuMain = gMenuBarView->getChildMenuByName("RLVa Main", FALSE); + // RELEASE-RLVa: LL defines CLIENT_MENU_NAME but we can't get to it from here so we need to keep those two in sync manually + LLMenuGL* pAdvancedMenu = gMenuBarView->getChildMenuByName("Advanced", FALSE); + //LLMenuGL* pRLVaMenuEmbed = pAdvancedMenu->getChildMenuByName("RLVa Embedded", FALSE); + + gMenuBarView->setItemVisible("RLVa Main", (fRlvEnabled) && (fTopLevel)); + if (!pAdvancedMenu) return; + pAdvancedMenu->setItemVisible("RLVa Embedded", (fRlvEnabled) && (!fTopLevel)); + + /* Singu Note: In the future when we have advanced menu in xml, we will want to use this to move the menu. + if ( (rlv_handler_t::isEnabled()) && (pRLVaMenuMain) && (pRLVaMenuEmbed) && + ( ((fTopLevel) && (1 == pRLVaMenuMain->getItemCount())) || ((!fTopLevel) && (1 == pRLVaMenuEmbed->getItemCount())) ) ) + { + LLMenuGL* pMenuFrom = (fTopLevel) ? pRLVaMenuEmbed : pRLVaMenuMain; + LLMenuGL* pMenuTo = (fTopLevel) ? pRLVaMenuMain : pRLVaMenuEmbed; + while (LLMenuItemGL* pItem = pMenuFrom->getItem(1)) + { + pMenuFrom->removeChild(pItem); + pMenuTo->addChild(pItem); + pItem->updateBranchParent(pMenuTo); + } + }*/ +} + bool RlvEnableIfNot::handleEvent(LLPointer, const LLSD& userdata) { bool fEnable = true; diff --git a/indra/newview/rlvcommon.h b/indra/newview/rlvcommon.h index e44c06f57..463b6f17d 100644 --- a/indra/newview/rlvcommon.h +++ b/indra/newview/rlvcommon.h @@ -198,7 +198,7 @@ typedef bool (RlvCommandHandler::*rlvCommandHandler)(const RlvCommand& rlvCmd, E BOOL rlvMenuCheckEnabled(void*); void rlvMenuToggleEnabled(void*); -//void rlvMenuToggleVisible(void*); +void rlvMenuToggleVisible(); //bool rlvMenuEnableIfNot(const LLSD& sdParam); class RlvEnableIfNot : public LLMemberListener { diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 853af1d82..99c1b6748 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -1054,14 +1054,6 @@ BOOL RlvHandler::setEnabled(BOOL fEnable) RlvUIEnabler::getInstance(); } - // RELEASE-RLVa: LL defines CLIENT_MENU_NAME but we can't get to it from here so we need to keep those two in sync manually - LLMenuGL* pClientMenu = NULL; - if ( (gMenuBarView) && ((pClientMenu = gMenuBarView->getChildMenuByName("Advanced", FALSE)) != NULL) ) - { - pClientMenu->setItemVisible("RLVa", m_fEnabled); - pClientMenu->setItemEnabled("RLVa", m_fEnabled); - } - return m_fEnabled; // Return enabled/disabled state } diff --git a/indra/newview/skins/default/xui/en-us/floater_chat_history_barless.xml b/indra/newview/skins/default/xui/en-us/floater_chat_history_barless.xml new file mode 100644 index 000000000..fd6eb9091 --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/floater_chat_history_barless.xml @@ -0,0 +1,42 @@ + + + Connecting to in-world Voice Chat... + Connected + Voice not available at your current location + Disconnected from in-world Voice Chat + icn_voice-localchat.tga + -- Instant message logging enabled -- + -- End of Log -- + '[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been granted permission to: [PERMISSIONS]. + '[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been denied permission to: [PERMISSIONS]. + Take in-world money ([CURRENCY]) from you + Act on your control inputs + Remap your control inputs + Animate your avatar + Attach to your avatar + Release ownership and become public + Link and delink from other objects + Add and remove joints with other objects + Change its permissions + Track your camera + Teleport you + Control your camera + + + + Gestures + + + +