merge changes for storm-1952

meow-7.2.2
Oz Linden 2013-08-21 10:40:57 -04:00
commit c15d2e87ac
4 changed files with 79 additions and 16 deletions

View File

@ -305,6 +305,7 @@ Cinder Roxley
OPEN-185
STORM-1703
STORM-1958
STORM-1952
STORM-1951
Clara Young
Coaldust Numbers

View File

@ -1101,27 +1101,61 @@ void LLPanelGroupMembersSubTab::onEjectMembers(void *userdata)
}
void LLPanelGroupMembersSubTab::handleEjectMembers()
{
//send down an eject message
uuid_vec_t selected_members;
{
std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
if (selection.empty()) return;
std::vector<LLScrollListItem*>::iterator itor;
for (itor = selection.begin() ;
itor != selection.end(); ++itor)
S32 selection_count = selection.size();
if (selection_count == 1)
{
LLUUID member_id = (*itor)->getUUID();
selected_members.push_back( member_id );
LLSD args;
LLUUID selected_avatar = mMembersList->getValue().asUUID();
std::string fullname = LLSLURL("agent", selected_avatar, "inspect").getSLURLString();
args["AVATAR_NAME"] = fullname;
LLSD payload;
LLNotificationsUtil::add("EjectGroupMemberWarning",
args,
payload,
boost::bind(&LLPanelGroupMembersSubTab::handleEjectCallback, this, _1, _2));
}
else
{
LLSD args;
args["COUNT"] = llformat("%d", selection_count);
LLSD payload;
LLNotificationsUtil::add("EjectGroupMembersWarning",
args,
payload,
boost::bind(&LLPanelGroupMembersSubTab::handleEjectCallback, this, _1, _2));
}
}
mMembersList->deleteSelectedItems();
sendEjectNotifications(mGroupID, selected_members);
LLGroupMgr::getInstance()->sendGroupMemberEjects(mGroupID,
selected_members);
bool LLPanelGroupMembersSubTab::handleEjectCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option) // Eject button
{
//send down an eject message
uuid_vec_t selected_members;
std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
if (selection.empty()) return false;
std::vector<LLScrollListItem*>::iterator itor;
for (itor = selection.begin() ;
itor != selection.end(); ++itor)
{
LLUUID member_id = (*itor)->getUUID();
selected_members.push_back( member_id );
}
mMembersList->deleteSelectedItems();
sendEjectNotifications(mGroupID, selected_members);
LLGroupMgr::getInstance()->sendGroupMemberEjects(mGroupID, selected_members);
}
return false;
}
void LLPanelGroupMembersSubTab::sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members)

View File

@ -167,6 +167,7 @@ public:
static void onEjectMembers(void*);
void handleEjectMembers();
void sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members);
bool handleEjectCallback(const LLSD& notification, const LLSD& response);
static void onRoleCheck(LLUICtrl* check, void* user_data);
void handleRoleCheck(const LLUUID& role_id,

View File

@ -506,6 +506,33 @@ Add this Ability to &apos;[ROLE_NAME]&apos;?
notext="No"
yestext="Yes"/>
</notification>
<notification
icon="alertmodal.tga"
name="EjectGroupMemberWarning"
type="alertmodal">
You are about to eject [AVATAR_NAME] from the group.
<tag>group</tag>
<tag>confirm</tag>
<usetemplate
ignoretext="Confirm ejecting a participant from group"
name="okcancelignore"
notext="Cancel"
yestext="Eject"/>
</notification>
<notification
icon="alertmodal.tga"
name="EjectGroupMembersWarning"
type="alertmodal">
You are about to eject [COUNT] members from the group.
<tag>group</tag>
<tag>confirm</tag>
<usetemplate
ignoretext="Confirm ejecting multiple members from group"
name="okcancelignore"
notext="Cancel"
yestext="Eject"/>
</notification>
<notification
icon="alertmodal.tga"