diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 88b094a1fcafaf896fec2e769953524a2df9ed95..f51169fea2537c29844e1837994794f479d83516 100755 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -1,6 +1,7 @@ /** * @file llpanellandmarks.cpp * @brief Landmarks tab for Side Bar "Places" panel + * @note This panel is incredibly evil. * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code @@ -159,33 +160,18 @@ class LLLandmarksPanelObserver : public LLInventoryObserver { public: LLLandmarksPanelObserver(LLLandmarksPanel* lp) - : mLP(lp), - mIsLibraryLandmarksOpen(false) + : mLP(lp) {} virtual ~LLLandmarksPanelObserver() {} /*virtual*/ void changed(U32 mask); private: LLLandmarksPanel* mLP; - bool mIsLibraryLandmarksOpen; }; void LLLandmarksPanelObserver::changed(U32 mask) { mLP->updateShowFolderState(); - - LLPlacesInventoryPanel* library = mLP->getLibraryInventoryPanel(); - if (!mIsLibraryLandmarksOpen && library) - { - // Search for "Landmarks" folder in the Library and open it once on start up. See EXT-4827. - const LLUUID &landmarks_cat = gInventory.findLibraryCategoryUUIDForType(LLFolderType::FT_LANDMARK, false); - if (landmarks_cat.notNull()) - { - LLOpenFolderByID opener(landmarks_cat); - library->getRootFolder()->applyFunctorRecursively(opener); - mIsLibraryLandmarksOpen = opener.isFolderOpen(); - } - } } LLLandmarksPanel::LLLandmarksPanel() @@ -193,7 +179,6 @@ LLLandmarksPanel::LLLandmarksPanel() , mFavoritesInventoryPanel(NULL) , mLandmarksInventoryPanel(NULL) , mMyInventoryPanel(NULL) - , mLibraryInventoryPanel(NULL) , mCurrentSelectedList(NULL) , mListCommands(NULL) , mGearButton(NULL) @@ -226,7 +211,6 @@ BOOL LLLandmarksPanel::postBuild() initFavoritesInventoryPanel(); initLandmarksInventoryPanel(); initMyInventoryPanel(); - initLibraryInventoryPanel(); return TRUE; } @@ -392,11 +376,6 @@ void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_ { return; } - - if (selectItemInAccordionTab(mLibraryInventoryPanel, "tab_library", obj_id, take_keyboard_focus)) - { - return; - } } ////////////////////////////////////////////////////////////////////////// @@ -571,23 +550,6 @@ void LLLandmarksPanel::initMyInventoryPanel() initAccordion("tab_inventory", mMyInventoryPanel, false); } -void LLLandmarksPanel::initLibraryInventoryPanel() -{ - mLibraryInventoryPanel = getChild<LLPlacesInventoryPanel>("library_list"); - - initLandmarksPanel(mLibraryInventoryPanel); - - // We want to fetch only "Landmarks" category from the library. - const LLUUID &landmarks_cat = gInventory.findLibraryCategoryUUIDForType(LLFolderType::FT_LANDMARK, false); - if (landmarks_cat.notNull()) - { - LLInventoryModelBackgroundFetch::instance().start(landmarks_cat); - } - - // Expanding "Library" tab for new users who have no landmarks in "My Inventory". - initAccordion("tab_library", mLibraryInventoryPanel, true); -} - void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list) { inventory_list->getFilter().setEmptyLookupMessage("PlacesNoMatchingItems"); @@ -666,10 +628,6 @@ void LLLandmarksPanel::deselectOtherThan(const LLPlacesInventoryPanel* inventory { mMyInventoryPanel->clearSelection(); } - if (inventory_list != mLibraryInventoryPanel) - { - mLibraryInventoryPanel->clearSelection(); - } } // List Commands Handlers @@ -854,7 +812,6 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) expand_all_folders(mFavoritesInventoryPanel->getRootFolder()); expand_all_folders(mLandmarksInventoryPanel->getRootFolder()); expand_all_folders(mMyInventoryPanel->getRootFolder()); - expand_all_folders(mLibraryInventoryPanel->getRootFolder()); for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) { @@ -866,7 +823,6 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) collapse_all_folders(mFavoritesInventoryPanel->getRootFolder()); collapse_all_folders(mLandmarksInventoryPanel->getRootFolder()); collapse_all_folders(mMyInventoryPanel->getRootFolder()); - collapse_all_folders(mLibraryInventoryPanel->getRootFolder()); for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) { @@ -880,7 +836,6 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) gSavedSettings.setBOOL("LandmarksSortedByDate",sorting_order); updateSortOrder(mLandmarksInventoryPanel, sorting_order); updateSortOrder(mMyInventoryPanel, sorting_order); - updateSortOrder(mLibraryInventoryPanel, sorting_order); } else { @@ -916,8 +871,7 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const { bool disable_collapse_all = !has_expanded_folders(mFavoritesInventoryPanel->getRootFolder()) && !has_expanded_folders(mLandmarksInventoryPanel->getRootFolder()) - && !has_expanded_folders(mMyInventoryPanel->getRootFolder()) - && !has_expanded_folders(mLibraryInventoryPanel->getRootFolder()); + && !has_expanded_folders(mMyInventoryPanel->getRootFolder()); if (disable_collapse_all) { for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) @@ -936,8 +890,7 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const { bool disable_expand_all = !has_collapsed_folders(mFavoritesInventoryPanel->getRootFolder()) && !has_collapsed_folders(mLandmarksInventoryPanel->getRootFolder()) - && !has_collapsed_folders(mMyInventoryPanel->getRootFolder()) - && !has_collapsed_folders(mLibraryInventoryPanel->getRootFolder()); + && !has_collapsed_folders(mMyInventoryPanel->getRootFolder()); if (disable_expand_all) { for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) @@ -1129,7 +1082,6 @@ void LLLandmarksPanel::onMenuVisibilityChange(LLUICtrl* ctrl, const LLSD& param) Processes such actions: cut/rename/delete/paste actions Rules: - 1. We can't perform any action in Library 2. For Landmarks we can: - cut/rename/delete in any other accordions - paste - only in Favorites, Landmarks accordions @@ -1143,9 +1095,6 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold if (!item) return false; - // nothing can be modified in Library - if (mLibraryInventoryPanel == mCurrentSelectedList) return false; - bool can_be_modified = false; // landmarks can be modified in any other accordion... diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index c11cbe05ae655a9599a7157603fbeb85da2a5823..cc4d411ea69241e7f0ec8c120dc59bc7dfd31432 100755 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -78,8 +78,6 @@ public: */ void setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus); - LLPlacesInventoryPanel* getLibraryInventoryPanel() { return mLibraryInventoryPanel; } - void updateMenuVisibility(LLUICtrl* menu); protected: @@ -114,7 +112,6 @@ private: void initFavoritesInventoryPanel(); void initLandmarksInventoryPanel(); void initMyInventoryPanel(); - void initLibraryInventoryPanel(); void initLandmarksPanel(LLPlacesInventoryPanel* inventory_list); LLAccordionCtrlTab* initAccordion(const std::string& accordion_tab_name, LLPlacesInventoryPanel* inventory_list, bool expand_tab); void onAccordionExpandedCollapsed(const LLSD& param, LLPlacesInventoryPanel* inventory_list); @@ -169,7 +166,6 @@ private: LLPlacesInventoryPanel* mFavoritesInventoryPanel; LLPlacesInventoryPanel* mLandmarksInventoryPanel; LLPlacesInventoryPanel* mMyInventoryPanel; - LLPlacesInventoryPanel* mLibraryInventoryPanel; LLMenuButton* mGearButton; LLToggleableMenu* mGearLandmarkMenu; LLToggleableMenu* mGearFolderMenu; diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml index 67a09949ceaa59279b661925b6fbd4d3c3e052f7..2a91a49d65544ec32f6d0bc64ce05c5def0a3209 100755 --- a/indra/newview/skins/default/xui/en/panel_landmarks.xml +++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml @@ -76,24 +76,6 @@ start_folder.name="My Inventory" width="307"/> </accordion_tab> - <accordion_tab - layout="topleft" - name="tab_library" - title="Library"> - <places_inventory_panel - allow_multi_select="true" - border="false" - bottom="0" - follows="all" - height="126" - left="0" - mouse_opaque="true" - name="library_list" - scroll.hide_scrollbar="true" - folder_view.use_ellipses="true" - start_folder.name="LIBRARY" - width="313"/> - </accordion_tab> </accordion> <panel background_visible="true"