aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpanelavatar.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp
index d48237f..8de2475 100644
--- a/linden/indra/newview/llpanelavatar.cpp
+++ b/linden/indra/newview/llpanelavatar.cpp
@@ -51,6 +51,7 @@
51 51
52#include "llfloaterfriends.h" 52#include "llfloaterfriends.h"
53#include "llfloatergroupinfo.h" 53#include "llfloatergroupinfo.h"
54#include "llfloatergroups.h"
54#include "llfloaterworldmap.h" 55#include "llfloaterworldmap.h"
55#include "llfloatermute.h" 56#include "llfloatermute.h"
56#include "llfloateravatarinfo.h" 57#include "llfloateravatarinfo.h"
@@ -86,6 +87,7 @@
86std::list<LLPanelAvatar*> LLPanelAvatar::sAllPanels; 87std::list<LLPanelAvatar*> LLPanelAvatar::sAllPanels;
87BOOL LLPanelAvatar::sAllowFirstLife = FALSE; 88BOOL LLPanelAvatar::sAllowFirstLife = FALSE;
88 89
90extern void callback_invite_to_group(LLUUID group_id, void *user_data);
89extern void handle_lure(const LLUUID& invitee); 91extern void handle_lure(const LLUUID& invitee);
90extern void handle_pay_by_id(const LLUUID& payee); 92extern void handle_pay_by_id(const LLUUID& payee);
91 93
@@ -428,6 +430,7 @@ BOOL LLPanelAvatarSecondLife::postBuild(void)
428 430
429 childSetAction("Find on Map", LLPanelAvatar::onClickTrack, getPanelAvatar()); 431 childSetAction("Find on Map", LLPanelAvatar::onClickTrack, getPanelAvatar());
430 childSetAction("Instant Message...", LLPanelAvatar::onClickIM, getPanelAvatar()); 432 childSetAction("Instant Message...", LLPanelAvatar::onClickIM, getPanelAvatar());
433 childSetAction("Invite to Group...", LLPanelAvatar::onClickGroupInvite, getPanelAvatar());
431 434
432 childSetAction("Add Friend...", LLPanelAvatar::onClickAddFriend, getPanelAvatar()); 435 childSetAction("Add Friend...", LLPanelAvatar::onClickAddFriend, getPanelAvatar());
433 childSetAction("Pay...", LLPanelAvatar::onClickPay, getPanelAvatar()); 436 childSetAction("Pay...", LLPanelAvatar::onClickPay, getPanelAvatar());
@@ -1415,6 +1418,8 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
1415 } 1418 }
1416 childSetVisible("Instant Message...",FALSE); 1419 childSetVisible("Instant Message...",FALSE);
1417 childSetEnabled("Instant Message...",FALSE); 1420 childSetEnabled("Instant Message...",FALSE);
1421 childSetVisible("Invite to Group...",FALSE);
1422 childSetEnabled("Invite to Group...",FALSE);
1418 childSetVisible("Mute",FALSE); 1423 childSetVisible("Mute",FALSE);
1419 childSetEnabled("Mute",FALSE); 1424 childSetEnabled("Mute",FALSE);
1420 childSetVisible("Offer Teleport...",FALSE); 1425 childSetVisible("Offer Teleport...",FALSE);
@@ -1438,6 +1443,8 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
1438 1443
1439 childSetVisible("Instant Message...",TRUE); 1444 childSetVisible("Instant Message...",TRUE);
1440 childSetEnabled("Instant Message...",FALSE); 1445 childSetEnabled("Instant Message...",FALSE);
1446 childSetVisible("Invite to Group...",TRUE);
1447 childSetEnabled("Invite to Group...",FALSE);
1441 childSetVisible("Mute",TRUE); 1448 childSetVisible("Mute",TRUE);
1442 childSetEnabled("Mute",FALSE); 1449 childSetEnabled("Mute",FALSE);
1443 1450
@@ -1545,6 +1552,22 @@ void LLPanelAvatar::onClickIM(void* userdata)
1545 gIMMgr->addSession(name, IM_NOTHING_SPECIAL, self->mAvatarID); 1552 gIMMgr->addSession(name, IM_NOTHING_SPECIAL, self->mAvatarID);
1546} 1553}
1547 1554
1555void LLPanelAvatar::onClickGroupInvite(void* userdata)
1556{
1557 LLPanelAvatar* self = (LLPanelAvatar*) userdata;
1558 if (self->getAvatarID().notNull())
1559 {
1560 LLFloaterGroupPicker* widget;
1561 widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
1562 if (widget)
1563 {
1564 widget->center();
1565 widget->setPowersMask(GP_MEMBER_INVITE);
1566 widget->setSelectCallback(callback_invite_to_group, (void *)&(self->getAvatarID()));
1567 }
1568 }
1569}
1570
1548 1571
1549// static 1572// static
1550//----------------------------------------------------------------------------- 1573//-----------------------------------------------------------------------------
@@ -1762,6 +1785,7 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**)
1762 continue; 1785 continue;
1763 } 1786 }
1764 self->childSetEnabled("Instant Message...",TRUE); 1787 self->childSetEnabled("Instant Message...",TRUE);
1788 self->childSetEnabled("Invite to Group...",TRUE);
1765 self->childSetEnabled("Pay...",TRUE); 1789 self->childSetEnabled("Pay...",TRUE);
1766 self->childSetEnabled("Mute",TRUE); 1790 self->childSetEnabled("Mute",TRUE);
1767 1791