summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2009-12-30 14:50:57 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2009-12-30 14:50:57 +0200
commit3a50996058b3892fccb0196db23f8c36d5573b70 (patch)
tree681d76ff701a2d90e0a06c46d0fb905a36c3a29e /indra
parent8f30d5f20413eac9356a84647dfb051cc02e3ba3 (diff)
Fixed normal bug EXT-3643 - Make Friend Offer dialog a modal alert.
Added "Start IM" option to "OfferFriendship" notification. --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewermessage.cpp33
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml4
2 files changed, 24 insertions, 13 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ed138f24ca..6f9e551649 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -35,6 +35,7 @@
#include "llanimationstates.h"
#include "llaudioengine.h"
+#include "llavataractions.h"
#include "lscript_byteformat.h"
#include "lleconomy.h"
#include "llfloaterreg.h"
@@ -193,19 +194,25 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
msg->sendReliable(LLHost(payload["sender"].asString()));
break;
}
- case 1:
- {
- // decline
- // We no longer notify other viewers, but we DO still send
- // the rejection to the simulator to delete the pending userop.
- msg->newMessageFast(_PREHASH_DeclineFriendship);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->nextBlockFast(_PREHASH_TransactionBlock);
- msg->addUUIDFast(_PREHASH_TransactionID, payload["session_id"]);
- msg->sendReliable(LLHost(payload["sender"].asString()));
- break;
+ case 1: // Decline
+ case 2: // Send IM - decline and start IM session
+ {
+ // decline
+ // We no longer notify other viewers, but we DO still send
+ // the rejection to the simulator to delete the pending userop.
+ msg->newMessageFast(_PREHASH_DeclineFriendship);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->nextBlockFast(_PREHASH_TransactionBlock);
+ msg->addUUIDFast(_PREHASH_TransactionID, payload["session_id"]);
+ msg->sendReliable(LLHost(payload["sender"].asString()));
+
+ // start IM session
+ if(2 == option)
+ {
+ LLAvatarActions::startIM(payload["from_id"].asUUID());
+ }
}
default:
// close button probably, possibly timed out
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 9d3c31c4e6..95a7374e7b 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5121,6 +5121,10 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you [O
index="1"
name="Decline"
text="Decline"/>
+ <button
+ index="2"
+ name="Send IM"
+ text="Send IM"/>
</form>
</notification>