summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llchathistory.cpp17
-rw-r--r--indra/newview/llpanelpeoplemenus.cpp24
-rw-r--r--indra/newview/llprogressview.cpp5
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby.xml10
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml10
5 files changed, 63 insertions, 3 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 9368d9cb7c..81cc52528c 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -68,6 +68,9 @@ const static std::string NEW_LINE(rawstr_to_utf8("\n"));
const static U32 LENGTH_OF_TIME_STR = std::string("12:00").length();
+const static std::string SLURL_APP_AGENT = "secondlife:///app/agent/";
+const static std::string SLURL_ABOUT = "/about";
+
// support for secondlife:///app/objectim/{UUID}/ SLapps
class LLObjectIMHandler : public LLCommandHandler
{
@@ -779,6 +782,20 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
else
{
std::string message = irc_me ? chat.mText.substr(3) : chat.mText;
+
+
+ //MESSAGE TEXT PROCESSING
+ //*HACK getting rid of redundant sender names in system notifications sent using sender name (see EXT-5010)
+ if (use_plain_text_chat_history && gAgentID != chat.mFromID && chat.mFromID.notNull())
+ {
+ std::string slurl_about = SLURL_APP_AGENT + chat.mFromID.asString() + SLURL_ABOUT;
+ if (message.length() > slurl_about.length() &&
+ message.compare(0, slurl_about.length(), slurl_about) == 0)
+ {
+ message = message.substr(slurl_about.length(), message.length()-1);
+ }
+ }
+
mEditor->appendText(message, FALSE, style_params);
}
mEditor->blockUndo();
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 7e184c78a8..900d28adca 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -121,6 +121,7 @@ LLContextMenu* NearbyMenu::createMenu()
const LLUUID& id = mUUIDs.front();
registrar.add("Avatar.Profile", boost::bind(&LLAvatarActions::showProfile, id));
registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, id));
+ registrar.add("Avatar.RemoveFriend", boost::bind(&LLAvatarActions::removeFriendDialog, id));
registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, id));
registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, id));
registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this));
@@ -143,6 +144,7 @@ LLContextMenu* NearbyMenu::createMenu()
// registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs)); // *TODO: unimplemented
registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs));
registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs));
+ registrar.add("Avatar.RemoveFriend",boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs));
// registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, mUUIDs)); // *TODO: unimplemented
// registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs)); // *TODO: unimplemented
enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2));
@@ -191,8 +193,26 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
}
else if (item == std::string("can_delete"))
{
- const LLUUID& id = mUUIDs.front();
- return LLAvatarActions::isFriend(id);
+ // We can remove friends if:
+ // - there are selected people
+ // - and there are only friends among selection.
+
+ bool result = (mUUIDs.size() > 0);
+
+ std::vector<LLUUID>::const_iterator
+ id = mUUIDs.begin(),
+ uuids_end = mUUIDs.end();
+
+ for (;id != uuids_end; ++id)
+ {
+ if ( !LLAvatarActions::isFriend(*id) )
+ {
+ result = false;
+ break;
+ }
+ }
+
+ return result;
}
else if (item == std::string("can_call"))
{
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index 7a48f890e0..0476e785a5 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -223,7 +223,10 @@ void LLProgressView::setCancelButtonVisible(BOOL b, const std::string& label)
// static
void LLProgressView::onCancelButtonClicked(void*)
{
- if (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE)
+ // Quitting viewer here should happen only when "Quit" button is pressed while starting up.
+ // Check for startup state is used here instead of teleport state to avoid quitting when
+ // cancel is pressed while teleporting inside region (EXT-4911)
+ if (LLStartUp::getStartupState() < STATE_STARTED)
{
LLAppViewer::instance()->requestQuit();
}
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
index c4da1df017..9d2ccba4da 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
@@ -20,6 +20,16 @@
parameter="can_add" />
</menu_item_call>
<menu_item_call
+ label="Remove Friend"
+ layout="topleft"
+ name="Remove Friend">
+ <menu_item_call.on_click
+ function="Avatar.RemoveFriend" />
+ <menu_item_call.on_enable
+ function="Avatar.EnableItem"
+ parameter="can_delete" />
+ </menu_item_call>
+ <menu_item_call
label="IM"
layout="topleft"
name="IM">
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
index 0d3dd3366d..588342595e 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
@@ -14,6 +14,16 @@
parameter="can_add" />
</menu_item_call>
<menu_item_call
+ label="Remove Friends"
+ layout="topleft"
+ name="Remove Friend">
+ <menu_item_call.on_click
+ function="Avatar.RemoveFriend" />
+ <menu_item_call.on_enable
+ function="Avatar.EnableItem"
+ parameter="can_delete" />
+ </menu_item_call>
+ <menu_item_call
label="IM"
layout="topleft"
name="IM">