summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2013-10-25 11:48:43 -0700
committerGraham Linden <graham@lindenlab.com>2013-10-25 11:48:43 -0700
commit970ee73e9a9cd1c94c295c9decb4d632886c19e6 (patch)
tree18cc7f08bbc043252bea9a6f687807116585d286 /indra/llui
parentd4e622daf2775147c75a75389ffb9b55f8cef799 (diff)
Fix release merge issues (included upstream changes not yet in release from bear)
Diffstat (limited to 'indra/llui')
-rwxr-xr-xindra/llui/llcombobox.cpp7
-rwxr-xr-xindra/llui/llcombobox.h2
-rwxr-xr-xindra/llui/llcommandmanager.cpp2
-rwxr-xr-xindra/llui/llcommandmanager.h4
-rwxr-xr-xindra/llui/llfloater.cpp6
-rwxr-xr-xindra/llui/llfloater.h2
-rwxr-xr-xindra/llui/llmodaldialog.cpp37
-rwxr-xr-xindra/llui/llscrollcontainer.cpp2
-rwxr-xr-xindra/llui/lltabcontainer.cpp45
-rwxr-xr-xindra/llui/lltabcontainer.h11
-rwxr-xr-xindra/llui/lltexteditor.cpp13
-rwxr-xr-xindra/llui/lltexteditor.h2
-rwxr-xr-xindra/llui/lltoolbar.cpp1
13 files changed, 24 insertions, 110 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index 56be52f69a..d4e14d9419 100755
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -534,13 +534,6 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p)
}
}
-void LLComboBox::setLeftTextPadding(S32 pad)
-{
- S32 left_pad, right_pad;
- mTextEntry->getTextPadding(&left_pad, &right_pad);
- mTextEntry->setTextPadding(pad, right_pad);
-}
-
void* LLComboBox::getCurrentUserdata()
{
LLScrollListItem* item = mList->getFirstSelected();
diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h
index 1e04fb0866..64dbaea306 100755
--- a/indra/llui/llcombobox.h
+++ b/indra/llui/llcombobox.h
@@ -190,8 +190,6 @@ public:
virtual BOOL operateOnAll(EOperation op);
//========================================================================
-
- void setLeftTextPadding(S32 pad);
void* getCurrentUserdata();
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp
index ab37ee48b6..625fb8e870 100755
--- a/indra/llui/llcommandmanager.cpp
+++ b/indra/llui/llcommandmanager.cpp
@@ -50,7 +50,6 @@ const LLCommandId LLCommandId::null = LLCommandId("null command");
LLCommand::Params::Params()
: available_in_toybox("available_in_toybox", false)
, icon("icon")
- , hover_icon("hover_icon")
, label_ref("label_ref")
, name("name")
, tooltip_ref("tooltip_ref")
@@ -72,7 +71,6 @@ LLCommand::LLCommand(const LLCommand::Params& p)
: mIdentifier(p.name)
, mAvailableInToybox(p.available_in_toybox)
, mIcon(p.icon)
- , mHoverIcon(p.hover_icon)
, mLabelRef(p.label_ref)
, mName(p.name)
, mTooltipRef(p.tooltip_ref)
diff --git a/indra/llui/llcommandmanager.h b/indra/llui/llcommandmanager.h
index 47a9b86785..ff5a8a3257 100755
--- a/indra/llui/llcommandmanager.h
+++ b/indra/llui/llcommandmanager.h
@@ -96,8 +96,6 @@ public:
Mandatory<std::string> name;
Mandatory<std::string> tooltip_ref;
- Optional<std::string> hover_icon;
-
Mandatory<std::string> execute_function;
Optional<LLSD> execute_parameters;
@@ -126,7 +124,6 @@ public:
const std::string& labelRef() const { return mLabelRef; }
const std::string& name() const { return mName; }
const std::string& tooltipRef() const { return mTooltipRef; }
- const std::string& hoverIcon() const {return mHoverIcon; }
const std::string& executeFunctionName() const { return mExecuteFunction; }
const LLSD& executeParameters() const { return mExecuteParameters; }
@@ -153,7 +150,6 @@ private:
std::string mLabelRef;
std::string mName;
std::string mTooltipRef;
- std::string mHoverIcon;
std::string mExecuteFunction;
LLSD mExecuteParameters;
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index edc730ef14..182c5cfd8a 100755
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -509,8 +509,8 @@ LLFloater::~LLFloater()
if( gFocusMgr.childHasKeyboardFocus(this))
{
- // Just in case we might still have focus here, release it.
- releaseFocus();
+ // Just in case we might still have focus here, release it.
+ releaseFocus();
}
// This is important so that floaters with persistent rects (i.e., those
@@ -1821,7 +1821,7 @@ void LLFloater::onClickClose( LLFloater* self )
self->onClickCloseBtn();
}
-void LLFloater::onClickCloseBtn(bool app_quitting)
+void LLFloater::onClickCloseBtn()
{
closeFloater(false);
}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 75715ef296..953689498f 100755
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -390,7 +390,7 @@ protected:
void destroy(); // Don't call this directly. You probably want to call closeFloater()
- virtual void onClickCloseBtn(bool app_quitting = false);
+ virtual void onClickCloseBtn();
virtual void updateTitleButtons();
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index ff85b0ad09..8c2be44904 100755
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -34,7 +34,7 @@
#include "llui.h"
#include "llwindow.h"
#include "llkeyboard.h"
-#include "llmenugl.h"
+
// static
std::list<LLModalDialog*> LLModalDialog::sModalStack;
@@ -161,18 +161,6 @@ void LLModalDialog::setVisible( BOOL visible )
BOOL LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask)
{
- LLView* popup_menu = LLMenuGL::sMenuContainer->getVisibleMenu();
- if (popup_menu != NULL)
- {
- S32 mx, my;
- LLUI::getMousePositionScreen(&mx, &my);
- LLRect menu_screen_rc = popup_menu->calcScreenRect();
- if(!menu_screen_rc.pointInRect(mx, my))
- {
- LLMenuGL::sMenuContainer->hideMenus();
- }
- }
-
if (mModal)
{
if (!LLFloater::handleMouseDown(x, y, mask))
@@ -185,34 +173,16 @@ BOOL LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLFloater::handleMouseDown(x, y, mask);
}
-
-
return TRUE;
}
BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask)
-{
+{
if( childrenHandleHover(x, y, mask) == NULL )
{
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl;
+ lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl;
}
-
- LLView* popup_menu = LLMenuGL::sMenuContainer->getVisibleMenu();
- if (popup_menu != NULL)
- {
- S32 mx, my;
- LLUI::getMousePositionScreen(&mx, &my);
- LLRect menu_screen_rc = popup_menu->calcScreenRect();
- if(menu_screen_rc.pointInRect(mx, my))
- {
- S32 local_x = mx - popup_menu->getRect().mLeft;
- S32 local_y = my - popup_menu->getRect().mBottom;
- popup_menu->handleHover(local_x, local_y, mask);
- gFocusMgr.setMouseCapture(NULL);
- }
- }
-
return TRUE;
}
@@ -240,7 +210,6 @@ BOOL LLModalDialog::handleDoubleClick(S32 x, S32 y, MASK mask)
BOOL LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- LLMenuGL::sMenuContainer->hideMenus();
childrenHandleRightMouseDown(x, y, mask);
return TRUE;
}
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index 238eae21c2..cbcce0ece5 100755
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -519,7 +519,7 @@ bool LLScrollContainer::addChild(LLView* view, S32 tab_group)
void LLScrollContainer::updateScroll()
{
- if (!getVisible() || !mScrolledView)
+ if (!mScrolledView)
{
return;
}
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 615796f555..76ba53ec32 100755
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -193,15 +193,12 @@ LLTabContainer::TabParams::TabParams()
: tab_top_image_unselected("tab_top_image_unselected"),
tab_top_image_selected("tab_top_image_selected"),
tab_top_image_flash("tab_top_image_flash"),
- tab_top_image_hovered("tab_top_image_hovered"),
tab_bottom_image_unselected("tab_bottom_image_unselected"),
tab_bottom_image_selected("tab_bottom_image_selected"),
tab_bottom_image_flash("tab_bottom_image_flash"),
- tab_bottom_image_hovered("tab_bottom_image_hovered"),
tab_left_image_unselected("tab_left_image_unselected"),
tab_left_image_selected("tab_left_image_selected"),
- tab_left_image_flash("tab_left_image_flash"),
- tab_left_image_hovered("tab_left_image_hovered")
+ tab_left_image_flash("tab_left_image_flash")
{}
LLTabContainer::Params::Params()
@@ -221,8 +218,7 @@ LLTabContainer::Params::Params()
open_tabs_on_drag_and_drop("open_tabs_on_drag_and_drop", false),
tab_icon_ctrl_pad("tab_icon_ctrl_pad", 0),
use_ellipses("use_ellipses"),
- font_halign("halign"),
- use_highlighting_on_hover("use_highlighting_on_hover",false)
+ font_halign("halign")
{}
LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
@@ -258,8 +254,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
mCustomIconCtrlUsed(p.use_custom_icon_ctrl),
mOpenTabsOnDragAndDrop(p.open_tabs_on_drag_and_drop),
mTabIconCtrlPad(p.tab_icon_ctrl_pad),
- mUseTabEllipses(p.use_ellipses),
- mUseHighlightingOnHover(p.use_highlighting_on_hover)
+ mUseTabEllipses(p.use_ellipses)
{
static LLUICachedControl<S32> tabcntr_vert_tab_min_width ("UITabCntrVertTabMinWidth", 0);
@@ -908,30 +903,18 @@ void LLTabContainer::update_images(LLTabTuple* tuple, TabParams params, LLTabCon
tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_top_image_unselected));
tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_top_image_selected));
tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_top_image_flash));
- if(mUseHighlightingOnHover)
- {
- tuple->mButton->setImageHoverUnselected(static_cast<LLUIImage*>(params.tab_top_image_hovered));
- }
}
else if (pos == LLTabContainer::BOTTOM)
{
tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_bottom_image_unselected));
tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_bottom_image_selected));
tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_bottom_image_flash));
- if(mUseHighlightingOnHover)
- {
- tuple->mButton->setImageHoverUnselected(static_cast<LLUIImage*>(params.tab_bottom_image_hovered));
- }
}
else if (pos == LLTabContainer::LEFT)
{
tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_left_image_unselected));
tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_left_image_selected));
tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_left_image_flash));
- if(mUseHighlightingOnHover)
- {
- tuple->mButton->setImageHoverUnselected(static_cast<LLUIImage*>(params.tab_left_image_hovered));
- }
}
}
}
@@ -1089,20 +1072,20 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
if (mIsVertical)
{
p.name("vtab_"+std::string(child->getName()));
- p.image_unselected(mMiddleTabParams.tab_left_image_unselected);
- p.image_selected(mMiddleTabParams.tab_left_image_selected);
- p.follows.flags = p.follows.flags() | FOLLOWS_TOP;
+ p.image_unselected(mMiddleTabParams.tab_left_image_unselected);
+ p.image_selected(mMiddleTabParams.tab_left_image_selected);
+ p.follows.flags = p.follows.flags() | FOLLOWS_TOP;
}
else
- {
+ {
p.name("htab_"+std::string(child->getName()));
- p.visible(false);
- p.image_unselected(tab_img);
- p.image_selected(tab_selected_img);
- p.follows.flags = p.follows.flags() | (getTabPosition() == TOP ? FOLLOWS_TOP : FOLLOWS_BOTTOM);
- // Try to squeeze in a bit more text
- p.pad_left( mLabelPadLeft );
- p.pad_right(2);
+ p.visible(false);
+ p.image_unselected(tab_img);
+ p.image_selected(tab_selected_img);
+ p.follows.flags = p.follows.flags() | (getTabPosition() == TOP ? FOLLOWS_TOP : FOLLOWS_BOTTOM);
+ // Try to squeeze in a bit more text
+ p.pad_left( mLabelPadLeft );
+ p.pad_right(2);
}
// *TODO : It seems wrong not to use p in both cases considering the way p is initialized
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index 7e7d4ac6e6..57862fc626 100755
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -62,15 +62,12 @@ public:
Optional<LLUIImage*> tab_top_image_unselected,
tab_top_image_selected,
tab_top_image_flash,
- tab_top_image_hovered,
tab_bottom_image_unselected,
tab_bottom_image_selected,
tab_bottom_image_flash,
- tab_bottom_image_hovered,
tab_left_image_unselected,
tab_left_image_selected,
- tab_left_image_flash,
- tab_left_image_hovered;
+ tab_left_image_flash;
TabParams();
};
@@ -117,11 +114,6 @@ public:
*/
Optional<S32> tab_icon_ctrl_pad;
- /**
- * This variable is used to found out should we highlight tab button on hover
- */
- Optional<bool> use_highlighting_on_hover;
-
Params();
};
@@ -315,7 +307,6 @@ private:
bool mOpenTabsOnDragAndDrop;
S32 mTabIconCtrlPad;
bool mUseTabEllipses;
- bool mUseHighlightingOnHover;
};
#endif // LL_TABCONTAINER_H
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 7f309a5ff6..0c16e06109 100755
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -666,14 +666,6 @@ void LLTextEditor::selectAll()
updatePrimary();
}
-void LLTextEditor::selectByCursorPosition(S32 prev_cursor_pos, S32 next_cursor_pos)
-{
- setCursorPos(prev_cursor_pos);
- startSelection();
- setCursorPos(next_cursor_pos);
- endSelection();
-}
-
BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
@@ -721,6 +713,7 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
setCursorAtLocalPos( x, y, true );
startSelection();
}
+ gFocusMgr.setMouseCapture( this );
}
handled = TRUE;
@@ -729,10 +722,6 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
// Delay cursor flashing
resetCursorBlink();
- if (handled)
- {
- gFocusMgr.setMouseCapture( this );
- }
return handled;
}
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index d3b7bc0eb7..32b543ec0e 100755
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -144,8 +144,6 @@ public:
virtual void selectAll();
virtual BOOL canSelectAll() const;
- void selectByCursorPosition(S32 prev_cursor_pos, S32 next_cursor_pos);
-
virtual bool canLoadOrSaveToFile();
void selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE);
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 75f52b8e34..928e82cb8c 100755
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -928,7 +928,6 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
button_p.label = LLTrans::getString(commandp->labelRef());
button_p.tool_tip = LLTrans::getString(commandp->tooltipRef());
button_p.image_overlay = LLUI::getUIImage(commandp->icon());
- button_p.image_hover_unselected = LLUI::getUIImage(commandp->hoverIcon());
button_p.button_flash_enable = commandp->isFlashingAllowed();
button_p.overwriteFrom(mButtonParams[mButtonType]);
LLToolBarButton* button = LLUICtrlFactory::create<LLToolBarButton>(button_p);