Rearranging and cleaning up some assorted code

This commit is contained in:
Liru Færs
2019-10-20 01:36:41 -04:00
parent f5fd05a1e4
commit ebcbf79237
6 changed files with 10 additions and 8 deletions

View File

@@ -43,18 +43,18 @@
#include "lltimer.h"
#include "llcalc.h"
//#include "llclipboard.h"
#include "llclipboard.h"
#include "llcontrol.h"
#include "llbutton.h"
#include "llfocusmgr.h"
#include "llkeyboard.h"
#include "llmenugl.h"
#include "llrect.h"
#include "llresmgr.h"
#include "llstring.h"
#include "llwindow.h"
#include "llui.h"
#include "lluictrlfactory.h"
#include "llclipboard.h"
#include "../newview/lgghunspell_wrapper.h"
//

View File

@@ -766,7 +766,7 @@ LLMenuGL* LLTextEditor::createUrlContextMenu(S32 x, S32 y, const std::string &in
// create and return the context menu from the XUI file
llassert(LLMenuGL::sMenuContainer != NULL);
auto menu = LLUICtrlFactory::getInstance()->buildMenu(xui_file, LLMenuGL::sMenuContainer);
auto menu = LLUICtrlFactory::instance().buildMenu(xui_file, LLMenuGL::sMenuContainer);
if (menu)
{
if (mIsFriendSignal)
@@ -1535,7 +1535,7 @@ BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
const LLStyleSP style = segment ? segment->getStyle() : nullptr;
auto submenu = (style && style->isLink()) ? createUrlContextMenu(x, y, style->getLinkHREF()) : nullptr;
// Add url menu to base menu if we have a selection, otherwise make it the menu.
auto menu = (submenu && !hasSelection()) ? submenu : LLUICtrlFactory::getInstance()->buildMenu("menu_texteditor.xml", LLMenuGL::sMenuContainer);
auto menu = (submenu && !hasSelection()) ? submenu : LLUICtrlFactory::instance().buildMenu("menu_texteditor.xml", LLMenuGL::sMenuContainer);
mPopupMenuHandle = menu->getHandle();
if (menu)
{

View File

@@ -43,14 +43,11 @@
#include "lleditmenuhandler.h"
#include "llpreeditor.h"
#include "llmenugl.h"
class LLFontGL;
class LLScrollbar;
class LLViewBorder;
class LLKeywordToken;
class LLMenuGL;
class LLTextCmd;
class LLUICtrlFactory;
class LLTextEditor : public LLUICtrl, LLEditMenuHandler, protected LLPreeditor
{

View File

@@ -461,6 +461,7 @@ static void settings_to_globals()
BTN_HEIGHT_SMALL = gSavedSettings.getS32("ButtonHeightSmall");
BTN_HEIGHT = gSavedSettings.getS32("ButtonHeight");
extern S32 MENU_BAR_HEIGHT;
MENU_BAR_HEIGHT = gSavedSettings.getS32("MenuBarHeight");
extern S32 STATUS_BAR_HEIGHT;
STATUS_BAR_HEIGHT = gSavedSettings.getS32("StatusBarHeight");

View File

@@ -217,6 +217,8 @@ private:
LLTextEditor* mEditor;
};
#if 0
//-----------------------------------------------------------------------------
// LLFloaterItemProperties
//-----------------------------------------------------------------------------
@@ -232,5 +234,6 @@ public:
private:
};
#endif
#endif // LL_LLFLOATERMARKETPLACELISTINGS_H

View File

@@ -45,6 +45,7 @@
#include "llfloatersearchreplace.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
#include "llmenugl.h"
#include "llnotificationsutil.h"
#include "llresmgr.h"
#include "roles_constants.h"