diff --git a/indra/newview/fsfloaternearbychat.cpp b/indra/newview/fsfloaternearbychat.cpp index 70557c4c8b..aa49fc0e64 100644 --- a/indra/newview/fsfloaternearbychat.cpp +++ b/indra/newview/fsfloaternearbychat.cpp @@ -67,7 +67,6 @@ #include "llstylemap.h" #include "lltextbox.h" #include "lltrans.h" -#include "lltranslate.h" #include "llviewercontrol.h" #include "llviewermenu.h"//for gMenuHolder #include "llviewerstats.h" @@ -142,8 +141,6 @@ BOOL FSFloaterNearbyChat::postBuild() mChatLayoutPanelHeight = mChatLayoutPanel->getRect().getHeight(); mInputEditorPad = mChatLayoutPanelHeight - mInputEditor->getRect().getHeight(); - enableTranslationButton(LLTranslate::isTranslationConfigured()); - getChild("chat_history_btn")->setCommitCallback(boost::bind(&FSFloaterNearbyChat::onHistoryButtonClicked, this)); getChild("chat_search_btn")->setCommitCallback(boost::bind(&FSFloaterNearbyChat::onSearchButtonClicked, this)); @@ -665,11 +662,6 @@ BOOL FSFloaterNearbyChat::getVisible() return is_active && !im_container->isMinimized() && im_container->getVisible(); } -void FSFloaterNearbyChat::enableTranslationButton(bool enabled) -{ - getChildView("translate_btn")->setEnabled(enabled); -} - // virtual BOOL FSFloaterNearbyChat::handleKeyHere( KEY key, MASK mask ) { diff --git a/indra/newview/fsfloaternearbychat.h b/indra/newview/fsfloaternearbychat.h index 58276d8be4..05fd42e210 100644 --- a/indra/newview/fsfloaternearbychat.h +++ b/indra/newview/fsfloaternearbychat.h @@ -87,7 +87,6 @@ public: void updateFSUseNearbyChatConsole(const LLSD &data); static bool isWordsName(const std::string& name); - void enableTranslationButton(bool enabled); LLChatEntry* getChatBox() { return mInputEditor; } S32 getMessageArchiveLength() {return mMessageArchive.size();} diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 757af5540b..e8d1adb141 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3482,12 +3482,11 @@ void LLAgent::processMaturityPreferenceFromServer(const LLSD &result, U8 perferr bool LLAgent::requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess, httpCallback_t cbFailure) { - std::string url; - - // FIRE-21323: Crashfix - //url = getRegion()->getCapability(capName); - url = getRegion() ? getRegion()->getCapability(capName) : ""; - // + if (!getRegion()) + { + return false; + } + std::string url = getRegion()->getCapability(capName); if (url.empty()) { diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index 610746ca80..213bc87a6f 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -84,7 +84,7 @@ LLFloater360Capture::~LLFloater360Capture() // Tell the Simulator not to send us everything anymore // and revert to the regular "keyhole" frustum of interest // list updates. - if (gSavedSettings.getBOOL("360CaptureUseInterestListCap")) + if (!LLApp::isExiting() && gSavedSettings.getBOOL("360CaptureUseInterestListCap")) { const bool send_everything = false; changeInterestListMode(send_everything); diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 3291e744d3..acf66b5d81 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -317,7 +317,6 @@ void LLFloaterIMNearbyChat::onOpen(const LLSD& key) restoreFloater(); onCollapseToLine(this); } - showTranslationCheckbox(LLTranslate::isTranslationConfigured()); } // virtual diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 220f567ba9..0bda09c1a2 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -255,7 +255,6 @@ BOOL LLFloaterIMSessionTab::postBuild() mGearBtn = getChild("gear_btn"); mAddBtn = getChild("add_btn"); mVoiceButton = getChild("voice_call_btn"); - mTranslationCheckBox = getChild("translate_chat_checkbox_lp"); mParticipantListPanel = getChild("speakers_list_panel"); mRightPartPanel = getChild("right_part_holder"); @@ -813,8 +812,6 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar() mCloseBtn->setVisible(is_not_torn_off && !mIsNearbyChat); enableDisableCallBtn(); - - showTranslationCheckbox(); } void LLFloaterIMSessionTab::forceReshape() @@ -831,11 +828,6 @@ void LLFloaterIMSessionTab::reshapeChatLayoutPanel() mChatLayoutPanel->reshape(mChatLayoutPanel->getRect().getWidth(), mInputEditor->getRect().getHeight() + mInputEditorPad, FALSE); } -void LLFloaterIMSessionTab::showTranslationCheckbox(BOOL show) -{ - mTranslationCheckBox->setVisible(mIsNearbyChat && show); -} - // static void LLFloaterIMSessionTab::processChatHistoryStyleUpdate(bool clean_messages/* = false*/) { diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index ef15c4386f..1ca908315d 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -73,8 +73,6 @@ public: static LLFloaterIMSessionTab* findConversation(const LLUUID& uuid); static LLFloaterIMSessionTab* getConversation(const LLUUID& uuid); - // show/hide the translation check box - void showTranslationCheckbox(const BOOL visible = FALSE); bool isNearbyChat() {return mIsNearbyChat;} @@ -189,7 +187,6 @@ protected: LLButton* mGearBtn; LLButton* mAddBtn; LLButton* mVoiceButton; - LLUICtrl* mTranslationCheckBox; private: // Handling selection and contextual menu diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp index a85e4efc45..6f11086c67 100644 --- a/indra/newview/llfloatertranslationsettings.cpp +++ b/indra/newview/llfloatertranslationsettings.cpp @@ -292,11 +292,6 @@ void LLFloaterTranslationSettings::onBtnOK() gSavedSettings.setString("TranslationService", getSelectedService()); gSavedSettings.setString("BingTranslateAPIKey", getEnteredBingKey()); gSavedSettings.setString("GoogleTranslateAPIKey", getEnteredGoogleKey()); - // [FS communication UI] - //(LLFloaterReg::getTypedInstance("nearby_chat"))-> - // showTranslationCheckbox(LLTranslate::isTranslationConfigured()); - (LLFloaterReg::getTypedInstance("fs_nearby_chat"))-> - enableTranslationButton(LLTranslate::isTranslationConfigured()); - // [FS communication UI] + closeFloater(false); } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d6d75bda12..b594db1f71 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -782,15 +782,15 @@ void hide_context_entries(LLMenuGL& menu, } bool found = false; - menuentry_vec_t::const_iterator itor2; - for (itor2 = entries_to_show.begin(); itor2 != entries_to_show.end(); ++itor2) - { - if (*itor2 == name) - { - found = true; - break; - } - } + + std::string myinput; + std::vector mylist{ "a", "b", "c" }; + + menuentry_vec_t::const_iterator itor2 = std::find(entries_to_show.begin(), entries_to_show.end(), name); + if (itor2 != entries_to_show.end()) + { + found = true; + } // Don't allow multiple separators in a row (e.g. such as if there are no items // between two separators). @@ -808,7 +808,21 @@ void hide_context_entries(LLMenuGL& menu, menu_item->setVisible(FALSE); } - menu_item->setEnabled(FALSE); + if (menu_item->getEnabled()) + { + // These should stay enabled unless specifically disabled + const menuentry_vec_t exceptions = { + "Detach From Yourself", + "Wearable And Object Wear", + "Wearable Add", + }; + + menuentry_vec_t::const_iterator itor2 = std::find(exceptions.begin(), exceptions.end(), name); + if (itor2 == exceptions.end()) + { + menu_item->setEnabled(FALSE); + } + } } else { diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 4f2fbedc15..fa85eaaf32 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2859,8 +2859,62 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root } std::set selected_uuid_set = LLAvatarActions::getInventorySelectedUUIDs(); + + // copy list of applicable items into a vector for bulk handling uuid_vec_t ids; - std::copy(selected_uuid_set.begin(), selected_uuid_set.end(), std::back_inserter(ids)); + if (action == "wear" || action == "wear_add") + { + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + const LLUUID mp_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); + std::copy_if(selected_uuid_set.begin(), + selected_uuid_set.end(), + std::back_inserter(ids), + [trash_id, mp_id](LLUUID id) + { + if (get_is_item_worn(id) + || LLAppearanceMgr::instance().getIsInCOF(id) + || gInventory.isObjectDescendentOf(id, trash_id)) + { + return false; + } + if (mp_id.notNull() && gInventory.isObjectDescendentOf(id, mp_id)) + { + return false; + } + LLInventoryObject* obj = (LLInventoryObject*)gInventory.getObject(id); + if (!obj) + { + return false; + } + if (obj->getIsLinkType() && gInventory.isObjectDescendentOf(obj->getLinkedUUID(), trash_id)) + { + return false; + } + if (obj->getIsLinkType() && LLAssetType::lookupIsLinkType(obj->getType())) + { + // missing + return false; + } + return true; + } + ); + } + else if (isRemoveAction(action)) + { + std::copy_if(selected_uuid_set.begin(), + selected_uuid_set.end(), + std::back_inserter(ids), + [](LLUUID id) + { + return get_is_item_worn(id); + } + ); + } + else + { + std::copy(selected_uuid_set.begin(), selected_uuid_set.end(), std::back_inserter(ids)); + } + // Check for actions that get handled in bulk if (action == "wear") { diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 9730f0f16d..404c29bfe7 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -460,7 +460,8 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_ LLViewerMedia::getInstance()->getMediaImplFromTextureID(object->getTE(face)->getMediaData()->getMediaID()); if(media_impl) { - media_impl->navigateHome(); + media_impl->setPriority(LLPluginClassMedia::PRIORITY_NORMAL); + media_impl->navigateHome(); return true; } } diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index a3480fdb10..0e745d6cff 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -844,7 +844,7 @@ BOOL LLSurfacePatch::updateTexture() { mVObjp->dirtyGeom(); gPipeline.markGLRebuild(mVObjp); - return TRUE; + return !mSTexUpdate; } } } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 4a27a83eb9..3125d42880 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -745,7 +745,7 @@ bool toggle_agent_pause(const LLSD& newvalue) //LLNavigationBar::getInstance()->setVisible(value); //gSavedSettings.setBOOL("ShowMiniLocationPanel", !value); - + //gViewerWindow->reshapeStatusBarContainer(); //return true; // } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 287685c857..9140cf2359 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -222,6 +222,7 @@ #include "particleeditor.h" #include "quickprefs.h" // handle secondlife:///app/openfloater/{NAME} URLs +const std::string FLOATER_PROFILE("profile"); class LLFloaterOpenHandler : public LLCommandHandler { public: @@ -238,8 +239,20 @@ public: const std::string floater_name = LLURI::unescape(params[0].asString()); // Support passing arguments to opened floater like secondlife:///app/openfloater/{NAME}?tab=msg&subtab=xyz - // LLFloaterReg::showInstance(floater_name); - LLFloaterReg::showInstance(floater_name, query_map); + //LLSD key; + //if (floater_name == FLOATER_PROFILE) + //{ + // key["id"] = gAgentID; + //} + //LLFloaterReg::showInstance(floater_name, key); + if (floater_name == FLOATER_PROFILE) + { + LLSD key; + key["id"] = gAgentID; + LLFloaterReg::showInstance(floater_name, key); + return true; + } + LLFloaterReg::showInstance(floater_name, query_map); return true; } diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index df4cfd2cca..efd4cf4e24 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -341,6 +341,24 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) return; } + if (!LLWorld::instanceExists()) + { + LL_WARNS("AppInit", "Capabilities") << "Received capabilities, but world no longer exists!" << LL_ENDL; + return; + } + + regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle); + if (!regionp) //region was removed + { + LL_WARNS("AppInit", "Capabilities") << "Received capabilities for region that no longer exists!" << LL_ENDL; + return; // this error condition is not recoverable. + } + + impl = regionp->getRegionImplNC(); + + // Fix seed cap retry count + //++(impl->mSeedCapAttempts); + if (!result.isMap() || result.has("error")) { LL_WARNS("AppInit", "Capabilities") << "Malformed response" << LL_ENDL; @@ -360,24 +378,6 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) // remove the http_result from the llsd result.erase("http_result"); - if (!LLWorld::instanceExists()) - { - LL_WARNS("AppInit", "Capabilities") << "Received capabilities, but world no longer exists!" << LL_ENDL; - return; - } - - regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle); - if (!regionp) //region was removed - { - LL_WARNS("AppInit", "Capabilities") << "Received capabilities for region that no longer exists!" << LL_ENDL; - return; // this error condition is not recoverable. - } - - impl = regionp->getRegionImplNC(); - - // Fix seed cap retry count - //++(impl->mSeedCapAttempts); - if (id != impl->mHttpResponderID) // region is no longer referring to this request { LL_WARNS("AppInit", "Capabilities") << "Received results for a stale capabilities request!" << LL_ENDL; @@ -2456,6 +2456,11 @@ void LLViewerRegion::requestSimulatorFeatures() std::string coroname = LLCoros::instance().launch("LLViewerRegionImpl::requestSimulatorFeatureCoro", boost::bind(&LLViewerRegionImpl::requestSimulatorFeatureCoro, url, getHandle())); + + // requestSimulatorFeatures can be called from other coros, + // launch() acts like a suspend() + // Make sure we are still good to do + LLCoros::checkStop(); LL_INFOS("AppInit", "SimulatorFeatures") << "Launching " << coroname << " requesting simulator features from " << url << " for region " << getRegionID() << LL_ENDL; } @@ -3352,6 +3357,12 @@ void LLViewerRegion::setSeedCapability(const std::string& url) std::string coroname = LLCoros::instance().launch("LLEnvironmentRequest::requestBaseCapabilitiesCompleteCoro", boost::bind(&LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro, getHandle())); + + // setSeedCapability can be called from other coros, + // launch() acts like a suspend() + // Make sure we are still good to do + LLCoros::checkStop(); + return; } @@ -3365,6 +3376,11 @@ void LLViewerRegion::setSeedCapability(const std::string& url) LLCoros::instance().launch("LLViewerRegionImpl::requestBaseCapabilitiesCoro", boost::bind(&LLViewerRegionImpl::requestBaseCapabilitiesCoro, getHandle())); + // setSeedCapability can be called from other coros, + // launch() acts like a suspend() + // Make sure we are still good to do + LLCoros::checkStop(); + LL_INFOS("AppInit", "Capabilities") << "Launching " << coroname << " requesting seed capabilities from " << url << " for region " << getRegionID() << LL_ENDL; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2de92fbbb0..cef77e5f36 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2451,15 +2451,14 @@ void LLViewerWindow::initWorldUI() // nav_bar_container->addChild(navbar); // nav_bar_container->setVisible(TRUE); - //// Navigation bar is outside visible area, expand status_bar_container to show it - //S32 new_height = nav_bar_container->getRect().getHeight() + status_bar_container->getRect().getHeight(); - //S32 new_width = status_bar_container->getRect().getWidth(); - //status_bar_container->reshape(new_width, new_height, TRUE); - // if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) // { // navbar->setVisible(FALSE); // } + // else + // { + // reshapeStatusBarContainer(); + //} // Force navigation bar to initialize LLNavigationBar::getInstance(); @@ -7155,6 +7154,27 @@ LLRect LLViewerWindow::getChatConsoleRect() return console_rect; } + +void LLViewerWindow::reshapeStatusBarContainer() +{ + LLPanel* status_bar_container = getRootView()->getChild("status_bar_container"); + LLView* nav_bar_container = getRootView()->getChild("nav_bar_container"); + + S32 new_height = status_bar_container->getRect().getHeight(); + S32 new_width = status_bar_container->getRect().getWidth(); + + if (gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) + { + // Navigation bar is outside visible area, expand status_bar_container to show it + new_height += nav_bar_container->getRect().getHeight(); + } + else + { + // collapse status_bar_container + new_height -= nav_bar_container->getRect().getHeight(); + } + status_bar_container->reshape(new_width, new_height, TRUE); +} //---------------------------------------------------------------------------- diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 98b3433d00..91fe91add0 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -178,6 +178,8 @@ public: bool getUIVisibility(); void handlePieMenu(S32 x, S32 y, MASK mask); + void reshapeStatusBarContainer(); + BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down); // diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp index b83b09a8af..83bc0e6c6d 100644 --- a/indra/newview/llvlcomposition.cpp +++ b/indra/newview/llvlcomposition.cpp @@ -290,6 +290,12 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, BOOL delete_raw = (mDetailTextures[i]->reloadRawImage(ddiscard) != NULL) ; if(mDetailTextures[i]->getRawImageLevel() != ddiscard)//raw iamge is not ready, will enter here again later. { + if (mDetailTextures[i]->getDecodePriority() <= 0.0f && !mDetailTextures[i]->hasSavedRawImage()) + { + mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_MAP); + mDetailTextures[i]->forceToRefetchTexture(ddiscard); + } + if(delete_raw) { mDetailTextures[i]->destroyRawImage() ; diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index d0af680bac..e0a2ac1fa9 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -1359,8 +1359,8 @@ bool LLVivoxVoiceClient::establishVoiceConnection() if (result.has("connector")) { - LLVoiceVivoxStats::getInstance()->establishAttemptEnd(connected); connected = LLSD::Boolean(result["connector"]); + LLVoiceVivoxStats::getInstance()->establishAttemptEnd(connected); if (!connected) { if (result.has("retry") && ++retries <= CONNECT_RETRY_MAX && !sShuttingDown) diff --git a/indra/newview/skins/default/xui/en/floater_fs_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_fs_nearby_chat.xml index 2716c3453b..eab0a5eb7c 100644 --- a/indra/newview/skins/default/xui/en/floater_fs_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_fs_nearby_chat.xml @@ -36,30 +36,6 @@ name="ls_control_panel" top="2" left="3"> - -