Compare commits

..

41 Commits

Author SHA1 Message Date
Liru Færs
544feee19f Fix Copy Names in Object Menu not working, oops!! 2020-01-08 20:48:48 -05:00
Liru Færs
bee60da089 Break out get_obj_data into its own function 2020-01-08 20:43:47 -05:00
Liru Færs
c466b44143 Introduce rudimentary objects list menu for Area Search
Enables multiselect in areasearch
2020-01-08 20:09:46 -05:00
Liru Færs
27222d524c Add Object support to List.ShowProfile, via get_slurl_for 2020-01-08 19:49:52 -05:00
Liru Færs
b99e2cbbdd Add support for OBJECT type to get_slurl_for
Caveat: Requires area search to be instantiated (should we break this out?)
Only includes location if in object list
2020-01-08 19:48:50 -05:00
Liru Færs
a5bdc24a14 Refactor get_slurl_for 2020-01-08 19:46:42 -05:00
Liru Færs
0b6d94f202 Request: Change "Log" button on IM Floater to "History"
This is more clear and consistent with all the other places this is used
2020-01-08 19:43:27 -05:00
Liru Færs
bf5035388b Expose ObjectData from AreaSearch 2020-01-08 19:22:36 -05:00
Liru Færs
640c136bcc Add Cam To to Object URL menu 2020-01-08 19:13:36 -05:00
Liru Færs
6ebd2eef00 Feature Request: Add Chat History to Group right click menus 2020-01-08 19:11:46 -05:00
Liru Færs
c954d02125 Add missing Go To to object pie menu 2020-01-08 18:00:51 -05:00
Liru Færs
a34414849c Sync some of llcommandlineparser with alchemy
Might fix Crash R
2020-01-08 17:07:49 -05:00
Liru Færs
c1ffb1b332 [Follow] Do not fly unless flying avatar target or already flying 2020-01-08 16:58:54 -05:00
Liru Færs
d06448cdfd Remove dead german menu entry 2020-01-08 16:53:23 -05:00
Liru Færs
117ef68916 Put object pie Follow where it was actually supposed to go
Thanks for the heads up on this mistake, Router!
2020-01-08 16:07:23 -05:00
Liru Færs
83b384ab97 Combine Marking from Minimap with Radar Mark
Color people right from the Radar!
Mark button on Radar now uses Red.

Removes "Radar.Mark" and its associated code
Thanks for the help on linux, Router!
2020-01-08 15:54:43 -05:00
Liru Færs
5ee5ba473b Small refactor of minimap marking code
Mark is now encapsulated
mm_setcolor is no longer part of LLNetMap
mm_clearMark is now used to erase mark from container
Introduces mm_getMarkerColor that returns a pointer,
instead of needing a ref every time.

Also mark isAgentUnderCursor const
2020-01-08 15:39:49 -05:00
Liru Færs
4055af4afd Add Mark menu to radar 2020-01-08 15:23:51 -05:00
Liru Færs
65dad7acfd Remove weird double newline between single avatar on minimap and distance 2020-01-08 14:53:08 -05:00
Liru Færs
a21927e510 [Follow] If target av isn't rendered, still try to get their position
Mainly moves code around, rather small change.
2020-01-08 13:15:37 -05:00
Liru Færs
094c948a87 Move Minimap Mark submenu back out of Selected Avatars menu for convenience 2020-01-08 13:12:13 -05:00
Liru Færs
31003f13af Fix Crash on text editor right click
Fixes Crashes N  and P
Missing nullcheck, my bad
Never expected there not to be a menu segment url when a menu is open
2020-01-08 10:25:44 -05:00
Router Gray
c1f39e167c Bang bang on the list baby 2020-01-07 20:00:50 -06:00
Router Gray
0e28436aa9 Fix invalid initialization of non-const reference 2020-01-07 19:59:53 -06:00
Liru Færs
bc1c816b99 Fix right click local avatar url menu's Focus being broken 2020-01-07 19:21:06 -05:00
Liru Færs
32424e5640 Fix up presentation of radar and local avs menus 2020-01-07 19:19:05 -05:00
Liru Færs
760f1308f3 Add SinguFollowDistance for setting minimum follow distance 2020-01-07 18:51:49 -05:00
Liru Færs
dfe8e364be Add Follow to pie and right click UI menus for objects and avatars 2020-01-07 18:51:18 -05:00
Liru Færs
33feeb0a01 Make Follow Great Again! 2020-01-07 17:40:43 -05:00
Liru Færs
50eb21ce23 This never got reset... weird 2020-01-07 16:48:27 -05:00
Liru Færs
d2052b9e4c Teleport and move to objects by their IM name links 2020-01-07 15:00:31 -05:00
Liru Færs
2c5ad97697 *Shakes cane* Get off my lawn, you young whippersnapper! 2020-01-07 14:21:24 -05:00
Liru Færs
8283422717 Rename Radar.TeleportTo to List.TeleportTo, and move the code 2020-01-07 11:53:23 -05:00
Liru Færs
4a293ff1e1 Clean up excess teleport to code using get_av_pos 2020-01-07 11:46:06 -05:00
Liru Færs
828307ca96 Sync LLSDSerialize with alchemy, and merge fix for Crash K 2020-01-07 11:00:21 -05:00
Liru Færs
a83901d2e4 Add ARC to avatar hover tips 2020-01-07 10:57:58 -05:00
Liru Færs
878ba534b5 Add Land Impact to object hover tip 2020-01-07 10:46:39 -05:00
Liru Færs
f17e6637d6 Use findAvatar instead of findObject 2020-01-07 10:39:56 -05:00
Liru Færs
66b2ad5f30 Actually fix crash 1, 5, and J
Removes a bad fix for beware's crash from forever ago
2020-01-07 08:12:01 -05:00
Liru Færs
463151c830 Fix crash and generaly wrong duplicate attribute name
NameUI "type" is now "id_type"
Thanks for the help, Router!
2020-01-07 06:19:24 -05:00
Liru Færs
77b6a903ac Remove spurious extra /* in rlvactions.h, thanks Router! 2020-01-07 05:13:37 -05:00
39 changed files with 506 additions and 212 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -217,7 +217,7 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask )
void LLChatBar::onFocusLost()
{
stopChat();
//stopChat();
}
void LLChatBar::refresh()

View File

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

View File

@@ -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))
@@ -347,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);
@@ -376,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)
@@ -412,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)
@@ -436,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");
}
@@ -801,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);
@@ -1471,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()); }

View File

@@ -124,7 +124,7 @@ enum ACTIVITY_TYPE
bool isInList() const { return mIsInList; }
void toggleMark() { mMarked = !mMarked; }
void setMarked(bool marked) { mMarked = marked; }
struct uuidMatch
{

View File

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

View File

@@ -105,7 +105,7 @@ LLXMLNodePtr LLNameBox::getXML(bool save_children) const
LLView* LLNameBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
{
S8 type = AVATAR;
node->getAttributeS8("type", type);
node->getAttributeS8("id_type", type);
LLUUID id;
node->getAttributeUUID("id", id);
std::string loading;

View File

@@ -137,7 +137,7 @@ LLView* LLNameEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
S32 max_text_length = 1024;
node->getAttributeS32("max_length", max_text_length);
S8 type = AVATAR;
node->getAttributeS8("type", type);
node->getAttributeS8("id_type", type);
LLUUID id;
node->getAttributeUUID("id", id);
std::string loading;

View File

@@ -296,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;
}
@@ -1005,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));
}
@@ -1498,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&)
@@ -1530,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)

View File

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

View File

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

View File

@@ -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()
{
@@ -9034,9 +9042,38 @@ template<typename T> T* get_focused()
return t;
}
const JCFloaterAreaSearch::ObjectData* get_obj_data(const LLUUID& id)
{
auto areasearch = JCFloaterAreaSearch::findInstance();
return areasearch ? areasearch->getObjectData(id) : nullptr;
}
const std::string get_slurl_for(const LLUUID& id, const LFIDBearer::Type& type)
{
return type == LFIDBearer::GROUP ? LLGroupActions::getSLURL(id) : LLAvatarActions::getSLURL(id);
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)
@@ -9186,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;
}
@@ -9280,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;
}
};
@@ -9299,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;
@@ -9352,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)
@@ -9384,12 +9442,21 @@ 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;
}
};
const LLVector3d& get_av_pos(const LLUUID& id);
class ListGoTo : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -9556,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)
@@ -9802,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");
@@ -9931,8 +10008,10 @@ 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");
@@ -9945,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();

View File

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

View File

@@ -35,8 +35,6 @@ public:
*/
static bool canReceiveIM(const LLUUID& idSender);
/*
/*
* Returns true if the user is allowed to chat on the specified channel
*/

View File

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

View File

@@ -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" type="1"/>
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" />

View File

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

View File

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

View File

@@ -497,7 +497,7 @@
bottom="-126"
left_delta="78"
name="Group Name Proxy"
width="142" type="1"/>
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" />

View File

@@ -45,6 +45,11 @@
<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"/>
@@ -55,7 +60,7 @@
<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>

View File

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

View File

@@ -45,17 +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_enable function="List.EnableSingleSelected"/>
<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"/>
@@ -67,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"/>

View File

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

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

View File

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

View File

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

View File

@@ -45,18 +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_enable function="List.EnableSingleSelected"/>
<on_visible function="List.IsNearby"/>
<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"/>
@@ -68,19 +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 Name" name="Copy Name">
<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"/>
@@ -110,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"/>
@@ -185,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"/>

View File

@@ -33,6 +33,10 @@
<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"/>
@@ -42,7 +46,7 @@
<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">
@@ -59,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>

View File

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

View File

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

View File

@@ -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" type="1">
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">

View File

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