Merge branch 'DRTVWR-573-maint-R' of https://github.com/secondlife/viewer

# Conflicts:
#	autobuild.xml
#	indra/newview/llagentui.cpp
#	indra/newview/llcallingcard.cpp
#	indra/newview/llfloateravatarrendersettings.cpp
#	indra/newview/llimview.cpp
#	indra/newview/llimview.h
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llpanelmaininventory.cpp
#	indra/newview/skins/default/xui/de/floater_tools.xml
#	indra/newview/skins/default/xui/en/floater_display_name.xml
#	indra/newview/skins/default/xui/en/floater_tools.xml
#	indra/newview/skins/default/xui/es/floater_tools.xml
#	indra/newview/skins/default/xui/ru/floater_tools.xml
master
Ansariel 2023-01-12 16:56:08 +01:00
commit b157ab47c0
40 changed files with 524 additions and 236 deletions

View File

@ -3196,9 +3196,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>2e8d817e7837dd6f4284b13fa3f5c15e</string>
<string>9e1b5515ab59b4e9cfeef6626d65d03d</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104765/917714/viewer_manager-3.0.575083-darwin64-575083.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/108609/945996/viewer_manager-3.0.577252-darwin64-577252.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@ -3220,9 +3220,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>3efa80faaf537e39a77218cd6efa9409</string>
<string>a3c599595ecc8fb987a5499fca42520a</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104766/917721/viewer_manager-3.0.575083-windows-575083.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/108610/946003/viewer_manager-3.0.577252-windows-577252.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -3233,7 +3233,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>source_type</key>
<string>hg</string>
<key>version</key>
<string>3.0.575083</string>
<string>3.0.577252</string>
</map>
<key>vlc-bin</key>
<map>

View File

@ -272,6 +272,14 @@ public:
boost::bind(&ReadPipeImpl::tick, this, _1));
}
~ReadPipeImpl()
{
if (mConnection.connected())
{
mConnection.disconnect();
}
}
// Much of the implementation is simply connecting the abstract virtual
// methods with implementation data concealed from the base class.
virtual std::istream& get_istream() { return mStream; }

View File

@ -164,6 +164,11 @@ LLPluginProcessParent::~LLPluginProcessParent()
{ // If we are quitting, the network sockets will already have been destroyed.
killSockets();
}
if (mPolling.connected())
{
mPolling.disconnect();
}
}
/*static*/

View File

@ -209,6 +209,7 @@ bool LLUrlEntryBase::isWikiLinkCorrect(const std::string &labeled_url) const
{
return (chr == L'\u02D0') // "Modifier Letter Colon"
|| (chr == L'\uFF1A') // "Fullwidth Colon"
|| (chr == L'\u2236') // "Ratio"
|| (chr == L'\uFE55'); // "Small Colon"
},
L'\u003A'); // Colon

View File

@ -233,7 +233,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
for (it = mUrlEntry.begin(); it != mUrlEntry.end(); ++it)
{
//Skip for url entry icon if content is not trusted
if(!is_content_trusted && (mUrlEntryIcon == *it))
if((mUrlEntryIcon == *it) && ((text.find("Hand") != std::string::npos) || !is_content_trusted))
{
continue;
}

View File

@ -4232,6 +4232,10 @@ void LLWindowWin32::handleStartCompositionMessage()
void LLWindowWin32::handleCompositionMessage(const U32 indexes)
{
if (!mPreeditor)
{
return;
}
BOOL needs_update = FALSE;
LLWString result_string;
LLWString preedit_string;

View File

@ -140,7 +140,6 @@ LLAgentCamera::LLAgentCamera() :
mCameraFOVZoomFactor(0.f),
mCameraCurrentFOVZoomFactor(0.f),
mCameraFocusOffset(),
mCameraFOVDefault(DEFAULT_FIELD_OF_VIEW),
mCameraCollidePlane(),
@ -162,7 +161,6 @@ LLAgentCamera::LLAgentCamera() :
mFocusObject(NULL),
mFocusObjectDist(0.f),
mFocusObjectOffset(),
mFocusDotRadius( 0.1f ), // meters
mTrackFocusObject(TRUE),
mAtKey(0), // Either 1, 0, or -1... indicates that movement-key is pressed
@ -2643,6 +2641,11 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
gAgent.standUp(); // force stand up
gViewerWindow->getWindow()->resetBusyCount();
if (LLSelectMgr::getInstance()->getSelection()->isAttachment())
{
LLSelectMgr::getInstance()->deselectAll();
}
if (gFaceEditToolset)
{
LLToolMgr::getInstance()->setCurrentToolset(gFaceEditToolset);

View File

@ -186,7 +186,6 @@ private:
F32 mTargetCameraDistance; // Target camera offset from avatar
F32 mCameraFOVZoomFactor; // Amount of fov zoom applied to camera when zeroing in on an object
F32 mCameraCurrentFOVZoomFactor; // Interpolated fov zoom
F32 mCameraFOVDefault; // Default field of view that is basis for FOV zoom effect
LLVector4 mCameraCollidePlane; // Colliding plane for camera
F32 mCameraZoomFraction; // Mousewheel driven fraction of zoom
LLVector3 mCameraPositionAgent; // Camera position in agent coordinates
@ -201,7 +200,6 @@ private:
// Follow
//--------------------------------------------------------------------
public:
void setUsingFollowCam(bool using_follow_cam);
bool isfollowCamLocked();
private:
LLFollowCam mFollowCam; // Ventrella
@ -267,7 +265,6 @@ private:
LLPointer<LLViewerObject> mFocusObject;
F32 mFocusObjectDist;
LLVector3 mFocusObjectOffset;
F32 mFocusDotRadius; // Meters
BOOL mTrackFocusObject;
//--------------------------------------------------------------------

View File

@ -73,7 +73,16 @@ void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/)
#endif
// </FS:CR>
// <FS:Oren> FIRE-30768: SLURL's don't work in VarRegions
//return_slurl = LLSLURL(regionp->getName(), gAgent.getPositionGlobal());
//// Make sure coordinates are within current region
//LLVector3d global_pos = gAgent.getPositionGlobal();
//LLVector3d region_origin = regionp->getOriginGlobal();
//// -1 otherwise slurl will fmod 256 to 0.
//// And valid slurl range is supposed to be 0..255
//F64 max_val = REGION_WIDTH_METERS - 1;
//global_pos.mdV[VX] = llclamp(global_pos[VX], region_origin[VX], region_origin[VX] + max_val);
//global_pos.mdV[VY] = llclamp(global_pos[VY], region_origin[VY], region_origin[VY] + max_val);
//return_slurl = LLSLURL(regionp->getName(), global_pos);
return_slurl = LLSLURL(regionp->getName(), regionp->getOriginGlobal(), gAgent.getPositionGlobal());
// </FS:Oren>
}

View File

@ -803,19 +803,18 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
// we were tracking someone who went offline
deleteTrackingData();
}
// } <FS:Beq/> [FIRE-32324] least invasive change move this brace after the if. LL fix should follow sometime soon
//[FIX FIRE-3522 : SJ] Notify Online/Offline to Nearby Chat even if chat_notify isnt true
// <FS:PP> Attempt to speed up things a little
// if(chat_notify||LGGContactSets::getInstance()->notifyForFriend(agent_id)||gSavedSettings.getBOOL("OnlineOfflinetoNearbyChat"))
static LLCachedControl<bool> OnlineOfflinetoNearbyChat(gSavedSettings, "OnlineOfflinetoNearbyChat");
if(chat_notify || LGGContactSets::getInstance()->notifyForFriend(agent_id) || OnlineOfflinetoNearbyChat)
// </FS:PP>
{
// Look up the name of this agent for the notification
LLAvatarNameCache::get(agent_id,boost::bind(&on_avatar_name_cache_notify,_1, _2, online, payload));
//[FIX FIRE-3522 : SJ] Notify Online/Offline to Nearby Chat even if chat_notify isnt true
// <FS:PP> Attempt to speed up things a little
// if(chat_notify||LGGContactSets::getInstance()->notifyForFriend(agent_id)||gSavedSettings.getBOOL("OnlineOfflinetoNearbyChat"))
static LLCachedControl<bool> OnlineOfflinetoNearbyChat(gSavedSettings, "OnlineOfflinetoNearbyChat");
if(chat_notify || LGGContactSets::getInstance()->notifyForFriend(agent_id) || OnlineOfflinetoNearbyChat)
// </FS:PP>
{
// Look up the name of this agent for the notification
LLAvatarNameCache::get(agent_id,boost::bind(&on_avatar_name_cache_notify,_1, _2, online, payload));
}
}
} // <FS:Beq/> [FIRE-32324] least invasive change move this brace after the if
mModifyMask |= LLFriendObserver::ONLINE;
instance().notifyObservers();

View File

@ -79,7 +79,9 @@ static S32 cube_channel = -1;
static S32 diffuse_channel = -1;
static S32 bump_channel = -1;
#define LL_BUMPLIST_MULTITHREADED 0 // TODO -- figure out why this doesn't work
// Enabled after changing LLViewerTexture::mNeedsCreateTexture to an
// LLAtomicBool; this should work just fine, now. HB
#define LL_BUMPLIST_MULTITHREADED 1
// static

View File

@ -593,13 +593,18 @@ void LLFloaterAvatarPicker::findCoro(std::string url, LLUUID queryID, std::strin
if (status || (status == LLCore::HttpStatus(HTTP_BAD_REQUEST)))
{
LLFloaterAvatarPicker* floater =
LLFloaterReg::findTypedInstance<LLFloaterAvatarPicker>("avatar_picker", name);
if (floater)
{
result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
floater->processResponse(queryID, result);
}
result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
}
else
{
result["failure_reason"] = status.toString();
}
LLFloaterAvatarPicker* floater =
LLFloaterReg::findTypedInstance<LLFloaterAvatarPicker>("avatar_picker", name);
if (floater)
{
floater->processResponse(queryID, result);
}
}
@ -861,59 +866,67 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
{
LLScrollListCtrl* search_results = getChild<LLScrollListCtrl>("SearchResults");
LLSD agents = content["agents"];
// clear "Searching" label on first results
search_results->deleteAllItems();
// clear "Searching" label on first results
search_results->deleteAllItems();
if (content.has("failure_reason"))
{
getChild<LLScrollListCtrl>("SearchResults")->setCommentText(content["failure_reason"].asString());
getChildView("ok_btn")->setEnabled(false);
}
else
{
LLSD agents = content["agents"];
LLSD item;
LLSD::array_const_iterator it = agents.beginArray();
for ( ; it != agents.endArray(); ++it)
{
const LLSD& row = *it;
if (row["id"].asUUID() != gAgent.getID() || !mExcludeAgentFromSearchResults)
{
item["id"] = row["id"];
LLSD& columns = item["columns"];
columns[0]["column"] = "name";
columns[0]["value"] = row["display_name"];
columns[1]["column"] = "username";
columns[1]["value"] = row["username"];
search_results->addElement(item);
LLSD item;
LLSD::array_const_iterator it = agents.beginArray();
for (; it != agents.endArray(); ++it)
{
const LLSD& row = *it;
if (row["id"].asUUID() != gAgent.getID() || !mExcludeAgentFromSearchResults)
{
item["id"] = row["id"];
LLSD& columns = item["columns"];
columns[0]["column"] = "name";
columns[0]["value"] = row["display_name"];
columns[1]["column"] = "username";
columns[1]["value"] = row["username"];
search_results->addElement(item);
// add the avatar name to our list
LLAvatarName avatar_name;
avatar_name.fromLLSD(row);
sAvatarNameMap[row["id"].asUUID()] = avatar_name;
}
}
// add the avatar name to our list
LLAvatarName avatar_name;
avatar_name.fromLLSD(row);
sAvatarNameMap[row["id"].asUUID()] = avatar_name;
}
}
if (search_results->isEmpty())
{
std::string name = "'" + getChild<LLUICtrl>("Edit")->getValue().asString() + "'";
LLSD item;
item["id"] = LLUUID::null;
item["columns"][0]["column"] = "name";
item["columns"][0]["value"] = name;
item["columns"][1]["column"] = "username";
item["columns"][1]["value"] = getString("not_found_text");
search_results->addElement(item);
search_results->setEnabled(false);
getChildView("ok_btn")->setEnabled(false);
}
else
{
getChildView("ok_btn")->setEnabled(true);
search_results->setEnabled(true);
search_results->sortByColumnIndex(1, TRUE);
std::string text = getChild<LLUICtrl>("Edit")->getValue().asString();
if (!search_results->selectItemByLabel(text, TRUE, 1))
{
search_results->selectFirstItem();
}
onList();
search_results->setFocus(TRUE);
}
if (search_results->isEmpty())
{
std::string name = "'" + getChild<LLUICtrl>("Edit")->getValue().asString() + "'";
LLSD item;
item["id"] = LLUUID::null;
item["columns"][0]["column"] = "name";
item["columns"][0]["value"] = name;
item["columns"][1]["column"] = "username";
item["columns"][1]["value"] = getString("not_found_text");
search_results->addElement(item);
search_results->setEnabled(false);
getChildView("ok_btn")->setEnabled(false);
}
else
{
getChildView("ok_btn")->setEnabled(true);
search_results->setEnabled(true);
search_results->sortByColumnIndex(1, TRUE);
std::string text = getChild<LLUICtrl>("Edit")->getValue().asString();
if (!search_results->selectItemByLabel(text, TRUE, 1))
{
search_results->selectFirstItem();
}
onList();
search_results->setFocus(TRUE);
}
}
}
}

View File

@ -91,6 +91,8 @@ BOOL LLFloaterAvatarRenderSettings::postBuild()
LLFloater::postBuild();
mAvatarSettingsList = getChild<LLNameListCtrl>("render_settings_list");
mAvatarSettingsList->setRightMouseDownCallback(boost::bind(&LLFloaterAvatarRenderSettings::onAvatarListRightClick, this, _1, _2, _3));
mAvatarSettingsList->setAlternateSort();
getChild<LLFilterEditor>("people_filter_input")->setCommitCallback(boost::bind(&LLFloaterAvatarRenderSettings::onFilterEdit, this, _2));
return TRUE;
}
@ -134,13 +136,37 @@ void LLFloaterAvatarRenderSettings::updateList()
{
item_params.value = iter->first;
LLAvatarNameCache::get(iter->first, &av_name);
item_params.columns.add().value(av_name.getCompleteName()).column("name");
std::string setting = getString(iter->second == 1 ? "av_never_render" : "av_always_render");
item_params.columns.add().value(setting).column("setting");
mAvatarSettingsList->addNameItemRow(item_params);
if(!isHiddenRow(av_name.getCompleteName()))
{
item_params.columns.add().value(av_name.getCompleteName()).column("name");
std::string setting = getString(iter->second == 1 ? "av_never_render" : "av_always_render");
item_params.columns.add().value(setting).column("setting");
S32 mute_date = LLRenderMuteList::getInstance()->getVisualMuteDate(iter->first);
item_params.columns.add().value(createTimestamp(mute_date)).column("timestamp").alt_value(std::to_string(mute_date));
mAvatarSettingsList->addNameItemRow(item_params);
}
}
}
void LLFloaterAvatarRenderSettings::onFilterEdit(const std::string& search_string)
{
std::string filter_upper = search_string;
LLStringUtil::toUpper(filter_upper);
if (mNameFilter != filter_upper)
{
mNameFilter = filter_upper;
mNeedsUpdate = true;
}
}
bool LLFloaterAvatarRenderSettings::isHiddenRow(const std::string& av_name)
{
if (mNameFilter.empty()) return false;
std::string upper_name = av_name;
LLStringUtil::toUpper(upper_name);
return std::string::npos == upper_name.find(mNameFilter);
}
static LLVOAvatar* find_avatar(const LLUUID& id)
{
LLViewerObject *obj = gObjectList.findObject(id);
@ -191,10 +217,6 @@ bool LLFloaterAvatarRenderSettings::isActionChecked(const LLSD& userdata, const
{
return (visual_setting == S32(LLVOAvatar::AV_RENDER_NORMALLY));
}
else if ("non_default" == command_name)
{
return (visual_setting != S32(LLVOAvatar::AV_RENDER_NORMALLY));
}
else if ("never" == command_name)
{
return (visual_setting == S32(LLVOAvatar::AV_DO_NOT_RENDER));
@ -286,4 +308,4 @@ std::string LLFloaterAvatarRenderSettings::createTimestamp(S32 datetime)
LLStringUtil::format (timeStr, substitution);
return timeStr;
}
#endif
#endif

View File

@ -47,6 +47,7 @@ public:
virtual ~LLFloaterDisplayName() { }
/*virtual*/ BOOL postBuild();
void onSave();
void onReset();
void onCancel();
/*virtual*/ void onOpen(const LLSD& key);
@ -101,6 +102,7 @@ void LLFloaterDisplayName::onOpen(const LLSD& key)
BOOL LLFloaterDisplayName::postBuild()
{
getChild<LLUICtrl>("reset_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onReset, this));
getChild<LLUICtrl>("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onCancel, this));
getChild<LLUICtrl>("save_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onSave, this));
@ -156,6 +158,20 @@ void LLFloaterDisplayName::onCancel()
setVisible(false);
}
void LLFloaterDisplayName::onReset()
{
LLAvatarName av_name;
if (!LLAvatarNameCache::get(gAgent.getID(), &av_name))
{
return;
}
getChild<LLUICtrl>("display_name_editor")->setValue(av_name.getCompleteName());
getChild<LLUICtrl>("display_name_confirm")->clear();
getChild<LLUICtrl>("display_name_confirm")->setFocus(TRUE);
}
void LLFloaterDisplayName::onSave()
{
std::string display_name_utf8 = getChild<LLUICtrl>("display_name_editor")->getValue().asString();

View File

@ -56,7 +56,6 @@ const F32 HORIZONTAL_PADDING = 16.f;
const F32 VERTICAL_PADDING = 12.f;
const F32 LINE_PADDING = 3.f; // aka "leading"
const F32 BUFFER_SIZE = 2.f;
const F32 HUD_TEXT_MAX_WIDTH = 190.f;
const S32 NUM_OVERLAP_ITERATIONS = 10;
const F32 POSITION_DAMPING_TC = 0.2f;
const F32 MAX_STABLE_CAMERA_VELOCITY = 0.1f;
@ -67,6 +66,8 @@ const F32 LOD_2_SCREEN_COVERAGE = 0.40f;
std::set<LLPointer<LLHUDNameTag> > LLHUDNameTag::sTextObjects;
std::vector<LLPointer<LLHUDNameTag> > LLHUDNameTag::sVisibleTextObjects;
BOOL LLHUDNameTag::sDisplayText = TRUE ;
const F32 LLHUDNameTag::NAMETAG_MAX_WIDTH = 298.f;
const F32 LLHUDNameTag::HUD_TEXT_MAX_WIDTH = 190.f;
bool llhudnametag_further_away::operator()(const LLPointer<LLHUDNameTag>& lhs, const LLPointer<LLHUDNameTag>& rhs) const
{
@ -424,7 +425,8 @@ void LLHUDNameTag::addLine(const std::string &text_utf8,
const LLColor4& color,
const LLFontGL::StyleFlags style,
const LLFontGL* font,
const bool use_ellipses)
const bool use_ellipses,
F32 max_pixels)
{
LLWString wline = utf8str_to_wstring(text_utf8);
if (!wline.empty())
@ -441,7 +443,7 @@ void LLHUDNameTag::addLine(const std::string &text_utf8,
tokenizer tokens(wline, sep);
tokenizer::iterator iter = tokens.begin();
const F32 max_pixels = HUD_TEXT_MAX_WIDTH;
max_pixels = llmin(max_pixels, NAMETAG_MAX_WIDTH);
while (iter != tokens.end())
{
U32 line_length = 0;
@ -498,7 +500,7 @@ void LLHUDNameTag::setLabel(const std::string &label_utf8)
addLabel(label_utf8);
}
void LLHUDNameTag::addLabel(const std::string& label_utf8)
void LLHUDNameTag::addLabel(const std::string& label_utf8, F32 max_pixels)
{
LLWString wstr = utf8string_to_wstring(label_utf8);
if (!wstr.empty())
@ -512,13 +514,15 @@ void LLHUDNameTag::addLabel(const std::string& label_utf8)
tokenizer tokens(wstr, sep);
tokenizer::iterator iter = tokens.begin();
max_pixels = llmin(max_pixels, NAMETAG_MAX_WIDTH);
while (iter != tokens.end())
{
U32 line_length = 0;
do
{
S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(),
HUD_TEXT_MAX_WIDTH, wstr.length(), LLFontGL::WORD_BOUNDARY_IF_POSSIBLE);
max_pixels, wstr.length(), LLFontGL::WORD_BOUNDARY_IF_POSSIBLE);
LLHUDTextSegment segment(iter->substr(line_length, segment_length), LLFontGL::NORMAL, mColor, mFontp);
mLabelSegments.push_back(segment);
line_length += segment_length;
@ -705,7 +709,7 @@ void LLHUDNameTag::updateSize()
const LLFontGL* fontp = iter->mFont;
height += fontp->getLineHeight();
height += LINE_PADDING;
width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH));
width = llmax(width, llmin(iter->getWidth(fontp), NAMETAG_MAX_WIDTH));
++iter;
}
@ -719,7 +723,7 @@ void LLHUDNameTag::updateSize()
while (iter != mLabelSegments.end())
{
height += mFontp->getLineHeight();
width = llmax(width, llmin(iter->getWidth(mFontp), HUD_TEXT_MAX_WIDTH));
width = llmax(width, llmin(iter->getWidth(mFontp), NAMETAG_MAX_WIDTH));
++iter;
}

View File

@ -85,6 +85,9 @@ public:
ALIGN_VERT_CENTER
} EVertAlignment;
static const F32 NAMETAG_MAX_WIDTH; // 298px, made to fit 31 M's
static const F32 HUD_TEXT_MAX_WIDTH; // 190px
public:
// Set entire string, eliminating existing lines
void setString(const std::string& text_utf8);
@ -92,11 +95,17 @@ public:
void clearString();
// Add text a line at a time, allowing custom formatting
void addLine(const std::string &text_utf8, const LLColor4& color, const LLFontGL::StyleFlags style = LLFontGL::NORMAL, const LLFontGL* font = NULL, const bool use_ellipses = false);
void addLine(
const std::string &text_utf8,
const LLColor4& color,
const LLFontGL::StyleFlags style = LLFontGL::NORMAL,
const LLFontGL* font = NULL,
const bool use_ellipses = false,
F32 max_pixels = HUD_TEXT_MAX_WIDTH);
// For bubble chat, set the part above the chat text
void setLabel(const std::string& label_utf8);
void addLabel(const std::string& label_utf8);
void addLabel(const std::string& label_utf8, F32 max_pixels = HUD_TEXT_MAX_WIDTH);
// Sets the default font for lines with no font specified
void setFont(const LLFontGL* font);

View File

@ -41,6 +41,7 @@
#include "llstring.h"
#include "lltextutil.h"
#include "lltrans.h"
#include "lltranslate.h"
#include "lluictrlfactory.h"
#include "llfloaterimsessiontab.h"
#include "llagent.h"
@ -645,6 +646,31 @@ void chatterBoxInvitationCoro(std::string url, LLUUID sessionId, LLIMMgr::EInvit
}
void translateSuccess(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text,
bool log2file, std::string originalMsg, std::string expectLang, std::string translation, const std::string detected_language)
{
std::string message_txt(utf8_text);
// filter out non-interesting responses
if (!translation.empty()
&& ((detected_language.empty()) || (expectLang != detected_language))
&& (LLStringUtil::compareInsensitive(translation, originalMsg) != 0))
{
message_txt += " (" + LLTranslate::removeNoTranslateTags(translation) + ")";
}
LLIMModel::getInstance()->processAddingMessage(session_id, from, from_id, message_txt, log2file);
}
void translateFailure(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text,
bool log2file, int status, const std::string err_msg)
{
std::string message_txt(utf8_text);
std::string msg = LLTrans::getString("TranslationFailed", LLSD().with("[REASON]", err_msg));
LLStringUtil::replaceString(msg, "\n", " "); // we want one-line error messages
message_txt += " (" + msg + ")";
LLIMModel::getInstance()->processAddingMessage(session_id, from, from_id, message_txt, log2file);
}
LLIMModel::LLIMModel()
{
@ -1392,44 +1418,66 @@ bool LLIMModel::logToFile(const std::string& file_name, const std::string& from,
}
}
bool LLIMModel::proccessOnlineOfflineNotification(
void LLIMModel::proccessOnlineOfflineNotification(
const LLUUID& session_id,
const std::string& utf8_text)
{
// Add system message to history
return addMessage(session_id, SYSTEM_FROM, LLUUID::null, utf8_text);
addMessage(session_id, SYSTEM_FROM, LLUUID::null, utf8_text);
}
// <FS:Ansariel> Added is_announcement parameter
//bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id,
// const std::string& utf8_text, bool log2file, bool is_region_msg) {
bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id,
const std::string& utf8_text, bool log2file, bool is_region_msg, bool is_announcement /* = false */, bool keyword_alert_performed /* = false */) {
//void LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id,
// const std::string& utf8_text, bool log2file /* = true */, bool is_region_msg /* = false */) {
void LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id,
const std::string& utf8_text, bool log2file /* = true */, bool is_region_msg /* = false */, bool is_announcement /* = false */, bool keyword_alert_performed /* = false */) {
LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file, is_region_msg, is_announcement);
if (!session) return false;
//if (gSavedSettings.getBOOL("TranslateChat") && (from != SYSTEM_FROM))
if (gSavedSettings.getBOOL("TranslateChat") && (from != SYSTEM_FROM) && !is_announcement && !keyword_alert_performed)
{
const std::string from_lang = ""; // leave empty to trigger autodetect
const std::string to_lang = LLTranslate::getTranslateLanguage();
//good place to add some1 to recent list
//other places may be called from message history.
if( !from_id.isNull() &&
( session->isP2PSessionType() || session->isAdHocSessionType() ) )
LLRecentPeople::instance().add(from_id);
LLTranslate::translateMessage(from_lang, to_lang, utf8_text,
boost::bind(&translateSuccess, session_id, from, from_id, utf8_text, log2file, utf8_text, from_lang, _1, _2),
boost::bind(&translateFailure, session_id, from, from_id, utf8_text, log2file, _1, _2));
}
else
{
processAddingMessage(session_id, from, from_id, utf8_text, log2file, is_region_msg, is_announcement, keyword_alert_performed);
}
}
// notify listeners
LLSD arg;
arg["session_id"] = session_id;
arg["num_unread"] = session->mNumUnread;
arg["participant_unread"] = session->mParticipantUnreadMessageCount;
arg["message"] = utf8_text;
arg["from"] = from;
arg["from_id"] = from_id;
arg["time"] = LLLogChat::timestamp(false);
arg["session_type"] = session->mSessionType;
arg["is_announcement"] = is_announcement; // <FS:Ansariel> Indicator if it's an announcement
arg["keyword_alert_performed"] = keyword_alert_performed; // <FS:Ansariel> Pass info if keyword alert has been performed
mNewMsgSignal(arg);
// <FS:Ansariel> Added is_announcement parameter
//void LLIMModel::processAddingMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id,
// const std::string& utf8_text, bool log2file /* = true */, bool is_region_msg /* = false */)
void LLIMModel::processAddingMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id,
const std::string& utf8_text, bool log2file /* = true */, bool is_region_msg /* = false */, bool is_announcement /* = false */, bool keyword_alert_performed /* = false */)
{
LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file, is_region_msg, is_announcement);
if (!session) return;
return true;
//good place to add some1 to recent list
//other places may be called from message history.
if( !from_id.isNull() &&
( session->isP2PSessionType() || session->isAdHocSessionType() ) )
LLRecentPeople::instance().add(from_id);
// notify listeners
LLSD arg;
arg["session_id"] = session_id;
arg["num_unread"] = session->mNumUnread;
arg["participant_unread"] = session->mParticipantUnreadMessageCount;
arg["message"] = utf8_text;
arg["from"] = from;
arg["from_id"] = from_id;
arg["time"] = LLLogChat::timestamp(false);
arg["session_type"] = session->mSessionType;
arg["is_region_msg"] = is_region_msg;
arg["is_announcement"] = is_announcement; // <FS:Ansariel> Indicator if it's an announcement
arg["keyword_alert_performed"] = keyword_alert_performed; // <FS:Ansariel> Pass info if keyword alert has been performed
mNewMsgSignal(arg);
}
// <FS:Ansariel> Added is_announcement parameter

View File

@ -240,8 +240,10 @@ public:
* It sends new message signal for each added message.
*/
// <FS:Ansariel> Added is_announcement parameter
//bool addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true, bool is_region_msg = false);
bool addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true, bool is_region_msg = false, bool is_announcement = false, bool keyword_alert_performed = false);
//void addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true, bool is_region_msg = false);
//void processAddingMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text, bool log2file = true, bool is_region_msg = false);
void addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true, bool is_region_msg = false, bool is_announcement = false, bool keyword_alert_performed = false);
void processAddingMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text, bool log2file = true, bool is_region_msg = false, bool is_announcement = false, bool keyword_alert_performed = false);
/**
* Similar to addMessage(...) above but won't send a signal about a new message added
@ -255,7 +257,7 @@ public:
/**
* Add a system message to an IM Model
*/
bool proccessOnlineOfflineNotification(const LLUUID& session_id, const std::string& utf8_text);
void proccessOnlineOfflineNotification(const LLUUID& session_id, const std::string& utf8_text);
/**
* Get a session's name.

View File

@ -545,7 +545,11 @@ BOOL get_is_item_worn(const LLUUID& id)
const LLViewerInventoryItem* item = gInventory.getItem(id);
if (!item)
return FALSE;
if (item->getIsLinkType() && !gInventory.getItem(item->getLinkedUUID()))
{
return FALSE;
}
// Consider the item as worn if it has links in COF.
// [SL:KB] - The code below causes problems across the board so it really just needs to go
// if (LLAppearanceMgr::instance().isLinkedInCOF(id))
@ -906,7 +910,7 @@ void show_item_original(const LLUUID& item_uuid)
//LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
//if (main_inventory)
//{
// main_inventory->resetFilters();
// main_inventory->resetAllItemsFilters();
//}
// </FS:Ansariel>
reset_inventory_filter();
@ -915,6 +919,7 @@ void show_item_original(const LLUUID& item_uuid)
{
LLFloaterReg::toggleInstanceOrBringToFront("inventory");
}
sidepanel_inventory->showInventoryPanel();
const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
// <FS:Ansariel> Optional hiding of Received Items folder aka Inbox
@ -2990,7 +2995,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
}
else if ("ungroup_folder_items" == action)
{
if (selected_uuid_set.size() == 1)
if (ids.size() == 1)
{
LLInventoryCategory* inv_cat = gInventory.getCategory(*ids.begin());
if (!inv_cat || LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType()))

View File

@ -1814,6 +1814,9 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo
LL_WARNS(LOG_INV) << "Deleting non-existent object [ id: " << id << " ] " << LL_ENDL;
return;
}
//collect the links before removing the item from mItemMap
LLInventoryModel::item_array_t links = collectLinksTo(id);
LL_DEBUGS(LOG_INV) << "Deleting inventory object " << id << LL_ENDL;
mLastItem = NULL;
@ -1872,7 +1875,7 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo
obj = NULL; // delete obj
if (fix_broken_links && !is_link_type)
{
updateLinkedObjectsFromPurge(id);
rebuildLinkItems(links);
}
if (do_notify_observers)
{
@ -1880,26 +1883,25 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo
}
}
void LLInventoryModel::updateLinkedObjectsFromPurge(const LLUUID &baseobj_id)
void LLInventoryModel::rebuildLinkItems(LLInventoryModel::item_array_t& items)
{
LLInventoryModel::item_array_t item_array = collectLinksTo(baseobj_id);
// REBUILD is expensive, so clear the current change list first else
// everything else on the changelist will also get rebuilt.
if (item_array.size() > 0)
{
notifyObservers();
for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin();
iter != item_array.end();
iter++)
{
const LLViewerInventoryItem *linked_item = (*iter);
const LLUUID &item_id = linked_item->getUUID();
if (item_id == baseobj_id) continue;
addChangedMask(LLInventoryObserver::REBUILD, item_id);
}
notifyObservers();
}
// REBUILD is expensive, so clear the current change list first else
// everything else on the changelist will also get rebuilt.
if (items.size() > 0)
{
notifyObservers();
for (LLInventoryModel::item_array_t::const_iterator iter = items.begin();
iter != items.end();
iter++)
{
const LLViewerInventoryItem *linked_item = (*iter);
if (linked_item)
{
addChangedMask(LLInventoryObserver::REBUILD, linked_item->getUUID());
}
}
notifyObservers();
}
}
// Add/remove an observer. If the observer is destroyed, be sure to

View File

@ -495,7 +495,7 @@ public:
void checkTrashOverflow();
protected:
void updateLinkedObjectsFromPurge(const LLUUID& baseobj_id);
void rebuildLinkItems(LLInventoryModel::item_array_t& items);
//--------------------------------------------------------------------
// Reorder

View File

@ -527,7 +527,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
//If there are items in mFetchQueue, we want to check the time since the last bulkFetch was
//sent. If it exceeds our retry time, go ahead and fire off another batch.
LLViewerRegion * region(gAgent.getRegion());
if (! region || gDisconnected)
if (! region || gDisconnected || LLApp::isExiting())
{
return;
}

View File

@ -1776,6 +1776,7 @@ void LLInventoryPanel::purgeSelectedItems()
if (inventory_selected.empty()) return;
LLSD args;
S32 count = inventory_selected.size();
std::vector<LLUUID> selected_items;
for (std::set<LLFolderViewItem*>::const_iterator it = inventory_selected.begin(), end_it = inventory_selected.end();
it != end_it;
++it)
@ -1785,27 +1786,23 @@ void LLInventoryPanel::purgeSelectedItems()
LLInventoryModel::item_array_t items;
gInventory.collectDescendents(item_id, cats, items, LLInventoryModel::INCLUDE_TRASH);
count += items.size() + cats.size();
selected_items.push_back(item_id);
}
args["COUNT"] = count;
LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(&LLInventoryPanel::callbackPurgeSelectedItems, this, _1, _2));
LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(callbackPurgeSelectedItems, _1, _2, selected_items));
}
void LLInventoryPanel::callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response)
// static
void LLInventoryPanel::callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response, const std::vector<LLUUID> inventory_selected)
{
if (!mFolderRoot.get()) return;
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
const std::set<LLFolderViewItem*> inventory_selected = mFolderRoot.get()->getSelectionList();
if (inventory_selected.empty()) return;
std::set<LLFolderViewItem*>::const_iterator it = inventory_selected.begin();
const std::set<LLFolderViewItem*>::const_iterator it_end = inventory_selected.end();
for (; it != it_end; ++it)
for (auto it : inventory_selected)
{
LLUUID item_id = static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID();
remove_inventory_object(item_id, NULL);
remove_inventory_object(it, NULL);
}
}
}

View File

@ -276,7 +276,7 @@ public:
// Clean up stuff when the folder root gets deleted
void clearFolderRoot();
void callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response);
static void callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response, const std::vector<LLUUID> inventory_selected);
protected:
void openStartFolderOrMyInventory(); // open the first level of inventory

View File

@ -1105,6 +1105,18 @@ void LLPanelLogin::onRememberPasswordCheck(void*)
if (sInstance)
{
gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE);
LLPointer<LLCredential> cred;
bool remember_user, remember_password;
getFields(cred, remember_user, remember_password);
std::string grid(LLGridManager::getInstance()->getGridId());
std::string user_id(cred->userID());
if (!remember_password)
{
gSecAPIHandler->removeFromProtectedMap("mfa_hash", grid, user_id);
gSecAPIHandler->syncProtectedMap();
}
}
}

View File

@ -541,6 +541,18 @@ void LLPanelMainInventory::resetFilters()
setFilterTextFromFilter();
}
void LLPanelMainInventory::resetAllItemsFilters()
{
LLFloaterInventoryFinder *finder = getFinder();
getAllItemsPanel()->getFilter().resetDefault();
if (finder)
{
finder->updateElementsFromFilter();
}
setFilterTextFromFilter();
}
void LLPanelMainInventory::onSelectSearchType()
{
std::string new_type = mSearchTypeCombo->getValue();

View File

@ -103,6 +103,7 @@ public:
void toggleFindOptions();
void resetFilters();
void resetAllItemsFilters();
// <FS:Zi> Filter dropdown
void onFilterTypeSelected(const std::string& filter_type_name);

View File

@ -39,6 +39,7 @@
#include "llagent.h"
#include "llviewerwindow.h"
#include "llviewermedia.h"
#include "llvovolume.h"
#include "llsdutil.h"
#include "llselectmgr.h"
#include "llbutton.h"
@ -452,10 +453,17 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_
{
viewer_media_t media_impl =
LLViewerMedia::getInstance()->getMediaImplFromTextureID(object->getTE(face)->getMediaData()->getMediaID());
if(media_impl)
{
if (media_impl)
{
media_impl->setPriority(LLPluginClassMedia::PRIORITY_NORMAL);
media_impl->navigateHome();
if (!only_if_current_is_empty)
{
LLSD media_data;
media_data[LLMediaEntry::CURRENT_URL_KEY] = std::string();
object->getTE(face)->mergeIntoMediaData(media_data);
}
return true;
}
}
@ -471,6 +479,23 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_
LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection();
selected_objects->getSelectedTEValue( &functor_navigate_media, all_face_media_navigated );
if (all_face_media_navigated)
{
struct functor_sync_to_server : public LLSelectedObjectFunctor
{
virtual bool apply(LLViewerObject* object)
{
LLVOVolume *volume = dynamic_cast<LLVOVolume*>(object);
if (volume)
{
volume->sendMediaDataUpdate();
}
return true;
}
} sendfunc;
selected_objects->applyToObjects(&sendfunc);
}
// Note: we don't update the 'current URL' field until the media data itself changes
return all_face_media_navigated;

View File

@ -76,6 +76,7 @@ LLToolCamera::LLToolCamera()
mOutsideSlopX(FALSE),
mOutsideSlopY(FALSE),
mValidClickPoint(FALSE),
mClickPickPending(false),
mValidSelection(FALSE),
mMouseSteering(FALSE),
mMouseUpX(0),
@ -128,6 +129,11 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
mValidClickPoint = FALSE;
// Sometimes Windows issues down and up events near simultaneously
// without giving async pick a chance to trigged
// Ex: mouse from numlock emulation
mClickPickPending = true;
// If mouse capture gets ripped away, claim we moused up
// at the point we moused down. JC
mMouseUpX = x;
@ -143,13 +149,15 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
{
if (!LLToolCamera::getInstance()->hasMouseCapture())
LLToolCamera* camera = LLToolCamera::getInstance();
if (!camera->mClickPickPending)
{
return;
}
camera->mClickPickPending = false;
LLToolCamera::getInstance()->mMouseDownX = pick_info.mMousePt.mX;
LLToolCamera::getInstance()->mMouseDownY = pick_info.mMousePt.mY;
camera->mMouseDownX = pick_info.mMousePt.mX;
camera->mMouseDownY = pick_info.mMousePt.mY;
gViewerWindow->moveCursorToCenter();
@ -159,7 +167,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
// Check for hit the sky, or some other invalid point
if (!hit_obj && pick_info.mPosGlobal.isExactlyZero())
{
LLToolCamera::getInstance()->mValidClickPoint = FALSE;
camera->mValidClickPoint = FALSE;
return;
}
@ -169,7 +177,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
if (!selection->getObjectCount() || selection->getSelectType() != SELECT_TYPE_HUD)
{
LLToolCamera::getInstance()->mValidClickPoint = FALSE;
camera->mValidClickPoint = FALSE;
return;
}
}
@ -193,7 +201,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
if( !good_customize_avatar_hit )
{
LLToolCamera::getInstance()->mValidClickPoint = FALSE;
camera->mValidClickPoint = FALSE;
return;
}
@ -244,7 +252,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
}
LLToolCamera::getInstance()->mValidClickPoint = TRUE;
camera->mValidClickPoint = TRUE;
if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() )
{
@ -291,32 +299,36 @@ BOOL LLToolCamera::handleMouseUp(S32 x, S32 y, MASK mask)
if (hasMouseCapture())
{
if (mValidClickPoint)
{
if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() )
{
LLCoordGL mouse_pos;
LLVector3 focus_pos = gAgent.getPosAgentFromGlobal(gAgentCamera.getFocusGlobal());
BOOL success = LLViewerCamera::getInstance()->projectPosAgentToScreen(focus_pos, mouse_pos);
if (success)
{
LLUI::getInstance()->setMousePositionScreen(mouse_pos.mX, mouse_pos.mY);
}
}
else if (mMouseSteering)
{
LLUI::getInstance()->setMousePositionScreen(mMouseDownX, mMouseDownY);
}
else
{
gViewerWindow->moveCursorToCenter();
}
}
else
{
// not a valid zoomable object
LLUI::getInstance()->setMousePositionScreen(mMouseDownX, mMouseDownY);
}
// Do not move camera if we haven't gotten a pick
if (!mClickPickPending)
{
if (mValidClickPoint)
{
if (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode())
{
LLCoordGL mouse_pos;
LLVector3 focus_pos = gAgent.getPosAgentFromGlobal(gAgentCamera.getFocusGlobal());
BOOL success = LLViewerCamera::getInstance()->projectPosAgentToScreen(focus_pos, mouse_pos);
if (success)
{
LLUI::getInstance()->setMousePositionScreen(mouse_pos.mX, mouse_pos.mY);
}
}
else if (mMouseSteering)
{
LLUI::getInstance()->setMousePositionScreen(mMouseDownX, mMouseDownY);
}
else
{
gViewerWindow->moveCursorToCenter();
}
}
else
{
// not a valid zoomable object
LLUI::getInstance()->setMousePositionScreen(mMouseDownX, mMouseDownY);
}
}
// calls releaseMouse() internally
setMouseCapture(FALSE);

View File

@ -67,6 +67,7 @@ protected:
BOOL mOutsideSlopX;
BOOL mOutsideSlopY;
BOOL mValidClickPoint;
bool mClickPickPending;
BOOL mValidSelection;
BOOL mMouseSteering;
S32 mMouseUpX; // needed for releaseMouse()

View File

@ -733,7 +733,7 @@ LLUUID LLBufferedAssetUploadInfo::finishUpload(LLSD &result)
LLScriptAssetUpload::LLScriptAssetUpload(LLUUID itemId, std::string buffer, invnUploadFinish_f finish):
LLBufferedAssetUploadInfo(itemId, LLAssetType::AT_LSL_TEXT, buffer, finish),
mExerienceId(),
mTargetType(LSL2),
mTargetType(MONO),
mIsRunning(false)
{
}
@ -754,7 +754,7 @@ LLSD LLScriptAssetUpload::generatePostBody()
if (getTaskId().isNull())
{
body["item_id"] = getItemId();
body["target"] = "lsl2";
body["target"] = "mono";
}
else
{

View File

@ -904,7 +904,10 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent)
{
virtual bool apply(LLViewerObject* objectp)
{
objectp->boostTexturePriority();
if (objectp)
{
objectp->boostTexturePriority();
}
return true;
}
} func;

View File

@ -515,6 +515,7 @@ void send_viewer_stats(bool include_preferences)
system["cpu_sse"] = gSysCPU.getSSEVersions();
system["address_size"] = ADDRESS_SIZE;
system["os_bitness"] = LLOSInfo::instance().getOSBitness();
system["hardware_concurrency"] = (LLSD::Integer) std::thread::hardware_concurrency();
unsigned char MACAddress[MAC_ADDRESS_BYTES];
LLUUID::getNodeID(MACAddress);
std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x",

View File

@ -1191,7 +1191,7 @@ void LLViewerFetchedTexture::init(bool firstinit)
mLoadedCallbackDesiredDiscardLevel = S8_MAX;
mPauseLoadedCallBacks = FALSE;
mNeedsCreateTexture = FALSE;
mNeedsCreateTexture = false;
mIsRawImageValid = FALSE;
mRawDiscardLevel = INVALID_DISCARD_LEVEL;
@ -1478,12 +1478,12 @@ void LLViewerFetchedTexture::addToCreateTexture()
{
//just update some variables, not to create a real GL texture.
createGLTexture(mRawDiscardLevel, mRawImage, 0, FALSE);
mNeedsCreateTexture = FALSE;
mNeedsCreateTexture = false;
destroyRawImage();
}
else if(!force_update && getDiscardLevel() > -1 && getDiscardLevel() <= mRawDiscardLevel)
{
mNeedsCreateTexture = FALSE;
mNeedsCreateTexture = false;
destroyRawImage();
}
else
@ -1519,7 +1519,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
mRawDiscardLevel += i;
if(mRawDiscardLevel >= getDiscardLevel() && getDiscardLevel() > 0)
{
mNeedsCreateTexture = FALSE;
mNeedsCreateTexture = false;
destroyRawImage();
return;
}
@ -1551,7 +1551,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/)
destroyRawImage();
return FALSE;
}
mNeedsCreateTexture = FALSE;
mNeedsCreateTexture = false;
if (mRawImage.isNull())
{
@ -1723,14 +1723,14 @@ void LLViewerFetchedTexture::postCreateTexture()
destroyRawImage();
}
mNeedsCreateTexture = FALSE;
mNeedsCreateTexture = false;
}
void LLViewerFetchedTexture::scheduleCreateTexture()
{
if (!mNeedsCreateTexture)
{
mNeedsCreateTexture = TRUE;
mNeedsCreateTexture = true;
if (preCreateTexture())
{
#if LL_IMAGEGL_THREAD_CHECK
@ -1744,7 +1744,7 @@ void LLViewerFetchedTexture::scheduleCreateTexture()
memcpy(data_copy, data, size);
}
#endif
mNeedsCreateTexture = TRUE;
mNeedsCreateTexture = true;
auto mainq = LLImageGLThread::sEnabled ? mMainQueue.lock() : nullptr;
if (mainq)
{

View File

@ -27,6 +27,7 @@
#ifndef LL_LLVIEWERTEXTURE_H
#define LL_LLVIEWERTEXTURE_H
#include "llatomic.h"
#include "llgltexture.h"
#include "lltimer.h"
#include "llframetimer.h"
@ -571,7 +572,9 @@ protected:
LLFrameTimer mStopFetchingTimer; // Time since mDecodePriority == 0.f.
BOOL mInImageList; // TRUE if image is in list (in which case don't reset priority!)
BOOL mNeedsCreateTexture;
// This needs to be atomic, since it is written both in the main thread
// and in the GL image worker thread... HB
LLAtomicBool mNeedsCreateTexture;
BOOL mForSculpt ; //a flag if the texture is used as sculpt data.
BOOL mIsFetched ; //is loaded from remote or from cache, not generated locally.

View File

@ -4063,14 +4063,15 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
void LLVOAvatar::addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font, const bool use_ellipses, bool is_name /* = false */)
// </FS:Ansariel>
{
// extra width (NAMETAG_MAX_WIDTH) is for names only, not for chat
llassert(mNameText);
if (mVisibleChat || mVisibleTyping)
{
mNameText->addLabel(line);
mNameText->addLabel(line, LLHUDNameTag::NAMETAG_MAX_WIDTH);
}
else
{
mNameText->addLine(line, color, (LLFontGL::StyleFlags)style, font, use_ellipses);
mNameText->addLine(line, color, (LLFontGL::StyleFlags)style, font, use_ellipses, LLHUDNameTag::NAMETAG_MAX_WIDTH);
}
// <FS:Ansariel> Fix nametag not properly updating when display name arrives
//mNameIsSet |= !line.empty();

View File

@ -1930,20 +1930,17 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
light_set_t::iterator iter = gPipeline.mNearbyLights.begin();
while (iter != gPipeline.mNearbyLights.end())
{
if (iter->drawable->getVObj()->isAttachment() && iter->drawable->getVObj()->getAvatar() == muted_avatar)
{
gPipeline.mLights.erase(iter->drawable);
iter = gPipeline.mNearbyLights.erase(iter);
}
else
{
iter++;
}
}
for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin();
iter != gPipeline.mNearbyLights.end(); iter++)
{
const LLViewerObject *vobj = iter->drawable->getVObj();
if (vobj && vobj->getAvatar()
&& vobj->isAttachment() && vobj->getAvatar() == muted_avatar)
{
gPipeline.mLights.erase(iter->drawable);
gPipeline.mNearbyLights.erase(iter);
}
}
}
U32 LLPipeline::addObject(LLViewerObject *vobj)

View File

@ -56,7 +56,7 @@
max_length_chars="31"
height="20"
top_pad="0"
left="50" />
left_delta="0" />
<text
top_pad="8"
left="25"
@ -72,23 +72,33 @@
max_length_chars="31"
height="20"
top_pad="0"
left="50" />
left_delta="0" />
<button
label="Reset"
layout="topleft"
font="SansSerif"
width="120"
height="23"
top_pad="10"
left_delta="0"
name="reset_btn"
tool_tip="Use Username as a Display Name" />
<button
height="23"
label="Save"
layout="topleft"
font="SansSerif"
left="35"
left_pad="35"
name="save_btn"
tool_tip="Save your new Display Name"
top_pad="10"
top_delta="0"
width="120" />
<button
height="23"
label="Cancel"
font="SansSerif"
layout="topleft"
left_pad="125"
left_pad="5"
name="cancel_btn"
width="120" />
</floater>

View File

@ -90,7 +90,7 @@
parameter="conversation_log" />
</menu_item_check>
<menu_item_separator layout="topleft" />
<menu_item_check name="Translate_chat" label="Translate Nearby chat">
<menu_item_check name="Translate_chat" label="Translate chat">
<menu_item_check.on_click
function="IMFloaterContainer.Action"
parameter="Translating.Toggle" />

View File

@ -460,8 +460,72 @@
max_val="999999999"
top_pad="10"
tool_tip="Object cost." />
</panel>
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
left="10"
name="BaseMaskDebug"
text_color="White"
top_pad="30"
width="130">
B:
</text>
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
left_delta="60"
name="OwnerMaskDebug"
text_color="White"
top_delta="0"
width="270">
O:
</text>
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
left_delta="60"
name="GroupMaskDebug"
text_color="White"
top_delta="0"
width="210">
G:
</text>
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
left_delta="60"
name="EveryoneMaskDebug"
text_color="White"
top_delta="0"
width="150">
E:
</text>
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
left_delta="60"
name="NextMaskDebug"
text_color="White"
top_delta="0"
width="90">
N:
</text>
</panel>
</scroll_container>
<panel
height="30"