From 285ac83064b28a4c53542aeb64b9fd5728370ab8 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 9 Sep 2009 21:50:12 -0700 Subject: Redid layout of profile window, added group invite button --- linden/indra/newview/llpanelavatar.cpp | 24 + linden/indra/newview/llpanelavatar.h | 1 + .../skins/default/xui/en-us/floater_profile.xml | 4 +- .../skins/default/xui/en-us/panel_avatar.xml | 567 ++++++++++----------- .../skins/silver/xui/en-us/panel_avatar.xml | 430 ---------------- 5 files changed, 301 insertions(+), 725 deletions(-) delete mode 100644 linden/indra/newview/skins/silver/xui/en-us/panel_avatar.xml (limited to 'linden/indra') 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 @@ #include "llfloaterfriends.h" #include "llfloatergroupinfo.h" +#include "llfloatergroups.h" #include "llfloaterworldmap.h" #include "llfloatermute.h" #include "llfloateravatarinfo.h" @@ -86,6 +87,7 @@ std::list LLPanelAvatar::sAllPanels; BOOL LLPanelAvatar::sAllowFirstLife = FALSE; +extern void callback_invite_to_group(LLUUID group_id, void *user_data); extern void handle_lure(const LLUUID& invitee); extern void handle_pay_by_id(const LLUUID& payee); @@ -428,6 +430,7 @@ BOOL LLPanelAvatarSecondLife::postBuild(void) childSetAction("Find on Map", LLPanelAvatar::onClickTrack, getPanelAvatar()); childSetAction("Instant Message...", LLPanelAvatar::onClickIM, getPanelAvatar()); + childSetAction("Invite to Group...", LLPanelAvatar::onClickGroupInvite, getPanelAvatar()); childSetAction("Add Friend...", LLPanelAvatar::onClickAddFriend, getPanelAvatar()); childSetAction("Pay...", LLPanelAvatar::onClickPay, getPanelAvatar()); @@ -1415,6 +1418,8 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name } childSetVisible("Instant Message...",FALSE); childSetEnabled("Instant Message...",FALSE); + childSetVisible("Invite to Group...",FALSE); + childSetEnabled("Invite to Group...",FALSE); childSetVisible("Mute",FALSE); childSetEnabled("Mute",FALSE); childSetVisible("Offer Teleport...",FALSE); @@ -1438,6 +1443,8 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name childSetVisible("Instant Message...",TRUE); childSetEnabled("Instant Message...",FALSE); + childSetVisible("Invite to Group...",TRUE); + childSetEnabled("Invite to Group...",FALSE); childSetVisible("Mute",TRUE); childSetEnabled("Mute",FALSE); @@ -1545,6 +1552,22 @@ void LLPanelAvatar::onClickIM(void* userdata) gIMMgr->addSession(name, IM_NOTHING_SPECIAL, self->mAvatarID); } +void LLPanelAvatar::onClickGroupInvite(void* userdata) +{ + LLPanelAvatar* self = (LLPanelAvatar*) userdata; + if (self->getAvatarID().notNull()) + { + LLFloaterGroupPicker* widget; + widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID())); + if (widget) + { + widget->center(); + widget->setPowersMask(GP_MEMBER_INVITE); + widget->setSelectCallback(callback_invite_to_group, (void *)&(self->getAvatarID())); + } + } +} + // static //----------------------------------------------------------------------------- @@ -1762,6 +1785,7 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**) continue; } self->childSetEnabled("Instant Message...",TRUE); + self->childSetEnabled("Invite to Group...",TRUE); self->childSetEnabled("Pay...",TRUE); self->childSetEnabled("Mute",TRUE); diff --git a/linden/indra/newview/llpanelavatar.h b/linden/indra/newview/llpanelavatar.h index 4570145..b1bb317 100644 --- a/linden/indra/newview/llpanelavatar.h +++ b/linden/indra/newview/llpanelavatar.h @@ -311,6 +311,7 @@ public: static void onClickTrack( void *userdata); static void onClickIM( void *userdata); + static void onClickGroupInvite( void *userdata); static void onClickOfferTeleport( void *userdata); static void onClickPay( void *userdata); static void onClickAddFriend(void* userdata); diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_profile.xml b/linden/indra/newview/skins/default/xui/en-us/floater_profile.xml index daf45cf..c67443f 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_profile.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_profile.xml @@ -1,6 +1,6 @@ - + diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml index a3a4b1a..a7a26ab 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml @@ -1,430 +1,411 @@ - - + - - - [ACCTTYPE] -[PAYMENTINFO] -[AGEVERIFICATION] - - - Resident - - - Trial - - - Charter Member - - - Linden Lab Employee - - - Payment Info Used - - - Payment Info On File - - - No Payment Info On File - - - Age-verified - - - Not Age-verified - - - Name: - - - - Currently Online - - - Born: - - + [ACCTTYPE] + [PAYMENTINFO] + [AGEVERIFICATION] + + + Resident + + + Trial + + + Charter Member + + + Linden Lab Employee + + + Payment Info Used + + + Payment Info On File + + + No Payment Info On File + + + Age-verified + + + Not Age-verified + + + Currently: Online + + + Currently: Offline + +