Remove unused gPopupMenuView and MENU_BAR_WIDTH and other associated code

This commit is contained in:
Liru Færs
2019-10-20 01:32:56 -04:00
parent a644b2dee5
commit f5fd05a1e4
8 changed files with 4 additions and 47 deletions

View File

@@ -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

View File

@@ -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.

View File

@@ -10750,17 +10750,6 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>18</integer>
</map>
<key>MenuBarWidth</key>
<map>
<key>Comment</key>
<string/>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>410</integer>
</map>
<key>MeshEnabled</key>
<map>
<key>Comment</key>

View File

@@ -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");

View File

@@ -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();
}

View File

@@ -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 );

View File

@@ -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<LLEvent> 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

View File

@@ -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<LLObjectSelection> mObjectSelection;
};
extern const std::string SAVE_INTO_INVENTORY;
extern LLMenuBarGL* gMenuBarView;
//extern LLView* gMenuBarHolder;
extern LLMenuGL* gPopupMenuView;
extern LLViewerMenuHolderGL* gMenuHolder;
extern LLMenuBarGL* gLoginMenuBarView;