diff options
Diffstat (limited to 'indra/newview/llpanellandmarks.h')
-rw-r--r-- | indra/newview/llpanellandmarks.h | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 389a04a76f..d54761ed59 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2001-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -41,6 +41,7 @@ #include "llpanelpick.h" #include "llremoteparcelrequest.h" +class LLAccordionCtrlTab; class LLFolderViewItem; class LLMenuGL; class LLInventoryPanel; @@ -66,6 +67,7 @@ protected: * @return true - if current selected panel is not null and selected item is a landmark */ bool isLandmarkSelected() const; + bool isReceivedFolderSelected() const; LLLandmark* getCurSelectedLandmark() const; LLFolderViewItem* getCurSelectedItem () const; void updateSortOrder(LLInventoryPanel* panel, bool byDate); @@ -80,7 +82,7 @@ private: void initLandmarksInventroyPanel(); void initMyInventroyPanel(); void initLibraryInventroyPanel(); - void initLandmarksPanel(LLInventorySubTreePanel* inventory_list, const LLUUID& start_folder_id); + void initLandmarksPanel(LLInventorySubTreePanel* inventory_list); void initAccordion(const std::string& accordion_tab_name, LLInventorySubTreePanel* inventory_list); void onAccordionExpandedCollapsed(const LLSD& param, LLInventorySubTreePanel* inventory_list); void deselectOtherThan(const LLInventorySubTreePanel* inventory_list); @@ -89,16 +91,42 @@ private: void initListCommandsHandlers(); void updateListCommands(); void onActionsButtonClick(); - void onAddLandmarkButtonClick() const; - void onAddFolderButtonClick() const; + void showActionMenu(LLMenuGL* menu, std::string spawning_view_name); + void onAddButtonHeldDown(); void onTrashButtonClick() const; void onAddAction(const LLSD& command_name) const; - void onCopyPasteAction(const LLSD& command_name) const; + void onClipboardAction(const LLSD& command_name) const; void onFoldingAction(const LLSD& command_name); + bool isActionChecked(const LLSD& userdata) const; bool isActionEnabled(const LLSD& command_name) const; void onCustomAction(const LLSD& command_name); + + /** + * Determines if selected item can be modified via context/gear menu. + * + * It validates Places Landmarks rules first. And then LLFolderView permissions. + * For now it checks cut/rename/delete/paste actions. + */ + bool canSelectedBeModified(const std::string& command_name) const; void onPickPanelExit( LLPanelPickEdit* pick_panel, LLView* owner, const LLSD& params); + /** + * Processes drag-n-drop of the Landmarks and folders into trash button. + */ + bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept); + + /** + * Static callback for gIdleCallbacks to perform actions out of drawing + */ + static void doIdle(void* landmarks_panel); + + /** + * Updates accordions according to filtered items in lists. + * + * It hides accordion for empty lists + */ + void updateFilteredAccordions(); + private: LLInventorySubTreePanel* mFavoritesInventoryPanel; LLInventorySubTreePanel* mLandmarksInventoryPanel; @@ -106,10 +134,15 @@ private: LLInventorySubTreePanel* mLibraryInventoryPanel; LLMenuGL* mGearLandmarkMenu; LLMenuGL* mGearFolderMenu; + LLMenuGL* mMenuAdd; LLInventorySubTreePanel* mCurrentSelectedList; LLPanel* mListCommands; bool mSortByDate; + bool mDirtyFilter; + + typedef std::vector<LLAccordionCtrlTab*> accordion_tabs_t; + accordion_tabs_t mAccordionTabs; }; #endif //LL_LLPANELLANDMARKS_H |