From f5fd05a1e4d0c65d2cc8b92fdf69c7a2d399baad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 20 Oct 2019 01:32:56 -0400 Subject: [PATCH] Remove unused gPopupMenuView and MENU_BAR_WIDTH and other associated code --- indra/llui/llmenugl.cpp | 1 - indra/llui/llmenugl.h | 1 - indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/llappviewer.cpp | 1 - indra/newview/llselectmgr.cpp | 7 ------- indra/newview/lltoolcomp.cpp | 2 +- indra/newview/llviewermenu.cpp | 24 +++--------------------- indra/newview/llviewermenu.h | 4 ---- 8 files changed, 4 insertions(+), 47 deletions(-) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 5ae3d36b2..7b9bbe372 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -73,7 +73,6 @@ using namespace LLOldEvents; LLMenuHolderGL *LLMenuGL::sMenuContainer = nullptr; S32 MENU_BAR_HEIGHT = 0; -S32 MENU_BAR_WIDTH = 0; ///============================================================================ /// Local function declarations, constants, enums, and typedefs diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 844edef5b..45e21e18e 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -47,7 +47,6 @@ extern S32 MENU_BAR_HEIGHT; -extern S32 MENU_BAR_WIDTH; // These callbacks are used by the LLMenuItemCallGL and LLMenuItemCheckGL // classes during their work. diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2b7e54597..b074c964b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10750,17 +10750,6 @@ This should be as low as possible, but too low may break functionality Value 18 - MenuBarWidth - - Comment - - Persist - 0 - Type - S32 - Value - 410 - MeshEnabled Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c91eccafd..3bdcb2807 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -462,7 +462,6 @@ static void settings_to_globals() BTN_HEIGHT = gSavedSettings.getS32("ButtonHeight"); MENU_BAR_HEIGHT = gSavedSettings.getS32("MenuBarHeight"); - MENU_BAR_WIDTH = gSavedSettings.getS32("MenuBarWidth"); extern S32 STATUS_BAR_HEIGHT; STATUS_BAR_HEIGHT = gSavedSettings.getS32("StatusBarHeight"); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index a60f31f9a..7cb3be329 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5451,13 +5451,6 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data dialog_refresh_all(); - // silly hack to allow 'save into inventory' - if(gPopupMenuView->getVisible()) - { - gPopupMenuView->setItemEnabled(SAVE_INTO_INVENTORY, - enable_save_into_inventory(NULL)); - } - // hack for left-click buy object LLToolPie::selectionPropertiesReceived(); } diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index 912a3a341..b628851bb 100644 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -758,7 +758,7 @@ BOOL LLToolCompGun::handleHover(S32 x, S32 y, MASK mask) { // *NOTE: This hack is here to make mouselook kick in again after // item selected from context menu. - if ( mCur == mNull && !gPopupMenuView->getVisible() ) + if (mCur == mNull) { LLSelectMgr::getInstance()->deselectAll(); setCurrentTool( (LLTool*) mGrab ); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d182ed75e..171abfce2 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -206,7 +206,6 @@ extern AIHTTPView* gHttpView; LLMenuBarGL *gMenuBarView = NULL; LLViewerMenuHolderGL *gMenuHolder = NULL; -LLMenuGL *gPopupMenuView = NULL; LLMenuBarGL *gLoginMenuBarView = NULL; // Pie menus @@ -220,7 +219,6 @@ LLContextMenu *gPieLand = NULL; const std::string CLIENT_MENU_NAME("Advanced"); const std::string SERVER_MENU_NAME("Admin"); -const std::string SAVE_INTO_INVENTORY("Save Object Back to My Inventory"); const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents"); LLMenuGL* gAttachSubMenu = NULL; @@ -453,7 +451,6 @@ BOOL enable_land_selected( void* ); BOOL enable_more_than_one_selected(void* ); BOOL enable_selection_you_own_all(void*); BOOL enable_selection_you_own_one(void*); -BOOL enable_save_into_inventory(void*); BOOL enable_save_into_task_inventory(void*); BOOL enable_detach(const LLSD& = LLSD()); @@ -637,16 +634,6 @@ void init_menus() // Initialize actions initialize_menus(); - /// - /// Popup menu - /// - /// The popup menu is now populated by the show_context_menu() - /// method. - - gPopupMenuView = new LLMenuGL( "Popup" ); - gPopupMenuView->setVisible( FALSE ); - gMenuHolder->addChild( gPopupMenuView ); - /// /// Pie menus /// @@ -659,9 +646,6 @@ void init_menus() /// LLColor4 color; - color = gColors.getColor( "MenuPopupBgColor" ); - gPopupMenuView->setBackgroundColor( color ); - // If we are not in production, use a different color to make it apparent. if (LLViewerLogin::getInstance()->isInProductionGrid()) { @@ -1769,9 +1753,6 @@ void cleanup_menus() delete gMenuBarView; gMenuBarView = NULL; - delete gPopupMenuView; - gPopupMenuView = NULL; - delete gMenuHolder; gMenuHolder = NULL; @@ -5131,7 +5112,8 @@ class LLToolsSaveToInventory : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - if(enable_save_into_inventory(NULL)) + bool enable_save_into_inventory(); + if(enable_save_into_inventory()) { derez_objects(DRD_SAVE_INTO_AGENT_INVENTORY, LLUUID::null); } @@ -7664,7 +7646,7 @@ bool LLHasAsset::operator()(LLInventoryCategory* cat, return FALSE; } -BOOL enable_save_into_inventory(void*) +bool enable_save_into_inventory() { // *TODO: clean this up // find the last root diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 29d46def8..a52f8682f 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -48,7 +48,6 @@ void cleanup_menus(); void show_debug_menus(); // checks for if menus should be shown first. void show_context_menu( S32 x, S32 y, MASK mask ); void show_build_mode_context_menu(S32 x, S32 y, MASK mask); -BOOL enable_save_into_inventory(void*); void handle_reset_view(); void handle_cut(void*); void handle_copy(void*); @@ -159,11 +158,8 @@ protected: LLSafeHandle mObjectSelection; }; -extern const std::string SAVE_INTO_INVENTORY; - extern LLMenuBarGL* gMenuBarView; //extern LLView* gMenuBarHolder; -extern LLMenuGL* gPopupMenuView; extern LLViewerMenuHolderGL* gMenuHolder; extern LLMenuBarGL* gLoginMenuBarView;