diff options
author | Runitai Linden <davep@lindenlab.com> | 2020-03-24 11:58:31 -0500 |
---|---|---|
committer | Runitai Linden <davep@lindenlab.com> | 2020-03-24 11:58:31 -0500 |
commit | cbe83442790927349d5d7a374c80185d761c1f41 (patch) | |
tree | 84f985bbcb891e1d3ecc78a3e92b76d41bcc698c /indra/newview/llpanelgroupgeneral.cpp | |
parent | 3d22273726ab4d40f2eb9afc5ceeac37471a9dfa (diff) | |
parent | 1370c6d0c03ed81c47db19a1cae78fdc272d9729 (diff) |
Merge branch 'DRTVWR-440' of bitbucket.org:lindenlab/viewer into davep/DRTVWR-440
Diffstat (limited to 'indra/newview/llpanelgroupgeneral.cpp')
-rw-r--r-- | indra/newview/llpanelgroupgeneral.cpp | 58 |
1 files changed, 7 insertions, 51 deletions
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index b53cd222e7..375daf60f8 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -30,6 +30,7 @@ #include "llavatarnamecache.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llsdparam.h" #include "lluictrlfactory.h" #include "roles_constants.h" @@ -303,6 +304,11 @@ void LLPanelGroupGeneral::draw() bool LLPanelGroupGeneral::apply(std::string& mesg) { + if (mGroupID.isNull()) + { + return false; + } + if (!mGroupID.isNull() && mAllowEdit && mComboActiveTitle && mComboActiveTitle->isDirty()) { LLGroupMgr::getInstance()->sendGroupTitleUpdate(mGroupID,mComboActiveTitle->getCurrentID()); @@ -312,7 +318,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) BOOL has_power_in_group = gAgent.hasPowerInGroup(mGroupID,GP_GROUP_CHANGE_IDENTITY); - if (has_power_in_group || mGroupID.isNull()) + if (has_power_in_group) { LL_INFOS() << "LLPanelGroupGeneral::apply" << LL_ENDL; @@ -325,25 +331,6 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) return false; } - if (mGroupID.isNull()) - { - // Validate the group name length. - S32 group_name_len = mGroupNameEditor->getText().size(); - if ( group_name_len < DB_GROUP_NAME_MIN_LEN - || group_name_len > DB_GROUP_NAME_STR_LEN) - { - std::ostringstream temp_error; - temp_error << "A group name must be between " << DB_GROUP_NAME_MIN_LEN - << " and " << DB_GROUP_NAME_STR_LEN << " characters."; - mesg = temp_error.str(); - return false; - } - - LLNotificationsUtil::add("CreateGroupCost", LLSD(), LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); - - return false; - } - LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) { @@ -450,37 +437,6 @@ bool LLPanelGroupGeneral::confirmMatureApply(const LLSD& notification, const LLS return ret; } -// static -bool LLPanelGroupGeneral::createGroupCallback(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - switch(option) - { - case 0: - { - // Yay! We are making a new group! - U32 enrollment_fee = (mCtrlEnrollmentFee->get() ? - (U32) mSpinEnrollmentFee->get() : 0); - LLUUID insignia_id = mInsignia->getImageItemID().isNull() ? LLUUID::null : mInsignia->getImageAssetID(); - - LLGroupMgr::getInstance()->sendCreateGroupRequest(mGroupNameEditor->getText(), - mEditCharter->getText(), - mCtrlShowInGroupList->get(), - insignia_id, - enrollment_fee, - mCtrlOpenEnrollment->get(), - false, - mComboMature->getCurrentIndex() == MATURE_CONTENT); - - } - break; - case 1: - default: - break; - } - return false; -} - // virtual void LLPanelGroupGeneral::update(LLGroupChange gc) { |