diff options
Diffstat (limited to 'indra/newview/llpanelgrouproles.cpp')
-rw-r--r-- | indra/newview/llpanelgrouproles.cpp | 332 |
1 files changed, 166 insertions, 166 deletions
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index c427b57545..b5d4712868 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -119,7 +119,7 @@ LLPanelGroupRoles::LLPanelGroupRoles() mCurrentTab(NULL), mRequestedTab( NULL ), mSubTabContainer( NULL ), - mFirstUse( TRUE ) + mFirstUse( true ) { } @@ -177,7 +177,7 @@ bool LLPanelGroupRoles::postBuild() return LLPanelGroupTab::postBuild(); } -BOOL LLPanelGroupRoles::isVisibleByAgent(LLAgent* agentp) +bool LLPanelGroupRoles::isVisibleByAgent(LLAgent* agentp) { /* This power was removed to make group roles simpler return agentp->hasPowerInGroup(mGroupID, @@ -221,9 +221,9 @@ bool LLPanelGroupRoles::handleSubTabSwitch(const LLSD& data) args["WANT_APPLY_MESSAGE"] = mWantApplyMesg; LLNotificationsUtil::add("PanelGroupApply", args, LLSD(), boost::bind(&LLPanelGroupRoles::handleNotifyCallback, this, _1, _2)); - mHasModal = TRUE; + mHasModal = true; - // Returning FALSE will block a close action from finishing until + // Returning false will block a close action from finishing until // we get a response back from the user. return false; } @@ -253,7 +253,7 @@ void LLPanelGroupRoles::transitionToTab() bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - mHasModal = FALSE; + mHasModal = false; LLPanelGroupTab* transition_tab = mRequestedTab; switch (option) { @@ -266,7 +266,7 @@ bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLS // There was a problem doing the apply. if ( !apply_mesg.empty() ) { - mHasModal = TRUE; + mHasModal = true; LLSD args; args["MESSAGE"] = apply_mesg; LLNotificationsUtil::add("GenericAlert", args, LLSD(), boost::bind(&LLPanelGroupRoles::onModalClose, this, _1, _2)); @@ -296,7 +296,7 @@ bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLS bool LLPanelGroupRoles::onModalClose(const LLSD& notification, const LLSD& response) { - mHasModal = FALSE; + mHasModal = false; return false; } @@ -369,7 +369,7 @@ void LLPanelGroupRoles::activate() LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mGroupID); } - mFirstUse = FALSE; + mFirstUse = false; LLPanelGroupTab* panelp = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel(); if (panelp) panelp->activate(); @@ -389,12 +389,12 @@ bool LLPanelGroupRoles::needsApply(std::string& mesg) return panelp->needsApply(mesg); } -BOOL LLPanelGroupRoles::hasModal() +bool LLPanelGroupRoles::hasModal() { - if (mHasModal) return TRUE; + if (mHasModal) return true; LLPanelGroupTab* panelp = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel(); - if (!panelp) return FALSE; + if (!panelp) return false; return panelp->hasModal(); } @@ -419,7 +419,7 @@ void LLPanelGroupRoles::setGroupID(const LLUUID& id) if(mSubTabContainer) mSubTabContainer->selectTab(1); - group_roles_tab->mFirstOpen = TRUE; + group_roles_tab->mFirstOpen = true; activate(); } @@ -439,7 +439,7 @@ LLPanelGroupSubTab::~LLPanelGroupSubTab() { } -BOOL LLPanelGroupSubTab::postBuildSubTab(LLView* root) +bool LLPanelGroupSubTab::postBuildSubTab(LLView* root) { // Get icons for later use. mActionIcons.clear(); @@ -458,7 +458,7 @@ BOOL LLPanelGroupSubTab::postBuildSubTab(LLView* root) { mActionIcons["partial"] = getString("power_partial_icon"); } - return TRUE; + return true; } bool LLPanelGroupSubTab::postBuild() @@ -499,15 +499,15 @@ void LLPanelGroupSubTab::setSearchFilter(const std::string& filter) void LLPanelGroupSubTab::activate() { - setOthersVisible(TRUE); + setOthersVisible(true); } void LLPanelGroupSubTab::deactivate() { - setOthersVisible(FALSE); + setOthersVisible(false); } -void LLPanelGroupSubTab::setOthersVisible(BOOL b) +void LLPanelGroupSubTab::setOthersVisible(bool b) { if (mHeader) { @@ -543,9 +543,9 @@ void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl, U64 allowed_by_some, U64 allowed_by_all, LLUICtrl::commit_callback_t commit_callback, - BOOL show_all, - BOOL filter, - BOOL is_owner_role) + bool show_all, + bool filter, + bool is_owner_role) { if (LLGroupMgr::getInstance()->mRoleActionSets.empty()) { @@ -575,9 +575,9 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl, U64 allowed_by_all, LLRoleActionSet* action_set, LLUICtrl::commit_callback_t commit_callback, - BOOL show_all, - BOOL filter, - BOOL is_owner_role) + bool show_all, + bool filter, + bool is_owner_role) { LL_DEBUGS() << "Building role list for: " << action_set->mActionSetData->mName << LL_ENDL; // See if the allow mask matches anything in this category. @@ -613,7 +613,7 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl, std::vector<LLRoleAction*>::iterator ra_end = action_set->mActions.end(); bool items_match_filter = false; - BOOL can_change_actions = (!is_owner_role && gAgent.hasPowerInGroup(mGroupID, GP_ROLE_CHANGE_ACTIONS)); + bool can_change_actions = (!is_owner_role && gAgent.hasPowerInGroup(mGroupID, GP_ROLE_CHANGE_ACTIONS)); for ( ; ra_it != ra_end; ++ra_it) { @@ -724,26 +724,26 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl, if (show_all) { - check->setTentative(FALSE); + check->setTentative(false); if (allowed_by_some & (*ra_it)->mPowerBit) { - check->set(TRUE); + check->set(true); } else { - check->set(FALSE); + check->set(false); } } else { - check->set(TRUE); + check->set(true); if (show_full_strength) { - check->setTentative(FALSE); + check->setTentative(false); } else { - check->setTentative(TRUE); + check->setTentative(true); } } @@ -766,7 +766,7 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl, } } -void LLPanelGroupSubTab::setFooterEnabled(BOOL enable) +void LLPanelGroupSubTab::setFooterEnabled(bool enable) { if (mFooter) { @@ -783,9 +783,9 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab() mMembersList(NULL), mAssignedRolesList(NULL), mAllowedActionsList(NULL), - mChanged(FALSE), - mPendingMemberUpdate(FALSE), - mHasMatch(FALSE), + mChanged(false), + mPendingMemberUpdate(false), + mHasMatch(false), mNumOwnerAdditions(0) { } @@ -806,7 +806,7 @@ LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab() } } -BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) +bool LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) { LLPanelGroupSubTab::postBuildSubTab(root); @@ -823,13 +823,13 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) mAllowedActionsList = parent->getChild<LLScrollListCtrl>("member_allowed_actions", recurse); mActionDescription = parent->getChild<LLTextEditor>("member_action_description", recurse); - if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList || !mActionDescription) return FALSE; + if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList || !mActionDescription) return false; - mAllowedActionsList->setCommitOnSelectionChange(TRUE); + mAllowedActionsList->setCommitOnSelectionChange(true); mAllowedActionsList->setCommitCallback(boost::bind(&LLPanelGroupMembersSubTab::updateActionDescription, this)); // We want to be notified whenever a member is selected. - mMembersList->setCommitOnSelectionChange(TRUE); + mMembersList->setCommitOnSelectionChange(true); mMembersList->setCommitCallback(onMemberSelect, this); // Show the member's profile on double click. mMembersList->setDoubleClickCallback(onMemberDoubleClick, this); @@ -844,7 +844,7 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) std::string order_by = gSavedSettings.getString("GroupMembersSortOrder"); if(!order_by.empty()) { - mMembersList->sortByColumn(order_by, TRUE); + mMembersList->sortByColumn(order_by, true); } LLButton* button = parent->getChild<LLButton>("member_invite", recurse); @@ -858,17 +858,17 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) if ( mEjectBtn ) { mEjectBtn->setClickedCallback(onEjectMembers, this); - mEjectBtn->setEnabled(FALSE); + mEjectBtn->setEnabled(false); } mBanBtn = parent->getChild<LLButton>("member_ban", recurse); if(mBanBtn) { mBanBtn->setClickedCallback(onBanMember, this); - mBanBtn->setEnabled(FALSE); + mBanBtn->setEnabled(false); } - return TRUE; + return true; } void LLPanelGroupMembersSubTab::setGroupID(const LLUUID& id) @@ -936,9 +936,9 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() allowed_by_some, allowed_by_all, NULL, - FALSE, - FALSE, - FALSE); + false, + false, + false); ////////////////////////////////// // Build the assigned roles list. @@ -947,9 +947,9 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() LLGroupMgrGroupData::role_list_t::iterator iter = gdatap->mRoles.begin(); LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end(); - BOOL can_ban_members = gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS); - BOOL can_eject_members = gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_EJECT); - BOOL member_is_owner = FALSE; + bool can_ban_members = gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS); + bool can_eject_members = gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_EJECT); + bool member_is_owner = false; for( ; iter != end; ++iter) { @@ -959,14 +959,14 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() if (group_role_data) { - const BOOL needs_sort = FALSE; + const bool needs_sort = false; S32 count = group_role_data->getMembersInRole( selected_members, needs_sort); //check if the user has permissions to assign/remove //members to/from the role (but the ability to add/remove //should only be based on the "saved" changes to the role //not in the temp/meta data. -jwolk - BOOL cb_enable = ( (count > 0) ? + bool cb_enable = ( (count > 0) ? agentCanRemoveFromRole(mGroupID, role_id) : agentCanAddToRole(mGroupID, role_id) ); @@ -994,8 +994,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() if ( member_data && member_data->isInRole(gdatap->mOwnerRole) ) { // Can't remove other owners. - cb_enable = FALSE; - can_ban_members = FALSE; + cb_enable = false; + can_ban_members = false; break; } } @@ -1017,10 +1017,10 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() // If anyone selected is in any role besides 'Everyone' then they can't be ejected. if (role_id.notNull() && (count > 0)) { - can_eject_members = FALSE; + can_eject_members = false; if (role_id == gdatap->mOwnerRole) { - member_is_owner = TRUE; + member_is_owner = true; } } @@ -1076,12 +1076,12 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() LL_WARNS() << "No group role data for " << iter->second << LL_ENDL; } } - mAssignedRolesList->setEnabled(TRUE); + mAssignedRolesList->setEnabled(true); if (gAgent.isGodlike()) { - can_eject_members = TRUE; - // can_ban_members = TRUE; + can_eject_members = true; + // can_ban_members = true; } if (!can_eject_members && !member_is_owner) @@ -1094,8 +1094,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() if ( member_data && member_data->isInRole(gdatap->mOwnerRole) ) { - can_eject_members = TRUE; - //can_ban_members = TRUE; + can_eject_members = true; + //can_ban_members = true; } } @@ -1107,12 +1107,12 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() { if( gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_EJECT)) { - can_eject_members = TRUE; + can_eject_members = true; } if( gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS)) { - can_ban_members = TRUE; + can_ban_members = true; } } @@ -1124,8 +1124,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() // Don't count the agent. if ((*member_iter) == gAgent.getID()) { - can_eject_members = FALSE; - can_ban_members = FALSE; + can_eject_members = false; + can_ban_members = false; } } @@ -1257,7 +1257,7 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id, U64 powers_all_have = GP_ALL_POWERS; U64 powers_some_have = 0; - BOOL is_owner_role = ( gdatap->mOwnerRole == role_id ); + bool is_owner_role = ( gdatap->mOwnerRole == role_id ); LLUUID member_id; std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected(); @@ -1329,9 +1329,9 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id, powers_some_have, powers_all_have, NULL, - FALSE, - FALSE, - FALSE); + false, + false, + false); } // static @@ -1414,7 +1414,7 @@ void LLPanelGroupMembersSubTab::cancel() DeletePairedPointer()); mMemberRoleChangeData.clear(); - mChanged = FALSE; + mChanged = false; notifyObservers(); } } @@ -1441,7 +1441,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg) if ( gdatap->getRoleData(gdatap->mOwnerRole, rd) ) { - mHasModal = TRUE; + mHasModal = true; args["ROLE_NAME"] = rd.mRoleName; LLNotificationsUtil::add("AddGroupOwnerWarning", args, @@ -1469,7 +1469,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg) bool LLPanelGroupMembersSubTab::addOwnerCB(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - mHasModal = FALSE; + mHasModal = false; if (0 == option) { @@ -1512,7 +1512,7 @@ void LLPanelGroupMembersSubTab::applyMemberChanges() //force a UI update handleMemberSelect(); - mChanged = FALSE; + mChanged = false; mNumOwnerAdditions = 0; notifyObservers(); } @@ -1680,8 +1680,8 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) && gdatap->isRoleMemberDataComplete()) { mMemberProgress = gdatap->mMembers.begin(); - mPendingMemberUpdate = TRUE; - mHasMatch = FALSE; + mPendingMemberUpdate = true; + mHasMatch = false; } else { @@ -1710,7 +1710,7 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) // Still busy retreiving role/member mappings. retrieved << "Retrieving role member mappings..."; } - mMembersList->setEnabled(FALSE); + mMembersList->setEnabled(false); mMembersList->setCommentText(retrieved.str()); } } @@ -1736,7 +1736,7 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data) mMembersList->addNameItemRow(item_params); - mHasMatch = TRUE; + mHasMatch = true; } void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id) @@ -1765,7 +1765,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb addMemberToList(member); if(!mMembersList->getEnabled()) { - mMembersList->setEnabled(TRUE); + mMembersList->setEnabled(true); } } @@ -1773,7 +1773,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb void LLPanelGroupMembersSubTab::updateMembers() { - mPendingMemberUpdate = FALSE; + mPendingMemberUpdate = false; // Rebuild the members list. @@ -1838,17 +1838,17 @@ void LLPanelGroupMembersSubTab::updateMembers() { if (mHasMatch) { - mMembersList->setEnabled(TRUE); + mMembersList->setEnabled(true); } else if (gdatap->mMembers.size()) { - mMembersList->setEnabled(FALSE); + mMembersList->setEnabled(false); mMembersList->setCommentText(std::string("No match.")); } } else { - mPendingMemberUpdate = TRUE; + mPendingMemberUpdate = true; } // This should clear the other two lists, since nothing is selected. @@ -1964,8 +1964,8 @@ LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab() mDeleteRoleButton(NULL), mCopyRoleButton(NULL), mCreateRoleButton(NULL), - mFirstOpen(TRUE), - mHasRoleChange(FALSE) + mFirstOpen(true), + mHasRoleChange(false) { } @@ -1973,7 +1973,7 @@ LLPanelGroupRolesSubTab::~LLPanelGroupRolesSubTab() { } -BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) +bool LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) { LLPanelGroupSubTab::postBuildSubTab(root); @@ -2001,7 +2001,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) || !mRoleName || !mRoleTitle || !mRoleDescription || !mMemberVisibleCheck) { LL_WARNS() << "ARG! element not found." << LL_ENDL; - return FALSE; + return false; } mRemoveEveryoneTxt = getString("cant_delete_role"); @@ -2011,7 +2011,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) if ( mCreateRoleButton ) { mCreateRoleButton->setClickedCallback(onCreateRole, this); - mCreateRoleButton->setEnabled(FALSE); + mCreateRoleButton->setEnabled(false); } mCopyRoleButton = @@ -2019,7 +2019,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) if ( mCopyRoleButton ) { mCopyRoleButton->setClickedCallback(onCopyRole, this); - mCopyRoleButton->setEnabled(FALSE); + mCopyRoleButton->setEnabled(false); } mDeleteRoleButton = @@ -2027,31 +2027,31 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) if ( mDeleteRoleButton ) { mDeleteRoleButton->setClickedCallback(onDeleteRole, this); - mDeleteRoleButton->setEnabled(FALSE); + mDeleteRoleButton->setEnabled(false); } - mRolesList->setCommitOnSelectionChange(TRUE); + mRolesList->setCommitOnSelectionChange(true); mRolesList->setCommitCallback(onRoleSelect, this); mAssignedMembersList->setContextMenu(LLScrollListCtrl::MENU_AVATAR); mMemberVisibleCheck->setCommitCallback(onMemberVisibilityChange, this); - mAllowedActionsList->setCommitOnSelectionChange(TRUE); + mAllowedActionsList->setCommitOnSelectionChange(true); mAllowedActionsList->setCommitCallback(boost::bind(&LLPanelGroupRolesSubTab::updateActionDescription, this)); - mRoleName->setCommitOnFocusLost(TRUE); + mRoleName->setCommitOnFocusLost(true); mRoleName->setKeystrokeCallback(onPropertiesKey, this); - mRoleTitle->setCommitOnFocusLost(TRUE); + mRoleTitle->setCommitOnFocusLost(true); mRoleTitle->setKeystrokeCallback(onPropertiesKey, this); - mRoleDescription->setCommitOnFocusLost(TRUE); + mRoleDescription->setCommitOnFocusLost(true); mRoleDescription->setKeystrokeCallback(boost::bind(&LLPanelGroupRolesSubTab::onDescriptionKeyStroke, this, _1)); - setFooterEnabled(FALSE); + setFooterEnabled(false); - return TRUE; + return true; } void LLPanelGroupRolesSubTab::activate() @@ -2066,9 +2066,9 @@ void LLPanelGroupRolesSubTab::activate() mRoleDescription->clear(); mRoleTitle->clear(); - setFooterEnabled(FALSE); + setFooterEnabled(false); - mHasRoleChange = FALSE; + mHasRoleChange = false; update(GC_ALL); } @@ -2077,7 +2077,7 @@ void LLPanelGroupRolesSubTab::deactivate() LL_DEBUGS() << "LLPanelGroupRolesSubTab::deactivate()" << LL_ENDL; LLPanelGroupSubTab::deactivate(); - mFirstOpen = FALSE; + mFirstOpen = false; } bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg) @@ -2101,7 +2101,7 @@ bool LLPanelGroupRolesSubTab::apply(std::string& mesg) LL_DEBUGS() << "LLPanelGroupRolesSubTab::apply()" << LL_ENDL; saveRoleChanges(true); - mFirstOpen = FALSE; + mFirstOpen = false; LLGroupMgr::getInstance()->sendGroupRoleChanges(mGroupID); notifyObservers(); @@ -2111,7 +2111,7 @@ bool LLPanelGroupRolesSubTab::apply(std::string& mesg) void LLPanelGroupRolesSubTab::cancel() { - mHasRoleChange = FALSE; + mHasRoleChange = false; LLGroupMgr::getInstance()->cancelGroupRoleChanges(mGroupID); notifyObservers(); @@ -2200,7 +2200,7 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc) item = mRolesList->addElement(row, ((*rit).first.isNull()) ? ADD_TOP : ADD_BOTTOM, this); if (had_selection && ((*rit).first == last_selected)) { - item->setSelected(TRUE); + item->setSelected(true); } } } @@ -2210,16 +2210,16 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc) } } - mRolesList->sortByColumn(std::string("name"), TRUE); + mRolesList->sortByColumn(std::string("name"), true); if ( (gdatap->mRoles.size() < (U32)MAX_ROLES) && gAgent.hasPowerInGroup(mGroupID, GP_ROLE_CREATE) ) { - mCreateRoleButton->setEnabled(TRUE); + mCreateRoleButton->setEnabled(true); } else { - mCreateRoleButton->setEnabled(FALSE); + mCreateRoleButton->setEnabled(false); } if (had_selection) @@ -2233,9 +2233,9 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc) mRoleName->clear(); mRoleDescription->clear(); mRoleTitle->clear(); - setFooterEnabled(FALSE); - mDeleteRoleButton->setEnabled(FALSE); - mCopyRoleButton->setEnabled(FALSE); + setFooterEnabled(false); + mDeleteRoleButton->setEnabled(false); + mCopyRoleButton->setEnabled(false); } } @@ -2260,7 +2260,7 @@ void LLPanelGroupRolesSubTab::onRoleSelect(LLUICtrl* ctrl, void* user_data) void LLPanelGroupRolesSubTab::handleRoleSelect() { - BOOL can_delete = TRUE; + bool can_delete = true; LL_DEBUGS() << "LLPanelGroupRolesSubTab::handleRoleSelect()" << LL_ENDL; mAssignedMembersList->deleteAllItems(); @@ -2280,16 +2280,16 @@ void LLPanelGroupRolesSubTab::handleRoleSelect() LLScrollListItem* item = mRolesList->getFirstSelected(); if (!item) { - setFooterEnabled(FALSE); + setFooterEnabled(false); return; } - setFooterEnabled(TRUE); + setFooterEnabled(true); LLRoleData rd; if (gdatap->getRoleData(item->getUUID(),rd)) { - BOOL is_owner_role = ( gdatap->mOwnerRole == item->getUUID() ); + bool is_owner_role = ( gdatap->mOwnerRole == item->getUUID() ); mRoleName->setText(rd.mRoleName); mRoleTitle->setText(rd.mRoleTitle); mRoleDescription->setText(rd.mRoleDescription); @@ -2300,8 +2300,8 @@ void LLPanelGroupRolesSubTab::handleRoleSelect() rd.mRolePowers, 0LL, boost::bind(&LLPanelGroupRolesSubTab::handleActionCheck, this, _1, false), - TRUE, - FALSE, + true, + false, is_owner_role); @@ -2314,9 +2314,9 @@ void LLPanelGroupRolesSubTab::handleRoleSelect() if ( is_owner_role ) { // you can't delete the owner role - can_delete = FALSE; + can_delete = false; // ... or hide members with this role - mMemberVisibleCheck->setEnabled(FALSE); + mMemberVisibleCheck->setEnabled(false); } else { @@ -2326,9 +2326,9 @@ void LLPanelGroupRolesSubTab::handleRoleSelect() if (item->getUUID().isNull()) { // Everyone role, can't edit description or name or delete - mRoleDescription->setEnabled(FALSE); - mRoleName->setEnabled(FALSE); - can_delete = FALSE; + mRoleDescription->setEnabled(false); + mRoleName->setEnabled(false); + can_delete = false; } } else @@ -2339,9 +2339,9 @@ void LLPanelGroupRolesSubTab::handleRoleSelect() mRoleName->clear(); mRoleDescription->clear(); mRoleTitle->clear(); - setFooterEnabled(FALSE); + setFooterEnabled(false); - can_delete = FALSE; + can_delete = false; } mSelectedRole = item->getUUID(); buildMembersList(); @@ -2445,7 +2445,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) { // Uncheck the item, for now. It will be // checked if they click 'Yes', below. - check->set(FALSE); + check->set(false); LLRoleData rd; LLSD args; @@ -2454,7 +2454,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) { args["ACTION_NAME"] = rap->mDescription; args["ROLE_NAME"] = rd.mRoleName; - mHasModal = TRUE; + mHasModal = true; std::string warning = "AssignDangerousActionWarning"; if (GP_ROLE_CHANGE_ACTIONS == power) { @@ -2481,7 +2481,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) { args["ACTION_NAME"] = rap->mDescription; args["ROLE_NAME"] = rd.mRoleName; - mHasModal = TRUE; + mHasModal = true; std::vector<LLScrollListItem*> all_data = mAllowedActionsList->getAllData(); std::vector<LLScrollListItem*>::iterator ad_it = all_data.begin(); @@ -2527,9 +2527,9 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) current_role_powers, current_role_powers, boost::bind(&LLPanelGroupRolesSubTab::handleActionCheck, this, _1, false), - TRUE, - FALSE, - FALSE); + true, + false, + false); } @@ -2545,7 +2545,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) gdatap->removeRolePower(role_id,power); } - mHasRoleChange = TRUE; + mHasRoleChange = true; notifyObservers(); } @@ -2554,13 +2554,13 @@ bool LLPanelGroupRolesSubTab::addActionCB(const LLSD& notification, const LLSD& { if (!check) return false; - mHasModal = FALSE; + mHasModal = false; S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (0 == option) { // User clicked "Yes" - check->set(TRUE); + check->set(true); const bool force_add = true; handleActionCheck(check, force_add); } @@ -2573,13 +2573,13 @@ void LLPanelGroupRolesSubTab::onPropertiesKey(LLLineEditor* ctrl, void* user_dat LLPanelGroupRolesSubTab* self = static_cast<LLPanelGroupRolesSubTab*>(user_data); if (!self) return; - self->mHasRoleChange = TRUE; + self->mHasRoleChange = true; self->notifyObservers(); } void LLPanelGroupRolesSubTab::onDescriptionKeyStroke(LLTextEditor* caller) { - mHasRoleChange = TRUE; + mHasRoleChange = true; notifyObservers(); } @@ -2589,7 +2589,7 @@ void LLPanelGroupRolesSubTab::onDescriptionCommit(LLUICtrl* ctrl, void* user_dat LLPanelGroupRolesSubTab* self = static_cast<LLPanelGroupRolesSubTab*>(user_data); if (!self) return; - self->mHasRoleChange = TRUE; + self->mHasRoleChange = true; self->notifyObservers(); } @@ -2653,7 +2653,7 @@ void LLPanelGroupRolesSubTab::handleCreateRole() rd.mRoleName = "New Role"; gdatap->createRole(new_role_id,rd); - mRolesList->deselectAllItems(TRUE); + mRolesList->deselectAllItems(true); LLSD row; row["id"] = new_role_id; row["columns"][0]["column"] = "name"; @@ -2664,7 +2664,7 @@ void LLPanelGroupRolesSubTab::handleCreateRole() // put focus on name field and select its contents if(mRoleName) { - mRoleName->setFocus(TRUE); + mRoleName->setFocus(true); mRoleName->onTabInto(); gFocusMgr.triggerFocusFlash(); } @@ -2704,7 +2704,7 @@ void LLPanelGroupRolesSubTab::handleCopyRole() rd.mRoleName += "(Copy)"; gdatap->createRole(new_role_id,rd); - mRolesList->deselectAllItems(TRUE); + mRolesList->deselectAllItems(true); LLSD row; row["id"] = new_role_id; row["columns"][0]["column"] = "name"; @@ -2715,7 +2715,7 @@ void LLPanelGroupRolesSubTab::handleCopyRole() // put focus on name field and select its contents if(mRoleName) { - mRoleName->setFocus(TRUE); + mRoleName->setFocus(true); mRoleName->onTabInto(); gFocusMgr.triggerFocusFlash(); } @@ -2792,7 +2792,7 @@ void LLPanelGroupRolesSubTab::saveRoleChanges(bool select_saved_role) LLScrollListItem* item = mRolesList->addElement(row, ADD_BOTTOM, this); item->setSelected(select_saved_role); - mHasRoleChange = FALSE; + mHasRoleChange = false; } } @@ -2823,9 +2823,9 @@ void LLPanelGroupRolesSubTab::setGroupID(const LLUUID& id) if(mRoleDescription) mRoleDescription->clear(); if(mRoleTitle) mRoleTitle->clear(); - mHasRoleChange = FALSE; + mHasRoleChange = false; - setFooterEnabled(FALSE); + setFooterEnabled(false); LLPanelGroupSubTab::setGroupID(id); } @@ -2843,7 +2843,7 @@ LLPanelGroupActionsSubTab::~LLPanelGroupActionsSubTab() { } -BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root) +bool LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root) { LLPanelGroupSubTab::postBuildSubTab(root); @@ -2861,15 +2861,15 @@ BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root) mActionRoles = parent->getChild<LLScrollListCtrl>("action_roles",recurse); mActionMembers = parent->getChild<LLNameListCtrl>("action_members",recurse); - if (!mActionList || !mActionDescription || !mActionRoles || !mActionMembers) return FALSE; + if (!mActionList || !mActionDescription || !mActionRoles || !mActionMembers) return false; - mActionList->setCommitOnSelectionChange(TRUE); + mActionList->setCommitOnSelectionChange(true); mActionList->setCommitCallback(boost::bind(&LLPanelGroupActionsSubTab::handleActionSelect, this)); mActionList->setContextMenu(LLScrollListCtrl::MENU_AVATAR); update(GC_ALL); - return TRUE; + return true; } void LLPanelGroupActionsSubTab::activate() @@ -2884,9 +2884,9 @@ void LLPanelGroupActionsSubTab::activate() GP_ALL_POWERS, GP_ALL_POWERS, NULL, - FALSE, - TRUE, - FALSE); + false, + true, + false); } void LLPanelGroupActionsSubTab::deactivate() @@ -2937,9 +2937,9 @@ void LLPanelGroupActionsSubTab::onFilterChanged() GP_ALL_POWERS, GP_ALL_POWERS, NULL, - FALSE, - TRUE, - FALSE); + false, + true, + false); } void LLPanelGroupActionsSubTab::handleActionSelect() @@ -3050,7 +3050,7 @@ LLPanelGroupBanListSubTab::LLPanelGroupBanListSubTab() mDeleteBanButton(NULL) {} -BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root) +bool LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root) { LLPanelGroupSubTab::postBuildSubTab(root); @@ -3071,19 +3071,19 @@ BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root) mBanCountText = parent->getChild<LLTextBase>("ban_count", recurse); if(!mBanList || !mCreateBanButton || !mDeleteBanButton || !mRefreshBanListButton || !mBanCountText) - return FALSE; + return false; - mBanList->setCommitOnSelectionChange(TRUE); + mBanList->setCommitOnSelectionChange(true); mBanList->setCommitCallback(onBanEntrySelect, this); mCreateBanButton->setClickedCallback(onCreateBanEntry, this); - mCreateBanButton->setEnabled(FALSE); + mCreateBanButton->setEnabled(false); mDeleteBanButton->setClickedCallback(onDeleteBanEntry, this); - mDeleteBanButton->setEnabled(FALSE); + mDeleteBanButton->setEnabled(false); mRefreshBanListButton->setClickedCallback(onRefreshBanList, this); - mRefreshBanListButton->setEnabled(FALSE); + mRefreshBanListButton->setEnabled(false); setBanCount(0); @@ -3091,8 +3091,8 @@ BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root) populateBanList(); - setFooterEnabled(FALSE); - return TRUE; + setFooterEnabled(false); + return true; } void LLPanelGroupBanListSubTab::activate() @@ -3100,7 +3100,7 @@ void LLPanelGroupBanListSubTab::activate() LLPanelGroupSubTab::activate(); mBanList->deselectAllItems(); - mDeleteBanButton->setEnabled(FALSE); + mDeleteBanButton->setEnabled(false); LLGroupMgrGroupData * group_datap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (group_datap) @@ -3111,7 +3111,7 @@ void LLPanelGroupBanListSubTab::activate() } else { - mCreateBanButton->setEnabled(FALSE); + mCreateBanButton->setEnabled(false); setBanCount(0); } @@ -3122,7 +3122,7 @@ void LLPanelGroupBanListSubTab::activate() // LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID); - setFooterEnabled(FALSE); + setFooterEnabled(false); update(GC_ALL); } @@ -3153,7 +3153,7 @@ void LLPanelGroupBanListSubTab::handleBanEntrySelect() { if (gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS)) { - mDeleteBanButton->setEnabled(TRUE); + mDeleteBanButton->setEnabled(true); } } @@ -3229,11 +3229,11 @@ void LLPanelGroupBanListSubTab::handleDeleteBanEntry() // Removing an item removes the selection, we shouldn't be able to click // the button anymore until we reselect another entry. - mDeleteBanButton->setEnabled(FALSE); + mDeleteBanButton->setEnabled(false); } // update ban-count related elements - mCreateBanButton->setEnabled(TRUE); + mCreateBanButton->setEnabled(true); setBanCount(gdatap->mBanList.size()); LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, mGroupID, LLGroupMgr::BAN_DELETE, ban_ids); @@ -3250,7 +3250,7 @@ void LLPanelGroupBanListSubTab::onRefreshBanList(void* user_data) void LLPanelGroupBanListSubTab::handleRefreshBanList() { - mRefreshBanListButton->setEnabled(FALSE); + mRefreshBanListButton->setEnabled(false); LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID); } @@ -3258,7 +3258,7 @@ void LLPanelGroupBanListSubTab::onBanListCompleted(bool isComplete) { if(isComplete) { - mRefreshBanListButton->setEnabled(TRUE); + mRefreshBanListButton->setEnabled(true); populateBanList(); } } @@ -3309,7 +3309,7 @@ void LLPanelGroupBanListSubTab::populateBanList() mBanList->addNameItemRow(ban_entry); } - mRefreshBanListButton->setEnabled(TRUE); + mRefreshBanListButton->setEnabled(true); mCreateBanButton->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS) && gdatap->mBanList.size() < GB_MAX_BANNED_AGENTS); setBanCount(gdatap->mBanList.size()); @@ -3320,6 +3320,6 @@ void LLPanelGroupBanListSubTab::setGroupID(const LLUUID& id) if(mBanList) mBanList->deleteAllItems(); - setFooterEnabled(FALSE); + setFooterEnabled(false); LLPanelGroupSubTab::setGroupID(id); } |