MAINT-8586 XUI cleanup

master
Andrey Kleshchev 2018-05-08 12:42:35 +00:00
parent a517dec5e4
commit 9eabb2797e
16 changed files with 27 additions and 119 deletions

View File

@ -159,9 +159,6 @@ BOOL LLPanelGroup::postBuild()
button = getChild<LLButton>("btn_chat");
button->setClickedCallback(onBtnGroupChatClicked, this);
button = getChild<LLButton>("btn_cancel");
button->setVisible(false); button->setEnabled(true);
button = getChild<LLButton>("btn_refresh");
button->setClickedCallback(onBtnRefresh, this);
@ -170,8 +167,6 @@ BOOL LLPanelGroup::postBuild()
childSetCommitCallback("back",boost::bind(&LLPanelGroup::onBackBtnClick,this),NULL);
childSetCommitCallback("btn_create",boost::bind(&LLPanelGroup::onBtnCreate,this),NULL);
childSetCommitCallback("btn_cancel",boost::bind(&LLPanelGroup::onBtnCancel,this),NULL);
LLPanelGroupTab* panel_general = findChild<LLPanelGroupTab>("group_general_tab_panel");
LLPanelGroupTab* panel_roles = findChild<LLPanelGroupTab>("group_roles_tab_panel");
@ -299,11 +294,6 @@ void LLPanelGroup::onBtnJoin()
LLGroupActions::join(mID);
}
void LLPanelGroup::onBtnCancel()
{
onBackBtnClick();
}
void LLPanelGroup::changed(LLGroupChange gc)
{
for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it)

View File

@ -95,7 +95,6 @@ protected:
void onBtnCreate();
void onBackBtnClick();
void onBtnJoin();
void onBtnCancel();
static void onBtnApply(void*);
static void onBtnRefresh(void*);

View File

@ -465,12 +465,12 @@ BOOL LLPanelGroupSubTab::postBuild()
{
// Hook up the search widgets.
bool recurse = true;
mSearchEditor = getChild<LLFilterEditor>("filter_input", recurse);
if (!mSearchEditor)
return FALSE;
mSearchEditor->setCommitCallback(boost::bind(&LLPanelGroupSubTab::setSearchFilter, this, _2));
mSearchEditor = findChild<LLFilterEditor>("filter_input", recurse);
if (mSearchEditor) // SubTab doesn't implement this, only some of derived classes
{
mSearchEditor->setCommitCallback(boost::bind(&LLPanelGroupSubTab::setSearchFilter, this, _2));
}
return LLPanelGroupTab::postBuild();
}
@ -815,8 +815,8 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
// Look recursively from the parent to find all our widgets.
bool recurse = true;
mHeader = parent->getChild<LLPanel>("members_header", recurse);
mFooter = parent->getChild<LLPanel>("members_footer", recurse);
mHeader = parent->findChild<LLPanel>("members_header", recurse);
mFooter = parent->findChild<LLPanel>("members_footer", recurse);
mMembersList = parent->getChild<LLNameListCtrl>("member_list", recurse);
mAssignedRolesList = parent->getChild<LLScrollListCtrl>("member_assigned_roles", recurse);
@ -1980,8 +1980,8 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
// Look recursively from the parent to find all our widgets.
bool recurse = true;
mHeader = parent->getChild<LLPanel>("roles_header", recurse);
mFooter = parent->getChild<LLPanel>("roles_footer", recurse);
mHeader = parent->findChild<LLPanel>("roles_header", recurse);
mFooter = parent->findChild<LLPanel>("roles_footer", recurse);
mRolesList = parent->getChild<LLScrollListCtrl>("role_list", recurse);
@ -2789,8 +2789,8 @@ BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root)
// Look recursively from the parent to find all our widgets.
bool recurse = true;
mHeader = parent->getChild<LLPanel>("actions_header", recurse);
mFooter = parent->getChild<LLPanel>("actions_footer", recurse);
mHeader = parent->findChild<LLPanel>("actions_header", recurse);
mFooter = parent->findChild<LLPanel>("actions_footer", recurse);
mActionDescription = parent->getChild<LLTextEditor>("action_description", recurse);
@ -2996,10 +2996,10 @@ BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root)
// Look recursively from the parent to find all our widgets.
bool recurse = true;
mHeader = parent->getChild<LLPanel>("banlist_header", recurse);
mFooter = parent->getChild<LLPanel>("banlist_footer", recurse);
mHeader = parent->findChild<LLPanel>("banlist_header", recurse);
mFooter = parent->findChild<LLPanel>("banlist_footer", recurse);
mBanList = parent->getChild<LLNameListCtrl>("ban_list", recurse);
mCreateBanButton = parent->getChild<LLButton>("ban_create", recurse);

View File

@ -132,7 +132,7 @@ protected:
BOOL is_owner_role);
protected:
LLPanel* mHeader;
LLPanel* mHeader; // Might not be present in xui of derived class (NULL)
LLPanel* mFooter;
LLFilterEditor* mSearchEditor;

View File

@ -531,11 +531,6 @@ BOOL LLPanelOutfitEdit::postBuild()
mPlusBtn = getChild<LLButton>("plus_btn");
mPlusBtn->setClickedCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this));
mEditWearableBtn = getChild<LLButton>("edit_wearable_btn");
mEditWearableBtn->setEnabled(FALSE);
mEditWearableBtn->setVisible(FALSE);
mEditWearableBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this));
childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance()));

View File

@ -214,7 +214,6 @@ private:
LLFilterEditor* mSearchFilter;
LLSaveFolderState* mSavedFolderState;
std::string mSearchString;
LLButton* mEditWearableBtn;
LLButton* mFolderViewBtn;
LLButton* mListViewBtn;
LLButton* mPlusBtn;

View File

@ -224,8 +224,6 @@ void LLPanelPermissions::disableAll()
getChildView("Description:")->setEnabled(FALSE);
getChild<LLUICtrl>("Object Description")->setValue(LLStringUtil::null);
getChildView("Object Description")->setEnabled(FALSE);
getChildView("Permissions:")->setEnabled(FALSE);
getChild<LLUICtrl>("checkbox share with group")->setValue(FALSE);
getChildView("checkbox share with group")->setEnabled(FALSE);
@ -379,8 +377,6 @@ void LLPanelPermissions::refresh()
getChildView("pathfinding_attributes_value")->setEnabled(TRUE);
getChild<LLUICtrl>("pathfinding_attributes_value")->setValue(LLTrans::getString(pfAttrName));
getChildView("Permissions:")->setEnabled(TRUE);
// Update creator text field
getChildView("Creator:")->setEnabled(TRUE);

View File

@ -102,10 +102,6 @@ BOOL LLSidepanelAppearance::postBuild()
childSetAction("edit_outfit_btn", boost::bind(&LLSidepanelAppearance::showOutfitEditPanel, this));
mNewOutfitBtn = getChild<LLButton>("newlook_btn");
mNewOutfitBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onNewOutfitButtonClicked, this));
mNewOutfitBtn->setEnabled(false);
mFilterEditor = getChild<LLFilterEditor>("Filter");
if (mFilterEditor)
{
@ -285,14 +281,6 @@ void LLSidepanelAppearance::onEditAppearanceButtonClicked()
}
}
void LLSidepanelAppearance::onNewOutfitButtonClicked()
{
if (!mOutfitEdit->getVisible())
{
mPanelOutfitsInventory->onSave();
}
}
void LLSidepanelAppearance::showOutfitsInventoryPanel()
{
toggleWearableEditPanel(FALSE);
@ -347,7 +335,6 @@ void LLSidepanelAppearance::toggleMyOutfitsPanel(BOOL visible)
// *TODO: Move these controls to panel_outfits_inventory.xml
// so that we don't need to toggle them explicitly.
mFilterEditor->setVisible(visible);
mNewOutfitBtn->setVisible(visible);
mCurrOutfitPanel->setVisible(visible);
if (visible)
@ -473,8 +460,6 @@ void LLSidepanelAppearance::editWearable(LLViewerWearable *wearable, LLView *dat
// fetched. Alternatively, we could stuff this logic into llagentwearables::makeNewOutfitLinks.
void LLSidepanelAppearance::fetchInventory()
{
mNewOutfitBtn->setEnabled(false);
uuid_vec_t ids;
LLUUID item_id;
for(S32 type = (S32)LLWearableType::WT_SHAPE; type < (S32)LLWearableType::WT_COUNT; ++type)
@ -525,7 +510,6 @@ void LLSidepanelAppearance::fetchInventory()
void LLSidepanelAppearance::inventoryFetched()
{
mNewOutfitBtn->setEnabled(true);
}
void LLSidepanelAppearance::setWearablesLoading(bool val)

View File

@ -55,7 +55,6 @@ public:
void fetchInventory();
void inventoryFetched();
void onNewOutfitButtonClicked();
void showOutfitsInventoryPanel();
void showOutfitEditPanel();
@ -84,7 +83,6 @@ private:
LLButton* mOpenOutfitBtn;
LLButton* mEditAppearanceBtn;
LLButton* mNewOutfitBtn;
LLPanel* mCurrOutfitPanel;
LLTextBox* mCurrentLookName;

View File

@ -177,9 +177,6 @@ BOOL LLSidepanelInventory::postBuild()
mTeleportBtn = mInventoryPanel->getChild<LLButton>("teleport_btn");
mTeleportBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onTeleportButtonClicked, this));
mOverflowBtn = mInventoryPanel->getChild<LLButton>("overflow_btn");
mOverflowBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onOverflowButtonClicked, this));
mPanelMainInventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
mPanelMainInventory->setSelectCallback(boost::bind(&LLSidepanelInventory::onSelectionChange, this, _1, _2));
LLTabContainer* tabs = mPanelMainInventory->getChild<LLTabContainer>("inventory filter tabs");
@ -515,10 +512,6 @@ void LLSidepanelInventory::onTeleportButtonClicked()
performActionOnSelection("teleport");
}
void LLSidepanelInventory::onOverflowButtonClicked()
{
}
void LLSidepanelInventory::onBackButtonClicked()
{
showInventoryPanel();

View File

@ -114,7 +114,6 @@ protected:
void onWearButtonClicked();
void onPlayButtonClicked();
void onTeleportButtonClicked();
void onOverflowButtonClicked();
void onBackButtonClicked();
private:
@ -123,7 +122,6 @@ private:
LLButton* mWearBtn;
LLButton* mPlayBtn;
LLButton* mTeleportBtn;
LLButton* mOverflowBtn;
LLButton* mShopBtn;
bool mInboxEnabled;

View File

@ -50,8 +50,7 @@ LLSidepanelInventorySubpanel::LLSidepanelInventorySubpanel(const LLPanel::Params
: LLPanel(p),
mIsDirty(TRUE),
mIsEditing(FALSE),
mCancelBtn(NULL),
mSaveBtn(NULL)
mCancelBtn(NULL)
{
}
@ -63,11 +62,12 @@ LLSidepanelInventorySubpanel::~LLSidepanelInventorySubpanel()
// virtual
BOOL LLSidepanelInventorySubpanel::postBuild()
{
mSaveBtn = getChild<LLButton>("save_btn");
mSaveBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onSaveButtonClicked, this));
mCancelBtn = getChild<LLButton>("cancel_btn");
mCancelBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onCancelButtonClicked, this));
mCancelBtn = findChild<LLButton>("cancel_btn");
if (mCancelBtn)
{
mCancelBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onCancelButtonClicked, this));
}
return TRUE;
}
@ -118,8 +118,10 @@ void LLSidepanelInventorySubpanel::dirty()
void LLSidepanelInventorySubpanel::updateVerbs()
{
mSaveBtn->setVisible(mIsEditing);
mCancelBtn->setVisible(mIsEditing);
if (mCancelBtn)
{
mCancelBtn->setVisible(mIsEditing);
}
}
void LLSidepanelInventorySubpanel::onEditButtonClicked()
@ -129,14 +131,6 @@ void LLSidepanelInventorySubpanel::onEditButtonClicked()
updateVerbs();
}
void LLSidepanelInventorySubpanel::onSaveButtonClicked()
{
save();
setIsEditing(FALSE);
refresh();
updateVerbs();
}
void LLSidepanelInventorySubpanel::onCancelButtonClicked()
{
setIsEditing(FALSE);

View File

@ -62,9 +62,7 @@ protected:
//
protected:
void onEditButtonClicked();
void onSaveButtonClicked();
void onCancelButtonClicked();
LLButton* mSaveBtn;
LLButton* mCancelBtn;
private:

View File

@ -124,30 +124,24 @@ BOOL LLSidepanelTaskInfo::postBuild()
childSetCommitCallback("search_check", &LLSidepanelTaskInfo::onCommitIncludeInSearch,this);
mDAPermModify = getChild<LLUICtrl>("perm_modify");
mDACreator = getChildView("Creator:");
mDACreatorName = getChild<LLUICtrl>("Creator Name");
mDAOwner = getChildView("Owner:");
mDAOwnerName = getChild<LLUICtrl>("Owner Name");
mDAGroup = getChildView("Group:");
mDAGroupName = getChild<LLUICtrl>("Group Name");
mDAButtonSetGroup = getChildView("button set group");
mDAObjectName = getChild<LLUICtrl>("Object Name");
mDAName = getChildView("Name:");
mDADescription = getChildView("Description:");
mDAObjectDescription = getChild<LLUICtrl>("Object Description");
mDAPermissions = getChildView("Permissions:");
mDACheckboxShareWithGroup = getChild<LLUICtrl>("checkbox share with group");
mDAButtonDeed = getChildView("button deed");
mDACheckboxAllowEveryoneMove = getChild<LLUICtrl>("checkbox allow everyone move");
mDACheckboxAllowEveryoneCopy = getChild<LLUICtrl>("checkbox allow everyone copy");
mDANextOwnerCan = getChildView("Next owner can:");
mDACheckboxNextOwnerCanModify = getChild<LLUICtrl>("checkbox next owner can modify");
mDACheckboxNextOwnerCanCopy = getChild<LLUICtrl>("checkbox next owner can copy");
mDACheckboxNextOwnerCanTransfer = getChild<LLUICtrl>("checkbox next owner can transfer");
mDACheckboxForSale = getChild<LLUICtrl>("checkbox for sale");
mDASearchCheck = getChild<LLUICtrl>("search_check");
mDAComboSaleType = getChild<LLComboBox>("sale type");
mDACost = getChild<LLUICtrl>("Cost");
mDAEditCost = getChild<LLUICtrl>("Edit Cost");
mDALabelClickAction = getChildView("label click action");
mDAComboClickAction = getChild<LLComboBox>("clickaction");
@ -183,7 +177,6 @@ void LLSidepanelTaskInfo::disableAll()
mDAPermModify->setEnabled(FALSE);
mDAPermModify->setValue(LLStringUtil::null);
mDACreator->setEnabled(FALSE);
mDACreatorName->setValue(LLStringUtil::null);
mDACreatorName->setEnabled(FALSE);
@ -191,21 +184,14 @@ void LLSidepanelTaskInfo::disableAll()
mDAOwnerName->setValue(LLStringUtil::null);
mDAOwnerName->setEnabled(FALSE);
mDAGroup->setEnabled(FALSE);
mDAGroupName->setValue(LLStringUtil::null);
mDAGroupName->setEnabled(FALSE);
mDAButtonSetGroup->setEnabled(FALSE);
mDAObjectName->setValue(LLStringUtil::null);
mDAObjectName->setEnabled(FALSE);
mDAName->setEnabled(FALSE);
mDAGroupName->setValue(LLStringUtil::null);
mDAGroupName->setEnabled(FALSE);
mDADescription->setEnabled(FALSE);
mDAObjectDescription->setValue(LLStringUtil::null);
mDAObjectDescription->setEnabled(FALSE);
mDAPermissions->setEnabled(FALSE);
mDACheckboxShareWithGroup->setValue(FALSE);
mDACheckboxShareWithGroup->setEnabled(FALSE);
@ -217,7 +203,6 @@ void LLSidepanelTaskInfo::disableAll()
mDACheckboxAllowEveryoneCopy->setEnabled(FALSE);
//Next owner can:
mDANextOwnerCan->setEnabled(FALSE);
mDACheckboxNextOwnerCanModify->setValue(FALSE);
mDACheckboxNextOwnerCanModify->setEnabled(FALSE);
mDACheckboxNextOwnerCanCopy->setValue(FALSE);
@ -235,9 +220,7 @@ void LLSidepanelTaskInfo::disableAll()
mDAComboSaleType->setValue(LLSaleInfo::FS_COPY);
mDAComboSaleType->setEnabled(FALSE);
mDACost->setEnabled(FALSE);
mDACost->setValue(getString("Cost Default"));
mDAEditCost->setValue(LLStringUtil::null);
mDAEditCost->setEnabled(FALSE);
@ -365,8 +348,6 @@ void LLSidepanelTaskInfo::refresh()
mDAPathfindingAttributes->setEnabled(TRUE);
mDAPathfindingAttributes->setValue(LLTrans::getString(pfAttrName));
getChildView("Permissions:")->setEnabled(TRUE);
// Update creator text field
getChildView("Creator:")->setEnabled(TRUE);
@ -698,7 +679,6 @@ void LLSidepanelTaskInfo::refresh()
getChild<LLUICtrl>("checkbox for sale")->setTentative( is_for_sale_mixed);
getChildView("sale type")->setEnabled(num_for_sale && can_transfer && !is_sale_price_mixed);
getChildView("Next owner can:")->setEnabled(TRUE);
getChildView("checkbox next owner can modify")->setEnabled(base_mask_on & PERM_MODIFY);
getChildView("checkbox next owner can copy")->setEnabled(base_mask_on & PERM_COPY);
getChildView("checkbox next owner can transfer")->setEnabled(next_owner_mask_on & PERM_COPY);
@ -708,7 +688,6 @@ void LLSidepanelTaskInfo::refresh()
getChildView("checkbox for sale")->setEnabled(FALSE);
getChildView("sale type")->setEnabled(FALSE);
getChildView("Next owner can:")->setEnabled(FALSE);
getChildView("checkbox next owner can modify")->setEnabled(FALSE);
getChildView("checkbox next owner can copy")->setEnabled(FALSE);
getChildView("checkbox next owner can transfer")->setEnabled(FALSE);

View File

@ -125,30 +125,24 @@ private:
private:
// Pointers cached here to speed up the "disableAll" function which gets called on idle
LLUICtrl* mDAPermModify;
LLView* mDACreator;
LLUICtrl* mDACreatorName;
LLView* mDAOwner;
LLUICtrl* mDAOwnerName;
LLView* mDAGroup;
LLUICtrl* mDAGroupName;
LLView* mDAButtonSetGroup;
LLUICtrl* mDAObjectName;
LLView* mDAName;
LLView* mDADescription;
LLUICtrl* mDAObjectDescription;
LLView* mDAPermissions;
LLUICtrl* mDACheckboxShareWithGroup;
LLView* mDAButtonDeed;
LLUICtrl* mDACheckboxAllowEveryoneMove;
LLUICtrl* mDACheckboxAllowEveryoneCopy;
LLView* mDANextOwnerCan;
LLUICtrl* mDACheckboxNextOwnerCanModify;
LLUICtrl* mDACheckboxNextOwnerCanCopy;
LLUICtrl* mDACheckboxNextOwnerCanTransfer;
LLUICtrl* mDACheckboxForSale;
LLUICtrl* mDASearchCheck;
LLComboBox* mDAComboSaleType;
LLUICtrl* mDACost;
LLUICtrl* mDAEditCost;
LLView* mDALabelClickAction;
LLComboBox* mDAComboClickAction;

View File

@ -131,15 +131,6 @@ width="333">
tab_group="1"
top_pad="6"
follows="all" />
<!-- <button
follows="bottom|left"
height="23"
label="New outfit"
layout="topleft"
left_pad="5"
right="-10"
name="newlook_btn"
width="100" />-->
<panel
class="panel_outfit_edit"
filename="panel_outfit_edit.xml"