diff options
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 53 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.h | 19 | ||||
-rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llsidepanelappearance.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_outfits_inventory.xml | 157 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/sidepanel_appearance.xml | 76 |
7 files changed, 152 insertions, 171 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e361082f7b..ab06ac1691 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -973,7 +973,7 @@ bool LLInvFVBridge::isInOutfitsSidePanel() const dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); if (!outfit_panel) return false; - return outfit_panel->isAccordionPanel(my_panel); + return outfit_panel->isTabPanel(my_panel); } // +=================================================+ diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 4511bca23a..5b36a5406a 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -75,12 +75,12 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory() BOOL LLPanelOutfitsInventory::postBuild() { - initAccordionPanels(); + initTabPanels(); initListCommandsHandlers(); return TRUE; } -void LLPanelOutfitsInventory::updateParent() +void LLPanelOutfitsInventory::updateVerbs() { if (mParent) { @@ -127,7 +127,7 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) mActivePanel->setFilterSubString(string); } -void LLPanelOutfitsInventory::onWear() +void LLPanelOutfitsInventory::onWearButtonClick() { LLFolderViewEventListener* listenerp = getCorrectListenerForAction(); if (listenerp) @@ -167,7 +167,7 @@ void LLPanelOutfitsInventory::onNew() void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action) { updateListCommands(); - updateParent(); + updateVerbs(); if (getRootFolder()->needsAutoRename() && items.size()) { getRootFolder()->startRenamingSelectedItem(); @@ -234,13 +234,14 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() mListCommands->childSetAction("options_gear_btn", boost::bind(&LLPanelOutfitsInventory::onGearButtonClick, this)); mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this)); mListCommands->childSetAction("add_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this)); - + mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this)); + LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>("trash_btn"); trash_btn->setDragAndDropHandler(boost::bind(&LLPanelOutfitsInventory::handleDragAndDropToTrash, this - , _4 // BOOL drop - , _5 // EDragAndDropType cargo_type - , _7 // EAcceptance* accept - )); + , _4 // BOOL drop + , _5 // EDragAndDropType cargo_type + , _7 // EAcceptance* accept + )); mCommitCallbackRegistrar.add("panel_outfits_inventory_gear_default.Custom.Action", boost::bind(&LLPanelOutfitsInventory::onCustomAction, this, _2)); @@ -252,8 +253,10 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() void LLPanelOutfitsInventory::updateListCommands() { bool trash_enabled = isActionEnabled("delete"); + bool wear_enabled = isActionEnabled("wear"); mListCommands->childSetEnabled("trash_btn", trash_enabled); + mListCommands->childSetEnabled("wear_btn", wear_enabled); } void LLPanelOutfitsInventory::onGearButtonClick() @@ -308,7 +311,7 @@ void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata) } if (command_name == "wear") { - onWear(); + onWearButtonClick(); } if (command_name == "add") { @@ -407,41 +410,41 @@ bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropTy //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// -// Accordion // +// Tab panels // -void LLPanelOutfitsInventory::initAccordionPanels() +void LLPanelOutfitsInventory::initTabPanels() { - mAccordionPanels.resize(2); + mTabPanels.resize(2); LLInventoryPanel *myoutfits_panel = getChild<LLInventoryPanel>("outfitslist_accordionpanel"); myoutfits_panel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, LLInventoryFilter::FILTERTYPE_CATEGORY); myoutfits_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mAccordionPanels[0] = myoutfits_panel; + mTabPanels[0] = myoutfits_panel; mActivePanel = myoutfits_panel; LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>("cof_accordionpanel"); cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mAccordionPanels[1] = cof_panel; + mTabPanels[1] = cof_panel; - for (accordionpanels_vec_t::iterator iter = mAccordionPanels.begin(); - iter != mAccordionPanels.end(); + for (tabpanels_vec_t::iterator iter = mTabPanels.begin(); + iter != mTabPanels.end(); ++iter) { LLInventoryPanel *panel = (*iter); - panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onAccordionSelectionChange, this, panel, _1, _2)); + panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, panel, _1, _2)); } } -void LLPanelOutfitsInventory::onAccordionSelectionChange(LLInventoryPanel* accordion_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action) +void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action) { if (user_action && items.size() > 0) { - for (accordionpanels_vec_t::iterator iter = mAccordionPanels.begin(); - iter != mAccordionPanels.end(); + for (tabpanels_vec_t::iterator iter = mTabPanels.begin(); + iter != mTabPanels.end(); ++iter) { LLInventoryPanel *panel = (*iter); - if (panel == accordion_panel) + if (panel == tab_panel) { mActivePanel = panel; } @@ -459,10 +462,10 @@ LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel() return mActivePanel; } -bool LLPanelOutfitsInventory::isAccordionPanel(LLInventoryPanel *panel) +bool LLPanelOutfitsInventory::isTabPanel(LLInventoryPanel *panel) { - for(accordionpanels_vec_t::iterator it = mAccordionPanels.begin(); - it != mAccordionPanels.end(); + for(tabpanels_vec_t::iterator it = mTabPanels.begin(); + it != mTabPanels.end(); ++it) { if (*it == panel) diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index afeaef485d..9b6b483e3b 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -54,7 +54,6 @@ public: /*virtual*/ BOOL postBuild(); void onSearchEdit(const std::string& string); - void onWear(); void onAdd(); void onRemove(); void onEdit(); @@ -71,29 +70,30 @@ public: LLFolderView* getRootFolder(); protected: - void updateParent(); + void updateVerbs(); bool getIsCorrectType(const LLFolderViewEventListener *listenerp) const; private: LLSidepanelAppearance* mParent; LLSaveFolderState* mSavedFolderState; + public: ////////////////////////////////////////////////////////////////////////////////// - // Accordion // + // tab panels LLInventoryPanel* getActivePanel(); - bool isAccordionPanel(LLInventoryPanel *panel); + bool isTabPanel(LLInventoryPanel *panel); protected: - void initAccordionPanels(); - void onAccordionSelectionChange(LLInventoryPanel* accordion_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action); + void initTabPanels(); + void onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action); private: LLInventoryPanel* mActivePanel; - typedef std::vector<LLInventoryPanel *> accordionpanels_vec_t; - accordionpanels_vec_t mAccordionPanels; + typedef std::vector<LLInventoryPanel *> tabpanels_vec_t; + tabpanels_vec_t mTabPanels; - // Accordion // + // tab panels // //////////////////////////////////////////////////////////////////////////////// @@ -103,6 +103,7 @@ protected: void initListCommandsHandlers(); void updateListCommands(); void onGearButtonClick(); + void onWearButtonClick(); void onAddButtonClick(); void showActionMenu(LLMenuGL* menu, std::string spawning_view_name); void onTrashButtonClick(); diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index eb3695a371..30b0075c4b 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -113,9 +113,6 @@ BOOL LLSidepanelAppearance::postBuild() mEditAppearanceBtn = getChild<LLButton>("editappearance_btn"); mEditAppearanceBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditAppearanceButtonClicked, this)); - mWearBtn = getChild<LLButton>("wear_btn"); - mWearBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onWearButtonClicked, this)); - mEditBtn = getChild<LLButton>("edit_btn"); mEditBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditButtonClicked, this)); @@ -199,14 +196,6 @@ void LLSidepanelAppearance::onFilterEdit(const std::string& search_string) } } -void LLSidepanelAppearance::onWearButtonClicked() -{ - if (!mLookInfo->getVisible()) - { - mPanelOutfitsInventory->onWear(); - } -} - void LLSidepanelAppearance::onOpenOutfitButtonClicked() { const LLViewerInventoryItem *outfit_link = LLAppearanceManager::getInstance()->getCurrentOutfitLink(); @@ -284,7 +273,6 @@ void LLSidepanelAppearance::toggleLookInfoPanel(BOOL visible) mLookInfo->setVisible(visible); mPanelOutfitsInventory->setVisible(!visible); mFilterEditor->setVisible(!visible); - mWearBtn->setVisible(!visible); mEditBtn->setVisible(!visible); mNewOutfitBtn->setVisible(!visible); mCurrOutfitPanel->setVisible(!visible); @@ -314,12 +302,10 @@ void LLSidepanelAppearance::updateVerbs() { const bool is_correct_type = (mPanelOutfitsInventory->getCorrectListenerForAction() != NULL); mEditBtn->setEnabled(is_correct_type); - mWearBtn->setEnabled(is_correct_type); } else { mEditBtn->setEnabled(FALSE); - mWearBtn->setEnabled(FALSE); } } diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 9c870f631a..8ef2088eda 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -67,7 +67,6 @@ private: void onOpenOutfitButtonClicked(); void onEditAppearanceButtonClicked(); - void onWearButtonClicked(); void onEditButtonClicked(); void onNewOutfitButtonClicked(); void onBackButtonClicked(); @@ -82,7 +81,6 @@ private: LLButton* mOpenOutfitBtn; LLButton* mEditAppearanceBtn; - LLButton* mWearBtn; LLButton* mEditBtn; LLButton* mNewOutfitBtn; LLPanel* mCurrOutfitPanel; diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index db95d01b43..ab73f135b9 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -1,61 +1,104 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel name="Outfits" - height="510" - width="333" - follows="top|left" - left="0" - top_pad="0"> - <accordion - single_expansion="true" - height="510" - layout="topleft" - left="0" - follows="top|left" - name="outfits_accordion" - top_pad="0" - width="333"> - <accordion_tab - expanded="false" - layout="topleft" - name="tab_cof" - title="Current Outfit"> - <inventory_panel + + <panel name="Outfits" + background_visible="true" + follows="all" + height="550" + label="Things" + layout="topleft" + min_height="350" + min_width="240" + width="330" + border="false"> + <tab_container + follows="all" + height="500" + layout="topleft" + left="10" + name="appearance_tabs" + tab_min_width="100" + tab_height="30" + tab_position="top" + halign="center" + width="313"> + <inventory_panel + label="MY OUTFITS" + help_topic="my_outfits_tab" allow_multi_select="true" + follows="all" border="false" - height="460" - left="0" - top="0" - mouse_opaque="true" - name="cof_accordionpanel" - start_folder="Current Outfit" /> - </accordion_tab> - <accordion_tab - expanded="true" - layout="topleft" - name="tab_outfits" - title="My Outfits"> - <inventory_panel - allow_multi_select="true" - border="false" - follows="all" - left="0" - top="0" - height="460" - mouse_opaque="true" - name="outfitslist_accordionpanel" - start_folder="My Outfits" /> - </accordion_tab> - </accordion> - <!--<button bottom="0" - halign="center" - height="23" - label=">" - enabled="false" - mouse_opaque="false" - name="selector" - width="20" - left="0" - visible="false" - follows="right|bottom" - tool_tip="View outfit properties" />--> + left="0" + top="0" + height="500" + width="290" + mouse_opaque="true" + name="outfitslist_accordionpanel" + start_folder="My Outfits" /> + <inventory_panel + label="WEARING" + help_topic="now_wearing_tab" + allow_multi_select="true" + border="false" + height="500" + width="290" + left="0" + top="0" + mouse_opaque="true" + name="cof_accordionpanel" + start_folder="Current Outfit" /> + </tab_container> + <panel + background_visible="true" + follows="bottom|left" + height="50" + layout="topleft" + left="0" + visible="true" + name="bottom_panel" + top_pad="10" + width="313"> + <button + follows="bottom|left" + tool_tip="Show additional options" + height="18" + image_disabled="OptionsMenu_Disabled" + image_selected="OptionsMenu_Press" + image_unselected="OptionsMenu_Off" + layout="topleft" + left="10" + name="options_gear_btn" + top="6" + width="18" /> + <button + follows="bottom|left" + height="18" + image_selected="AddItem_Press" + image_unselected="AddItem_Off" + image_disabled="AddItem_Disabled" + layout="topleft" + left_pad="5" + name="add_btn" + tool_tip="Add new item" + width="18" /> + <dnd_button + follows="bottom|left" + height="18" + image_selected="TrashItem_Press" + image_unselected="TrashItem_Off" + layout="topleft" + right="-5" + name="trash_btn" + tool_tip="Remove selected item" + top="6" + width="18" /> + <button + follows="top|left" + height="23" + label="Wear" + layout="topleft" + name="wear_btn" + right="-5" + top_pad="0" + width="90" /> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index 3dac1a9614..27f19d44fa 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -85,72 +85,21 @@ left="0" class="panel_outfits_inventory" filename="panel_outfits_inventory.xml" name="panel_outfits_inventory" - height="510" + height="550" min_height="510" width="333" top_pad="0" - follows="top|left" + follows="all" /> - <panel - visible="true" - name="bottom_panel" - height="50" - left="0" - top_pad="3" - follows="bottom|left" - width="333"> - <button - follows="bottom|left" - tool_tip="Show additional options" - height="18" - image_disabled="OptionsMenu_Disabled" - image_selected="OptionsMenu_Press" - image_unselected="OptionsMenu_Off" - layout="topleft" - left="10" - name="options_gear_btn" - top="6" - width="18" /> - <button - follows="bottom|left" - height="18" - image_selected="AddItem_Press" - image_unselected="AddItem_Off" - image_disabled="AddItem_Disabled" - layout="topleft" - left_pad="5" - name="newlook_btn" - tool_tip="Add new outfit" - width="18" /> - <dnd_button - follows="bottom|left" - height="18" - image_selected="TrashItem_Press" - image_unselected="TrashItem_Off" - layout="topleft" - right="-5" - name="trash_btn" - tool_tip="Remove selected item" - top="6" - width="18" /> - <button - follows="bottom|left" - height="23" - label="Wear" - layout="topleft" - name="wear_btn" - right="-5" - top_pad="0" - width="90" /> - </panel> - <!-- <button - follows="bottom|left" - height="23" - label="New outfit" - layout="topleft" - left_pad="5" - right="-10" - width="100" />--> + <!-- <button + follows="bottom|left" + height="23" + label="New outfit" + layout="topleft" + left_pad="5" + right="-10" + name="newlook_btn" + width="100" />--> <panel class="panel_look_info" filename="panel_look_info.xml" @@ -167,4 +116,5 @@ left="0" left="0" name="panel_edit_wearable" visible="false" /> -</panel>
\ No newline at end of file +</panel> + |