diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-02-21 14:44:45 +0200 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-02-21 14:44:45 +0200 |
commit | d6f1ba31da4a40d62fe781419cdd7db9843f6a30 (patch) | |
tree | 5a8f7c1c359e9327355768a739dfb0389f40508f /indra/newview/llpanelmaininventory.cpp | |
parent | 6786e43fcb315eb10b5ab4a205163fb424c18bc6 (diff) |
SL-19105 Updated icons, menus and Received items panel visibility in single-folder mode
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 57 |
1 files changed, 47 insertions, 10 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index d13c691abd..5b7678987e 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1278,6 +1278,20 @@ void LLPanelMainInventory::onViewModeClick() mActivePanel = mSingleFolderMode ? getChild<LLInventoryPanel>("single_folder_inv") : (LLInventoryPanel*)getChild<LLTabContainer>("inventory filter tabs")->getCurrentPanel(); updateTitle(); + + LLSidepanelInventory* sidepanel_inventory = getParentSidepanelInventory(); + if (sidepanel_inventory) + { + if(mSingleFolderMode) + { + sidepanel_inventory->hideInbox(); + } + else + { + sidepanel_inventory->toggleInbox(); + } + } + } void LLPanelMainInventory::onUpFolderClicked() @@ -1623,16 +1637,6 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) LLInventoryModel::EHasChildren children = gInventory.categoryHasChildren(trash_id); return children != LLInventoryModel::CHILDREN_NO && gInventory.isCategoryComplete(trash_id); } - if (command_name == "open_folder") - { - LLFolderView* root = getActivePanel()->getRootFolder(); - std::set<LLFolderViewItem*> selection_set = root->getSelectionList(); - if (selection_set.size() != 1) return FALSE; - LLFolderViewItem* current_item = *selection_set.begin(); - if (!current_item) return FALSE; - const LLUUID& folder_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID(); - return (gInventory.getCategory(folder_id) != NULL); - } return TRUE; } @@ -1648,6 +1652,16 @@ bool LLPanelMainInventory::isActionVisible(const LLSD& userdata) { return !mSingleFolderMode; } + if (param_str == "open_folder") + { + LLFolderView* root = getActivePanel()->getRootFolder(); + std::set<LLFolderViewItem*> selection_set = root->getSelectionList(); + if (selection_set.size() != 1) return FALSE; + LLFolderViewItem* current_item = *selection_set.begin(); + if (!current_item) return FALSE; + const LLUUID& folder_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID(); + return (gInventory.getCategory(folder_id) != NULL); + } return true; } @@ -1695,6 +1709,19 @@ BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata) return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_LINKS) != 0; } + if (command_name == "list_view") + { + return true; + } + if (command_name == "gallery_view") + { + return false; + } + if (command_name == "combination_view") + { + return false; + } + return FALSE; } @@ -1737,5 +1764,15 @@ void LLPanelMainInventory::updateTitle() } } } + +LLSidepanelInventory* LLPanelMainInventory::getParentSidepanelInventory() +{ + LLFloaterSidePanelContainer* inventory_container = dynamic_cast<LLFloaterSidePanelContainer*>(gFloaterView->getParentFloater(this)); + if(inventory_container) + { + return dynamic_cast<LLSidepanelInventory*>(inventory_container->findChild<LLPanel>("main_panel", true)); + } + return NULL; +} // List Commands // //////////////////////////////////////////////////////////////////////////////// |