diff options
Diffstat (limited to 'indra/newview')
25 files changed, 735 insertions, 131 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 08e43da9e4..649d86aaa6 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1031,7 +1031,6 @@ set(viewer_HEADER_FILES macmain.h noise.h pipeline.h - randgauss.h VertexCache.h VorbisFramework.h ) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index a17ba79078..e5cc2fce88 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -50,7 +50,6 @@ LLBottomTray::LLBottomTray(const LLSD&) mSpeakBtn(NULL), mNearbyChatBar(NULL), mToolbarStack(NULL) - { mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL); diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index c4bfd71999..319cbf8209 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -76,8 +76,15 @@ public: bool mUserEnteredCurrencyBuy; // from website - bool mSiteCurrencyEstimated; - S32 mSiteCurrencyEstimatedCost; + + // pre-viewer 2.0, the server returned estimates as an + // integer US cents value, e.g., "1000" for $10.00 + // post-viewer 2.0, the server may also return estimates + // as a string with currency embedded, e.g., "10.00 Euros" + bool mUSDCurrencyEstimated; + S32 mUSDCurrencyEstimatedCost; + bool mLocalCurrencyEstimated; + std::string mLocalCurrencyEstimatedCost; std::string mSiteConfirm; bool mBought; @@ -101,6 +108,10 @@ public: void startCurrencyBuy(const std::string& password); void finishCurrencyBuy(); + + void clearEstimate(); + bool hasEstimate() const; + std::string getLocalEstimate() const; void startTransaction(TransactionType type, const char* method, LLXMLRPCValue params); @@ -126,12 +137,11 @@ LLCurrencyUIManager::Impl::Impl(LLPanel& dialog) mError(false), mUserCurrencyBuy(2000), // note, this is a default, real value set in llfloaterbuycurrency.cpp mUserEnteredCurrencyBuy(false), - mSiteCurrencyEstimated(false), - mSiteCurrencyEstimatedCost(0), mBought(false), mTransactionType(TransactionNone), mTransaction(0), mCurrencyChanged(false) { + clearEstimate(); } LLCurrencyUIManager::Impl::~Impl() @@ -141,14 +151,13 @@ LLCurrencyUIManager::Impl::~Impl() void LLCurrencyUIManager::Impl::updateCurrencyInfo() { - mSiteCurrencyEstimated = false; - mSiteCurrencyEstimatedCost = 0; + clearEstimate(); mBought = false; mCurrencyChanged = false; if (mUserCurrencyBuy == 0) { - mSiteCurrencyEstimated = true; + mLocalCurrencyEstimated = true; return; } @@ -185,9 +194,21 @@ void LLCurrencyUIManager::Impl::finishCurrencyInfo() } LLXMLRPCValue currency = result["currency"]; - mSiteCurrencyEstimated = true; - mSiteCurrencyEstimatedCost = currency["estimatedCost"].asInt(); - + + // old XML-RPC server: estimatedCost = value in US cents + mUSDCurrencyEstimated = currency["estimatedCost"].isValid(); + if (mUSDCurrencyEstimated) + { + mUSDCurrencyEstimatedCost = currency["estimatedCost"].asInt(); + } + + // newer XML-RPC server: estimatedLocalCost = local currency string + mLocalCurrencyEstimated = currency["estimatedLocalCost"].isValid(); + if (mLocalCurrencyEstimated) + { + mLocalCurrencyEstimatedCost = currency["estimatedLocalCost"].asString(); + } + S32 newCurrencyBuy = currency["currencyBuy"].asInt(); if (newCurrencyBuy != mUserCurrencyBuy) { @@ -200,17 +221,20 @@ void LLCurrencyUIManager::Impl::finishCurrencyInfo() void LLCurrencyUIManager::Impl::startCurrencyBuy(const std::string& password) { - mSiteCurrencyEstimated = false; - mSiteCurrencyEstimatedCost = 0; - mCurrencyChanged = false; - LLXMLRPCValue keywordArgs = LLXMLRPCValue::createStruct(); keywordArgs.appendString("agentId", gAgent.getID().asString()); keywordArgs.appendString( "secureSessionId", gAgent.getSecureSessionID().asString()); keywordArgs.appendInt("currencyBuy", mUserCurrencyBuy); - keywordArgs.appendInt("estimatedCost", mSiteCurrencyEstimatedCost); + if (mUSDCurrencyEstimated) + { + keywordArgs.appendInt("estimatedCost", mUSDCurrencyEstimatedCost); + } + if (mLocalCurrencyEstimated) + { + keywordArgs.appendString("estimatedLocalCost", mLocalCurrencyEstimatedCost); + } keywordArgs.appendString("confirm", mSiteConfirm); if (!password.empty()) { @@ -226,6 +250,9 @@ void LLCurrencyUIManager::Impl::startCurrencyBuy(const std::string& password) params.append(keywordArgs); startTransaction(TransactionBuy, "buyCurrency", params); + + clearEstimate(); + mCurrencyChanged = false; } void LLCurrencyUIManager::Impl::finishCurrencyBuy() @@ -270,6 +297,34 @@ void LLCurrencyUIManager::Impl::startTransaction(TransactionType type, clearError(); } +void LLCurrencyUIManager::Impl::clearEstimate() +{ + mUSDCurrencyEstimated = false; + mUSDCurrencyEstimatedCost = 0; + mLocalCurrencyEstimated = false; + mLocalCurrencyEstimatedCost = "0"; +} + +bool LLCurrencyUIManager::Impl::hasEstimate() const +{ + return (mUSDCurrencyEstimated || mLocalCurrencyEstimated); +} + +std::string LLCurrencyUIManager::Impl::getLocalEstimate() const +{ + if (mLocalCurrencyEstimated) + { + // we have the new-style local currency string + return mLocalCurrencyEstimatedCost; + } + if (mUSDCurrencyEstimated) + { + // we have the old-style USD-specific value + return "US$ " + llformat("%#.2f", mUSDCurrencyEstimatedCost / 100.0); + } + return ""; +} + bool LLCurrencyUIManager::Impl::checkTransaction() { if (!mTransaction) @@ -342,8 +397,8 @@ void LLCurrencyUIManager::Impl::currencyKey(S32 value) mUserCurrencyBuy = value; - if (mSiteCurrencyEstimated) { - mSiteCurrencyEstimated = false; + if (hasEstimate()) { + clearEstimate(); //cannot just simply refresh the whole UI, as the edit field will // get reset and the cursor will change... @@ -406,8 +461,8 @@ void LLCurrencyUIManager::Impl::updateUI() } } - mPanel.childSetTextArg("currency_est", "[LOCALAMOUNT]", "US$ " + llformat("%#.2f", mSiteCurrencyEstimatedCost / 100.0)); - mPanel.childSetVisible("currency_est", mSiteCurrencyEstimated && mUserCurrencyBuy > 0); + mPanel.childSetTextArg("currency_est", "[LOCALAMOUNT]", getLocalEstimate()); + mPanel.childSetVisible("currency_est", hasEstimate() && mUserCurrencyBuy > 0); if (mPanel.childIsEnabled("buy_btn") ||mPanel.childIsVisible("currency_est") @@ -448,18 +503,32 @@ void LLCurrencyUIManager::setZeroMessage(const std::string& message) impl.mZeroMessage = message; } -void LLCurrencyUIManager::setEstimate(int amount) +void LLCurrencyUIManager::setUSDEstimate(int amount) +{ + impl.mUSDCurrencyEstimatedCost = amount; + impl.mUSDCurrencyEstimated = true; + impl.updateUI(); + + impl.mCurrencyChanged = false; +} + +int LLCurrencyUIManager::getUSDEstimate() +{ + return impl.mUSDCurrencyEstimated ? impl.mUSDCurrencyEstimatedCost : 0; +} + +void LLCurrencyUIManager::setLocalEstimate(const std::string &amount) { - impl.mSiteCurrencyEstimatedCost = amount; - impl.mSiteCurrencyEstimated = true; + impl.mLocalCurrencyEstimatedCost = amount; + impl.mLocalCurrencyEstimated = true; impl.updateUI(); impl.mCurrencyChanged = false; } -int LLCurrencyUIManager::getEstimate() +std::string LLCurrencyUIManager::getLocalEstimate() const { - return impl.mSiteCurrencyEstimated ? impl.mSiteCurrencyEstimatedCost : 0; + return impl.getLocalEstimate(); } void LLCurrencyUIManager::prepare() @@ -490,7 +559,7 @@ void LLCurrencyUIManager::buy(const std::string& buy_msg) LLUIString msg = buy_msg; msg.setArg("[LINDENS]", llformat("%d", impl.mUserCurrencyBuy)); - msg.setArg("[LOCALAMOUNT]", "US$ " + llformat("%#.2f", impl.mSiteCurrencyEstimatedCost / 100.0)); + msg.setArg("[LOCALAMOUNT]", getLocalEstimate()); LLConfirmationManager::confirm(impl.mSiteConfirm, msg, impl, @@ -511,7 +580,7 @@ bool LLCurrencyUIManager::canCancel() bool LLCurrencyUIManager::canBuy() { return impl.mTransactionType == Impl::TransactionNone - && impl.mSiteCurrencyEstimated + && impl.hasEstimate() && impl.mUserCurrencyBuy > 0; } diff --git a/indra/newview/llcurrencyuimanager.h b/indra/newview/llcurrencyuimanager.h index 93427aed7f..dfe027098d 100644 --- a/indra/newview/llcurrencyuimanager.h +++ b/indra/newview/llcurrencyuimanager.h @@ -57,11 +57,16 @@ public: void setZeroMessage(const std::string& message); // sets the gray message to show when zero - void setEstimate(int); - int getEstimate(); + void setUSDEstimate(int); // deprecated in 2.0 + int getUSDEstimate(); // deprecated in 2.0 // the amount in US$ * 100 (in otherwords, in cents) // use set when you get this information from elsewhere + void setLocalEstimate(const std::string &local_est); + std::string getLocalEstimate() const; + // the estimated cost in the user's local currency + // for example, "US$ 10.00" or "10.00 Euros" + void prepare(); // call once after dialog is built, from postBuild() void updateUI(bool show = true); diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 36f0315790..467796b4a3 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -685,7 +685,14 @@ void LLFloaterBuyLandUI::finishWebSiteInfo() mSiteLandUseAction = landUse["action"].asString(); LLXMLRPCValue currency = result["currency"]; - mCurrency.setEstimate(currency["estimatedCost"].asInt()); + if (currency["estimatedCost"].isValid()) + { + mCurrency.setUSDEstimate(currency["estimatedCost"].asInt()); + } + if (currency["estimatedLocalCost"].isValid()) + { + mCurrency.setLocalEstimate(currency["estimatedLocalCost"].asString()); + } mSiteConfirm = result["confirm"].asString(); } @@ -733,7 +740,8 @@ void LLFloaterBuyLandUI::runWebSitePrep(const std::string& password) keywordArgs.appendInt("billableArea", mIsForGroup ? 0 : mParcelBillableArea); keywordArgs.appendInt("currencyBuy", mCurrency.getAmount()); - keywordArgs.appendInt("estimatedCost", mCurrency.getEstimate()); + keywordArgs.appendInt("estimatedCost", mCurrency.getUSDEstimate()); + keywordArgs.appendString("estimatedLocalCost", mCurrency.getLocalEstimate()); keywordArgs.appendString("confirm", mSiteConfirm); if (!password.empty()) { @@ -1217,7 +1225,7 @@ void LLFloaterBuyLandUI::refreshUI() childSetText("currency_reason", getString("not_enough_lindens", string_args)); - childSetTextArg("currency_est", "[AMOUNT2]", llformat("%#.2f", mCurrency.getEstimate() / 100.0)); + childSetTextArg("currency_est", "[LOCAL_AMOUNT]", mCurrency.getLocalEstimate()); } if (willHaveEnough) @@ -1297,7 +1305,7 @@ void LLFloaterBuyLandUI::startBuyPreConfirm() { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mCurrency.getAmount()); - string_args["[AMOUNT2]"] = llformat("%#.2f", mCurrency.getEstimate() / 100.0); + string_args["[LOCAL_AMOUNT]"] = mCurrency.getLocalEstimate(); action += getString("buy_for_US", string_args); } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 90e48d22ec..84e0f58c4b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -284,7 +284,10 @@ void LLInvFVBridge::showProperties() key["id"] = mUUID;
LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
+ // Disable old properties floater; this is replaced by the sidepanel.
+ /*
LLFloaterReg::showInstance("properties", mUUID);
+ */
}
void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch)
@@ -3912,6 +3915,7 @@ void LLObjectBridge::openItem() key["id"] = mUUID;
LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
+ // Disable old properties floater; this is replaced by the sidepanel.
/*
LLFloaterReg::showInstance("properties", mUUID);
*/
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index bcb4edd7c1..d54545971b 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -695,11 +695,6 @@ LLWString LLNearbyChatBar::stripChannelNumber(const LLWString &mesg, S32* channe } } -void LLNearbyChatBar::setPTTState(bool state) -{ - mSpeakBtn->setSpeakBtnToggleState(state); -} - void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel) { LLMessageSystem* msg = gMessageSystem; diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index aa25b6aa68..56ee706a97 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -96,7 +96,6 @@ public: std::string getCurrentChat(); virtual BOOL handleKeyHere( KEY key, MASK mask ); - void setPTTState(bool state); static void startChat(const char* line); static void stopChat(); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 79b33e29f5..a5e9407a41 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -165,7 +165,9 @@ void LLTaskInvFVBridge::showProperties() key["object"] = mPanel->getTaskUUID(); key["id"] = mUUID; LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); - + + + // Disable old properties floater; this is replaced by the sidepanel. /* LLFloaterProperties* floater = LLFloaterReg::showTypedInstance<LLFloaterProperties>("properties", mUUID); if (floater) diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index cd765b0338..d441762fa6 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -62,6 +62,14 @@ LLSpeakButton::Params::Params() // See widgets/talk_button.xml } +void LLSpeakButton::draw() +{ + // gVoiceClient is the authoritative global source of info regarding our open-mic state, we merely reflect that state. + bool openmic = gVoiceClient->getUserPTTState(); + mSpeakBtn->setToggleState(openmic); + LLUICtrl::draw(); +} + LLSpeakButton::LLSpeakButton(const Params& p) : LLUICtrl(p) , mPrivateCallPanel(NULL) @@ -84,7 +92,8 @@ LLSpeakButton::LLSpeakButton(const Params& p) addChild(mSpeakBtn); LLTransientFloaterMgr::getInstance()->addControlView(mSpeakBtn); - mSpeakBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_SpeakBtn, this)); + mSpeakBtn->setMouseDownCallback(boost::bind(&LLSpeakButton::onMouseDown_SpeakBtn, this)); + mSpeakBtn->setMouseUpCallback(boost::bind(&LLSpeakButton::onMouseUp_SpeakBtn, this)); mSpeakBtn->setToggleState(FALSE); LLButton::Params show_params = p.show_button; @@ -122,15 +131,15 @@ LLSpeakButton::~LLSpeakButton() { } -void LLSpeakButton::setSpeakBtnToggleState(bool state) +void LLSpeakButton::onMouseDown_SpeakBtn() { - mSpeakBtn->setToggleState(state); + bool down = true; + gVoiceClient->inputUserControlState(down); // this method knows/care about whether this translates into a toggle-to-talk or down-to-talk } - -void LLSpeakButton::onClick_SpeakBtn() +void LLSpeakButton::onMouseUp_SpeakBtn() { - bool speaking = mSpeakBtn->getToggleState(); - gVoiceClient->setUserPTTState(speaking); + bool down = false; + gVoiceClient->inputUserControlState(down); } void LLSpeakButton::onClick_ShowBtn() diff --git a/indra/newview/llspeakbutton.h b/indra/newview/llspeakbutton.h index f59ded2133..e213c562dd 100644 --- a/indra/newview/llspeakbutton.h +++ b/indra/newview/llspeakbutton.h @@ -45,7 +45,6 @@ class LLOutputMonitorCtrl; * clicked. */ class LLSpeakButton : public LLUICtrl - { public: @@ -61,14 +60,14 @@ public: }; /*virtual*/ ~LLSpeakButton(); - - void setSpeakBtnToggleState(bool state); + /*virtual*/ void draw(); protected: friend class LLUICtrlFactory; LLSpeakButton(const Params& p); - void onClick_SpeakBtn(); + void onMouseDown_SpeakBtn(); + void onMouseUp_SpeakBtn(); void onClick_ShowBtn(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 07d073c3a9..4d4ad1c022 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2634,6 +2634,8 @@ void handle_object_edit() void handle_object_inspect() { + // Disable sidepanel inspector + /* LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); LLViewerObject* selected_objectp = selection->getFirstRootObject(); if (selected_objectp) @@ -2642,6 +2644,7 @@ void handle_object_inspect() key["task"] = "task"; LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); } + */ LLFloaterReg::showInstance("inspect", LLSD()); } diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index df5481c874..39d4bb0c02 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -68,9 +68,6 @@ #include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel #include "llfloaterchat.h" // for LLFloaterChat::addChat() -// for Talk Button's state updating -#include "llnearbychatbar.h" - // for base64 decoding #include "apr_base64.h" @@ -5791,7 +5788,6 @@ bool LLVoiceClient::getMuteMic() const void LLVoiceClient::setUserPTTState(bool ptt) { mUserPTTState = ptt; - if (LLNearbyChatBar::instanceExists()) LLNearbyChatBar::getInstance()->setPTTState(ptt); } bool LLVoiceClient::getUserPTTState() @@ -5802,7 +5798,6 @@ bool LLVoiceClient::getUserPTTState() void LLVoiceClient::toggleUserPTTState(void) { mUserPTTState = !mUserPTTState; - if (LLNearbyChatBar::instanceExists()) LLNearbyChatBar::getInstance()->setPTTState(mUserPTTState); } void LLVoiceClient::setVoiceEnabled(bool enabled) @@ -5930,8 +5925,6 @@ void LLVoiceClient::setMicGain(F32 volume) void LLVoiceClient::keyDown(KEY key, MASK mask) { -// LL_DEBUGS("Voice") << "key is " << LLKeyboard::stringFromKey(key) << LL_ENDL; - if (gKeyboard->getKeyRepeated(key)) { // ignore auto-repeat keys @@ -5940,44 +5933,39 @@ void LLVoiceClient::keyDown(KEY key, MASK mask) if(!mPTTIsMiddleMouse) { - if(mPTTIsToggle) - { - if(key == mPTTKey) - { - toggleUserPTTState(); - } - } - else if(mPTTKey != KEY_NONE) - { - setUserPTTState(gKeyboard->getKeyDown(mPTTKey)); - } + bool down = (mPTTKey != KEY_NONE) + && gKeyboard->getKeyDown(mPTTKey); + inputUserControlState(down); } } void LLVoiceClient::keyUp(KEY key, MASK mask) { if(!mPTTIsMiddleMouse) { - if(!mPTTIsToggle && (mPTTKey != KEY_NONE)) + bool down = (mPTTKey != KEY_NONE) + && gKeyboard->getKeyDown(mPTTKey); + inputUserControlState(down); + } +} +void LLVoiceClient::inputUserControlState(bool down) +{ + if(mPTTIsToggle) + { + if(down) // toggle open-mic state on 'down' { - setUserPTTState(gKeyboard->getKeyDown(mPTTKey)); + toggleUserPTTState(); } } + else // set open-mic state as an absolute + { + setUserPTTState(down); + } } void LLVoiceClient::middleMouseState(bool down) { if(mPTTIsMiddleMouse) { - if(mPTTIsToggle) - { - if(down) - { - toggleUserPTTState(); - } - } - else - { - setUserPTTState(down); - } + inputUserControlState(down); } } diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 9df96d9a52..347fae6156 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -188,6 +188,7 @@ static void updatePosition(void); void setUserPTTState(bool ptt); bool getUserPTTState(); void toggleUserPTTState(void); + void inputUserControlState(bool down); // interpret any sort of up-down mic-open control input according to ptt-toggle prefs void setVoiceEnabled(bool enabled); static bool voiceEnabled(); void setUsePTT(bool usePTT); @@ -196,7 +197,7 @@ static void updatePosition(void); void setEarLocation(S32 loc); void setVoiceVolume(F32 volume); void setMicGain(F32 volume); - void setUserVolume(const LLUUID& id, F32 volume); // set's volume for specified agent, from 0-1 (where .5 is nominal) + void setUserVolume(const LLUUID& id, F32 volume); // sets volume for specified agent, from 0-1 (where .5 is nominal) void setLipSyncEnabled(BOOL enabled); BOOL lipSyncEnabled(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 021fc74648..09769d5e80 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1640,38 +1640,19 @@ bool LLVOVolume::hasMedia() const LLVector3 LLVOVolume::getApproximateFaceNormal(U8 face_id) { - LLVector3 result = LLVector3::zero; - - LLFace* facep = mDrawable->getFace(face_id); - if(facep) - { - LLStrider<LLVector3> verticesp; - LLStrider<LLVector3> normalsp; - LLStrider<LLVector2> texCoordsp; - LLStrider<U16> indicesp; - S32 index_offset; - index_offset = facep->getGeometry(verticesp,normalsp,texCoordsp, indicesp); - - if(index_offset != -1 && (normalsp.get() != NULL)) + LLVolume* volume = getVolume(); + LLVector3 result; + + if (volume && face_id < volume->getNumVolumeFaces()) + { + const LLVolumeFace& face = volume->getVolumeFace(face_id); + for (S32 i = 0; i < face.mVertices.size(); ++i) { - U16 count = facep->getGeomCount(); - U16 i; - - for(i=0; i < count; i++) - { - LLVector3 normal = *normalsp++; -// llinfos << "adding " << normal << llendl; - result += normal; - } + result += face.mVertices[i].mNormal; } - } - - if(!result.isNull()) - { -// llinfos << "before conversion: " << result << llendl; + result = volumeDirectionToAgent(result); - result.normalize(); -// llinfos << "after conversion: " << result << llendl; + result.normVec(); } return result; diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index e5ff62746e..a8c4625f6e 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -55,8 +55,6 @@ const BOOL gUseRoam = FALSE; /////////////////////////////////// -#include "randgauss.h" - template<class T> inline T LERP(T a, T b, F32 factor) { return a + (b - a) * factor; diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml index 0f710a8047..6e0c3dfe54 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml @@ -115,7 +115,7 @@ Try selecting a smaller area. </floater.string> <floater.string name="buy_for_US"> - Buy L$ [AMOUNT] for approx. US$ [AMOUNT2], + Buy L$ [AMOUNT] for approx. [LOCAL_AMOUNT], </floater.string> <floater.string name="parcel_meters"> @@ -172,10 +172,6 @@ supports [AMOUNT2] objects name="no_parcel_selected"> (no parcel selected) </floater.string> - <floater.string - name="buy_currency"> - Buy L$ [LINDENS] for approx. US$ [USD] - </floater.string> <text type="string" length="1" @@ -667,7 +663,7 @@ This parcel is 512 m² of land. name="currency_est" top="409" width="178"> - for approx. US$ [AMOUNT2] + for approx. [LOCAL_AMOUNT] </text> <text type="string" diff --git a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml index 93c53981f3..04a247fd54 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml @@ -73,7 +73,7 @@ <menu_item_call label="Edit" layout="topleft" - name="report"> + name="edit"> <menu_item_call.on_click function="Object.Edit" /> <menu_item_call.on_enable diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 66c9060b06..df2c2465c5 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2558,10 +2558,10 @@ name="Texture Atlas"> <menu_item_check.on_check function="CheckControl" - parameter="TextureAtlas" /> + parameter="EnableTextureAtlas" /> <menu_item_check.on_click function="ToggleControl" - parameter="TextureAtlas" /> + parameter="EnableTextureAtlas" /> </menu_item_check> <menu_item_check label="Render Attached Lights" diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 255b92844f..a90337d31a 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -145,7 +145,8 @@ top_delta="0" width="200" > <combo_editor - label="Search Second Life" /> + label="Search [SECOND_LIFE]" + name="search_combo_editor"/> </search_combo_box> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 613decad8d..06f0710406 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -272,7 +272,7 @@ Avatars: width="315" /> <radio_item height="16" - label="In window" + label="In a window" layout="topleft" left_delta="175" name="1" @@ -284,13 +284,13 @@ Avatars: enabled_control="EnableVoiceChat" control_name="PushToTalkToggle" height="20" - label="Use Push-to-talk in toggle mode" + label="Toggle mode for microphone when I press the Speak trigger key:" layout="topleft" left="30" name="push_to_talk_toggle_check" width="237" top_pad="-25" - tool_tip="When in toggle mode, press and release the push-to-talk trigger to switch your microphone on and off. When not in toggle mode, the microphone is active only when the trigger is held down."/> + tool_tip="When in toggle mode, press and release the trigger key ONCE to switch your microphone on or off. When not in toggle mode, the microphone broadcasts your voice only while the trigger is being held down."/> <line_editor follows="top|left" control_name="PushToTalkButton" @@ -300,7 +300,7 @@ Avatars: left_delta="50" max_length="254" name="modifier_combo" - label="Push-to-talk trigger" + label="Push-to-Speak trigger" top_pad="0" width="280" /> <button diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index ce7939c00f..acf4601bfe 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -94,6 +94,7 @@ layout="topleft" left="30" mouse_opaque="false" + name="Logs:" top_pad="10" width="350"> Logs: @@ -184,6 +185,7 @@ layout="topleft" left_delta="0" mouse_opaque="false" + name="log_path_desc" top_pad="1" width="128" text_color="LtGray_50"> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index ba2ddd8b32..d454b9e5c8 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -336,7 +336,7 @@ follows="left|bottom" height="19" is_toggle="true" - label="Input / Output Devices" + label="Input/Output Devices" layout="topleft" left="165" top_pad="12" diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml new file mode 100644 index 0000000000..8eb2254112 --- /dev/null +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -0,0 +1,547 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + auto_tile="true" + height="570" + layout="topleft" + name="object properties" + help_topic="object_properties" + save_rect="true" + title="Object Properties" + width="333"> + <panel.string + name="text deed continued"> + Deed + </panel.string> + <panel.string + name="text deed"> + Deed + </panel.string> + <panel.string + name="text modify info 1"> + You can modify this object + </panel.string> + <panel.string + name="text modify info 2"> + You can modify these objects + </panel.string> + <panel.string + name="text modify info 3"> + You can't modify this object + </panel.string> + <panel.string + name="text modify info 4"> + You can't modify these objects + </panel.string> + <panel.string + name="text modify warning"> + This object has linked parts + </panel.string> + <panel.string + name="Cost Default"> + Price: L$ + </panel.string> + <panel.string + name="Cost Total"> + Total Price: L$ + </panel.string> + <panel.string + name="Cost Per Unit"> + Price Per: L$ + </panel.string> + <panel.string + name="Cost Mixed"> + Mixed Price + </panel.string> + <panel.string + name="Sale Mixed"> + Mixed Sale + </panel.string> + <button + follows="top|right" + height="25" + image_overlay="BackArrow_Off" + layout="topleft" + name="back_btn" + picture_style="true" + right="-5" + tab_stop="false" + top="0" + width="25" /> + <panel + follows="all" + height="500" + label="" + layout="topleft" + left="5" + help_topic="" + top="30" + border="1" + width="313"> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left="10" + name="Name:" + top_pad="5" + width="90"> + Name: + </text> + <line_editor + follows="left|top|right" + height="19" + layout="topleft" + left_pad="0" + max_length="63" + name="Object Name" + select_on_focus="true" + top_delta="0" + width="170" /> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left="10" + name="Description:" + top_pad="3" + width="90"> + Description: + </text> + <line_editor + follows="left|top|right" + height="19" + layout="topleft" + left_pad="0" + max_length="127" + name="Object Description" + select_on_focus="true" + top_delta="0" + width="170" /> + <text + type="string" + left="10" + length="1" + follows="left|top" + height="19" + layout="topleft" + name="Creator:" + width="90"> + Creator: + </text> + <text + type="string" + length="1" + follows="left|top" + left_pad="0" + height="19" + layout="topleft" + name="Creator Name" + width="175"> + Esbee Linden + </text> + <text + type="string" + length="1" + left="10" + follows="left|top" + height="19" + layout="topleft" + name="Owner:" + width="90"> + Owner: + </text> + <text + type="string" + length="1" + follows="left|top" + height="19" + layout="topleft" + name="Owner Name" + left_pad="0" + width="175"> + Erica Linden + </text> + <text + type="string" + length="1" + follows="left|top" + layout="topleft" + left="10" + height="18" + name="Group:" + top_pad="4" + width="75"> + Group: + </text> + <button + follows="top|left" + height="10" + image_disabled="Activate_Checkmark" + image_selected="Activate_Checkmark" + image_unselected="Activate_Checkmark" + image_color="White_50" + layout="topleft" + left_pad="0" + top_delta="0" + name="button set group" + picture_style="true" + tab_stop="false" + tool_tip="Choose a group to share this object's permissions" + width="10" /> + <name_box + follows="left|top" + height="18" + initial_value="Loading..." + layout="topleft" + left_pad="5" + top_delta="-1" + name="Group Name Proxy" + width="150" /> + <button + follows="top|left" + font="SansSerifSmall" + height="20" + label="Deed" + label_selected="Deed" + layout="topleft" + name="button deed" + top_pad="0" + left="100" + tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer." + width="80" /> + <check_box + height="19" + follows="left|top" + label="Share" + layout="topleft" + name="checkbox share with group" + tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions." + left_pad="3" + width="100" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + top_pad="15" + left="10" + name="label click action" + width="90"> + Click to: + </text> + <combo_box + follows="left|top" + height="20" + layout="topleft" + name="clickaction" + width="168" + left_pad="0"> + <combo_box.item + label="Touch (default)" + name="Touch/grab(default)" + value="Touch/grab (default)" /> + <combo_box.item + label="Sit on object" + name="Sitonobject" + value="Sit on object" /> + <combo_box.item + label="Buy object" + name="Buyobject" + value="Buy object" /> + <combo_box.item + label="Pay object" + name="Payobject" + value="Pay object" /> + <combo_box.item + label="Open" + name="Open" + value="Open" /> + </combo_box> + <check_box + height="16" + top_pad="15" + label="For Sale:" + layout="topleft" + name="checkbox for sale" + left="10" + width="90" /> +<!-- NEW SALE TYPE COMBO BOX --> + <combo_box + left_pad="0" + layout="topleft" + follows="left|top" + allow_text_entry="false" + height="20" + intial_value="2" + max_chars="20" + mouse_opaque="true" + name="sale type" + width="158"> + <combo_box.item + name="Copy" + label="Copy" + value="2" /> + <combo_box.item + name="Contents" + label="Contents" + value="3" /> + <combo_box.item + name="Original" + label="Original" + value="1" /> + </combo_box> +<!-- NEW PRICE SPINNER --> + <spinner + follows="left|top" + decimal_digits="0" + increment="1" + top_pad="8" + left="100" + control_name="Edit Cost" + name="Edit Cost" + label="Price: L$" + label_width="65" + width="150" + min_val="1" + height="20" + max_val="999999999" /> + <check_box + height="15" + width="110" + top_pad="3" + label="Show in search" + layout="topleft" + left="100" + name="search_check" + tool_tip="Let people see this object in search results" /> + <panel + border="false" + follows="left|top" + layout="topleft" + mouse_opaque="false" + background_visible="true" + bg_alpha_color="DkGray" + name="perms_build" + left="0" + top="241" + height="120" + width="278"> + <text + type="string" + length="1" + left="10" + top_pad="9" + text_color="EmphasisColor" + height="16" + follows="left|top|right" + layout="topleft" + name="perm_modify" + width="250"> + You can modify this object + </text> + <text + type="string" + follows="left|top" + name="Anyone can:" + width="250" + left="10"> + Anyone: + </text> + <check_box + height="19" + label="Move" + layout="topleft" + name="checkbox allow everyone move" + left="15" + width="85" /> + <check_box + height="19" + label="Copy" + layout="topleft" + left_pad="0" + name="checkbox allow everyone copy" + width="90" /> + <text + type="string" + follows="left|top" + height="19" + name="Next owner can:" + width="250" + left="10"> + Next owner: + </text> + <check_box + follows="left|top|right" + label="Modify" + layout="topleft" + left="15" + name="checkbox next owner can modify" + width="85" /> + <check_box + follows="left|top|right" + height="19" + label="Copy" + layout="topleft" + left_pad="0" + name="checkbox next owner can copy" + width="90" /> + <check_box + follows="left|top|right" + height="19" + label="Transfer" + layout="topleft" + name="checkbox next owner can transfer" + left_pad="0" + top_delta="0" + tool_tip="Next owner can give away or resell this object" + width="90" /> + <text + type="string" + text_color="EmphasisColor" + length="1" + top_pad="5" + follows="left|top" + layout="topleft" + left="10" + name="B:" + height="10" + width="45"> + B: + </text> + <text + type="string" + text_color="White" + length="1" + follows="left|top" + layout="topleft" + left_pad="0" + name="O:" + height="10" + width="44"> + O: + </text> + <text + type="string" + text_color="EmphasisColor" + length="1" + follows="left|top" + layout="topleft" + left_pad="0" + name="G:" + height="10" + width="43"> + G: + </text> + <text + type="string" + text_color="White" + length="1" + follows="left|top" + left_pad="0" + layout="topleft" + name="E:" + height="10" + width="43"> + E: + </text> + <text + type="string" + text_color="EmphasisColor" + length="1" + follows="left|top" + layout="topleft" + left_pad="0" + name="N:" + height="10" + width="48"> + N: + </text> + <text + type="string" + text_color="White" + length="1" + follows="left|top" + layout="topleft" + left_pad="0" + name="F:" + height="10" + width="50"> + F: + </text> + </panel> + </panel> + <panel + height="25" + layout="bottomright" + help_topic="button_tab" + name="button_panel" + left="5" + bottom="5" + width="313"> + <button + follows="bottom|left" + font="SansSerifSmallBold" + height="25" + label="Edit" + layout="topleft" + left="0" + name="edit_btn" + top="0" + width="50" /> + <button + follows="bottom|left" + font="SansSerifSmallBold" + height="25" + label="Open" + layout="topleft" + left_pad="5" + name="open_btn" + top="0" + width="60" /> + <button + follows="bottom|left" + font="SansSerifSmallBold" + height="25" + label="Pay" + layout="topleft" + left_pad="5" + name="pay_btn" + top="0" + width="50" /> + <button + follows="bottom|left" + font="SansSerifSmallBold" + height="25" + label="Buy" + layout="topleft" + left_pad="5" + name="buy_btn" + top="0" + width="60" /> + <button + follows="bottom|right" + font="SansSerifSmallBold" + height="25" + label="Cancel" + layout="topleft" + name="cancel_btn" + right="-1" + top="0" + width="70" /> + <button + follows="bottom|right" + font="SansSerifSmallBold" + height="25" + label="Save" + layout="topleft" + name="save_btn" + left_pad="-135" + top="0" + width="60" /> + </panel> +</panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/widgets/talk_button.xml b/indra/newview/skins/default/xui/en/widgets/talk_button.xml index d9f39b6937..1d8257fbc8 100644 --- a/indra/newview/skins/default/xui/en/widgets/talk_button.xml +++ b/indra/newview/skins/default/xui/en/widgets/talk_button.xml @@ -11,7 +11,6 @@ label_selected="Speak" font="SansSerifSmall" tab_stop="false" - is_toggle="true" /> <show_button name="right" |