void LLPanelPermissions::onClickGroup(void* data) { LLPanelPermissions* panelp = (LLPanelPermissions*)data; LLUUID owner_id; std::string name; BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name); LLFloater* parent_floater = gFloaterView->getParentFloater(panelp); if(owners_identical && (owner_id == gAgent.getID())) { LLFloaterGroupPicker* fg = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID())); if (fg) { fg->setSelectCallback( cbGroupID, data ); if (parent_floater) { LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, fg); fg->setOrigin(new_rect.mLeft, new_rect.mBottom); parent_floater->addDependentFloater(fg); } } } }
// static LLFloaterGroupPicker* LLFloaterGroupPicker::showInstance(const LLSD& seed) { LLFloaterGroupPicker* pickerp = getInstance(seed); if (pickerp) pickerp->open(); else pickerp = new LLFloaterGroupPicker(seed); return pickerp; }
void LLAvatarActions::inviteToGroup(const uuid_vec_t& ids) { LLFloaterGroupPicker* widget = LLFloaterGroupPicker::showInstance(LLSD(ids.front())); if (widget) { widget->center(); widget->setPowersMask(GP_MEMBER_INVITE); widget->removeNoneOption(); widget->setSelectGroupCallback(boost::bind(callback_invite_to_group, _1, ids)); } }
void LLAvatarActions::inviteToGroup(const LLUUID& id) { LLFloaterGroupPicker* widget = LLFloaterReg::showTypedInstance<LLFloaterGroupPicker>("group_picker", LLSD(id)); if (widget) { widget->center(); widget->setPowersMask(GP_MEMBER_INVITE); widget->removeNoneOption(); widget->setSelectGroupCallback(boost::bind(callback_invite_to_group, _1, id)); } }
// static void PanelRadar::onClickInvite(void* user_data) { PanelRadar* self = (PanelRadar*) user_data; LLScrollListItem *item = self->mRadarList->getFirstSelected(); if (item != NULL) { LLUUID agent_id = item->getUUID(); LLFloaterGroupPicker* widget; widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID())); if (widget) { widget->center(); widget->setPowersMask(GP_MEMBER_INVITE); widget->setSelectCallback(callback_invite_to_group, (void *)&agent_id); } } }
void LLSidepanelTaskInfo::onClickGroup() { LLUUID owner_id; std::string name; BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name); LLFloater* parent_floater = gFloaterView->getParentFloater(this); if (owners_identical && (owner_id == gAgent.getID())) { LLFloaterGroupPicker* fg = LLFloaterReg::showTypedInstance<LLFloaterGroupPicker>("group_picker", LLSD(gAgent.getID())); if (fg) { fg->setSelectGroupCallback( boost::bind(&LLSidepanelTaskInfo::cbGroupID, this, _1) ); if (parent_floater) { LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, fg); fg->setOrigin(new_rect.mLeft, new_rect.mBottom); parent_floater->addDependentFloater(fg); } } } }
void LLFloaterGroupPicker::onBtnCancel(void* userdata) { LLFloaterGroupPicker* self = (LLFloaterGroupPicker*)userdata; if(self) self->close(); }
void LLFloaterGroupPicker::onBtnOK(void* userdata) { LLFloaterGroupPicker* self = (LLFloaterGroupPicker*)userdata; if(self) self->ok(); }