Compare commits
62 Commits
sv-1.8.7.8
...
sv-1.8.7.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
544feee19f | ||
|
|
bee60da089 | ||
|
|
c466b44143 | ||
|
|
27222d524c | ||
|
|
b99e2cbbdd | ||
|
|
a5bdc24a14 | ||
|
|
0b6d94f202 | ||
|
|
bf5035388b | ||
|
|
640c136bcc | ||
|
|
6ebd2eef00 | ||
|
|
c954d02125 | ||
|
|
a34414849c | ||
|
|
c1ffb1b332 | ||
|
|
d06448cdfd | ||
|
|
117ef68916 | ||
|
|
83b384ab97 | ||
|
|
5ee5ba473b | ||
|
|
4055af4afd | ||
|
|
65dad7acfd | ||
|
|
a21927e510 | ||
|
|
094c948a87 | ||
|
|
31003f13af | ||
|
|
c1f39e167c | ||
|
|
0e28436aa9 | ||
|
|
bc1c816b99 | ||
|
|
32424e5640 | ||
|
|
760f1308f3 | ||
|
|
dfe8e364be | ||
|
|
33feeb0a01 | ||
|
|
50eb21ce23 | ||
|
|
d2052b9e4c | ||
|
|
2c5ad97697 | ||
|
|
8283422717 | ||
|
|
4a293ff1e1 | ||
|
|
828307ca96 | ||
|
|
a83901d2e4 | ||
|
|
878ba534b5 | ||
|
|
f17e6637d6 | ||
|
|
66b2ad5f30 | ||
|
|
463151c830 | ||
|
|
77b6a903ac | ||
|
|
1813a7bf8b | ||
|
|
6839cba56a | ||
|
|
f73fb6424b | ||
|
|
af2ae76ca2 | ||
|
|
a870534ea0 | ||
|
|
ba61314c32 | ||
|
|
d32e478456 | ||
|
|
1b29210f16 | ||
|
|
760f23b370 | ||
|
|
a7cba5f1a3 | ||
|
|
27033f4ebb | ||
|
|
c772179149 | ||
|
|
4c7eacf4fc | ||
|
|
672037d1f2 | ||
|
|
80cedb913a | ||
|
|
734621be82 | ||
|
|
dd3944161d | ||
|
|
1aabbb13c0 | ||
|
|
5574f263b1 | ||
|
|
2117c66c9a | ||
|
|
1fbfc498bf |
@@ -118,7 +118,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)
|
||||
fail_if_not_legacy = true;
|
||||
}
|
||||
|
||||
if (!strncasecmp(LEGACY_NON_HEADER, hdr_buf, strlen(LEGACY_NON_HEADER))) /* Flawfinder: ignore */
|
||||
if (!strnicmp(LEGACY_NON_HEADER, hdr_buf, strlen(LEGACY_NON_HEADER))) /* Flawfinder: ignore */
|
||||
{
|
||||
legacy_no_header = true;
|
||||
inbuf = (int)str.gcount();
|
||||
@@ -141,9 +141,8 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)
|
||||
}
|
||||
header = hdr_buf;
|
||||
|
||||
std::string::size_type start = std::string::npos;
|
||||
std::string::size_type start = header.find_first_not_of("<? ");
|
||||
std::string::size_type end = std::string::npos;
|
||||
start = header.find_first_not_of("<? ");
|
||||
if (start != std::string::npos)
|
||||
{
|
||||
end = header.find_first_of(" ?", start);
|
||||
@@ -1304,8 +1303,8 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32
|
||||
}
|
||||
|
||||
bool need_comma = false;
|
||||
LLSD::map_const_iterator iter = data.beginMap();
|
||||
LLSD::map_const_iterator end = data.endMap();
|
||||
auto iter = data.beginMap();
|
||||
auto end = data.endMap();
|
||||
for(; iter != end; ++iter)
|
||||
{
|
||||
if(need_comma) ostr << ",";
|
||||
@@ -1323,8 +1322,8 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32
|
||||
{
|
||||
ostr << post << pre << "[";
|
||||
bool need_comma = false;
|
||||
LLSD::array_const_iterator iter = data.beginArray();
|
||||
LLSD::array_const_iterator end = data.endArray();
|
||||
auto iter = data.beginArray();
|
||||
auto end = data.endArray();
|
||||
for(; iter != end; ++iter)
|
||||
{
|
||||
if(need_comma) ostr << ",";
|
||||
@@ -1392,22 +1391,22 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32
|
||||
// *FIX: memory inefficient.
|
||||
const std::vector<U8>& buffer = data.asBinary();
|
||||
ostr << "b(" << buffer.size() << ")\"";
|
||||
if(buffer.size())
|
||||
if(!buffer.empty())
|
||||
{
|
||||
if (options & LLSDFormatter::OPTIONS_PRETTY_BINARY)
|
||||
{
|
||||
std::ios_base::fmtflags old_flags = ostr.flags();
|
||||
ostr.setf( std::ios::hex, std::ios::basefield );
|
||||
ostr << "0x";
|
||||
for (size_t i = 0; i < buffer.size(); i++)
|
||||
for (unsigned char i : buffer)
|
||||
{
|
||||
ostr << (int) buffer[i];
|
||||
ostr << static_cast<int>(i);
|
||||
}
|
||||
ostr.flags(old_flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
ostr.write((const char*)&buffer[0], buffer.size());
|
||||
ostr.write(reinterpret_cast<const char*>(&buffer[0]), buffer.size());
|
||||
}
|
||||
}
|
||||
ostr << "\"";
|
||||
@@ -1444,9 +1443,9 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
|
||||
{
|
||||
ostr.put('{');
|
||||
U32 size_nbo = htonl(data.size());
|
||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
||||
LLSD::map_const_iterator iter = data.beginMap();
|
||||
LLSD::map_const_iterator end = data.endMap();
|
||||
ostr.write(reinterpret_cast<const char*>(&size_nbo), sizeof(U32));
|
||||
auto iter = data.beginMap();
|
||||
auto end = data.endMap();
|
||||
for(; iter != end; ++iter)
|
||||
{
|
||||
ostr.put('k');
|
||||
@@ -1461,9 +1460,9 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
|
||||
{
|
||||
ostr.put('[');
|
||||
U32 size_nbo = htonl(data.size());
|
||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
||||
LLSD::array_const_iterator iter = data.beginArray();
|
||||
LLSD::array_const_iterator end = data.endArray();
|
||||
ostr.write(reinterpret_cast<const char*>(&size_nbo), sizeof(U32));
|
||||
auto iter = data.beginArray();
|
||||
auto end = data.endArray();
|
||||
for(; iter != end; ++iter)
|
||||
{
|
||||
format_count += format(*iter, ostr);
|
||||
@@ -1529,7 +1528,7 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
|
||||
const std::vector<U8>& buffer = data.asBinary();
|
||||
U32 size_nbo = htonl(buffer.size());
|
||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
||||
if(buffer.size()) ostr.write((const char*)&buffer[0], buffer.size());
|
||||
if(!buffer.empty()) ostr.write((const char*)&buffer[0], buffer.size());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1706,12 +1705,12 @@ int deserialize_string_raw(
|
||||
// *FIX: This is memory inefficient.
|
||||
S32 len = strtol(buf + 1, NULL, 0);
|
||||
if((max_bytes>0)&&(len>max_bytes)) return LLSDParser::PARSE_FAILURE;
|
||||
std::vector<char> buf;
|
||||
std::vector<char> buf2;
|
||||
if(len)
|
||||
{
|
||||
buf.resize(len);
|
||||
count += (int)fullread(istr, (char *)&buf[0], len);
|
||||
value.assign(buf.begin(), buf.end());
|
||||
buf2.resize(len);
|
||||
count += (int)fullread(istr, (char *)&buf2[0], len);
|
||||
value.assign(buf2.begin(), buf2.end());
|
||||
}
|
||||
c = istr.get();
|
||||
++count;
|
||||
@@ -2095,7 +2094,18 @@ std::string zip_llsd(LLSD& data)
|
||||
}
|
||||
|
||||
have = CHUNK-strm.avail_out;
|
||||
output = (U8*) realloc(output, cur_size+have);
|
||||
U8* new_output = (U8*) realloc(output, cur_size+have);
|
||||
if (new_output == NULL)
|
||||
{
|
||||
LL_WARNS() << "Failed to compress LLSD block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
|
||||
deflateEnd(&strm);
|
||||
if (output)
|
||||
{
|
||||
free(output);
|
||||
}
|
||||
return std::string();
|
||||
}
|
||||
output = new_output;
|
||||
memcpy(output+cur_size, out, have);
|
||||
cur_size += have;
|
||||
}
|
||||
@@ -2114,15 +2124,6 @@ std::string zip_llsd(LLSD& data)
|
||||
deflateEnd(&strm);
|
||||
free(output);
|
||||
|
||||
#if 0 //verify results work with unzip_llsd
|
||||
std::istringstream test(result);
|
||||
LLSD test_sd;
|
||||
if (!unzip_llsd(test_sd, test, result.size()))
|
||||
{
|
||||
LL_ERRS() << "Invalid compression result!" << LL_ENDL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2173,7 +2174,19 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
|
||||
|
||||
U32 have = CHUNK-strm.avail_out;
|
||||
|
||||
result = (U8*) realloc(result, cur_size + have);
|
||||
U8* new_result = (U8*)realloc(result, cur_size + have);
|
||||
if (new_result == NULL)
|
||||
{
|
||||
LL_WARNS() << "Failed to unzip LLSD block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
|
||||
inflateEnd(&strm);
|
||||
if (result)
|
||||
{
|
||||
free(result);
|
||||
}
|
||||
delete in;
|
||||
return false;
|
||||
}
|
||||
result = new_result;
|
||||
memcpy(result+cur_size, out, have);
|
||||
cur_size += have;
|
||||
|
||||
@@ -2219,6 +2232,11 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
|
||||
//and trailers are different for the formats.
|
||||
U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32 size )
|
||||
{
|
||||
if (size == 0)
|
||||
{
|
||||
LL_WARNS() << "No data to unzip." << LL_ENDL;
|
||||
return NULL;
|
||||
}
|
||||
U8* result = NULL;
|
||||
U32 cur_size = 0;
|
||||
z_stream strm;
|
||||
@@ -2258,7 +2276,23 @@ U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32
|
||||
}
|
||||
U32 have = CHUNK-strm.avail_out;
|
||||
|
||||
result = (U8*) realloc(result, cur_size + have);
|
||||
U8* new_result = (U8*) realloc(result, cur_size + have);
|
||||
if (new_result == NULL)
|
||||
{
|
||||
LL_WARNS() << "Failed to unzip LLSD NavMesh block: can't reallocate memory, current size: " << cur_size
|
||||
<< " bytes; requested " << cur_size + have
|
||||
<< " bytes; total syze: ." << size << " bytes."
|
||||
<< LL_ENDL;
|
||||
inflateEnd(&strm);
|
||||
if (result)
|
||||
{
|
||||
free(result);
|
||||
}
|
||||
delete [] in;
|
||||
valid = false;
|
||||
return NULL;
|
||||
}
|
||||
result = new_result;
|
||||
memcpy(result+cur_size, out, have);
|
||||
cur_size += have;
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ void LLAvatarName::fromString(const std::string& full_name)
|
||||
mLegacyLastName = full_name.substr(index+1);
|
||||
if (mLegacyLastName != "Resident")
|
||||
{
|
||||
mUsername = mLegacyFirstName + "." + mLegacyLastName;
|
||||
mUsername = mLegacyFirstName + '.' + mLegacyLastName;
|
||||
mDisplayName = full_name;
|
||||
LLStringUtil::toLower(mUsername);
|
||||
}
|
||||
@@ -184,7 +184,7 @@ std::string LLAvatarName::getCompleteName(bool linefeed) const
|
||||
name = mDisplayName;
|
||||
if (sUseUsernames)
|
||||
{
|
||||
name += (linefeed ? "\n(" : " (") + mUsername + ")";
|
||||
name += (linefeed ? "\n(" : " (") + mUsername + ')';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -238,7 +238,7 @@ std::string LLAvatarName::getUserName() const
|
||||
}
|
||||
else
|
||||
{
|
||||
name = mLegacyFirstName + " " + mLegacyLastName;
|
||||
name = mLegacyFirstName + ' ' + mLegacyLastName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
{
|
||||
case 1 : return getCompleteName();
|
||||
case 2 : return getDisplayName();
|
||||
case 3 : return getLegacyName() + (mIsDisplayNameDefault ? "" : " (" + mDisplayName + ")"); break;
|
||||
case 3 : return getLegacyName() + (mIsDisplayNameDefault ? "" : " (" + mDisplayName + ')'); break;
|
||||
default : return getLegacyName();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,8 @@ const std::array<const std::string, LFIDBearer::COUNT> LFIDBearer::sMenuStrings
|
||||
};
|
||||
std::array<LLMenuGL*, LFIDBearer::COUNT> LFIDBearer::sMenus {};
|
||||
|
||||
LFIDBearer* LFIDBearer::sActive = nullptr;
|
||||
const LFIDBearer* LFIDBearer::sActive = nullptr;
|
||||
LFIDBearer::Type LFIDBearer::sActiveType = LFIDBearer::AVATAR;
|
||||
|
||||
void LFIDBearer::buildMenus()
|
||||
{
|
||||
@@ -49,7 +50,7 @@ LLMenuGL* LFIDBearer::showMenu(LLView* self, const std::string& menu_name, S32 x
|
||||
|
||||
void LFIDBearer::showMenu(LLView* self, LLMenuGL* menu, S32 x, S32 y)
|
||||
{
|
||||
sActive = this; // Menu listeners rely on this
|
||||
setActive(); // Menu listeners rely on this
|
||||
menu->buildDrawLabels();
|
||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||
LLMenuGL::showPopup(self, menu, x, y);
|
||||
|
||||
@@ -43,11 +43,18 @@ struct LFIDBearer
|
||||
virtual S32 getNumSelected() const { return getStringUUIDSelectedItem().notNull(); }
|
||||
virtual Type getSelectedType() const { return AVATAR; }
|
||||
|
||||
template<typename T> static T* getActive() { return static_cast<T*>(sActive); }
|
||||
template<typename T> static const T* getActive() { return static_cast<const T*>(sActive); }
|
||||
static LLUUID getActiveSelectedID() { return sActive->getStringUUIDSelectedItem(); }
|
||||
static uuid_vec_t getActiveSelectedIDs() { return sActive->getSelectedIDs(); }
|
||||
static S32 getActiveNumSelected() { return sActive->getNumSelected(); }
|
||||
static Type getActiveType() { return sActive->getSelectedType(); }
|
||||
static const Type& getActiveType() { return sActiveType; }
|
||||
|
||||
void setActive() const
|
||||
{
|
||||
sActive = this;
|
||||
sActiveType = getSelectedType();
|
||||
//sActiveIDs or even some kinda hybrid map, if Type is MULTIPLE fill the vals? and remove a buncha virtual functions?
|
||||
}
|
||||
|
||||
static void buildMenus();
|
||||
LLMenuGL* showMenu(LLView* self, const std::string& menu_name, S32 x, S32 y, std::function<void(LLMenuGL*)> on_menu_built = nullptr);
|
||||
@@ -57,5 +64,8 @@ protected:
|
||||
// Menus that recur, such as general avatars or groups menus
|
||||
static const std::array<const std::string, COUNT> sMenuStrings;
|
||||
static std::array<LLMenuGL*, COUNT> sMenus;
|
||||
static LFIDBearer* sActive;
|
||||
|
||||
private:
|
||||
static const LFIDBearer* sActive;
|
||||
static Type sActiveType;
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
virtual void cut() {};
|
||||
virtual BOOL canCut() const { return FALSE; }
|
||||
|
||||
virtual void copy() {};
|
||||
virtual void copy() const {};
|
||||
virtual BOOL canCopy() const { return FALSE; }
|
||||
|
||||
virtual void paste() {};
|
||||
|
||||
@@ -1119,7 +1119,7 @@ BOOL LLLineEditor::canCopy() const
|
||||
|
||||
|
||||
// copy selection to clipboard
|
||||
void LLLineEditor::copy()
|
||||
void LLLineEditor::copy() const
|
||||
{
|
||||
if( canCopy() )
|
||||
{
|
||||
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
virtual void cut();
|
||||
virtual BOOL canCut() const;
|
||||
|
||||
virtual void copy();
|
||||
void copy() const override final;
|
||||
virtual BOOL canCopy() const;
|
||||
|
||||
virtual void paste();
|
||||
|
||||
@@ -2874,7 +2874,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
|
||||
// LLEditMenuHandler functions
|
||||
|
||||
// virtual
|
||||
void LLScrollListCtrl::copy()
|
||||
void LLScrollListCtrl::copy() const
|
||||
{
|
||||
std::string buffer;
|
||||
for (auto item : getAllSelected())
|
||||
|
||||
@@ -322,7 +322,7 @@ public:
|
||||
virtual void scrollToShowSelected();
|
||||
|
||||
// LLEditMenuHandler functions
|
||||
virtual void copy();
|
||||
void copy() const override final;
|
||||
virtual BOOL canCopy() const;
|
||||
virtual void cut();
|
||||
virtual BOOL canCut() const;
|
||||
|
||||
@@ -375,7 +375,7 @@ LLTextEditor::~LLTextEditor()
|
||||
const std::string& LLTextEditor::getMenuSegmentUrl() const
|
||||
{
|
||||
auto segment = getSegmentAtLocalPos(mLastContextMenuX, mLastContextMenuY);
|
||||
auto style = segment->getStyle();
|
||||
auto style = segment ? segment->getStyle() : nullptr;
|
||||
return style ? style->getLinkHREF() : LLStringUtil::null;
|
||||
}
|
||||
|
||||
@@ -2216,7 +2216,7 @@ BOOL LLTextEditor::canCopy() const
|
||||
}
|
||||
|
||||
// copy selection to clipboard
|
||||
void LLTextEditor::copy(bool raw)
|
||||
void LLTextEditor::copy(bool raw) const
|
||||
{
|
||||
if( !canCopy() )
|
||||
{
|
||||
@@ -4228,9 +4228,9 @@ void LLTextEditor::appendTextImpl(const std::string &new_text, const LLStyleSP s
|
||||
if (always_underline) link_style->mUnderline = true;
|
||||
appendAndHighlightText(link, part, link_style, !always_underline/*match.underlineOnHoverOnly()*/);
|
||||
};
|
||||
const auto&& cb = boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3);
|
||||
const auto&& cb = force_replace_links ? boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3) : static_cast<LLUrlLabelCallback>(LLUrlRegistryNullCallback);
|
||||
auto& urlr = LLUrlRegistry::instance();
|
||||
while (!text.empty() && (force_replace_links ? urlr.findUrl(text, match, cb) : urlr.findUrl(text, match)))
|
||||
while (!text.empty() && urlr.findUrl(text, match, cb))
|
||||
{
|
||||
start = match.getStart();
|
||||
end = match.getEnd()+1;
|
||||
|
||||
@@ -129,9 +129,9 @@ public:
|
||||
virtual BOOL canRedo() const;
|
||||
virtual void cut();
|
||||
virtual BOOL canCut() const;
|
||||
void copy(bool raw);
|
||||
void copyRaw() { copy(true); }
|
||||
virtual void copy() { copy(false); }
|
||||
void copy(bool raw) const;
|
||||
void copyRaw() const { copy(true); }
|
||||
void copy() const override final { copy(false); }
|
||||
virtual BOOL canCopy() const;
|
||||
virtual void paste();
|
||||
virtual BOOL canPaste() const;
|
||||
|
||||
@@ -673,12 +673,9 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cb)
|
||||
{
|
||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgent::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||
addObserver(agent_id_string, url, cb);
|
||||
}
|
||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgent::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||
addObserver(agent_id_string, url, cb);
|
||||
return name_wait_str;
|
||||
}
|
||||
}
|
||||
@@ -789,12 +786,9 @@ std::string LLUrlEntryAgentName::getLabel(const std::string &url, const LLUrlLab
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cb)
|
||||
{
|
||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgentName::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||
addObserver(agent_id_string, url, cb);
|
||||
}
|
||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgentName::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||
addObserver(agent_id_string, url, cb);
|
||||
return name_wait_str;
|
||||
}
|
||||
}
|
||||
@@ -928,13 +922,10 @@ std::string LLUrlEntryGroup::getLabel(const std::string &url, const LLUrlLabelCa
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cb)
|
||||
{
|
||||
gCacheName->getGroup(group_id,
|
||||
boost::bind(&LLUrlEntryGroup::onGroupNameReceived,
|
||||
this, _1, _2, _3));
|
||||
addObserver(group_id_string, url, cb);
|
||||
}
|
||||
gCacheName->getGroup(group_id,
|
||||
boost::bind(&LLUrlEntryGroup::onGroupNameReceived,
|
||||
this, _1, _2, _3));
|
||||
addObserver(group_id_string, url, cb);
|
||||
return LLTrans::getString("LoadingData");
|
||||
}
|
||||
}
|
||||
@@ -1038,7 +1029,7 @@ std::string LLUrlEntryParcel::getLabel(const std::string &url, const LLUrlLabelC
|
||||
std::string parcel_id_string = unescapeUrl(path_array[2]); // parcel id
|
||||
|
||||
// Add an observer to call LLUrlLabelCallback when we have parcel name.
|
||||
if (cb) addObserver(parcel_id_string, url, cb);
|
||||
addObserver(parcel_id_string, url, cb);
|
||||
|
||||
LLUUID parcel_id(parcel_id_string);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class LLAvatarName;
|
||||
typedef boost::signals2::signal<void (const std::string& url,
|
||||
const std::string& label,
|
||||
const std::string& icon)> LLUrlLabelSignal;
|
||||
typedef LLUrlLabelSignal::slot_function_type LLUrlLabelCallback;
|
||||
typedef LLUrlLabelSignal::slot_type LLUrlLabelCallback;
|
||||
|
||||
///
|
||||
/// LLUrlEntryBase is the base class of all Url types registered in the
|
||||
|
||||
@@ -146,6 +146,28 @@
|
||||
<key>Value</key>
|
||||
<string>/resync</string>
|
||||
</map>
|
||||
<key>AlchemyChatCommandSetChatChannel</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Command to set nearby chat channel</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>/setchannel</string>
|
||||
</map>
|
||||
<key>AlchemyChatCommandSetHome</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Command to set the avatar home</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>/sethome</string>
|
||||
</map>
|
||||
<key>AlchemyConnectToNeighbors</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -212,6 +234,17 @@
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>AlchemyNearbyChatChannel</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Chat channel used for sending nearby chat from the viewer</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AlchemyRainbowEffects</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -774,6 +807,17 @@
|
||||
<key>Value</key>
|
||||
<string>key2name</string>
|
||||
</map>
|
||||
<key>AscentCmdLineKeyToNameNameSystem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>For key to name command defined by AscentCmdLineKeyToName, the format to show the key's name in. 0 = Old Style, 1 = Display Names and Username, 2 = Displayname only, 3 = Old Style (Display Name)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>AscentCmdLineOfferTp</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -873,6 +917,17 @@
|
||||
<key>Value</key>
|
||||
<real>0</real>
|
||||
</map>
|
||||
<key>SinguFollowDistance</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Distance at which to follow objects and avatars at, from menus that offer follow (minimum 0.5)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<string>1.0</string>
|
||||
</map>
|
||||
<key>SinguLastKnownReleaseBuild</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -236,6 +236,7 @@ struct ProfCtrlListAccum : public LLControlGroup::ApplyFunctor
|
||||
#endif //PROF_CTRL_CALLS
|
||||
void spew_key_to_name(const LLUUID& targetKey, const LLAvatarName& av_name)
|
||||
{
|
||||
static const LLCachedControl<S32> ns(gSavedSettings, "AscentCmdLineKeyToNameNameSystem");
|
||||
cmdline_printchat(llformat("%s: %s", targetKey.asString().c_str(), av_name.getNSName().c_str()));
|
||||
}
|
||||
bool cmd_line_chat(std::string data, EChatType type)
|
||||
@@ -255,12 +256,14 @@ bool cmd_line_chat(std::string data, EChatType type)
|
||||
static LLCachedControl<std::string> sPosCommand(gSavedSettings, "AscentCmdLinePos");
|
||||
static LLCachedControl<std::string> sRezPlatCommand(gSavedSettings, "AscentCmdLineRezPlatform");
|
||||
static LLCachedControl<std::string> sHomeCommand(gSavedSettings, "AscentCmdLineTeleportHome");
|
||||
static LLCachedControl<std::string> sSetHomeCommand(gSavedSettings, "AlchemyChatCommandSetHome", "/sethome");
|
||||
static LLCachedControl<std::string> sCalcCommand(gSavedSettings, "AscentCmdLineCalc");
|
||||
static LLCachedControl<std::string> sMapToCommand(gSavedSettings, "AscentCmdLineMapTo");
|
||||
static LLCachedControl<std::string> sClearCommand(gSavedSettings, "AscentCmdLineClearChat");
|
||||
static LLCachedControl<std::string> sRegionMsgCommand(gSavedSettings, "SinguCmdLineRegionSay");
|
||||
static LLCachedControl<std::string> sTeleportToCam(gSavedSettings, "AscentCmdTeleportToCam");
|
||||
static LLCachedControl<std::string> sHoverHeight(gSavedSettings, "AlchemyChatCommandHoverHeight", "/hover");
|
||||
static LLCachedControl<std::string> sSetNearbyChatChannelCmd(gSavedSettings, "AlchemyChatCommandSetChatChannel", "/setchannel");
|
||||
static LLCachedControl<std::string> sResyncAnimCommand(gSavedSettings, "AlchemyChatCommandResyncAnim", "/resync");
|
||||
static LLCachedControl<std::string> sKeyToName(gSavedSettings, "AscentCmdLineKeyToName");
|
||||
static LLCachedControl<std::string> sOfferTp(gSavedSettings, "AscentCmdLineOfferTp");
|
||||
@@ -364,6 +367,11 @@ bool cmd_line_chat(std::string data, EChatType type)
|
||||
gAgent.teleportHome();
|
||||
return false;
|
||||
}
|
||||
else if (cmd == utf8str_tolower(sSetHomeCommand)) // sethome
|
||||
{
|
||||
gAgent.setStartPosition(START_LOCATION_ID_HOME);
|
||||
return false;
|
||||
}
|
||||
else if (cmd == utf8str_tolower(sCalcCommand))//Cryogenic Blitz
|
||||
{
|
||||
if (data.length() > cmd.length() + 1)
|
||||
@@ -447,6 +455,15 @@ bool cmd_line_chat(std::string data, EChatType type)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if (cmd == utf8str_tolower(sSetNearbyChatChannelCmd)) // Set nearby chat channel
|
||||
{
|
||||
S32 chan;
|
||||
if (input >> chan)
|
||||
{
|
||||
gSavedSettings.setS32("AlchemyNearbyChatChannel", chan);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (cmd == utf8str_tolower(sTeleportToCam))
|
||||
{
|
||||
gAgent.teleportViaLocation(gAgentCamera.getCameraPositionGlobal());
|
||||
|
||||
@@ -80,13 +80,21 @@ BOOL JCFloaterAreaSearch::postBuild()
|
||||
mResultList = getChild<LLScrollListCtrl>("result_list");
|
||||
mResultList->setDoubleClickCallback(boost::bind(&JCFloaterAreaSearch::onDoubleClick,this));
|
||||
mResultList->sortByColumn("Name", TRUE);
|
||||
auto tp = getChild<LLButton>("TP");
|
||||
auto look = getChild<LLButton>("Look");
|
||||
mResultList->setCommitOnSelectionChange(true);
|
||||
mResultList->setCommitCallback([=](LLUICtrl* ctrl, const LLSD& param){
|
||||
bool enabled = mResultList->getNumSelected() == 1;
|
||||
tp->setEnabled(enabled);
|
||||
look->setEnabled(enabled);
|
||||
});
|
||||
|
||||
mCounterText = getChild<LLTextBox>("counter");
|
||||
|
||||
getChild<LLButton>("Refresh")->setClickedCallback(boost::bind(&JCFloaterAreaSearch::onRefresh,this));
|
||||
getChild<LLButton>("Stop")->setClickedCallback(boost::bind(&JCFloaterAreaSearch::onStop,this));
|
||||
getChild<LLButton>("TP")->setClickedCallback(boost::bind(&JCFloaterAreaSearch::teleportToSelected, this));
|
||||
getChild<LLButton>("Look")->setClickedCallback(boost::bind(&JCFloaterAreaSearch::lookAtSelected, this));
|
||||
tp->setClickedCallback(boost::bind(&JCFloaterAreaSearch::teleportToSelected, this));
|
||||
look->setClickedCallback(boost::bind(&JCFloaterAreaSearch::lookAtSelected, this));
|
||||
|
||||
getChild<LLFilterEditor>("Name query chunk")->setCommitCallback(boost::bind(&JCFloaterAreaSearch::onCommitLine,this,_1,_2,LIST_OBJECT_NAME));
|
||||
getChild<LLFilterEditor>("Description query chunk")->setCommitCallback(boost::bind(&JCFloaterAreaSearch::onCommitLine,this,_1,_2,LIST_OBJECT_DESC));
|
||||
|
||||
@@ -56,6 +56,20 @@ public:
|
||||
|
||||
void results();
|
||||
static void processObjectPropertiesFamily(LLMessageSystem* msg, void** user_data);
|
||||
struct ObjectData
|
||||
{
|
||||
LLUUID id;
|
||||
std::string name;
|
||||
std::string desc;
|
||||
LLUUID owner_id;
|
||||
LLUUID group_id;
|
||||
};
|
||||
|
||||
const ObjectData* getObjectData(const LLUUID& id) const
|
||||
{
|
||||
const auto& it = mCachedObjects.find(id);
|
||||
return it != mCachedObjects.end() ? &it->second : nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -84,14 +98,6 @@ private:
|
||||
LLViewerRegion* mLastRegion;
|
||||
bool mStopped;
|
||||
|
||||
struct ObjectData
|
||||
{
|
||||
LLUUID id;
|
||||
std::string name;
|
||||
std::string desc;
|
||||
LLUUID owner_id;
|
||||
LLUUID group_id;
|
||||
};
|
||||
uuid_set_t mPendingObjects;
|
||||
boost::unordered_map<LLUUID, ObjectData> mCachedObjects;
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ LFFloaterInvPanel::LFFloaterInvPanel(const LLSD& cat, const std::string& name, L
|
||||
mPanel->postBuild();
|
||||
mPanel->setFollows(FOLLOWS_ALL);
|
||||
mPanel->setEnabled(true);
|
||||
mPanel->removeBorder();
|
||||
addChild(mPanel);
|
||||
removeChild(panel);
|
||||
}
|
||||
|
||||
@@ -1613,12 +1613,14 @@ void LLAgent::startAutoPilotGlobal(
|
||||
mAutoPilotFlyOnStop = FALSE;
|
||||
}
|
||||
|
||||
if (distance > 30.0 && mAutoPilotAllowFlying)
|
||||
bool follow = mAutoPilotBehaviorName == "Follow";
|
||||
|
||||
if (!follow && distance > 30.0 && mAutoPilotAllowFlying)
|
||||
{
|
||||
setFlying(TRUE);
|
||||
}
|
||||
|
||||
if ( distance > 1.f &&
|
||||
if (!follow && distance > 1.f &&
|
||||
mAutoPilotAllowFlying &&
|
||||
heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f))
|
||||
{
|
||||
@@ -1690,7 +1692,7 @@ void LLAgent::startFollowPilot(const LLUUID &leader_id, BOOL allow_flying, F32 s
|
||||
}
|
||||
|
||||
startAutoPilotGlobal(object->getPositionGlobal(),
|
||||
std::string(), // behavior_name
|
||||
"Follow", // behavior_name
|
||||
NULL, // target_rotation
|
||||
NULL, // finish_callback
|
||||
NULL, // callback_data
|
||||
@@ -1707,6 +1709,9 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
|
||||
{
|
||||
if (mAutoPilot)
|
||||
{
|
||||
if (!user_cancel && mAutoPilotBehaviorName == "Follow")
|
||||
return; // Follow means actually follow
|
||||
|
||||
mAutoPilot = FALSE;
|
||||
if (mAutoPilotUseRotation && !user_cancel)
|
||||
{
|
||||
@@ -1726,6 +1731,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
|
||||
mAutoPilotFinishedCallback = NULL;
|
||||
}
|
||||
mLeaderID = LLUUID::null;
|
||||
mAutoPilotNoProgressFrameCount = 0;
|
||||
|
||||
setControlFlags(AGENT_CONTROL_STOP);
|
||||
|
||||
@@ -1750,20 +1756,33 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
||||
{
|
||||
if (mAutoPilot)
|
||||
{
|
||||
if (!mLeaderID.isNull())
|
||||
bool follow = !mLeaderID.isNull(); //mAutoPilotBehaviorName == "Follow";
|
||||
if (follow)
|
||||
{
|
||||
LLViewerObject* object = gObjectList.findObject(mLeaderID);
|
||||
if (!object)
|
||||
if (auto object = gObjectList.findObject(mLeaderID))
|
||||
{
|
||||
stopAutoPilot();
|
||||
return;
|
||||
mAutoPilotTargetGlobal = object->getPositionGlobal();
|
||||
if (const auto& av = object->asAvatar()) // Fly if avatar target is flying
|
||||
setFlying(av->mInAir);
|
||||
}
|
||||
else // We might still have a valid avatar pos
|
||||
{
|
||||
const LLVector3d& get_av_pos(const LLUUID & id);
|
||||
auto pos = get_av_pos(mLeaderID);
|
||||
if (pos.isExactlyZero()) // Default constructed or invalid from server
|
||||
{
|
||||
mAutoPilotBehaviorName.clear(); // Nothing left to follow pilot
|
||||
stopAutoPilot();
|
||||
return;
|
||||
}
|
||||
mAutoPilotTargetGlobal = pos;
|
||||
// Should we fly if the height difference is great enough here? Altitude is often invalid...
|
||||
}
|
||||
mAutoPilotTargetGlobal = object->getPositionGlobal();
|
||||
}
|
||||
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
if (gAgentAvatarp->mInAir && mAutoPilotAllowFlying)
|
||||
if (!follow && gAgentAvatarp->mInAir && mAutoPilotAllowFlying)
|
||||
{
|
||||
setFlying(TRUE);
|
||||
}
|
||||
@@ -1775,7 +1794,7 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
||||
|
||||
F32 target_dist = direction.magVec();
|
||||
|
||||
if (target_dist >= mAutoPilotTargetDist)
|
||||
if (!follow && target_dist >= mAutoPilotTargetDist)
|
||||
{
|
||||
mAutoPilotNoProgressFrameCount++;
|
||||
if (mAutoPilotNoProgressFrameCount > AUTOPILOT_MAX_TIME_NO_PROGRESS * gFPSClamped)
|
||||
|
||||
@@ -72,6 +72,8 @@
|
||||
#include "chatbar_as_cmdline.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvcommon.h"
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
@@ -100,25 +102,24 @@ class LLChatBarGestureObserver : public LLGestureManagerObserver
|
||||
{
|
||||
public:
|
||||
LLChatBarGestureObserver(LLChatBar* chat_barp) : mChatBar(chat_barp){}
|
||||
virtual ~LLChatBarGestureObserver() {}
|
||||
virtual void changed() { mChatBar->refreshGestures(); }
|
||||
virtual ~LLChatBarGestureObserver() = default;
|
||||
void changed() override { mChatBar->refreshGestures(); }
|
||||
private:
|
||||
LLChatBar* mChatBar;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// Functions
|
||||
//
|
||||
|
||||
LLChatBar::LLChatBar()
|
||||
: LLPanel(),
|
||||
mInputEditor(NULL),
|
||||
mInputEditor(nullptr),
|
||||
mGestureLabelTimer(),
|
||||
mLastSpecialChatChannel(0),
|
||||
mIsBuilt(FALSE),
|
||||
mGestureCombo(NULL),
|
||||
mObserver(NULL)
|
||||
mGestureCombo(nullptr),
|
||||
mObserver(nullptr)
|
||||
{
|
||||
setIsChrome(TRUE);
|
||||
|
||||
@@ -132,10 +133,14 @@ LLChatBar::~LLChatBar()
|
||||
{
|
||||
LLGestureMgr::instance().removeObserver(mObserver);
|
||||
delete mObserver;
|
||||
mObserver = NULL;
|
||||
mObserver = nullptr;
|
||||
// LLView destructor cleans up children
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// Overrides
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
BOOL LLChatBar::postBuild()
|
||||
{
|
||||
if (LLUICtrl* history_ctrl = findChild<LLUICtrl>("History"))
|
||||
@@ -189,7 +194,7 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask )
|
||||
else if (mask == MASK_SHIFT)
|
||||
{
|
||||
// whisper
|
||||
sendChat( CHAT_TYPE_WHISPER );
|
||||
sendChat(CHAT_TYPE_WHISPER);
|
||||
handled = TRUE;
|
||||
}
|
||||
else if (mask == MASK_NONE)
|
||||
@@ -210,6 +215,11 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask )
|
||||
return handled;
|
||||
}
|
||||
|
||||
void LLChatBar::onFocusLost()
|
||||
{
|
||||
//stopChat();
|
||||
}
|
||||
|
||||
void LLChatBar::refresh()
|
||||
{
|
||||
// HACK: Leave the name of the gesture in place for a few seconds.
|
||||
@@ -242,17 +252,16 @@ void LLChatBar::refreshGestures()
|
||||
//store current selection so we can maintain it
|
||||
std::string cur_gesture = mGestureCombo->getValue().asString();
|
||||
mGestureCombo->selectFirstItem();
|
||||
std::string label = mGestureCombo->getValue().asString();;
|
||||
|
||||
// clear
|
||||
mGestureCombo->clearRows();
|
||||
|
||||
// collect list of unique gestures
|
||||
std::map <std::string, BOOL> unique;
|
||||
LLGestureMgr::item_map_t::const_iterator it;
|
||||
const LLGestureMgr::item_map_t& active_gestures = LLGestureMgr::instance().getActiveGestures();
|
||||
for (it = active_gestures.begin(); it != active_gestures.end(); ++it)
|
||||
for (const auto& active_gesture : active_gestures)
|
||||
{
|
||||
LLMultiGesture* gesture = (*it).second;
|
||||
LLMultiGesture* gesture = active_gesture.second;
|
||||
if (gesture)
|
||||
{
|
||||
if (!gesture->mTrigger.empty())
|
||||
@@ -262,11 +271,9 @@ void LLChatBar::refreshGestures()
|
||||
}
|
||||
}
|
||||
|
||||
// add unique gestures
|
||||
std::map <std::string, BOOL>::iterator it2;
|
||||
for (it2 = unique.begin(); it2 != unique.end(); ++it2)
|
||||
for (auto& it2 : unique)
|
||||
{
|
||||
mGestureCombo->addSimpleElement((*it2).first);
|
||||
mGestureCombo->addSimpleElement(it2.first);
|
||||
}
|
||||
|
||||
mGestureCombo->sortByName();
|
||||
@@ -316,12 +323,12 @@ void LLChatBar::setIgnoreArrowKeys(BOOL b)
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLChatBar::inputEditorHasFocus()
|
||||
BOOL LLChatBar::inputEditorHasFocus() const
|
||||
{
|
||||
return mInputEditor && mInputEditor->hasFocus();
|
||||
}
|
||||
|
||||
std::string LLChatBar::getCurrentChat()
|
||||
std::string LLChatBar::getCurrentChat() const
|
||||
{
|
||||
return mInputEditor ? mInputEditor->getText() : LLStringUtil::null;
|
||||
}
|
||||
@@ -390,7 +397,7 @@ LLWString LLChatBar::stripChannelNumber(const LLWString &mesg, S32* channel)
|
||||
pos++;
|
||||
}
|
||||
|
||||
mLastSpecialChatChannel = strtol(wstring_to_utf8str(channel_string).c_str(), NULL, 10);
|
||||
mLastSpecialChatChannel = strtol(wstring_to_utf8str(channel_string).c_str(), nullptr, 10);
|
||||
// <edit>
|
||||
if(mesg[1] == '-')
|
||||
mLastSpecialChatChannel = -mLastSpecialChatChannel;
|
||||
@@ -570,9 +577,12 @@ void LLChatBar::onInputEditorKeystroke()
|
||||
|
||||
S32 length = raw_text.length();
|
||||
|
||||
//if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
|
||||
// [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d)
|
||||
if ( (length > 0) && (raw_text[0] != '/') && (!gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT)) )
|
||||
// if( (length > 0)
|
||||
// && (raw_text[0] != '/') // forward slash is used for escape (eg. emote) sequences
|
||||
// && (raw_text[0] != ':') // colon is used in for MUD poses
|
||||
// )
|
||||
// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.0d
|
||||
if ( (length > 0) && (raw_text[0] != '/') && (raw_text[0] != ':') && (!RlvActions::hasBehaviour(RLV_BHVR_REDIRCHAT)) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
gAgent.startTyping();
|
||||
@@ -582,21 +592,6 @@ void LLChatBar::onInputEditorKeystroke()
|
||||
gAgent.stopTyping();
|
||||
}
|
||||
|
||||
/* Doesn't work -- can't tell the difference between a backspace
|
||||
that killed the selection vs. backspace at the end of line.
|
||||
if (length > 1
|
||||
&& text[0] == '/'
|
||||
&& key == KEY_BACKSPACE)
|
||||
{
|
||||
// the selection will already be deleted, but we need to trim
|
||||
// off the character before
|
||||
std::string new_text = raw_text.substr(0, length-1);
|
||||
mInputEditor->setText( new_text );
|
||||
mInputEditor->setCursorToEnd();
|
||||
length = length - 1;
|
||||
}
|
||||
*/
|
||||
|
||||
KEY key = gKeyboard->currentKey();
|
||||
|
||||
// Ignore "special" keys, like backspace, arrows, etc.
|
||||
@@ -622,11 +617,6 @@ void LLChatBar::onInputEditorKeystroke()
|
||||
mInputEditor->setSelection(length, outlength);
|
||||
}
|
||||
}
|
||||
|
||||
//LL_INFOS() << "GESTUREDEBUG " << trigger
|
||||
// << " len " << length
|
||||
// << " outlen " << out_str.getLength()
|
||||
// << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -668,11 +658,11 @@ void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type,
|
||||
void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate)
|
||||
{
|
||||
// Look for "/20 foo" channel chats.
|
||||
S32 channel = 0;
|
||||
S32 channel = gSavedSettings.getS32("AlchemyNearbyChatChannel");
|
||||
LLWString out_text = stripChannelNumber(wtext, &channel);
|
||||
std::string utf8_out_text = wstring_to_utf8str(out_text);
|
||||
|
||||
std::string utf8_text = wstring_to_utf8str(wtext);
|
||||
|
||||
utf8_text = utf8str_trim(utf8_text);
|
||||
if (!utf8_text.empty())
|
||||
{
|
||||
@@ -680,17 +670,12 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b
|
||||
if ( (0 == channel) && (rlv_handler_t::isEnabled()) )
|
||||
// RELEASE-RLVa: [SL-2.0.0] This entire class appears to be dead/non-functional?
|
||||
if ( (0 == channel) && (RlvActions::isRlvEnabled()) )
|
||||
{
|
||||
// Adjust the (public) chat "volume" on chat and gestures (also takes care of playing the proper animation)
|
||||
if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) )
|
||||
type = CHAT_TYPE_WHISPER;
|
||||
else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) )
|
||||
type = CHAT_TYPE_NORMAL;
|
||||
else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) )
|
||||
type = CHAT_TYPE_NORMAL;
|
||||
|
||||
animate &= !gRlvHandler.hasBehaviour( (!RlvUtil::isEmote(utf8_text)) ? RLV_BHVR_REDIRCHAT : RLV_BHVR_REDIREMOTE );
|
||||
type = RlvActions::checkChatVolume(type);
|
||||
animate &= !RlvActions::hasBehaviour( (!RlvUtil::isEmote(utf8_text)) ? RLV_BHVR_REDIRCHAT : RLV_BHVR_REDIREMOTE );
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
@@ -731,23 +716,19 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL
|
||||
send_chat_from_viewer(utf8_out_text, type, channel);
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.2a
|
||||
//void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
|
||||
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-0.2.2a
|
||||
void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel)
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0a
|
||||
// Only process chat messages (ie not CHAT_TYPE_START, CHAT_TYPE_STOP, etc)
|
||||
if ( (rlv_handler_t::isEnabled()) && ( (CHAT_TYPE_WHISPER == type) || (CHAT_TYPE_NORMAL == type) || (CHAT_TYPE_SHOUT == type) ) )
|
||||
if ( (RlvActions::isRlvEnabled()) && ( (CHAT_TYPE_WHISPER == type) || (CHAT_TYPE_NORMAL == type) || (CHAT_TYPE_SHOUT == type) ) )
|
||||
{
|
||||
if (0 == channel)
|
||||
{
|
||||
// (We already did this before, but LLChatHandler::handle() calls this directly)
|
||||
if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) )
|
||||
type = CHAT_TYPE_WHISPER;
|
||||
else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) )
|
||||
type = CHAT_TYPE_NORMAL;
|
||||
else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) )
|
||||
type = CHAT_TYPE_NORMAL;
|
||||
// Clamp the volume of the chat if needed
|
||||
type = RlvActions::checkChatVolume(type);
|
||||
|
||||
// Redirect chat if needed
|
||||
if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT) || (gRlvHandler.hasBehaviour(RLV_BHVR_REDIREMOTE)) ) &&
|
||||
@@ -763,7 +744,7 @@ void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channe
|
||||
else
|
||||
{
|
||||
// Don't allow chat on a non-public channel if sendchannel restricted (unless the channel is an exception)
|
||||
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHANNEL)) && (!gRlvHandler.isException(RLV_BHVR_SENDCHANNEL, channel)) )
|
||||
if (!RlvActions::canSendChannel(channel))
|
||||
return;
|
||||
|
||||
// Don't allow chat on debug channel if @sendchat, @redirchat or @rediremote restricted (shows as public chat on viewers)
|
||||
@@ -836,33 +817,29 @@ void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channe
|
||||
void really_send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
|
||||
{
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
// <edit>
|
||||
if(channel >= 0)
|
||||
if (channel >= 0)
|
||||
{
|
||||
// </edit>
|
||||
msg->newMessageFast(_PREHASH_ChatFromViewer);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->nextBlockFast(_PREHASH_ChatData);
|
||||
msg->addStringFast(_PREHASH_Message, utf8_out_text);
|
||||
msg->addU8Fast(_PREHASH_Type, type);
|
||||
msg->addS32("Channel", channel);
|
||||
// <edit>
|
||||
msg->newMessageFast(_PREHASH_ChatFromViewer);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->nextBlockFast(_PREHASH_ChatData);
|
||||
msg->addStringFast(_PREHASH_Message, utf8_out_text);
|
||||
msg->addU8Fast(_PREHASH_Type, type);
|
||||
msg->addS32("Channel", channel);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg->newMessage("ScriptDialogReply");
|
||||
msg->nextBlock("AgentData");
|
||||
msg->addUUID("AgentID", gAgent.getID());
|
||||
msg->addUUID("SessionID", gAgent.getSessionID());
|
||||
msg->nextBlock("Data");
|
||||
msg->addUUID("ObjectID", gAgent.getID());
|
||||
msg->newMessageFast(_PREHASH_ScriptDialogReply);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->nextBlockFast(_PREHASH_Data);
|
||||
msg->addUUIDFast(_PREHASH_ObjectID, gAgent.getID());
|
||||
msg->addS32("ChatChannel", channel);
|
||||
msg->addS32("ButtonIndex", 0);
|
||||
msg->addString("ButtonLabel", utf8_out_text);
|
||||
msg->addS32Fast(_PREHASH_ButtonIndex, 0);
|
||||
msg->addStringFast(_PREHASH_ButtonLabel, utf8_out_text);
|
||||
}
|
||||
// </edit>
|
||||
gAgent.sendReliableMessage();
|
||||
|
||||
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT);
|
||||
@@ -895,7 +872,7 @@ void LLChatBar::onCommitGesture(LLUICtrl* ctrl)
|
||||
}
|
||||
}
|
||||
mGestureLabelTimer.start();
|
||||
if (mGestureCombo != NULL)
|
||||
if (mGestureCombo != nullptr)
|
||||
{
|
||||
// free focus back to chat bar
|
||||
mGestureCombo->setFocus(FALSE);
|
||||
@@ -907,24 +884,39 @@ void toggleChatHistory()
|
||||
LLFloaterChat::toggleInstance(LLSD());
|
||||
}
|
||||
|
||||
//
|
||||
// LLChatCommandHandler
|
||||
//
|
||||
|
||||
class LLChatHandler : public LLCommandHandler
|
||||
class LLChatCommandHandler final : public LLCommandHandler
|
||||
{
|
||||
public:
|
||||
// not allowed from outside the app
|
||||
LLChatHandler() : LLCommandHandler("chat", UNTRUSTED_BLOCK) { }
|
||||
LLChatCommandHandler() : LLCommandHandler("chat", UNTRUSTED_BLOCK) { }
|
||||
|
||||
// Your code here
|
||||
bool handle(const LLSD& tokens, const LLSD& query_map,
|
||||
LLMediaCtrl* web)
|
||||
LLMediaCtrl* web) override
|
||||
{
|
||||
if (tokens.size() < 2) return false;
|
||||
S32 channel = tokens[0].asInteger();
|
||||
std::string mesg = tokens[1].asString();
|
||||
send_chat_from_viewer(mesg, CHAT_TYPE_NORMAL, channel);
|
||||
return true;
|
||||
bool retval = false;
|
||||
// Need at least 2 tokens to have a valid message.
|
||||
if (tokens.size() < 2)
|
||||
{
|
||||
retval = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
S32 channel = tokens[0].asInteger();
|
||||
{
|
||||
retval = true;
|
||||
// Send unescaped message, see EXT-6353.
|
||||
std::string unescaped_mesg (LLURI::unescape(tokens[1].asString()));
|
||||
send_chat_from_viewer(unescaped_mesg, CHAT_TYPE_NORMAL, channel);
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
};
|
||||
|
||||
// Creating the object registers with the dispatcher.
|
||||
LLChatHandler gChatHandler;
|
||||
LLChatCommandHandler gChatHandler;
|
||||
|
||||
@@ -33,10 +33,9 @@
|
||||
#ifndef LL_LLCHATBAR_H
|
||||
#define LL_LLCHATBAR_H
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "llframetimer.h"
|
||||
#include "llchat.h"
|
||||
#include "lllayoutstack.h"
|
||||
#include "llpanel.h"
|
||||
|
||||
class LLLineEditor;
|
||||
class LLMessageSystem;
|
||||
@@ -46,17 +45,19 @@ class LLFrameTimer;
|
||||
class LLChatBarGestureObserver;
|
||||
class LLComboBox;
|
||||
|
||||
class LLChatBar : public LLPanel
|
||||
|
||||
class LLChatBar final
|
||||
: public LLPanel
|
||||
{
|
||||
public:
|
||||
// constructor for inline chat-bars (e.g. hosted in chat history window)
|
||||
LLChatBar();
|
||||
~LLChatBar();
|
||||
virtual BOOL postBuild();
|
||||
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
BOOL postBuild() override;
|
||||
BOOL handleKeyHere(KEY key, MASK mask) override;
|
||||
void onFocusLost() override;
|
||||
|
||||
void refresh();
|
||||
void refresh() override;
|
||||
void refreshGestures();
|
||||
|
||||
// Move cursor into chat input field.
|
||||
@@ -65,8 +66,8 @@ public:
|
||||
// Ignore arrow keys for chat bar
|
||||
void setIgnoreArrowKeys(BOOL b);
|
||||
|
||||
BOOL inputEditorHasFocus();
|
||||
std::string getCurrentChat();
|
||||
BOOL inputEditorHasFocus() const;
|
||||
std::string getCurrentChat() const;
|
||||
|
||||
// since chat bar logic is reused for chat history
|
||||
// gesture combo box might not be a direct child
|
||||
@@ -94,10 +95,11 @@ public:
|
||||
static void stopChat();
|
||||
|
||||
protected:
|
||||
~LLChatBar();
|
||||
|
||||
void sendChat(EChatType type);
|
||||
void updateChat();
|
||||
|
||||
protected:
|
||||
LLLineEditor* mInputEditor;
|
||||
|
||||
LLFrameTimer mGestureLabelTimer;
|
||||
|
||||
@@ -293,19 +293,19 @@ bool LLCommandLineParser::parseAndStoreResults(po::command_line_parser& clp)
|
||||
po::basic_parsed_options<char> opts = clp.run();
|
||||
po::store(opts, gVariableMap);
|
||||
}
|
||||
catch(po::error& e)
|
||||
catch (const po::error& e)
|
||||
{
|
||||
LL_WARNS() << "Caught Error:" << e.what() << LL_ENDL;
|
||||
mErrorMsg = e.what();
|
||||
return false;
|
||||
}
|
||||
catch(LLCLPError& e)
|
||||
catch (const LLCLPError& e)
|
||||
{
|
||||
LL_WARNS() << "Caught Error:" << e.what() << LL_ENDL;
|
||||
mErrorMsg = e.what();
|
||||
return false;
|
||||
}
|
||||
catch(LLCLPLastOption&)
|
||||
catch (const LLCLPLastOption&)
|
||||
{
|
||||
// This exception means a token was read after an option
|
||||
// that must be the last option was reached (see url and slurl options)
|
||||
@@ -354,18 +354,58 @@ bool LLCommandLineParser::parseCommandLine(int argc, char **argv)
|
||||
return parseAndStoreResults(clp);
|
||||
}
|
||||
|
||||
// TODO:
|
||||
// - Break out this funky parsing logic into separate method
|
||||
// - Unit-test it with tests like LLStringUtil::getTokens() (the command-line
|
||||
// overload that supports quoted tokens)
|
||||
// - Unless this logic offers significant semantic benefits, replace it with
|
||||
// LLStringUtil::getTokens(). This would fix a known bug: you cannot --set a
|
||||
// string-valued variable to the empty string, because empty strings are
|
||||
// eliminated below.
|
||||
|
||||
bool LLCommandLineParser::parseCommandLineString(const std::string& str)
|
||||
{
|
||||
std::string cmd_line_string("");
|
||||
if (!str.empty())
|
||||
{
|
||||
bool add_last_c = true;
|
||||
S32 last_c_pos = str.size() - 1; //don't get out of bounds on pos+1, last char will be processed separately
|
||||
for (S32 pos = 0; pos < last_c_pos; ++pos)
|
||||
{
|
||||
cmd_line_string.append(&str[pos], 1);
|
||||
if (str[pos] == '\\')
|
||||
{
|
||||
cmd_line_string.append("\\", 1);
|
||||
if (str[pos + 1] == '\\')
|
||||
{
|
||||
++pos;
|
||||
add_last_c = (pos != last_c_pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (add_last_c)
|
||||
{
|
||||
cmd_line_string.append(&str[last_c_pos], 1);
|
||||
if (str[last_c_pos] == '\\')
|
||||
{
|
||||
cmd_line_string.append("\\", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Split the string content into tokens
|
||||
boost::escaped_list_separator<char> sep("\\", "\r\n ", "\"'");
|
||||
boost::tokenizer< boost::escaped_list_separator<char> > tok(str, sep);
|
||||
const char* escape_chars = "\\";
|
||||
const char* separator_chars = "\r\n ";
|
||||
const char* quote_chars = "\"'";
|
||||
boost::escaped_list_separator<char> sep(escape_chars, separator_chars, quote_chars);
|
||||
boost::tokenizer< boost::escaped_list_separator<char> > tok(cmd_line_string, sep);
|
||||
std::vector<std::string> tokens;
|
||||
// std::copy(tok.begin(), tok.end(), std::back_inserter(tokens));
|
||||
for(boost::tokenizer< boost::escaped_list_separator<char> >::iterator i = tok.begin();
|
||||
i != tok.end();
|
||||
++i)
|
||||
{
|
||||
if(0 != i->size())
|
||||
if(!i->empty())
|
||||
{
|
||||
tokens.push_back(*i);
|
||||
}
|
||||
@@ -386,20 +426,28 @@ bool LLCommandLineParser::parseCommandLineFile(const std::basic_istream < char >
|
||||
|
||||
void LLCommandLineParser::notify()
|
||||
{
|
||||
po::notify(gVariableMap);
|
||||
try
|
||||
{
|
||||
po::notify(gVariableMap);
|
||||
}
|
||||
catch (const LLCLPError& e)
|
||||
{
|
||||
LL_WARNS() << "Caught Error: " << e.what() << LL_ENDL;
|
||||
mErrorMsg = e.what();
|
||||
}
|
||||
}
|
||||
|
||||
void LLCommandLineParser::printOptions() const
|
||||
{
|
||||
for(po::variables_map::iterator i = gVariableMap.begin(); i != gVariableMap.end(); ++i)
|
||||
for (auto& i : gVariableMap)
|
||||
{
|
||||
std::string name = i->first;
|
||||
token_vector_t values = i->second.as<token_vector_t>();
|
||||
std::string name = i.first;
|
||||
token_vector_t values = i.second.as<token_vector_t>();
|
||||
std::ostringstream oss;
|
||||
oss << name << ": ";
|
||||
for(token_vector_t::iterator t_itr = values.begin(); t_itr != values.end(); ++t_itr)
|
||||
for (auto& value : values)
|
||||
{
|
||||
oss << t_itr->c_str() << " ";
|
||||
oss << value.c_str() << " ";
|
||||
}
|
||||
LL_INFOS() << oss.str() << LL_ENDL;
|
||||
}
|
||||
|
||||
@@ -325,6 +325,20 @@ void LLControlAvatar::markForDeath()
|
||||
mRootVolp = NULL;
|
||||
}
|
||||
|
||||
void LLControlAvatar::markDead()
|
||||
{
|
||||
// NOTE: this can happen when the control avatar and root volume are on different regions and we're
|
||||
// being called from the LLViewerRegion destructor due the region being dropped
|
||||
// (due to being used as a vehicle and the move not yet being processed?)
|
||||
if (mRootVolp)
|
||||
{
|
||||
mRootVolp->unlinkControlAvatar();
|
||||
mRootVolp = nullptr;
|
||||
}
|
||||
|
||||
LLVOAvatar::markDead();
|
||||
}
|
||||
|
||||
void LLControlAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
||||
{
|
||||
if (mMarkedForDeath)
|
||||
@@ -372,59 +386,62 @@ void LLControlAvatar::updateDebugText()
|
||||
|
||||
for (auto volp : volumes)
|
||||
{
|
||||
S32 verts = 0;
|
||||
total_tris += volp->getTriangleCount(&verts);
|
||||
total_verts += verts;
|
||||
est_tris += volp->getEstTrianglesMax();
|
||||
est_streaming_tris += volp->getEstTrianglesStreamingCost();
|
||||
streaming_cost += volp->getStreamingCost();
|
||||
lod_string += llformat("%d",volp->getLOD());
|
||||
if (volp && volp->mDrawable)
|
||||
if (volp)
|
||||
{
|
||||
bool is_animated_flag = volp->getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG;
|
||||
if (is_animated_flag)
|
||||
S32 verts = 0;
|
||||
total_tris += volp->getTriangleCount(&verts);
|
||||
total_verts += verts;
|
||||
est_tris += volp->getEstTrianglesMax();
|
||||
est_streaming_tris += volp->getEstTrianglesStreamingCost();
|
||||
streaming_cost += volp->getStreamingCost();
|
||||
lod_string += llformat("%d", volp->getLOD());
|
||||
if (volp->mDrawable)
|
||||
{
|
||||
animated_object_flag_string += "1";
|
||||
bool is_animated_flag = volp->getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG;
|
||||
if (is_animated_flag)
|
||||
{
|
||||
animated_object_flag_string += "1";
|
||||
}
|
||||
else
|
||||
{
|
||||
animated_object_flag_string += "0";
|
||||
}
|
||||
if (volp->mDrawable->isActive())
|
||||
{
|
||||
active_string += "A";
|
||||
}
|
||||
else
|
||||
{
|
||||
active_string += "S";
|
||||
}
|
||||
if (volp->isRiggedMesh())
|
||||
{
|
||||
// Rigged/animatable mesh
|
||||
type_string += "R";
|
||||
lod_radius = volp->mLODRadius;
|
||||
}
|
||||
else if (volp->isMesh())
|
||||
{
|
||||
// Static mesh
|
||||
type_string += "M";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Any other prim
|
||||
type_string += "P";
|
||||
}
|
||||
if (cam_dist_count < 4)
|
||||
{
|
||||
cam_dist_string += LLStringOps::getReadableNumber(volp->mLODDistance) + "/" +
|
||||
LLStringOps::getReadableNumber(volp->mLODAdjustedDistance) + " ";
|
||||
cam_dist_count++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
animated_object_flag_string += "0";
|
||||
active_string += "-";
|
||||
type_string += "-";
|
||||
}
|
||||
if (volp->mDrawable->isActive())
|
||||
{
|
||||
active_string += "A";
|
||||
}
|
||||
else
|
||||
{
|
||||
active_string += "S";
|
||||
}
|
||||
if (volp->isRiggedMesh())
|
||||
{
|
||||
// Rigged/animatable mesh
|
||||
type_string += "R";
|
||||
lod_radius = volp->mLODRadius;
|
||||
}
|
||||
else if (volp->isMesh())
|
||||
{
|
||||
// Static mesh
|
||||
type_string += "M";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Any other prim
|
||||
type_string += "P";
|
||||
}
|
||||
if (cam_dist_count < 4)
|
||||
{
|
||||
cam_dist_string += LLStringOps::getReadableNumber(volp->mLODDistance) + "/" +
|
||||
LLStringOps::getReadableNumber(volp->mLODAdjustedDistance) + " ";
|
||||
cam_dist_count++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
active_string += "-";
|
||||
type_string += "-";
|
||||
}
|
||||
}
|
||||
addDebugText(llformat("CAV obj %d anim %d active %s impost %d upprd %d strcst %f",
|
||||
@@ -505,9 +522,10 @@ void LLControlAvatar::updateAnimations()
|
||||
{
|
||||
LLVOVolume *volp = *vol_it;
|
||||
//LL_INFOS("AnimatedObjects") << "updating anim for vol " << volp->getID() << " root " << mRootVolp->getID() << LL_ENDL;
|
||||
signaled_animation_map_t& signaled_animations = LLObjectSignaledAnimationMap::instance().getMap()[volp->getID()];
|
||||
for (auto anim_it = signaled_animations.begin();
|
||||
anim_it != signaled_animations.end();
|
||||
auto& signaled_anim_map = LLObjectSignaledAnimationMap::instance().getMap();
|
||||
signaled_animation_map_t& signaled_animations = signaled_anim_map[volp->getID()];
|
||||
for (auto anim_it = signaled_animations.begin(), anim_it_end = signaled_animations.end();
|
||||
anim_it != anim_it_end;
|
||||
++anim_it)
|
||||
{
|
||||
auto found_anim_it = anims.find(anim_it->first);
|
||||
|
||||
@@ -52,6 +52,7 @@ public:
|
||||
// Delayed kill so we don't make graphics pipeline unhappy calling
|
||||
// markDead() inside other graphics pipeline operations.
|
||||
void markForDeath();
|
||||
void markDead() override;
|
||||
|
||||
void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) override;
|
||||
BOOL updateCharacter(LLAgent &agent) override;
|
||||
|
||||
@@ -134,8 +134,9 @@ namespace
|
||||
}
|
||||
} //namespace
|
||||
|
||||
const LLColor4* mm_getMarkerColor(const LLUUID& id);
|
||||
LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string& name, const LLVector3d& position) :
|
||||
mID(id), mName(name), mPosition(position), mMarked(false), mFocused(false),
|
||||
mID(id), mName(name), mPosition(position), mMarked(mm_getMarkerColor(id)), mFocused(false),
|
||||
mStats(),
|
||||
mActivityType(ACTIVITY_NEW), mActivityTimer(),
|
||||
mIsInList(false), mAge(-1), mTime(time(NULL))
|
||||
@@ -322,6 +323,17 @@ bool is_nearby(const LLUUID& id)
|
||||
return std::find(avatars.begin(), avatars.end(), id) != avatars.end();
|
||||
}
|
||||
|
||||
const LLVector3d& get_av_pos(const LLUUID& id)
|
||||
{
|
||||
if (const auto inst = LLFloaterAvatarList::getIfExists())
|
||||
if (const auto av = inst->getAvatarEntry(id))
|
||||
return av->getPosition();
|
||||
|
||||
LLWorld::pos_map_t avatars;
|
||||
LLWorld::instance().getAvatars(&avatars);
|
||||
return avatars[id];
|
||||
}
|
||||
|
||||
void track_av(const LLUUID& id)
|
||||
{
|
||||
if (auto inst = LLFloaterAvatarList::getIfExists())
|
||||
@@ -336,20 +348,15 @@ void track_av(const LLUUID& id)
|
||||
LLTracker::trackLocation(avatars[id], LLStringUtil::null, LLStringUtil::null);
|
||||
}
|
||||
|
||||
void teleport_to(const LLUUID& id)
|
||||
{
|
||||
if (auto entry = LLFloaterAvatarList::instanceExists() ? LLFloaterAvatarList::instance().getAvatarEntry(id) : nullptr)
|
||||
gAgent.teleportViaLocation(entry->getPosition());
|
||||
else
|
||||
{
|
||||
LLWorld::pos_map_t avatars;
|
||||
LLWorld::instance().getAvatars(&avatars);
|
||||
gAgent.teleportViaLocation(avatars[id]);
|
||||
}
|
||||
}
|
||||
|
||||
static void cmd_profile(const LLAvatarListEntry* entry);
|
||||
static void cmd_toggle_mark(LLAvatarListEntry* entry);
|
||||
static void cmd_toggle_mark(LLAvatarListEntry* entry)
|
||||
{
|
||||
bool mark = !entry->isMarked();
|
||||
void mm_setcolor(LLUUID key, LLColor4 col);
|
||||
void mm_clearMark(const LLUUID & id);
|
||||
mark ? mm_setcolor(entry->getID(), LLColor4::red) : mm_clearMark(entry->getID());
|
||||
entry->setMarked(mark);
|
||||
}
|
||||
static void cmd_ar(const LLAvatarListEntry* entry);
|
||||
static void cmd_teleport(const LLAvatarListEntry* entry);
|
||||
|
||||
@@ -365,15 +372,6 @@ namespace
|
||||
}
|
||||
};
|
||||
|
||||
class RadarMark : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLFloaterAvatarList::instance().doCommand(cmd_toggle_mark);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class RadarFocus : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -401,15 +399,6 @@ namespace
|
||||
}
|
||||
};
|
||||
|
||||
class RadarTeleportTo : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
teleport_to(LFIDBearer::getActiveSelectedID());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class RadarAnnounceKeys : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -425,11 +414,9 @@ void addMenu(view_listener_t* menu, const std::string& name);
|
||||
void add_radar_listeners()
|
||||
{
|
||||
addMenu(new RadarTrack, "Radar.Track");
|
||||
addMenu(new RadarMark, "Radar.Mark");
|
||||
addMenu(new RadarFocus, "Radar.Focus");
|
||||
addMenu(new RadarFocusPrev, "Radar.FocusPrev");
|
||||
addMenu(new RadarFocusNext, "Radar.FocusNext");
|
||||
addMenu(new RadarTeleportTo, "Radar.TeleportTo");
|
||||
addMenu(new RadarAnnounceKeys, "Radar.AnnounceKeys");
|
||||
}
|
||||
|
||||
@@ -790,7 +777,7 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
if (entry->isMarked())
|
||||
{
|
||||
mark.value = "X";
|
||||
mark.color = LLColor4::blue;
|
||||
mark.color = *mm_getMarkerColor(av_id);
|
||||
mark.font_style = "BOLD";
|
||||
}
|
||||
element.columns.add(mark);
|
||||
@@ -1460,7 +1447,6 @@ void send_estate_message(const std::string request, const std::vector<std::strin
|
||||
|
||||
static void cmd_append_names(const LLAvatarListEntry* entry, std::string &str, std::string &sep)
|
||||
{ if(!str.empty())str.append(sep);str.append(entry->getName()); }
|
||||
static void cmd_toggle_mark(LLAvatarListEntry* entry) { entry->toggleMark(); }
|
||||
static void cmd_ar(const LLAvatarListEntry* entry) { LLFloaterReporter::showFromObject(entry->getID()); }
|
||||
static void cmd_profile(const LLAvatarListEntry* entry) { LLAvatarActions::showProfile(entry->getID()); }
|
||||
static void cmd_teleport(const LLAvatarListEntry* entry) { gAgent.teleportViaLocation(entry->getPosition()); }
|
||||
|
||||
@@ -124,7 +124,7 @@ enum ACTIVITY_TYPE
|
||||
|
||||
bool isInList() const { return mIsInList; }
|
||||
|
||||
void toggleMark() { mMarked = !mMarked; }
|
||||
void setMarked(bool marked) { mMarked = marked; }
|
||||
|
||||
struct uuidMatch
|
||||
{
|
||||
|
||||
@@ -622,7 +622,7 @@ void LLPanelLandGeneral::refresh()
|
||||
bool group_owned = parcel->getIsGroupOwned();
|
||||
|
||||
// Is it owned?
|
||||
mTextOwner->setValue(is_public ? LLSD(LLUUID::null) : LLSD().with("id", owner_id).with("group", group_owned));
|
||||
mTextOwner->setValue(is_public ? LLSD(LLUUID::null) : LLSD().with("id", owner_id).with("type", group_owned ? LFIDBearer::GROUP : LFIDBearer::AVATAR));
|
||||
mTextGroup->setValue(is_public ? LLUUID::null : group_id);
|
||||
if (is_public)
|
||||
{
|
||||
@@ -828,7 +828,7 @@ void LLPanelLandGeneral::refreshNames()
|
||||
}
|
||||
|
||||
bool group_owned = parcel->getIsGroupOwned();
|
||||
mTextOwner->setValue(LLSD().with("id", parcel->getOwnerID()).with("group", group_owned));
|
||||
mTextOwner->setValue(LLSD().with("id", parcel->getOwnerID()).with("type", group_owned ? LFIDBearer::GROUP : LFIDBearer::AVATAR));
|
||||
if (group_owned)
|
||||
{
|
||||
mTextOwner->setText(getString("group_owned_text"));
|
||||
|
||||
@@ -58,6 +58,8 @@ public:
|
||||
// [/RLVa:KB]
|
||||
|
||||
private:
|
||||
friend class OverlayToggle;
|
||||
friend class LLScaleMap;
|
||||
LLFloaterMap(const LLSD& key = LLSD());
|
||||
LLNetMap* mPanelMap;
|
||||
};
|
||||
|
||||
@@ -1333,25 +1333,22 @@ BOOL LLFolderView::canCopy() const
|
||||
}
|
||||
|
||||
// copy selected item
|
||||
void LLFolderView::copy()
|
||||
void LLFolderView::copy() const
|
||||
{
|
||||
// *NOTE: total hack to clear the inventory clipboard
|
||||
LLInventoryClipboard::instance().reset();
|
||||
S32 count = mSelectedItems.size();
|
||||
if(getVisible() && getEnabled() && (count > 0))
|
||||
{
|
||||
LLFolderViewEventListener* listener = NULL;
|
||||
selected_items_t::iterator item_it;
|
||||
for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it)
|
||||
for (auto item : mSelectedItems)
|
||||
{
|
||||
listener = (*item_it)->getListener();
|
||||
if(listener)
|
||||
if(auto listener = item->getListener())
|
||||
{
|
||||
listener->copyToClipboard();
|
||||
}
|
||||
}
|
||||
}
|
||||
mSearchString.clear();
|
||||
//mSearchString.clear(); // Singu Note: There's no good reason to clear out the jumpto item search string now, it'll time out anyway, let's remain const
|
||||
}
|
||||
|
||||
BOOL LLFolderView::canCut() const
|
||||
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
|
||||
// Copy & paste
|
||||
virtual BOOL canCopy() const;
|
||||
virtual void copy();
|
||||
virtual void copy() const override final;
|
||||
|
||||
virtual BOOL canCut() const;
|
||||
virtual void cut();
|
||||
|
||||
@@ -306,6 +306,8 @@ void LLHoverView::updateText()
|
||||
line.append(LLTrans::getString("TooltipPerson"));
|
||||
}
|
||||
mText.push_back(line);
|
||||
|
||||
mText.push_back(llformat("ARC: %d", hit_object->asAvatar()->getVisualComplexity()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -542,11 +544,16 @@ void LLHoverView::updateText()
|
||||
line.append(LLTrans::getString("TooltipForSaleMsg", args));
|
||||
}
|
||||
mText.push_back(line);
|
||||
|
||||
auto objects = LLSelectMgr::getInstance()->getHoverObjects();
|
||||
|
||||
line.clear();
|
||||
S32 prim_count = LLSelectMgr::getInstance()->getHoverObjects()->getObjectCount();
|
||||
S32 prim_count = objects->getObjectCount();
|
||||
line.append(llformat("Prims: %d", prim_count));
|
||||
mText.push_back(line);
|
||||
|
||||
mText.push_back(llformat("LI: %.2f", objects->getSelectedLinksetCost()));
|
||||
|
||||
line.clear();
|
||||
line.append("Position: ");
|
||||
|
||||
|
||||
@@ -1128,7 +1128,7 @@ void LLFloaterIMPanel::removeDynamicFocus()
|
||||
findChild<LLComboBox>("instant_message_flyout")->remove(getString("focus"));
|
||||
}
|
||||
|
||||
void copy_profile_uri(const LLUUID& id, LFIDBearer::Type type = LFIDBearer::AVATAR);
|
||||
void copy_profile_uri(const LLUUID& id, const LFIDBearer::Type& type = LFIDBearer::AVATAR);
|
||||
|
||||
void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
|
||||
{
|
||||
|
||||
@@ -39,17 +39,17 @@ static LLRegisterWidget<LLNameBox> r("name_box");
|
||||
|
||||
LLNameBox::LLNameBox(const std::string& name,
|
||||
const LLUUID& name_id,
|
||||
bool is_group,
|
||||
const Type& type,
|
||||
const std::string& loading,
|
||||
bool rlv_sensitive,
|
||||
const std::string& name_system)
|
||||
: LLNameUI(loading, rlv_sensitive, name_id, is_group, name_system)
|
||||
: LLNameUI(loading, rlv_sensitive, name_id, type, name_system)
|
||||
, LLTextBox(name, LLRect(), LLStringUtil::null, nullptr, TRUE)
|
||||
{
|
||||
setClickedCallback(boost::bind(&LLNameUI::showProfile, this));
|
||||
if (!name_id.isNull())
|
||||
{
|
||||
setNameID(name_id, is_group);
|
||||
setNameID(name_id, type);
|
||||
}
|
||||
else setText(mInitialValue);
|
||||
}
|
||||
@@ -104,8 +104,8 @@ LLXMLNodePtr LLNameBox::getXML(bool save_children) const
|
||||
// static
|
||||
LLView* LLNameBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
bool is_group = false;
|
||||
node->getAttribute_bool("is_group", is_group);
|
||||
S8 type = AVATAR;
|
||||
node->getAttributeS8("id_type", type);
|
||||
LLUUID id;
|
||||
node->getAttributeUUID("id", id);
|
||||
std::string loading;
|
||||
@@ -114,7 +114,7 @@ LLView* LLNameBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f
|
||||
node->getAttribute_bool("rlv_sensitive", rlv_sensitive);
|
||||
std::string name_system;
|
||||
node->getAttributeString("name_system", name_system);
|
||||
LLNameBox* name_box = new LLNameBox("name_box", id, is_group, loading, rlv_sensitive, name_system);
|
||||
LLNameBox* name_box = new LLNameBox("name_box", id, (Type)type, loading, rlv_sensitive, name_system);
|
||||
name_box->initFromXML(node,parent);
|
||||
|
||||
return name_box;
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
|
||||
LLNameBox(const std::string& name,
|
||||
const LLUUID& name_id = LLUUID::null,
|
||||
bool is_group = false,
|
||||
const Type& type = AVATAR,
|
||||
const std::string& loading = LLStringUtil::null,
|
||||
bool rlv_sensitive = false,
|
||||
const std::string& name_system = LLStringUtil::null);
|
||||
|
||||
@@ -42,20 +42,20 @@ static LLRegisterWidget<LLNameEditor> r("name_editor");
|
||||
|
||||
LLNameEditor::LLNameEditor(const std::string& name, const LLRect& rect,
|
||||
const LLUUID& name_id,
|
||||
bool is_group,
|
||||
const Type& type,
|
||||
const std::string& loading,
|
||||
bool rlv_sensitive,
|
||||
const std::string& name_system,
|
||||
bool click_for_profile,
|
||||
const LLFontGL* glfont,
|
||||
S32 max_text_length)
|
||||
: LLNameUI(loading, rlv_sensitive, name_id, is_group, name_system)
|
||||
: LLNameUI(loading, rlv_sensitive, name_id, type, name_system)
|
||||
, LLLineEditor(name, rect, LLStringUtil::null, glfont, max_text_length)
|
||||
, mClickForProfile(click_for_profile)
|
||||
{
|
||||
if (!name_id.isNull())
|
||||
{
|
||||
setNameID(name_id, is_group);
|
||||
setNameID(name_id, type);
|
||||
}
|
||||
else setText(mInitialValue);
|
||||
}
|
||||
@@ -83,10 +83,10 @@ BOOL LLNameEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
||||
}
|
||||
else // TODO: This is lazy, but I cannot recall a name editor that switches between group and avatar, so logic is not needed yet.
|
||||
{
|
||||
new_menu = mIsGroup ? "menu_nameeditor_group.xml" : "menu_nameeditor_avatar.xml";
|
||||
new_menu = mType == GROUP ? "menu_nameeditor_group.xml" : "menu_nameeditor_avatar.xml";
|
||||
}
|
||||
if (!new_menu.empty()) setContextMenu(LLUICtrlFactory::instance().buildMenu(new_menu, LLMenuGL::sMenuContainer));
|
||||
sActive = this;
|
||||
setActive();
|
||||
|
||||
return LLLineEditor::handleRightMouseDown(x, y, mask);
|
||||
}
|
||||
@@ -136,8 +136,8 @@ LLView* LLNameEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
|
||||
|
||||
S32 max_text_length = 1024;
|
||||
node->getAttributeS32("max_length", max_text_length);
|
||||
bool is_group = false;
|
||||
node->getAttribute_bool("is_group", is_group);
|
||||
S8 type = AVATAR;
|
||||
node->getAttributeS8("id_type", type);
|
||||
LLUUID id;
|
||||
node->getAttributeUUID("id", id);
|
||||
std::string loading;
|
||||
@@ -151,7 +151,7 @@ LLView* LLNameEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
|
||||
|
||||
LLNameEditor* line_editor = new LLNameEditor("name_editor",
|
||||
rect,
|
||||
id, is_group, loading, rlv_sensitive, name_system,
|
||||
id, (Type)type, loading, rlv_sensitive, name_system,
|
||||
click_for_profile,
|
||||
LLView::selectFont(node),
|
||||
max_text_length);
|
||||
|
||||
@@ -44,7 +44,7 @@ class LLNameEditor final
|
||||
public:
|
||||
LLNameEditor(const std::string& name, const LLRect& rect,
|
||||
const LLUUID& name_id = LLUUID::null,
|
||||
bool is_group = false,
|
||||
const Type& type = AVATAR,
|
||||
const std::string& loading = LLStringUtil::null,
|
||||
bool rlv_sensitive = false,
|
||||
const std::string& name_system = LLStringUtil::null,
|
||||
|
||||
@@ -46,35 +46,36 @@
|
||||
// statics
|
||||
std::set<LLNameUI*> LLNameUI::sInstances;
|
||||
|
||||
LLNameUI::LLNameUI(const std::string& loading, bool rlv_sensitive, const LLUUID& id, bool is_group, const std::string& name_system)
|
||||
: mNameID(id), mRLVSensitive(rlv_sensitive), mIsGroup(!is_group), mAllowInteract(false)
|
||||
LLNameUI::LLNameUI(const std::string& loading, bool rlv_sensitive, const LLUUID& id, const Type& type, const std::string& name_system)
|
||||
: mNameID(id), mRLVSensitive(rlv_sensitive), mType(NONE), mAllowInteract(false)
|
||||
, mNameSystem(name_system.empty() ? "PhoenixNameSystem" : name_system), mInitialValue(!loading.empty() ? loading : LLTrans::getString("LoadingData"))
|
||||
{
|
||||
setIsGroup(is_group);
|
||||
setType(type);
|
||||
}
|
||||
|
||||
void LLNameUI::setIsGroup(bool is_group)
|
||||
void LLNameUI::setType(const Type& type)
|
||||
{
|
||||
// Disconnect active connections if needed
|
||||
for (auto& connection : mConnections)
|
||||
connection.disconnect();
|
||||
|
||||
if (mIsGroup != is_group)
|
||||
if (mType != type)
|
||||
{
|
||||
if (mIsGroup = is_group)
|
||||
if (type == GROUP)
|
||||
sInstances.insert(this);
|
||||
else
|
||||
{
|
||||
sInstances.erase(this);
|
||||
mConnections[1] = gSavedSettings.getControl(mNameSystem)->getCommitSignal()->connect(boost::bind(&LLNameUI::setNameText, this));
|
||||
}
|
||||
mType = type;
|
||||
}
|
||||
}
|
||||
|
||||
void LLNameUI::setNameID(const LLUUID& name_id, bool is_group)
|
||||
void LLNameUI::setNameID(const LLUUID& name_id, const Type& type)
|
||||
{
|
||||
mNameID = name_id;
|
||||
setIsGroup(is_group);
|
||||
setType(type);
|
||||
|
||||
if (mAllowInteract = mNameID.notNull())
|
||||
{
|
||||
@@ -82,7 +83,7 @@ void LLNameUI::setNameID(const LLUUID& name_id, bool is_group)
|
||||
}
|
||||
else
|
||||
{
|
||||
setText(LLTrans::getString(mIsGroup ? "GroupNameNone" : "AvatarNameNobody"));
|
||||
setText(LLTrans::getString(mType == GROUP ? "GroupNameNone" : "AvatarNameNobody"));
|
||||
displayAsLink(false);
|
||||
}
|
||||
}
|
||||
@@ -92,7 +93,7 @@ void LLNameUI::setNameText()
|
||||
std::string name;
|
||||
bool got_name = false;
|
||||
|
||||
if (mIsGroup)
|
||||
if (mType == GROUP)
|
||||
{
|
||||
got_name = gCacheName->getGroupName(mNameID, name);
|
||||
}
|
||||
@@ -105,7 +106,7 @@ void LLNameUI::setNameText()
|
||||
mConnections[0] = LLAvatarNameCache::get(mNameID, boost::bind(&LLNameUI::setNameText, this));
|
||||
}
|
||||
|
||||
if (!mIsGroup && got_name && mRLVSensitive) // Filter if needed
|
||||
if (mType == AVATAR && got_name && mRLVSensitive) // Filter if needed
|
||||
{
|
||||
if ((RlvActions::hasBehaviour(RLV_BHVR_SHOWNAMES) || RlvActions::hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
|
||||
&& mNameID != gAgentID && RlvUtil::isNearbyAgent(mNameID))
|
||||
@@ -123,7 +124,7 @@ void LLNameUI::setNameText()
|
||||
setText(got_name ? name : mInitialValue);
|
||||
}
|
||||
|
||||
void LLNameUI::refresh(const LLUUID& id, const std::string& full_name, bool is_group)
|
||||
void LLNameUI::refresh(const LLUUID& id, const std::string& full_name)
|
||||
{
|
||||
if (id == mNameID)
|
||||
{
|
||||
@@ -131,12 +132,11 @@ void LLNameUI::refresh(const LLUUID& id, const std::string& full_name, bool is_g
|
||||
}
|
||||
}
|
||||
|
||||
void LLNameUI::refreshAll(const LLUUID& id, const std::string& full_name, bool is_group)
|
||||
void LLNameUI::refreshAll(const LLUUID& id, const std::string& full_name)
|
||||
{
|
||||
if (!is_group) return;
|
||||
for (auto box : sInstances)
|
||||
{
|
||||
box->refresh(id, full_name, is_group);
|
||||
box->refresh(id, full_name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,8 +144,10 @@ void LLNameUI::showProfile()
|
||||
{
|
||||
if (!mAllowInteract) return;
|
||||
|
||||
if (mIsGroup)
|
||||
LLGroupActions::show(mNameID);
|
||||
else
|
||||
LLAvatarActions::showProfile(mNameID);
|
||||
switch (LFIDBearer::getActiveType())
|
||||
{
|
||||
case LFIDBearer::GROUP: LLGroupActions::show(mNameID); break;
|
||||
case LFIDBearer::AVATAR: LLAvatarActions::showProfile(mNameID); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,24 +38,23 @@
|
||||
|
||||
struct LLNameUI : public LFIDBearer
|
||||
{
|
||||
LLNameUI(const std::string& loading = LLStringUtil::null, bool rlv_sensitive = false, const LLUUID& id = LLUUID::null, bool is_group = false, const std::string& name_system = LLStringUtil::null);
|
||||
LLNameUI(const std::string& loading = LLStringUtil::null, bool rlv_sensitive = false, const LLUUID& id = LLUUID::null, const Type& type = AVATAR, const std::string& name_system = LLStringUtil::null);
|
||||
virtual ~LLNameUI()
|
||||
{
|
||||
if (mIsGroup)
|
||||
sInstances.erase(this);
|
||||
if (mType == GROUP) sInstances.erase(this);
|
||||
for (auto& connection : mConnections)
|
||||
connection.disconnect();
|
||||
}
|
||||
|
||||
LLUUID getStringUUIDSelectedItem() const override final { return mNameID; }
|
||||
S32 getNumSelected() const override final { return 1; }
|
||||
Type getSelectedType() const override final { return mIsGroup ? GROUP : AVATAR; }
|
||||
Type getSelectedType() const override final { return mType; }
|
||||
|
||||
void setIsGroup(bool is_group);
|
||||
void setNameID(const LLUUID& name_id, bool is_group);
|
||||
void setType(const Type& type);
|
||||
void setNameID(const LLUUID& name_id, const Type& type);
|
||||
void setNameText(); // Sets the name to whatever the name cache has at the moment
|
||||
void refresh(const LLUUID& id, const std::string& full_name, bool is_group);
|
||||
static void refreshAll(const LLUUID& id, const std::string& full_name, bool is_group);
|
||||
void refresh(const LLUUID& id, const std::string& name);
|
||||
static void refreshAll(const LLUUID& id, const std::string& name);
|
||||
|
||||
void showProfile();
|
||||
|
||||
@@ -66,9 +65,9 @@ struct LLNameUI : public LFIDBearer
|
||||
virtual void setValue(const LLSD& value)
|
||||
{
|
||||
if (value.has("id"))
|
||||
setNameID(value["id"].asUUID(), value["group"].asBoolean());
|
||||
setNameID(value["id"].asUUID(), (Type)value["type"].asInteger());
|
||||
else
|
||||
setNameID(value.asUUID(), mIsGroup);
|
||||
setNameID(value.asUUID(), mType);
|
||||
}
|
||||
// Return agent UUIDs
|
||||
virtual LLSD getValue() const { return LLSD(mNameID); }
|
||||
@@ -80,7 +79,7 @@ private:
|
||||
protected:
|
||||
LLUUID mNameID;
|
||||
bool mRLVSensitive; // Whether or not we're doing RLV filtering
|
||||
bool mIsGroup;
|
||||
Type mType;
|
||||
bool mAllowInteract;
|
||||
std::string mInitialValue;
|
||||
std::string mNameSystem;
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llcolorscheme.h"
|
||||
#include "llfloatermap.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
#include "llframetimer.h"
|
||||
// [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3.0)
|
||||
@@ -295,15 +296,25 @@ std::size_t hash_value(const LLUUID& uuid)
|
||||
return (std::size_t)uuid.getCRC32();
|
||||
}
|
||||
boost::unordered_map<const LLUUID,LLColor4> mm_MarkerColors;
|
||||
bool mm_getMarkerColor(const LLUUID& id, LLColor4& color)
|
||||
const LLColor4* mm_getMarkerColor(const LLUUID& id)
|
||||
{
|
||||
boost::unordered_map<const LLUUID,LLColor4>::const_iterator it = mm_MarkerColors.find(id);
|
||||
if (it == mm_MarkerColors.end()) return false;
|
||||
color = it->second;
|
||||
return true;
|
||||
auto it = mm_MarkerColors.find(id);
|
||||
return it == mm_MarkerColors.end() ? nullptr : &it->second;
|
||||
}
|
||||
|
||||
void LLNetMap::mm_setcolor(LLUUID key,LLColor4 col)
|
||||
bool mm_getMarkerColor(const LLUUID& id, LLColor4& color)
|
||||
{
|
||||
auto c = mm_getMarkerColor(id);
|
||||
if (c) color = *c;
|
||||
return c;
|
||||
}
|
||||
|
||||
void mm_clearMark(const LLUUID& id)
|
||||
{
|
||||
mm_MarkerColors.erase(id);
|
||||
}
|
||||
|
||||
void mm_setcolor(LLUUID key,LLColor4 col)
|
||||
{
|
||||
mm_MarkerColors[key] = col;
|
||||
}
|
||||
@@ -979,8 +990,6 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& tool_tip, LLRect* stick
|
||||
|
||||
LLVector3d myPosition = gAgent.getPositionGlobal();
|
||||
|
||||
std::map<LLUUID, LLVector3d>::iterator current = mClosestAgentsToCursor.begin();
|
||||
std::map<LLUUID, LLVector3d>::iterator end = mClosestAgentsToCursor.end();
|
||||
for (const auto& target : mClosestAgentsToCursor)
|
||||
{
|
||||
const auto& targetUUID = target.first;
|
||||
@@ -1006,7 +1015,7 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& tool_tip, LLRect* stick
|
||||
LLVector3d delta = targetPosition - myPosition;
|
||||
F32 distance = (F32)delta.magVec();
|
||||
if (single_agent)
|
||||
tool_tip.append( llformat("\n\n(Distance: %.02fm)\n",distance) );
|
||||
tool_tip.append( llformat("\n(Distance: %.02fm)\n",distance) );
|
||||
else
|
||||
tool_tip.append(llformat(" (%.02fm)\n", distance));
|
||||
}
|
||||
@@ -1362,7 +1371,7 @@ BOOL LLNetMap::handleMouseUp( S32 x, S32 y, MASK mask )
|
||||
bool OverlayToggle::handleEvent(LLPointer<LLEvent> event, const LLSD& sdParam)
|
||||
{
|
||||
// Force an overlay update
|
||||
LFIDBearer::getActive<LLNetMap>()->mUpdateParcelImage = true;
|
||||
LLFloaterMap::findInstance()->mPanelMap->mUpdateParcelImage = true;
|
||||
return true;
|
||||
}
|
||||
// [/SL:KB]
|
||||
@@ -1474,7 +1483,7 @@ BOOL LLNetMap::handleHover( S32 x, S32 y, MASK mask )
|
||||
// static
|
||||
bool LLScaleMap::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLNetMap *self = LFIDBearer::getActive<LLNetMap>();
|
||||
auto self = LLFloaterMap::findInstance()->mPanelMap;
|
||||
|
||||
S32 level = userdata.asInteger();
|
||||
|
||||
@@ -1499,9 +1508,13 @@ bool LLScaleMap::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
//moymod - minimap color shit
|
||||
void markMassAgents(const LLColor4& color)
|
||||
{
|
||||
auto self = LFIDBearer::getActive<LLNetMap>();
|
||||
for (const auto& id : self->getSelectedIDs())
|
||||
self->mm_setcolor(id, color);
|
||||
auto radar = LLFloaterAvatarList::getInstance();
|
||||
for (const auto& id : LFIDBearer::getActiveSelectedIDs())
|
||||
{
|
||||
mm_setcolor(id, color);
|
||||
if (auto entry = radar ? radar->getAvatarEntry(id) : nullptr)
|
||||
entry->setMarked(true);
|
||||
}
|
||||
}
|
||||
|
||||
bool mmsetred::handleEvent(LLPointer<LLEvent>, const LLSD&)
|
||||
@@ -1531,8 +1544,13 @@ bool mmsetcustom::handleEvent(LLPointer<LLEvent>, const LLSD&)
|
||||
}
|
||||
bool mmsetunmark::handleEvent(LLPointer<LLEvent>, const LLSD&)
|
||||
{
|
||||
auto radar = LLFloaterAvatarList::getInstance();
|
||||
for (const auto& id : LFIDBearer::getActiveSelectedIDs())
|
||||
mm_MarkerColors.erase(id);
|
||||
{
|
||||
mm_clearMark(id);
|
||||
if (auto entry = radar ? radar->getAvatarEntry(id) : nullptr)
|
||||
entry->setMarked(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool mmenableunmark::handleEvent(LLPointer<LLEvent>, const LLSD& userdata)
|
||||
|
||||
@@ -72,9 +72,6 @@ public:
|
||||
uuid_vec_t getSelectedIDs() const override final { return mClosestAgentsAtLastClick; }
|
||||
S32 getNumSelected() const override final { return mClosestAgentsAtLastClick.size(); }
|
||||
|
||||
static void mm_setcolor(LLUUID key,LLColor4 col); //moymod
|
||||
|
||||
|
||||
// [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3.0)
|
||||
void refreshParcelOverlay() { mUpdateParcelImage = true; }
|
||||
// [/SL:KB]
|
||||
@@ -157,7 +154,7 @@ private:
|
||||
LLUUID mClosestAgentToCursor;
|
||||
LLUUID mClosestAgentAtLastRightClick;
|
||||
|
||||
BOOL isAgentUnderCursor() { return mClosestAgentToCursor.notNull(); }
|
||||
BOOL isAgentUnderCursor() const { return mClosestAgentToCursor.notNull(); }
|
||||
LLMenuGL* mPopupMenu;
|
||||
};
|
||||
|
||||
|
||||
@@ -337,12 +337,21 @@ void LLPanelAvatarFirstLife::enableControls(BOOL self)
|
||||
void show_picture(const LLUUID& id, const std::string& name);
|
||||
static std::string profile_picture_title(const std::string& str) { return "Profile Picture: " + str; }
|
||||
static void show_partner_help() { LLNotificationsUtil::add("ClickPartnerHelpAvatar", LLSD(), LLSD(), boost::bind(LLPanelAvatarSecondLife::onClickPartnerHelpLoadURL, _1, _2)); }
|
||||
void show_log_browser(const LLUUID& id)
|
||||
void show_log_browser(const LLUUID& id, const LFIDBearer::Type& type)
|
||||
{
|
||||
void show_log_browser(const std::string& name, const std::string& id);
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(id, &av_name);
|
||||
show_log_browser(av_name.getLegacyName(), id.asString());
|
||||
std::string name;
|
||||
if (type == LFIDBearer::AVATAR)
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(id, &av_name);
|
||||
name = av_name.getLegacyName();
|
||||
}
|
||||
else // GROUP
|
||||
{
|
||||
gCacheName->getGroupName(id, name);
|
||||
}
|
||||
show_log_browser(name, id.asString());
|
||||
}
|
||||
BOOL LLPanelAvatarSecondLife::postBuild()
|
||||
{
|
||||
@@ -368,7 +377,7 @@ BOOL LLPanelAvatarSecondLife::postBuild()
|
||||
getChild<LLUICtrl>("GroupInvite_Button")->setCommitCallback(boost::bind(static_cast<void(*)(const LLUUID&)>(LLAvatarActions::inviteToGroup), boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
|
||||
getChild<LLUICtrl>("Add Friend...")->setCommitCallback(boost::bind(LLAvatarActions::requestFriendshipDialog, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
getChild<LLUICtrl>("Log")->setCommitCallback(boost::bind(show_log_browser, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
getChild<LLUICtrl>("Log")->setCommitCallback(boost::bind(show_log_browser, boost::bind(&LLPanelAvatar::getAvatarID, pa), LFIDBearer::AVATAR));
|
||||
getChild<LLUICtrl>("Pay...")->setCommitCallback(boost::bind(LLAvatarActions::pay, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
if (LLUICtrl* ctrl = findChild<LLUICtrl>("Mute"))
|
||||
{
|
||||
@@ -1241,7 +1250,7 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id)
|
||||
if (mAvatarID.notNull())
|
||||
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarID, this);
|
||||
mAvatarID = avatar_id;
|
||||
getChild<LLNameEditor>("dnname")->setNameID(avatar_id, false);
|
||||
getChild<LLNameEditor>("dnname")->setNameID(avatar_id, LFIDBearer::AVATAR);
|
||||
}
|
||||
|
||||
if (avatar_id.isNull()) return;
|
||||
@@ -1399,7 +1408,7 @@ void LLPanelAvatar::onClickCopy(const LLSD& val)
|
||||
}
|
||||
else
|
||||
{
|
||||
void copy_profile_uri(const LLUUID& id, LFIDBearer::Type type = LFIDBearer::AVATAR);
|
||||
void copy_profile_uri(const LLUUID& id, const LFIDBearer::Type& type = LFIDBearer::AVATAR);
|
||||
copy_profile_uri(mAvatarID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ void LLPanelGroupTab::handleClickHelp()
|
||||
}
|
||||
}
|
||||
|
||||
void copy_profile_uri(const LLUUID& id, LFIDBearer::Type type);
|
||||
void copy_profile_uri(const LLUUID& id, const LFIDBearer::Type& type);
|
||||
|
||||
LLPanelGroup::LLPanelGroup(const LLUUID& group_id)
|
||||
: LLPanel("PanelGroup", LLRect(), FALSE),
|
||||
|
||||
@@ -101,15 +101,15 @@ void LLPanelMediaSettingsPermissions::draw()
|
||||
{
|
||||
if(mPermsGroupName)
|
||||
{
|
||||
mPermsGroupName->setNameID(group_id, true);
|
||||
mPermsGroupName->setNameID(group_id, LFIDBearer::GROUP);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mPermsGroupName)
|
||||
{
|
||||
mPermsGroupName->setNameID(LLUUID::null, TRUE);
|
||||
mPermsGroupName->refresh(LLUUID::null, std::string(), true);
|
||||
mPermsGroupName->setNameID(LLUUID::null, LFIDBearer::GROUP);
|
||||
mPermsGroupName->refresh(LLUUID::null, std::string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ void LLPanelPermissions::refresh()
|
||||
{
|
||||
if(mLabelGroupName)
|
||||
{
|
||||
mLabelGroupName->setNameID(group_id, TRUE);
|
||||
mLabelGroupName->setNameID(group_id, LFIDBearer::GROUP);
|
||||
mLabelGroupName->setEnabled(TRUE);
|
||||
}
|
||||
}
|
||||
@@ -453,8 +453,8 @@ void LLPanelPermissions::refresh()
|
||||
{
|
||||
if(mLabelGroupName)
|
||||
{
|
||||
mLabelGroupName->setNameID(LLUUID::null, TRUE);
|
||||
mLabelGroupName->refresh(LLUUID::null, std::string(), true);
|
||||
mLabelGroupName->setNameID(LLUUID::null, LFIDBearer::GROUP);
|
||||
mLabelGroupName->refresh(LLUUID::null, std::string());
|
||||
mLabelGroupName->setEnabled(FALSE);
|
||||
}
|
||||
}
|
||||
@@ -1016,7 +1016,7 @@ void LLPanelPermissions::cbGroupID(LLUUID group_id)
|
||||
{
|
||||
if(mLabelGroupName)
|
||||
{
|
||||
mLabelGroupName->setNameID(group_id, TRUE);
|
||||
mLabelGroupName->setNameID(group_id, LFIDBearer::GROUP);
|
||||
}
|
||||
LLSelectMgr::getInstance()->sendGroup(group_id);
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ void transition_back_to_login_panel(const std::string& emsg);
|
||||
|
||||
void callback_cache_name(const LLUUID& id, const std::string& full_name, bool is_group)
|
||||
{
|
||||
LLNameUI::refreshAll(id, full_name, is_group);
|
||||
LLNameUI::refreshAll(id, full_name);
|
||||
|
||||
// TODO: Actually be intelligent about the refresh.
|
||||
// For now, just brute force refresh the dialogs.
|
||||
|
||||
@@ -533,7 +533,7 @@ void LLToolPie::walkToClickedLocation()
|
||||
mAutoPilotDestination->setDuration(3.f);
|
||||
*/
|
||||
|
||||
handle_go_to();
|
||||
handle_go_to(mPick.mPosGlobal);
|
||||
}
|
||||
|
||||
// When we get object properties after left-clicking on an object
|
||||
@@ -763,8 +763,7 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
|
||||
void LLToolPie::stopClickToWalk()
|
||||
{
|
||||
mPick.mPosGlobal = gAgent.getPositionGlobal();
|
||||
handle_go_to();
|
||||
handle_go_to(gAgent.getPositionGlobal());
|
||||
/* Singu TODO: llhudeffectblob
|
||||
if(mAutoPilotDestination)
|
||||
{
|
||||
|
||||
@@ -3529,7 +3529,7 @@ LLViewerMediaImpl::canCut() const
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// virtual
|
||||
void
|
||||
LLViewerMediaImpl::copy()
|
||||
LLViewerMediaImpl::copy() const
|
||||
{
|
||||
LLPluginClassMedia* mMediaSource = getMediaPlugin();
|
||||
if (mMediaSource)
|
||||
|
||||
@@ -339,7 +339,7 @@ public:
|
||||
/*virtual*/ void cut() override;
|
||||
/*virtual*/ BOOL canCut() const override;
|
||||
|
||||
/*virtual*/ void copy() override;
|
||||
/*virtual*/ void copy() const override final;
|
||||
/*virtual*/ BOOL canCopy() const override;
|
||||
|
||||
/*virtual*/ void paste() override;
|
||||
|
||||
@@ -135,6 +135,7 @@
|
||||
#include "llfloaternotificationsconsole.h"
|
||||
|
||||
// <edit>
|
||||
#include "jcfloaterareasearch.h"
|
||||
#include "lltexteditor.h" // Initialize the text editor menu listeners in here
|
||||
#include "llfloatermessagelog.h"
|
||||
#include "shfloatermediaticker.h"
|
||||
@@ -2505,15 +2506,22 @@ BOOL enable_has_attachments(void*)
|
||||
//---------------------------------------------------------------------------
|
||||
// Avatar pie menu
|
||||
//---------------------------------------------------------------------------
|
||||
//void handle_follow(void *userdata)
|
||||
//{
|
||||
// // follow a given avatar by ID
|
||||
// LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
||||
// if (objectp)
|
||||
// {
|
||||
// gAgent.startFollowPilot(objectp->getID());
|
||||
// }
|
||||
//}
|
||||
|
||||
class LLObjectFollow : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
// follow a given avatar by ID
|
||||
LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
||||
if (objectp)
|
||||
{
|
||||
if (auto av = objectp->getAvatarAncestor()) // Follow the avatar, not a control avatar or an attachment, if possible
|
||||
objectp = av;
|
||||
gAgent.startFollowPilot(objectp->getID(), true, gSavedSettings.getF32("SinguFollowDistance"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
bool enable_object_mute()
|
||||
{
|
||||
@@ -2837,12 +2845,11 @@ class LLObjectPFLinksetsSelected : public view_listener_t
|
||||
|
||||
// </edit>
|
||||
|
||||
bool handle_go_to()
|
||||
void handle_go_to(const LLVector3d& pos)
|
||||
{
|
||||
// try simulator autopilot
|
||||
std::vector<std::string> strings;
|
||||
std::string val;
|
||||
LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
|
||||
val = llformat("%.9g", pos.mdV[VX]);
|
||||
strings.push_back(val);
|
||||
val = llformat("%.9g", pos.mdV[VY]);
|
||||
@@ -2868,14 +2875,14 @@ bool handle_go_to()
|
||||
|
||||
// Could be first use
|
||||
LLFirstUse::useGoTo();
|
||||
return true;
|
||||
}
|
||||
|
||||
class LLGoToObject : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
return handle_go_to();
|
||||
handle_go_to(LLToolPie::instance().getPick().mPosGlobal);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -9035,17 +9042,46 @@ template<typename T> T* get_focused()
|
||||
return t;
|
||||
}
|
||||
|
||||
const std::string get_slurl_for(const LLUUID& id, LFIDBearer::Type type)
|
||||
const JCFloaterAreaSearch::ObjectData* get_obj_data(const LLUUID& id)
|
||||
{
|
||||
return type == LFIDBearer::GROUP ? LLGroupActions::getSLURL(id) : LLAvatarActions::getSLURL(id);
|
||||
auto areasearch = JCFloaterAreaSearch::findInstance();
|
||||
return areasearch ? areasearch->getObjectData(id) : nullptr;
|
||||
}
|
||||
|
||||
const LLWString get_wslurl_for(const LLUUID& id, LFIDBearer::Type type)
|
||||
const std::string get_slurl_for(const LLUUID& id, const LFIDBearer::Type& type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case LFIDBearer::GROUP: return LLGroupActions::getSLURL(id);
|
||||
case LFIDBearer::AVATAR: return LLAvatarActions::getSLURL(id);
|
||||
case LFIDBearer::OBJECT:
|
||||
{
|
||||
const auto& obj_data = get_obj_data(id);
|
||||
if (!obj_data) return LLStringUtil::null;
|
||||
|
||||
LLSD sdQuery;
|
||||
sdQuery["name"] = obj_data->name;
|
||||
sdQuery["owner"] = obj_data->owner_id;
|
||||
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) && (obj_data->owner_id != gAgentID))
|
||||
sdQuery["rlv_shownames"] = true;
|
||||
|
||||
if (const auto obj = gObjectList.findObject(id))
|
||||
if (const auto region = obj->getRegion())
|
||||
sdQuery["slurl"] = LLSLURL(region->getName(), obj->getPositionAgent()).getLocationString();
|
||||
|
||||
return LLSLURL("objectim", id, LLURI::mapToQueryString(sdQuery)).getSLURLString();
|
||||
}
|
||||
default: return LLStringUtil::null;
|
||||
}
|
||||
}
|
||||
|
||||
const LLWString get_wslurl_for(const LLUUID& id, const LFIDBearer::Type& type)
|
||||
{
|
||||
return utf8str_to_wstring(get_slurl_for(id, type));
|
||||
}
|
||||
|
||||
void copy_profile_uri(const LLUUID& id, LFIDBearer::Type type)
|
||||
void copy_profile_uri(const LLUUID& id, const LFIDBearer::Type& type)
|
||||
{
|
||||
gViewerWindow->getWindow()->copyTextToClipboard(get_wslurl_for(id, type));
|
||||
}
|
||||
@@ -9187,10 +9223,19 @@ class ListCopyNames : public view_listener_t
|
||||
return ret;
|
||||
}
|
||||
|
||||
static std::string getObjectName(const LLUUID& id)
|
||||
{
|
||||
const auto& obj_data = get_obj_data(id);
|
||||
return obj_data ? obj_data->name : LLStringUtil::null;
|
||||
}
|
||||
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLWString str;
|
||||
copy_from_ids(LFIDBearer::getActiveSelectedIDs(), LFIDBearer::getActiveType() == LFIDBearer::GROUP ? getGroupName : getAvatarName);
|
||||
const auto& type = LFIDBearer::getActiveType();
|
||||
copy_from_ids(LFIDBearer::getActiveSelectedIDs(), type == LFIDBearer::GROUP ? getGroupName :
|
||||
type == LFIDBearer::OBJECT ? getObjectName :
|
||||
getAvatarName);
|
||||
if (!str.empty()) LLView::getWindow()->copyTextToClipboard(str);
|
||||
return true;
|
||||
}
|
||||
@@ -9281,13 +9326,13 @@ bool can_show_web_profile()
|
||||
return !gSavedSettings.getString("WebProfileURL").empty();
|
||||
}
|
||||
|
||||
void show_log_browser(const LLUUID& id);
|
||||
void show_log_browser(const LLUUID& id, const LFIDBearer::Type& type);
|
||||
class ListShowLog : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
for (const LLUUID& id : LFIDBearer::getActiveSelectedIDs())
|
||||
show_log_browser(id);
|
||||
show_log_browser(id, LFIDBearer::getActiveType());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -9300,6 +9345,7 @@ class ListShowProfile : public view_listener_t
|
||||
{
|
||||
case LFIDBearer::AVATAR: LLAvatarActions::showProfiles(LFIDBearer::getActiveSelectedIDs()); break;
|
||||
case LFIDBearer::GROUP: LLGroupActions::showProfiles(LFIDBearer::getActiveSelectedIDs()); break;
|
||||
case LFIDBearer::OBJECT: for (const auto& id : LFIDBearer::getActiveSelectedIDs()) LLUrlAction::openURL(get_slurl_for(id, LFIDBearer::OBJECT)); break;
|
||||
default: break;
|
||||
}
|
||||
return true;
|
||||
@@ -9353,6 +9399,17 @@ class ListStartIM : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
const LLVector3d& get_av_pos(const LLUUID& id);
|
||||
class ListTeleportTo : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
const auto&& id = LFIDBearer::getActiveSelectedID();
|
||||
gAgent.teleportViaLocation(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? gObjectList.findObject(id)->getPositionGlobal() : get_av_pos(id));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class ListAbuseReport : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -9385,7 +9442,27 @@ class ListIsNearby : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(is_nearby(LFIDBearer::getActiveSelectedID()));
|
||||
const auto&& id = LFIDBearer::getActiveSelectedID();
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? !!gObjectList.findObject(id) : is_nearby(id));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class ListFollow : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gAgent.startFollowPilot(LFIDBearer::getActiveSelectedID(), true, gSavedSettings.getF32("SinguFollowDistance"));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class ListGoTo : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
auto id = LFIDBearer::getActiveSelectedID();
|
||||
handle_go_to(LFIDBearer::getActiveType() == LFIDBearer::AVATAR ? get_av_pos(id) : gObjectList.findObject(id)->getPositionGlobal());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -9546,6 +9623,15 @@ class ListActivate : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
class ListObjectCamTo : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gAgentCamera.lookAtObject(LFIDBearer::getActiveSelectedID(), false);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class MediaCtrlCopyURL : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -9792,6 +9878,7 @@ void initialize_menus()
|
||||
addMenu(new LLOHGOD(), "Object.EnableExplode");
|
||||
add_wave_listeners();
|
||||
add_dae_listeners();
|
||||
addMenu(new LLObjectFollow(), "Object.Follow");
|
||||
// </edit>
|
||||
addMenu(new LLObjectMute(), "Object.Mute");
|
||||
addMenu(new LLObjectBuy(), "Object.Buy");
|
||||
@@ -9921,8 +10008,11 @@ void initialize_menus()
|
||||
addMenu(new ListStartCall(), "List.StartCall");
|
||||
addMenu(new ListStartConference(), "List.StartConference");
|
||||
addMenu(new ListStartIM(), "List.StartIM");
|
||||
addMenu(new ListTeleportTo, "List.TeleportTo");
|
||||
addMenu(new ListAbuseReport(), "List.AbuseReport");
|
||||
addMenu(new ListIsNearby, "List.IsNearby");
|
||||
addMenu(new ListFollow, "List.Follow");
|
||||
addMenu(new ListGoTo, "List.GoTo");
|
||||
addMenu(new ListTrack, "List.Track");
|
||||
addMenu(new ListEject(), "List.ParcelEject");
|
||||
addMenu(new ListFreeze(), "List.Freeze");
|
||||
@@ -9934,6 +10024,7 @@ void initialize_menus()
|
||||
addMenu(new ListLeave, "List.Leave");
|
||||
addMenu(new ListJoin, "List.Join");
|
||||
addMenu(new ListActivate, "List.Activate");
|
||||
addMenu(new ListObjectCamTo, "List.Object.CamTo");
|
||||
|
||||
add_radar_listeners();
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ void handle_object_sit_or_stand();
|
||||
void handle_give_money_dialog();
|
||||
bool enable_pay_object();
|
||||
bool enable_buy_object();
|
||||
bool handle_go_to();
|
||||
void handle_go_to(const LLVector3d& pos);
|
||||
|
||||
// Export to XML or Collada
|
||||
void handle_export_selected( void * );
|
||||
|
||||
@@ -4882,9 +4882,10 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
|
||||
|
||||
if (!gLastVersionChannel.empty() && gSavedSettings.getBOOL("SGServerVersionChangedNotification"))
|
||||
{
|
||||
LLSD payload;
|
||||
payload["message"] = version_channel;
|
||||
LLNotificationsUtil::add("ServerVersionChanged", LLSD(), payload);
|
||||
LLSD args;
|
||||
args["OLD_VERSION"] = gLastVersionChannel;
|
||||
args["NEW_VERSION"] = version_channel;
|
||||
LLNotificationsUtil::add("ServerVersionChanged", args);
|
||||
}
|
||||
|
||||
gLastVersionChannel = version_channel;
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
private:
|
||||
//void parseCommandLineURIs();
|
||||
bool mNameEditted; // Set if the user edits/sets the First or Last name field.
|
||||
bool mNameEditted = false; // Set if the user edits/sets the First or Last name field.
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4153,10 +4153,7 @@ void LLVOAvatar::clearNameTag()
|
||||
//static
|
||||
void LLVOAvatar::invalidateNameTag(const LLUUID& agent_id)
|
||||
{
|
||||
LLViewerObject* obj = gObjectList.findObject(agent_id);
|
||||
if (!obj) return;
|
||||
|
||||
LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(obj);
|
||||
LLVOAvatar* avatar = gObjectList.findAvatar(agent_id);
|
||||
if (!avatar) return;
|
||||
|
||||
avatar->clearNameTag();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*
|
||||
* Copyright (c) 2009-2013, Kitty Barnett
|
||||
* Copyright (c) 2009-2016, Kitty Barnett
|
||||
*
|
||||
* The source code in this file is provided to you under the terms of the
|
||||
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||
@@ -38,6 +38,13 @@ bool RlvActions::canReceiveIM(const LLUUID& idSender)
|
||||
( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIMFROM)) || (!gRlvHandler.isException(RLV_BHVR_RECVIMFROM, idSender)) ) );
|
||||
}
|
||||
|
||||
bool RlvActions::canSendChannel(int nChannel)
|
||||
{
|
||||
return
|
||||
( (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHANNEL)) || (gRlvHandler.isException(RLV_BHVR_SENDCHANNEL, nChannel)) ) /*&&
|
||||
( (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHANNELEXCEPT)) || (!gRlvHandler.isException(RLV_BHVR_SENDCHANNELEXCEPT, nChannel)) )*/;
|
||||
}
|
||||
|
||||
// Checked: 2010-11-30 (RLVa-1.3.0)
|
||||
bool RlvActions::canSendIM(const LLUUID& idRecipient)
|
||||
{
|
||||
@@ -62,29 +69,44 @@ bool RlvActions::canStartIM(const LLUUID& idRecipient)
|
||||
( (!gRlvHandler.hasBehaviour(RLV_BHVR_STARTIMTO)) || (!gRlvHandler.isException(RLV_BHVR_STARTIMTO, idRecipient)) ) );
|
||||
}
|
||||
|
||||
// Handles: @chatwhisper, @chatnormal and @chatshout
|
||||
EChatType RlvActions::checkChatVolume(EChatType chatType)
|
||||
{
|
||||
// In vs Bhvr | whisper | normal | shout | n+w | n+s | s+w | s+n+w |
|
||||
// ---------------------------------------------------------------------------------
|
||||
// whisper | normal | - | - | normal | - | normal | normal |
|
||||
// normal | - | whisper | - | whisper | whisper | - | whisper |
|
||||
// shout | - | whisper | normal | whisper | whisper | normal | whisper |
|
||||
|
||||
RlvHandler& rlvHandler = gRlvHandler;
|
||||
if ( ((CHAT_TYPE_SHOUT == chatType) || (CHAT_TYPE_NORMAL == chatType)) && (rlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) )
|
||||
chatType = CHAT_TYPE_WHISPER;
|
||||
else if ( (CHAT_TYPE_SHOUT == chatType) && (rlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) )
|
||||
chatType = CHAT_TYPE_NORMAL;
|
||||
else if ( (CHAT_TYPE_WHISPER == chatType) && (rlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) )
|
||||
chatType = CHAT_TYPE_NORMAL;
|
||||
return chatType;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Movement
|
||||
//
|
||||
|
||||
// Checked: 2010-12-11 (RLVa-1.2.2)
|
||||
bool RlvActions::canAcceptTpOffer(const LLUUID& idSender)
|
||||
{
|
||||
return ((!gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) || (gRlvHandler.isException(RLV_BHVR_TPLURE, idSender))) && (canStand());
|
||||
}
|
||||
|
||||
// Checked: 2013-11-08 (RLVa-1.4.9)
|
||||
bool RlvActions::autoAcceptTeleportOffer(const LLUUID& idSender)
|
||||
{
|
||||
return ((idSender.notNull()) && (gRlvHandler.isException(RLV_BHVR_ACCEPTTP, idSender))) || (gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTP));
|
||||
}
|
||||
|
||||
// Checked: 2013-11-08 (RLVa-1.4.9)
|
||||
bool RlvActions::canAcceptTpRequest(const LLUUID& idSender)
|
||||
{
|
||||
return (!gRlvHandler.hasBehaviour(RLV_BHVR_TPREQUEST)) || (gRlvHandler.isException(RLV_BHVR_TPREQUEST, idSender));
|
||||
}
|
||||
|
||||
// Checked: 2013-11-08 (RLVa-1.4.9)
|
||||
bool RlvActions::autoAcceptTeleportRequest(const LLUUID& idRequester)
|
||||
{
|
||||
return ((idRequester.notNull()) && (gRlvHandler.isException(RLV_BHVR_ACCEPTTPREQUEST, idRequester))) || (gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTPREQUEST));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*
|
||||
* Copyright (c) 2009-2013, Kitty Barnett
|
||||
* Copyright (c) 2009-2016, Kitty Barnett
|
||||
*
|
||||
* The source code in this file is provided to you under the terms of the
|
||||
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||
@@ -17,6 +17,7 @@
|
||||
#ifndef RLV_ACTIONS_H
|
||||
#define RLV_ACTIONS_H
|
||||
|
||||
#include "llchat.h"
|
||||
#include "rlvdefines.h"
|
||||
|
||||
// ============================================================================
|
||||
@@ -34,6 +35,11 @@ public:
|
||||
*/
|
||||
static bool canReceiveIM(const LLUUID& idSender);
|
||||
|
||||
/*
|
||||
* Returns true if the user is allowed to chat on the specified channel
|
||||
*/
|
||||
static bool canSendChannel(int nChannel);
|
||||
|
||||
/*
|
||||
* Returns true if the user is allowed to send IMs to the specified recipient (can be an avatar or a group)
|
||||
*/
|
||||
@@ -53,6 +59,11 @@ public:
|
||||
static bool canShowName(EShowNamesContext eContext) { return (eContext < SNC_COUNT) ? !s_BlockNamesContexts[eContext] : false; }
|
||||
static void setShowName(EShowNamesContext eContext, bool fShowName) { if ( (eContext < SNC_COUNT) && (isRlvEnabled()) ) { s_BlockNamesContexts[eContext] = !fShowName; } }
|
||||
|
||||
/*
|
||||
* Checks if the user is allowed to use the specified volume in (main) chat and returns the appropriate chat volume type
|
||||
*/
|
||||
static EChatType checkChatVolume(EChatType chatType);
|
||||
|
||||
protected:
|
||||
// Backwards logic so that we can initialize to 0 and it won't block when we forget to/don't check if RLVa is disabled
|
||||
static bool s_BlockNamesContexts[SNC_COUNT];
|
||||
@@ -108,7 +119,7 @@ public:
|
||||
static bool hasBehaviour(ERlvBehaviour eBhvr);
|
||||
|
||||
/*
|
||||
* Returns true if a - P2P or group - IM session is open with the specified UUID.
|
||||
* Returns true if a - P2P or group - IM session is open with the specified UUID
|
||||
*/
|
||||
static bool hasOpenP2PSession(const LLUUID& idAgent);
|
||||
static bool hasOpenGroupSession(const LLUUID& idGroup);
|
||||
|
||||
@@ -210,6 +210,10 @@ RlvCommandOptionGeneric::RlvCommandOptionGeneric(const std::string& strOption):
|
||||
m_fValid = true;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// RlvCommandOption structures
|
||||
//
|
||||
|
||||
// Checked: 2012-07-28 (RLVa-1.4.7)
|
||||
class RlvCommandOptionGetPathCallback
|
||||
{
|
||||
@@ -269,6 +273,14 @@ RlvCommandOptionGetPath::RlvCommandOptionGetPath(const RlvCommand& rlvCmd, getpa
|
||||
{
|
||||
getItemIDs(rlvCmdOption.getAttachmentPoint(), m_idItems);
|
||||
}
|
||||
else if (rlvCmdOption.isUUID()) // ... or it can specify a specific attachment
|
||||
{
|
||||
const LLViewerObject* pAttachObj = gObjectList.findObject(rlvCmdOption.getUUID());
|
||||
if ( (pAttachObj) && (pAttachObj->isAttachment()) && (pAttachObj->permYouOwner()) )
|
||||
m_idItems.push_back(pAttachObj->getAttachmentItemID());
|
||||
else
|
||||
m_fValid = false;
|
||||
}
|
||||
else if (rlvCmdOption.isEmpty()) // ... or it can be empty (in which case we act on the object that issued the command)
|
||||
{
|
||||
const LLViewerObject* pObj = gObjectList.findObject(rlvCmd.getObjectID());
|
||||
@@ -434,9 +446,19 @@ bool RlvObject::hasBehaviour(ERlvBehaviour eBehaviour, bool fStrictOnly) const
|
||||
|
||||
bool RlvObject::hasBehaviour(ERlvBehaviour eBehaviour, const std::string& strOption, bool fStrictOnly) const
|
||||
{
|
||||
for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd)
|
||||
if ( (itCmd->getBehaviourType() == eBehaviour) && (itCmd->getOption() == strOption) && ((!fStrictOnly) || (itCmd->isStrict())) )
|
||||
for (const RlvCommand& rlvCmd : m_Commands)
|
||||
{
|
||||
// The specified behaviour is contained within the current object if:
|
||||
// - the (parsed) behaviour matches
|
||||
// - the option matches (or we're checking for an empty option and the command was reference counted)
|
||||
// - we're not matching on strict (or it is a strict command)
|
||||
if ( (rlvCmd.getBehaviourType() == eBehaviour) &&
|
||||
( (rlvCmd.getOption() == strOption) /*|| ((strOption.empty()) && (rlvCmd.isRefCounted()))*/ ) &&
|
||||
( (!fStrictOnly) ||(rlvCmd.isStrict()) ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
<menu_item_call label="Focus Next" name="Focus Next"/>
|
||||
<menu_item_call label="Focus Previous" name="Focus Previous"/>
|
||||
|
||||
<menu_item_call label="Mark/Unmark" name="Mark/Unmark"/>
|
||||
<menu_item_call label="Focus Next Marked" name="Focus Next Marked"/>
|
||||
<menu_item_call label="Focus Previous Marked" name="Focus Previous Marked"/>
|
||||
</menu>
|
||||
|
||||
@@ -2406,7 +2406,10 @@ Klicken Sie auf „Akzeptieren“, um dem Chat beizutreten, oder auf &
|
||||
<notification name="ThrottledSLURL">Mehrere SLurls wurden von einem nicht vertrauten Browser innerhalb einer kurzen Zeitspanne empfangen.
|
||||
Sie wurden aus Sicherheitsgründen geblockt für ein paar Minuten.<tag>Sicherheit</tag></notification>
|
||||
|
||||
<notification name="ServerVersionChanged">Die Region, die Sie betreten haben, verwendet eine andere Simulatorversion. Klicken Sie auf diese Nachricht, um weitere Informationen zu erhalten.</notification>
|
||||
<notification name="ServerVersionChanged">Die Region, die Sie betreten haben, verwendet eine andere Simulatorversion.
|
||||
Current simulator: [NEW_VERSION]
|
||||
Previous simulator: [OLD_VERSION]
|
||||
</notification>
|
||||
<notification name="ObjectMediaFailure">Server Fehler: Media update oder download fehlgeschlagen.
|
||||
'[ERROR]'<tag>fehlgeschlagen</tag><usetemplate name="okbutton" yestext="OK"/></notification>
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<name_box type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-162" drop_shadow_visible="true" enabled="false" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="96"
|
||||
mouse_opaque="true" name="GroupText" v_pad="0" is_group="true"/>
|
||||
mouse_opaque="true" name="GroupText" v_pad="0" id_type="1"/>
|
||||
<button bottom="-160" enabled="true" follows="left|top" font="SansSerifSmall"
|
||||
halign="center" height="16" label="Set..." label_selected="Set..."
|
||||
left="350" mouse_opaque="true" name="Set..." scale_image="true" width="90" />
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<scroll_list name="result_list"
|
||||
left="10" right="-10" top="-103" bottom="32"
|
||||
follows="left|top|bottom|right" can_resize="true"
|
||||
column_padding="0" draw_heading="true" multi_select="false" search_column="1">
|
||||
column_padding="0" draw_heading="true" multi_select="true" search_column="1" menu_num="2">
|
||||
<column name="Name" label="Name" dynamicwidth="true" tool_tip="Double click on any entry to get a position beacon"/>
|
||||
<column name="Description" label="Description" dynamicwidth="true" tool_tip="Double click on any entry to get a position beacon"/>
|
||||
<column name="Owner" label="Owner" dynamicwidth="true" tool_tip="Double click on any entry to get a position beacon"/>
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
<string name="focus" value="Focus"/>
|
||||
<button bottom_delta="0" follows="left|top" height="20" left_delta="81" width="50" name="tp_btn" label="TP"/>
|
||||
<button bottom_delta="0" follows="left|top" height="20" left_delta="50" width="50" name="pay_btn" label="Pay"/>
|
||||
<button bottom_delta="0" follows="left|top" height="20" left_delta="50" width="50" name="history_btn" label="Log"/>
|
||||
<button bottom="-37" follows="left|top" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Call" left_delta="50" name="start_call_btn" width="80"/>
|
||||
<button bottom_delta="0" follows="left|top" height="20" left_delta="50" width="80" name="history_btn" label="History"/>
|
||||
<button bottom="-37" follows="left|top" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Call" left_delta="80" name="start_call_btn" width="80"/>
|
||||
<button bottom="-37" follows="top" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End" name="end_call_btn" visible="false" width="80"/>
|
||||
<panel border="false" bottom="-34" follows="left|top" height="20" left_delta="80" name="speaker_controls" width="100">
|
||||
<volume_slider bottom="0" follows="bottom" height="15" increment="0.05" initial_val="0.5" max_val="1.0" min_val="0.0" name="speaker_volume" width="56"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater name="inventory panel floater" width="250" height="400" min_width="100" min_height="100" can_close="true" can_minimize="true" can_resize="true">
|
||||
<filter_editor bottom="-36" follows="left|right|top" height="18" left="4" mouse_opaque="true" right="-4" name="inventory search editor" label="Type here to search">
|
||||
<filter_editor bottom="-36" follows="left|right|top" height="18" left="3" mouse_opaque="true" right="-2" name="inventory search editor" label="Type here to search">
|
||||
<filter_editor.commit_callback function="InvPanel.Search"/>
|
||||
</filter_editor>
|
||||
<panel name="placeholder_panel" follows="all" left="5" right="-5" bottom_delta="-360" height="358"/>
|
||||
<panel name="placeholder_panel" follows="all" left="4" right="-3" bottom_delta="-362" height="360"/>
|
||||
</floater>
|
||||
|
||||
@@ -497,7 +497,7 @@
|
||||
bottom="-126"
|
||||
left_delta="78"
|
||||
name="Group Name Proxy"
|
||||
width="142" is_group="true"/>
|
||||
width="142" id_type="1"/>
|
||||
<button bottom="-126" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Set" label_selected="Set..." left_delta="142"
|
||||
mouse_opaque="true" name="button set group" scale_image="TRUE" width="30" />
|
||||
|
||||
@@ -45,12 +45,22 @@
|
||||
<on_click function="List.InviteToGroup"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Offer Teleport" name="Offer Teleport">
|
||||
<on_click function="List.OfferTeleport"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To" name="Teleport To">
|
||||
<on_click function="Radar.TeleportTo"/>
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsInGroup"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Chat History" name="Chat History">
|
||||
<on_click function="List.ShowLog"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.IsInGroup"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Join Group" name="join_group">
|
||||
<on_click function="List.Join"/>
|
||||
<on_visible function="List.NotInGroup"/>
|
||||
|
||||
@@ -45,13 +45,21 @@
|
||||
<on_click function="List.InviteToGroup"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Offer Teleport" name="Offer Teleport">
|
||||
<on_click function="List.OfferTeleport"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To" name="Teleport To">
|
||||
<on_click function="Radar.TeleportTo"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Request Teleport" name="Request Teleport">
|
||||
<on_click function="List.RequestTeleport"/>
|
||||
@@ -63,20 +71,20 @@
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Chat History" name="Chat History">
|
||||
<on_click function="List.ShowLog"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Track/Untrack" name="Track/Untrack">
|
||||
<on_click function="List.Track"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_click function="Radar.Track"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Copy Key" name="Copy Key">
|
||||
<on_click function="List.CopyUUIDs"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy Names" name="Copy Names">
|
||||
<on_click function="List.CopyNames"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy SLURL" name="Copy SLURL">
|
||||
<on_click function="List.CopySLURL"/>
|
||||
|
||||
@@ -87,7 +87,6 @@
|
||||
<on_click function="StopTracking" />
|
||||
<on_visible function="IsTracking" />
|
||||
</menu_item_call>
|
||||
<menu name="avs_menu" label="Selected Avatars" filename="menu_local_avs.xml">
|
||||
<menu name="Mark" label="Mark">
|
||||
<menu_item_call label="Red" name="Red">
|
||||
<on_click function="MiniMap.setred" />
|
||||
@@ -109,7 +108,7 @@
|
||||
<on_click function="MiniMap.setunmark" />
|
||||
<on_enable function="MiniMap.enableunmark" />
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu name="avs_menu" label="Selected Avatars" filename="menu_local_avs.xml"/>
|
||||
<menu_item_check label="World Map Textures" name="World Map Textures">
|
||||
<on_check control="MiniMapWorldMapTextures" />
|
||||
<on_click function="ToggleControl" userdata="MiniMapWorldMapTextures" />
|
||||
|
||||
32
indra/newview/skins/default/xui/en-us/menu_objects_list.xml
Normal file
32
indra/newview/skins/default/xui/en-us/menu_objects_list.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<context_menu label="Objects" name="Objects">
|
||||
<menu_item_call label="Cam To" name="Cam To">
|
||||
<on_click function="List.Object.CamTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To" name="Teleport To">
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Copy Key" name="Copy Key">
|
||||
<on_click function="List.CopyUUIDs"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy Name" name="Copy Name">
|
||||
<on_click function="List.CopyNames"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy SLURL" name="Copy SLURL">
|
||||
<on_click function="List.CopySLURL"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
@@ -67,6 +67,9 @@
|
||||
<on_click function="ShowFloater" userdata="show inspect" />
|
||||
<on_enable function="Object.EnableInspect" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="Object.Follow"/>
|
||||
</menu_item_call>
|
||||
</pie_menu>
|
||||
<menu_item_call enabled="false" label="Send IM..." mouse_opaque="true" name="Send IM...">
|
||||
<on_click function="Avatar.SendIM" />
|
||||
|
||||
@@ -74,8 +74,12 @@
|
||||
<menu_item_call enabled="true" hidden="false" label="Data" mouse_opaque="true" name="Data">
|
||||
<on_click function="Object.Data" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator />
|
||||
<menu_item_separator />
|
||||
<menu_item_call label="Go To" name="Go To">
|
||||
<on_click function="GoToObject" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="Object.Follow"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator />
|
||||
<menu_item_call enabled="true" label="Reload" mouse_opaque="true" name="Reload Textures">
|
||||
<on_click function="Object.ReloadTextures" />
|
||||
|
||||
@@ -45,13 +45,21 @@
|
||||
<on_click function="List.InviteToGroup"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Offer Teleport" name="Offer Teleport">
|
||||
<on_click function="List.OfferTeleport"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To" name="Teleport To" shortcut="control|Enter">
|
||||
<on_click function="Radar.TeleportTo"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Request Teleport" name="Request Teleport">
|
||||
<on_click function="List.RequestTeleport"/>
|
||||
@@ -63,15 +71,20 @@
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Chat History" name="Chat History">
|
||||
<on_click function="List.ShowLog"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Track/Untrack" name="Track/Untrack">
|
||||
<on_click function="Radar.Track"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Copy Key" name="Copy Key">
|
||||
<on_click function="List.CopyUUIDs"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy Names" name="Copy Names">
|
||||
<on_click function="List.CopyNames"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy SLURL" name="Copy SLURL">
|
||||
<on_click function="List.CopySLURL"/>
|
||||
@@ -101,6 +114,27 @@
|
||||
<on_click function="Radar.FocusPrev" userdata="1"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu name="Mark" label="Mark">
|
||||
<menu_item_call label="Red" name="Red">
|
||||
<on_click function="MiniMap.setred" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Green" name="Green">
|
||||
<on_click function="MiniMap.setgreen" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Blue" name="Blue">
|
||||
<on_click function="MiniMap.setblue" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Yellow" name="Yellow">
|
||||
<on_click function="MiniMap.setyellow" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Custom..." name="Custom">
|
||||
<on_click function="MiniMap.setcustom" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Unmark" name="Unmark">
|
||||
<on_click function="MiniMap.setunmark" />
|
||||
<on_enable function="MiniMap.enableunmark" />
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu label="Alerts" name="Alerts" create_jump_keys="true">
|
||||
<menu_item_check label="Display alerts when an avatar" name="Display alerts in chat">
|
||||
<on_click function="ToggleControl" userdata="RadarChatAlerts"/>
|
||||
@@ -176,10 +210,6 @@
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu label="Hide Columns" name="Hide Columns" create_jump_keys="true">
|
||||
<menu_item_check label="Mark" name="Mark">
|
||||
<on_click function="ToggleControl" userdata="RadarColumnMarkHidden"/>
|
||||
<on_check control="RadarColumnMarkHidden"/>
|
||||
</menu_item_check>
|
||||
<menu_item_check label="Position" name="Position">
|
||||
<on_click function="ToggleControl" userdata="RadarColumnPositionHidden"/>
|
||||
<on_check control="RadarColumnPositionHidden"/>
|
||||
|
||||
@@ -33,11 +33,20 @@
|
||||
<menu_item_call label="Invite To Group" name="Invite To Group">
|
||||
<on_click function="List.InviteToGroup"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Offer Teleport" name="Offer Teleport">
|
||||
<on_click function="List.OfferTeleport"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To" name="Teleport To">
|
||||
<on_click function="Radar.TeleportTo"/>
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Request Teleport" name="Request Teleport">
|
||||
@@ -54,7 +63,7 @@
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Focus" name="Focus">
|
||||
<on_click function="List.Focus"/>
|
||||
<on_click function="Radar.Focus"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
<on_click function="List.Activate"/>
|
||||
<on_visible function="List.IsInGroup"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Chat History" name="Chat History">
|
||||
<on_click function="List.ShowLog"/>
|
||||
<on_visible function="List.IsInGroup"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Join Group" name="join_group">
|
||||
<on_click function="List.Join"/>
|
||||
<on_visible function="List.NotInGroup"/>
|
||||
|
||||
@@ -34,12 +34,28 @@
|
||||
function="Text.Url" userdata="ShowOnMap" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Teleport to Object Location"
|
||||
label="Teleport to Object URL Location"
|
||||
layout="topleft"
|
||||
name="teleport_to_object">
|
||||
<menu_item_call.on_click
|
||||
function="Text.Url" userdata="Teleport" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Cam To" name="Cam To">
|
||||
<on_click function="List.Object.CamTo"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To (current location)" name="Teleport To (current location)">
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
layout="topleft" />
|
||||
<menu_item_call
|
||||
|
||||
@@ -11415,7 +11415,9 @@ The object you're attempting to restore in world is no copy, if you do not have
|
||||
name="ServerVersionChanged"
|
||||
priority="high"
|
||||
type="notifytip">
|
||||
The region you have entered is running a different simulator version. Click this message for details.
|
||||
The region you have entered is running a different simulator version.
|
||||
Current simulator: [NEW_VERSION]
|
||||
Previous simulator: [OLD_VERSION]
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
|
||||
@@ -22,7 +22,7 @@ Hover your mouse over the options for more help.
|
||||
<name_box bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-20" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifBig" h_pad="0" halign="left" height="16" left="7"
|
||||
mouse_opaque="true" name="group_name" v_pad="0" is_group="true">
|
||||
mouse_opaque="true" name="group_name" v_pad="0" id_type="1">
|
||||
Type your new group name here
|
||||
</name_box>
|
||||
<text font="SansSerifSmall" name="prepend_founded_by">
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
<menu_item_call label="Enfocar Siguiente" name="Focus Next"/>
|
||||
<menu_item_call label="Enfocar Anterior" name="Focus Previous"/>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Marcar/Desmarcar" name="Mark/Unmark"/>
|
||||
<menu_item_call label="Enfocar Siguiente Marcado" name="Focus Next Marked"/>
|
||||
<menu_item_call label="Enfocar Anterior Marcado" name="Focus Previous Marked"/>
|
||||
</menu>
|
||||
|
||||
@@ -6069,7 +6069,8 @@ Ingresa el dominio a añadir en la [LIST]:
|
||||
|
||||
<notification name="ServerVersionChanged">
|
||||
La región en la que has entrado está utilizando una versión diferente del simulador.
|
||||
Pulsa en este mensaje para ver más detalles.
|
||||
Current simulator: [NEW_VERSION]
|
||||
Previous simulator: [OLD_VERSION]
|
||||
</notification>
|
||||
|
||||
<notification name="SGIncompleteAppearance">
|
||||
@@ -6135,4 +6136,4 @@ Por favor, asegurate de que tu reporte no será un duplicado de uno ya existente
|
||||
<usetemplate ignoretext="Cuando se abra el navegador para ir al Issue Tracker de [SHORT_APP_NAME]" name="okcancelignore" notext="Cancelar" yestext="Ir a la Página"/>
|
||||
</notification>
|
||||
|
||||
</notifications>
|
||||
</notifications>
|
||||
|
||||
@@ -3697,6 +3697,8 @@ Une erreur est survenue pendant la connexion au chat vocal pour [VOICE_CHANNEL_N
|
||||
|
||||
<notification name="ServerVersionChanged">
|
||||
La région dans laquelle vous avez pénétré utilise une version de simulateur différente. C'est ballot, mais c'est la vie !
|
||||
Current simulator: [NEW_VERSION]
|
||||
Previous simulator: [OLD_VERSION]
|
||||
</notification>
|
||||
|
||||
<notification name="UnableToOpenCommandURL">
|
||||
|
||||
@@ -3962,6 +3962,8 @@ Mais detalhes no log.
|
||||
|
||||
<notification name="ServerVersionChanged">
|
||||
A região em que você entrou está rodando uma versão diferente de simulador.
|
||||
Current simulator: [NEW_VERSION]
|
||||
Previous simulator: [OLD_VERSION]
|
||||
</notification>
|
||||
<notification name="MeshUploadPermError">
|
||||
Erro ao solicitar permissões de upload de mesh.
|
||||
|
||||
Reference in New Issue
Block a user