summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterpreference.cpp3
-rw-r--r--indra/newview/llgroupactions.cpp6
-rw-r--r--indra/newview/llnearbychat.cpp26
-rw-r--r--indra/newview/llnearbychat.h8
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp5
-rw-r--r--indra/newview/llpanelavatar.cpp19
-rw-r--r--indra/newview/llpanelavatar.h4
-rw-r--r--indra/newview/llviewermessage.cpp23
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml7
9 files changed, 85 insertions, 16 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 83c784c1f7..5128a7b861 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -106,6 +106,7 @@
#include "llviewermedia.h"
#include "llpluginclassmedia.h"
#include "llteleporthistorystorage.h"
+#include "llnearbychat.h"
#include <boost/regex.hpp>
@@ -361,6 +362,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
BOOL LLFloaterPreference::postBuild()
{
gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2));
+
+ gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2));
LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 6fe8ed0e4d..99b58f2170 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -100,9 +100,9 @@ public:
}
if (tokens[1].asString() == "inspect")
{
- LLSD key;
- key["group_id"] = group_id;
- LLFloaterReg::showInstance("inspect_group", key);
+ if (group_id.isNull())
+ return true;
+ LLGroupActions::show(group_id);
return true;
}
return false;
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 8f1dec1431..ee3be0a5e3 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -57,6 +57,7 @@
#include "lltrans.h"
#include "llbottomtray.h"
#include "llnearbychatbar.h"
+#include "llfloaterreg.h"
static const S32 RESIZE_BAR_THICKNESS = 3;
@@ -145,7 +146,7 @@ std::string appendTime()
return timeStr;
}
-void LLNearbyChat::addMessage(const LLChat& chat)
+void LLNearbyChat::addMessage(const LLChat& chat,bool archive)
{
if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
{
@@ -207,6 +208,13 @@ void LLNearbyChat::addMessage(const LLChat& chat)
mChatHistory->appendMessage(chat,use_plain_text_chat_history);
}
}
+
+ if(archive)
+ {
+ mMessageArchive.push_back(chat);
+ if(mMessageArchive.size()>200)
+ mMessageArchive.erase(mMessageArchive.begin());
+ }
}
void LLNearbyChat::onNearbySpeakers()
@@ -256,3 +264,19 @@ void LLNearbyChat::getAllowedRect(LLRect& rect)
{
rect = gViewerWindow->getWorldViewRectScaled();
}
+
+void LLNearbyChat::updateChatHistoryStyle()
+{
+ mChatHistory->clear();
+ for(std::vector<LLChat>::iterator it = mMessageArchive.begin();it!=mMessageArchive.end();++it)
+ {
+ addMessage(*it,false);
+ }
+}
+//static
+void LLNearbyChat::processChatHistoryStyleUpdate(const LLSD& newvalue)
+{
+ LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
+ if(nearby_chat)
+ nearby_chat->updateChatHistoryStyle();
+}
diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h
index efcaf4263b..1cbc2a3478 100644
--- a/indra/newview/llnearbychat.h
+++ b/indra/newview/llnearbychat.h
@@ -47,7 +47,7 @@ public:
~LLNearbyChat();
BOOL postBuild ();
- void addMessage (const LLChat& message);
+ void addMessage (const LLChat& message,bool archive = true);
void onNearbyChatContextMenuItemClicked(const LLSD& userdata);
bool onNearbyChatCheckContextMenuItem(const LLSD& userdata);
@@ -57,6 +57,10 @@ public:
virtual void setRect (const LLRect &rect);
+ virtual void updateChatHistoryStyle();
+
+ static void processChatHistoryStyleUpdate(const LLSD& newvalue);
+
private:
virtual void applySavedVariables();
@@ -68,6 +72,8 @@ private:
private:
LLHandle<LLView> mPopupMenuHandle;
LLChatHistory* mChatHistory;
+
+ std::vector<LLChat> mMessageArchive;
};
#endif
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 05da338513..857b7e9796 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -43,13 +43,14 @@ using namespace LLNotificationsUI;
const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"),
REVOKED_MODIFY_RIGHTS("RevokedModifyRights"), OBJECT_GIVE_ITEM(
"ObjectGiveItem"), OBJECT_GIVE_ITEM_UNKNOWN_USER(
- "ObjectGiveItemUnknownUser");
+ "ObjectGiveItemUnknownUser"), PAYMENT_RECIVED("PaymentRecived");
// static
bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification)
{
return GRANTED_MODIFY_RIGHTS == notification->getName()
- || REVOKED_MODIFY_RIGHTS == notification->getName();
+ || REVOKED_MODIFY_RIGHTS == notification->getName()
+ || PAYMENT_RECIVED == notification->getName();
}
// static
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 97c1e96175..eb9cb10d56 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -254,11 +254,19 @@ void LLPanelAvatarNotes::onCommitRights()
const LLRelationship* buddy_relationship =
LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
bool allow_modify_objects = childGetValue("objects_check").asBoolean();
+
+ // if modify objects checkbox clicked
if (buddy_relationship->isRightGrantedTo(
LLRelationship::GRANT_MODIFY_OBJECTS) != allow_modify_objects)
{
confirmModifyRights(allow_modify_objects, rights);
}
+ // only one checkbox can trigger commit, so store the rest of rights
+ else
+ {
+ LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(
+ getAvatarId(), rights);
+ }
}
void LLPanelAvatarNotes::processProperties(void* data, EAvatarProcessorType type)
@@ -522,20 +530,19 @@ void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_g
for(; it_end != it; ++it)
{
LLAvatarGroups::LLGroupData group_data = *it;
-
- // Check if there is no duplicates for this group
- if (std::find(mGroups.begin(), mGroups.end(), group_data.group_name) == mGroups.end())
- mGroups.push_back(group_data.group_name);
+ mGroups[group_data.group_name] = group_data.group_id;
}
// Creating string, containing group list
std::string groups = "";
- for (group_list_t::const_iterator it = mGroups.begin(); it != mGroups.end(); ++it)
+ for (group_map_t::iterator it = mGroups.begin(); it != mGroups.end(); ++it)
{
if (it != mGroups.begin())
groups += ", ";
- groups += *it;
+
+ std::string group_url="[secondlife:///app/group/" + it->second.asString() + "/about " + it->first + "]";
+ groups += group_url;
}
childSetValue("sl_groups", groups);
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index f54aeee4eb..b19c5cca49 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -192,8 +192,8 @@ protected:
private:
- typedef std::list<std::string> group_list_t;
- group_list_t mGroups;
+ typedef std::map< std::string,LLUUID> group_map_t;
+ group_map_t mGroups;
LLToggleableMenu* mProfileMenu;
};
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 9fc818e1ff..a5e06e7cff 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4347,7 +4347,28 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
// *TODO: Translate
LLSD args;
args["MESSAGE"] = desc;
- LLNotificationsUtil::add("SystemMessage", args);
+
+ // this is a marker to retrieve avatar name from server message:
+ // "<avatar name> paid you L$"
+ const std::string marker = "paid you L$";
+
+ // extract avatar name from system message
+ std::string name = desc.substr(0, desc.find(marker, 0));
+ LLStringUtil::trim(name);
+
+ // if name extracted and name cache contains avatar id send loggable notification
+ LLUUID from_id;
+ if(name.size() > 0 && gCacheName->getUUID(name, from_id))
+ {
+ args["NAME"] = name;
+ LLSD payload;
+ payload["from_id"] = from_id;
+ LLNotificationsUtil::add("PaymentRecived", args, payload);
+ }
+ else
+ {
+ LLNotificationsUtil::add("SystemMessage", args);
+ }
// Once the 'recent' container gets large enough, chop some
// off the beginning.
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index cb0614797a..254c8a0f21 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4611,6 +4611,13 @@ Please select at least one type of content to search (PG, Mature, or Adult).
<notification
icon="notify.tga"
+ name="PaymentRecived"
+ type="notify">
+[MESSAGE]
+ </notification>
+
+ <notification
+ icon="notify.tga"
name="EventNotification"
type="notify">
Event Notification: