Merge branch 'DRTVWR-565-maint-P' of https://bitbucket.org/lindenlab/viewer

# Conflicts:
#	indra/newview/featuretable_linux.txt
#	indra/newview/llagent.cpp
#	indra/newview/llfloatertranslationsettings.cpp
#	indra/newview/llviewercontrol.cpp
#	indra/newview/llviewerfloaterreg.cpp
#	indra/newview/llviewerregion.cpp
#	indra/newview/llviewerwindow.cpp
#	indra/newview/skins/default/xui/en/notifications.xml
master
Ansariel 2022-09-13 19:37:45 +02:00
commit 7d0d744e34
24 changed files with 175 additions and 157 deletions

View File

@ -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<LLButton>("chat_history_btn")->setCommitCallback(boost::bind(&FSFloaterNearbyChat::onHistoryButtonClicked, this));
getChild<LLButton>("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 )
{

View File

@ -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();}

View File

@ -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;
// <FS:Ansariel> FIRE-21323: Crashfix
//url = getRegion()->getCapability(capName);
url = getRegion() ? getRegion()->getCapability(capName) : "";
// </FS:Ansariel>
if (!getRegion())
{
return false;
}
std::string url = getRegion()->getCapability(capName);
if (url.empty())
{

View File

@ -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);

View File

@ -317,7 +317,6 @@ void LLFloaterIMNearbyChat::onOpen(const LLSD& key)
restoreFloater();
onCollapseToLine(this);
}
showTranslationCheckbox(LLTranslate::isTranslationConfigured());
}
// virtual

View File

@ -255,7 +255,6 @@ BOOL LLFloaterIMSessionTab::postBuild()
mGearBtn = getChild<LLButton>("gear_btn");
mAddBtn = getChild<LLButton>("add_btn");
mVoiceButton = getChild<LLButton>("voice_call_btn");
mTranslationCheckBox = getChild<LLUICtrl>("translate_chat_checkbox_lp");
mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel");
mRightPartPanel = getChild<LLLayoutPanel>("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*/)
{

View File

@ -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

View File

@ -292,11 +292,6 @@ void LLFloaterTranslationSettings::onBtnOK()
gSavedSettings.setString("TranslationService", getSelectedService());
gSavedSettings.setString("BingTranslateAPIKey", getEnteredBingKey());
gSavedSettings.setString("GoogleTranslateAPIKey", getEnteredGoogleKey());
// <FS:Ansariel> [FS communication UI]
//(LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))->
// showTranslationCheckbox(LLTranslate::isTranslationConfigured());
(LLFloaterReg::getTypedInstance<FSFloaterNearbyChat>("fs_nearby_chat"))->
enableTranslationButton(LLTranslate::isTranslationConfigured());
// </FS:Ansariel> [FS communication UI]
closeFloater(false);
}

View File

@ -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<std::string> 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
{

View File

@ -2859,8 +2859,62 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
}
std::set<LLUUID> 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")
{

View File

@ -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;
}
}

View File

@ -844,7 +844,7 @@ BOOL LLSurfacePatch::updateTexture()
{
mVObjp->dirtyGeom();
gPipeline.markGLRebuild(mVObjp);
return TRUE;
return !mSTexUpdate;
}
}
}

View File

@ -745,7 +745,7 @@ bool toggle_agent_pause(const LLSD& newvalue)
//LLNavigationBar::getInstance()->setVisible(value);
//gSavedSettings.setBOOL("ShowMiniLocationPanel", !value);
//gViewerWindow->reshapeStatusBarContainer();
//return true;
// }

View File

@ -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());
// <FS:Zi> 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;
}

View File

@ -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();
// <FS:Ansariel> 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();
// <FS:Ansariel> 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;
}

View File

@ -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<LLPanel>("status_bar_container");
LLView* nav_bar_container = getRootView()->getChild<LLView>("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);
}
//----------------------------------------------------------------------------

View File

@ -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);
//

View File

@ -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() ;

View File

@ -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)

View File

@ -36,30 +36,6 @@
name="ls_control_panel"
top="2"
left="3">
<layout_panel
name="lp_translate_btn"
auto_resize="false"
user_resize="false"
top="0"
layout="topleft"
height="20"
width="26"
follows="left|top">
<button
follows="left|top"
top="0"
width="24"
height="20"
left_delta="2"
image_overlay="TabIcon_Translate_Off"
control_name="TranslateChat"
is_toggle="true"
image_hover_unselected="Toolbar_Middle_Over"
image_selected="Toolbar_Middle_Selected"
image_unselected="Toolbar_Middle_Off"
tool_tip="Use selected translation service"
name="translate_btn"/>
</layout_panel>
<layout_panel
name="lp_chat_history_btn"
auto_resize="false"

View File

@ -220,20 +220,6 @@
left="1"
right="-1"
bottom="-1">
<layout_panel
auto_resize="false"
height="26"
name="translate_chat_checkbox_lp">
<check_box
top="10"
control_name="TranslateChat"
enabled="true"
height="16"
label="Translate chat"
left="5"
name="translate_chat_checkbox"
width="230" />
</layout_panel>
<layout_panel
name="chat_holder">
<chat_history

View File

@ -1539,7 +1539,7 @@ Delete pick &lt;nolink&gt;[PICK]&lt;/nolink&gt;?
<notification
icon="alert.tga"
name="ProfileUnpublishedClassified"
type="alert">
type="alertmodal">
You have unpublished classifieds. They will be lost if you close the window.
<tag>confirm</tag>
<usetemplate
@ -1551,7 +1551,7 @@ Delete pick &lt;nolink&gt;[PICK]&lt;/nolink&gt;?
<notification
icon="alert.tga"
name="ProfileUnsavedChanges"
type="alert">
type="alertmodal">
You have unsaved changes.
<tag>confirm</tag>
<tag>save</tag>

View File

@ -17,26 +17,6 @@
top="5"
orientation="vertical"
width="242">
<layout_panel
auto_resize="false"
height="26"
layout="topleft"
left_delta="0"
name="translate_chat_checkbox_lp"
top_delta="0"
visible="true"
width="230">
<check_box
top="10"
control_name="TranslateChat"
enabled="true"
height="16"
label="Translate chat"
layout="topleft"
left="5"
name="translate_chat_checkbox"
width="230" />
</layout_panel>
<layout_panel
auto_resize="true"
height="138"

View File

@ -36,29 +36,6 @@
name="ls_control_panel"
top="0"
left="3">
<layout_panel
name="lp_translate_btn"
auto_resize="false"
user_resize="false"
top="0"
layout="topleft"
height="26"
width="26"
follows="left|top">
<button
follows="left|top"
top="2"
width="24"
height="24"
image_overlay="TabIcon_Translate_Off"
control_name="TranslateChat"
is_toggle="true"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
tool_tip="Use selected translation service"
name="translate_btn"/>
</layout_panel>
<layout_panel
name="lp_chat_history_btn"
auto_resize="false"