Feature Request (from IRC): Allow less restrictive access to group profiles from search

mAllowEdit has really signified whether or not llpanelgroup was in its own standalone floater
This change removes the restrictions the lindens chose to put on group search, allowing the user as much control as possible over a group from outside a dedicated floater

Notices and Land & Money get their information from messages passed through viewermessage, addressed to the right instance by id, as such they must be unique to the standalone floater
Cancel button in group search will only enable when changes have been made and will refresh the group, clearing changes.
The OK button is not visible in group search as it serves the same purpose as the Apply button here.
This commit is contained in:
Lirusaito
2013-06-14 23:08:56 -04:00
parent cf675c3748
commit 8ce71811c5
6 changed files with 24 additions and 26 deletions

View File

@@ -298,8 +298,7 @@ void LLPanelGroupGeneral::onCommitEnrollment()
}
// Make sure the agent can change enrollment info.
if (!gAgent.hasPowerInGroup(mGroupID,GP_MEMBER_OPTIONS)
|| !mAllowEdit)
if (!gAgent.hasPowerInGroup(mGroupID,GP_MEMBER_OPTIONS))
{
return;
}
@@ -317,7 +316,7 @@ void LLPanelGroupGeneral::onCommitEnrollment()
void LLPanelGroupGeneral::onCommitTitle()
{
if (mGroupID.isNull() || !mAllowEdit) return;
if (mGroupID.isNull()) return;
LLGroupMgr::getInstance()->sendGroupTitleUpdate(mGroupID,mComboActiveTitle->getCurrentID());
update(GC_TITLES);
mComboActiveTitle->resetDirty();
@@ -564,7 +563,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
if (mComboActiveTitle)
{
mComboActiveTitle->setVisible(is_member);
mComboActiveTitle->setEnabled(mAllowEdit);
if ( mActiveTitleLabel) mActiveTitleLabel->setVisible(is_member);
@@ -624,7 +622,7 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
if (mCtrlShowInGroupList)
{
mCtrlShowInGroupList->set(gdatap->mShowInList);
mCtrlShowInGroupList->setEnabled(mAllowEdit && can_change_ident);
mCtrlShowInGroupList->setEnabled(can_change_ident);
mCtrlShowInGroupList->resetDirty();
}
@@ -638,20 +636,20 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
{
mComboMature->setCurrentByIndex(NON_MATURE_CONTENT);
}
mComboMature->setEnabled(mAllowEdit && can_change_ident);
mComboMature->setEnabled(can_change_ident);
mComboMature->setVisible( !gAgent.isTeen() );
mComboMature->resetDirty();
}
if (mCtrlOpenEnrollment)
{
mCtrlOpenEnrollment->set(gdatap->mOpenEnrollment);
mCtrlOpenEnrollment->setEnabled(mAllowEdit && can_change_member_opts);
mCtrlOpenEnrollment->setEnabled(can_change_member_opts);
mCtrlOpenEnrollment->resetDirty();
}
if (mCtrlEnrollmentFee)
{
mCtrlEnrollmentFee->set(gdatap->mMembershipFee > 0);
mCtrlEnrollmentFee->setEnabled(mAllowEdit && can_change_member_opts);
mCtrlEnrollmentFee->setEnabled(can_change_member_opts);
mCtrlEnrollmentFee->resetDirty();
}
@@ -659,9 +657,7 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
{
S32 fee = gdatap->mMembershipFee;
mSpinEnrollmentFee->set((F32)fee);
mSpinEnrollmentFee->setEnabled( mAllowEdit &&
(fee > 0) &&
can_change_member_opts);
mSpinEnrollmentFee->setEnabled(fee && can_change_member_opts);
mSpinEnrollmentFee->resetDirty();
}
if ( mBtnJoinGroup )
@@ -693,7 +689,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
mCtrlReceiveNotices->setVisible(is_member);
if (is_member)
{
mCtrlReceiveNotices->setEnabled(mAllowEdit);
if(!mCtrlReceiveNotices->isDirty()) //If the user hasn't edited this then refresh it. Value may have changed in groups panel, etc.
{
mCtrlReceiveNotices->set(agent_gdatap.mAcceptNotices);
@@ -707,7 +702,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
mCtrlListGroup->setVisible(is_member);
if (is_member)
{
mCtrlListGroup->setEnabled(mAllowEdit);
if(!mCtrlListGroup->isDirty()) //If the user hasn't edited this then refresh it. Value may have changed in groups panel, etc.
{
mCtrlListGroup->set(agent_gdatap.mListInProfile);
@@ -721,7 +715,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
mCtrlReceiveChat->setVisible(is_member);
if (is_member)
{
mCtrlReceiveChat->setEnabled(mAllowEdit);
if(!mCtrlReceiveChat->isDirty()) //If the user hasn't edited this then refresh it. Value may have changed in groups panel, etc.
{
mCtrlReceiveChat->set(!gIMMgr->getIgnoreGroup(mGroupID));
@@ -730,8 +723,8 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
}
}
if (mInsignia) mInsignia->setEnabled(mAllowEdit && can_change_ident);
if (mEditCharter) mEditCharter->setEnabled(mAllowEdit && can_change_ident);
if (mInsignia) mInsignia->setEnabled(can_change_ident);
if (mEditCharter) mEditCharter->setEnabled(can_change_ident);
if (mGroupName) mGroupName->setText(gdatap->mName);
if (mGroupNameEditor) mGroupNameEditor->setVisible(FALSE);