summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llcommandmanager.cpp9
-rw-r--r--indra/llui/llcommandmanager.h23
-rw-r--r--indra/llui/lldockablefloater.cpp7
-rw-r--r--indra/llui/llfloater.cpp69
-rw-r--r--indra/llui/llfloater.h8
-rw-r--r--indra/llui/llfloaterreg.cpp9
-rw-r--r--indra/llui/lllayoutstack.cpp17
-rw-r--r--indra/llui/lllayoutstack.h13
-rw-r--r--indra/llui/lltabcontainer.cpp20
-rw-r--r--indra/llui/lltoolbar.cpp55
-rw-r--r--indra/llui/lltoolbar.h4
-rw-r--r--indra/llui/llview.cpp6
-rw-r--r--indra/llui/llview.h2
13 files changed, 155 insertions, 87 deletions
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp
index 128ba609cb..0e2f3f1961 100644
--- a/indra/llui/llcommandmanager.cpp
+++ b/indra/llui/llcommandmanager.cpp
@@ -41,7 +41,7 @@
// LLCommandId class
//
-const LLCommandId LLCommandId::null = LLCommandId();
+const LLCommandId LLCommandId::null = LLCommandId("null command");
//
// LLCommand class
@@ -67,10 +67,11 @@ LLCommand::Params::Params()
}
LLCommand::LLCommand(const LLCommand::Params& p)
- : mAvailableInToybox(p.available_in_toybox)
+ : mIdentifier(p.name)
+ , mAvailableInToybox(p.available_in_toybox)
, mIcon(p.icon)
- , mIdentifier(p.name)
, mLabelRef(p.label_ref)
+ , mName(p.name)
, mTooltipRef(p.tooltip_ref)
, mExecuteFunction(p.execute_function)
, mExecuteParameters(p.execute_parameters)
@@ -134,7 +135,7 @@ void LLCommandManager::addCommand(LLCommand * command)
mCommandIndices[command_id.uuid()] = mCommands.size();
mCommands.push_back(command);
- lldebugs << "Successfully added command: " << command->id().name() << llendl;
+ lldebugs << "Successfully added command: " << command->name() << llendl;
}
//static
diff --git a/indra/llui/llcommandmanager.h b/indra/llui/llcommandmanager.h
index 9b93ab735a..a7276a48aa 100644
--- a/indra/llui/llcommandmanager.h
+++ b/indra/llui/llcommandmanager.h
@@ -50,31 +50,20 @@ public:
{}
};
- LLCommandId()
- : mName("null command")
- {
- mUUID = LLUUID::generateNewID(mName);
- }
-
LLCommandId(const std::string& name)
- : mName(name)
{
mUUID = LLUUID::generateNewID(name);
}
LLCommandId(const Params& p)
- : mName(p.name)
{
mUUID = LLUUID::generateNewID(p.name);
}
LLCommandId(const LLUUID& uuid)
- : mName(""),
- mUUID(uuid)
- {
- }
+ : mUUID(uuid)
+ {}
- const std::string& name() const { return mName; }
const LLUUID& uuid() const { return mUUID; }
bool operator!=(const LLCommandId& command) const
@@ -87,15 +76,9 @@ public:
return (mUUID == command.mUUID);
}
- bool operator<(const LLCommandId& command) const
- {
- return (mName < command.mName);
- }
-
static const LLCommandId null;
private:
- std::string mName;
LLUUID mUUID;
};
@@ -137,6 +120,7 @@ public:
const std::string& icon() const { return mIcon; }
const LLCommandId& id() const { return mIdentifier; }
const std::string& labelRef() const { return mLabelRef; }
+ const std::string& name() const { return mName; }
const std::string& tooltipRef() const { return mTooltipRef; }
const std::string& executeFunctionName() const { return mExecuteFunction; }
@@ -160,6 +144,7 @@ private:
bool mAvailableInToybox;
std::string mIcon;
std::string mLabelRef;
+ std::string mName;
std::string mTooltipRef;
std::string mExecuteFunction;
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index ca2dc644a4..aea58be12a 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -162,10 +162,15 @@ void LLDockableFloater::setVisible(BOOL visible)
void LLDockableFloater::setMinimized(BOOL minimize)
{
- if(minimize)
+ if(minimize && isDocked())
{
+ // minimizing a docked floater just hides it
setVisible(FALSE);
}
+ else
+ {
+ LLFloater::setMinimized(minimize);
+ }
}
LLView * LLDockableFloater::getDockWidget()
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index d1d840729d..7100ea13a7 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -165,6 +165,7 @@ LLFloater::Params::Params()
: title("title"),
short_title("short_title"),
single_instance("single_instance", false),
+ reuse_instance("reuse_instance", false),
can_resize("can_resize", false),
can_minimize("can_minimize", true),
can_close("can_close", true),
@@ -174,6 +175,7 @@ LLFloater::Params::Params()
save_rect("save_rect", false),
save_visibility("save_visibility", false),
can_dock("can_dock", false),
+ show_title("show_title", true),
open_positioning("open_positioning", LLFloaterEnums::OPEN_POSITIONING_NONE),
specified_left("specified_left"),
specified_bottom("specified_bottom"),
@@ -238,6 +240,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mTitle(p.title),
mShortTitle(p.short_title),
mSingleInstance(p.single_instance),
+ mReuseInstance(p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance), // reuse single-instance floaters by default
mKey(key),
mCanTearOff(p.can_tear_off),
mCanMinimize(p.can_minimize),
@@ -538,7 +541,6 @@ LLFloater::~LLFloater()
delete mResizeHandle[i];
}
- storeRectControl();
setVisible(false); // We're not visible if we're destroyed
storeVisibilityControl();
storeDockStateControl();
@@ -683,7 +685,12 @@ void LLFloater::openFloater(const LLSD& key)
}
else
{
- applyControlsAndPosition(LLFloaterReg::getLastFloaterCascading());
+ LLFloater* floater_to_stack = LLFloaterReg::getLastFloaterInGroup(mInstanceName);
+ if (!floater_to_stack)
+ {
+ floater_to_stack = LLFloaterReg::getLastFloaterCascading();
+ }
+ applyControlsAndPosition(floater_to_stack);
setMinimized(FALSE);
setVisibleAndFrontmost(mAutoFocus);
}
@@ -776,12 +783,19 @@ void LLFloater::closeFloater(bool app_quitting)
else
{
setVisible(FALSE);
+ if (!mReuseInstance)
+ {
+ destroy();
+ }
}
}
else
{
setVisible(FALSE); // hide before destroying (so handleVisibilityChange() gets called)
- destroy();
+ if (!mReuseInstance)
+ {
+ destroy();
+ }
}
}
}
@@ -861,9 +875,16 @@ bool LLFloater::applyRectControl()
{
bool saved_rect = false;
- // If we have a saved rect, use it
- if (mRectControl.size() > 1)
+ LLFloater* last_in_group = LLFloaterReg::getLastFloaterInGroup(mInstanceName);
+ if (last_in_group && last_in_group != this)
{
+ // other floaters in our group, position ourselves relative to them and don't save the rect
+ mRectControl.clear();
+ mOpenPositioning = LLFloaterEnums::OPEN_POSITIONING_CASCADE_GROUP;
+ }
+ else if (mRectControl.size() > 1)
+ {
+ // If we have a saved rect, use it
const LLRect& rect = getControlGroup()->getRect(mRectControl);
saved_rect = rect.notEmpty();
if (saved_rect)
@@ -912,6 +933,7 @@ void LLFloater::applyPositioning(LLFloater* other)
}
break;
+ case LLFloaterEnums::OPEN_POSITIONING_CASCADE_GROUP:
case LLFloaterEnums::OPEN_POSITIONING_CASCADING:
if (other != NULL)
{
@@ -1051,6 +1073,7 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user)
if (by_user)
{
storeRectControl();
+ mOpenPositioning = LLFloaterEnums::OPEN_POSITIONING_NONE;
}
// if not minimized, adjust all snapped dependents to new shape
@@ -1142,10 +1165,6 @@ void LLFloater::setMinimized(BOOL minimize)
mButtonsEnabled[BUTTON_RESTORE] = TRUE;
}
- if (mDragHandle)
- {
- mDragHandle->setVisible(TRUE);
- }
setBorderVisible(TRUE);
for(handle_set_iter_t dependent_it = mDependents.begin();
@@ -1296,19 +1315,9 @@ void LLFloater::setIsChrome(BOOL is_chrome)
mButtons[BUTTON_CLOSE]->setToolTip(LLStringExplicit(getButtonTooltip(Params(), BUTTON_CLOSE, is_chrome)));
}
- // no titles displayed on "chrome" floaters
- if (mDragHandle)
- mDragHandle->setTitleVisible(!is_chrome);
-
LLPanel::setIsChrome(is_chrome);
}
-void LLFloater::setTitleVisible(bool visible)
-{
- if (mDragHandle)
- mDragHandle->setTitleVisible(visible);
-}
-
// Change the draw style to account for the foreground state.
void LLFloater::setForeground(BOOL front)
{
@@ -1396,7 +1405,10 @@ void LLFloater::moveResizeHandlesToFront()
BOOL LLFloater::isFrontmost()
{
- return gFloaterView && gFloaterView->getFrontmost() == this && getVisible();
+ LLFloaterView* floater_view = getParentByType<LLFloaterView>();
+ return getVisible()
+ && (floater_view
+ && floater_view->getFrontmost() == this);
}
void LLFloater::addDependentFloater(LLFloater* floaterp, BOOL reposition)
@@ -1469,6 +1481,7 @@ BOOL LLFloater::handleMouseDown(S32 x, S32 y, MASK mask)
if(offerClickToButton(x, y, mask, BUTTON_CLOSE)) return TRUE;
if(offerClickToButton(x, y, mask, BUTTON_RESTORE)) return TRUE;
if(offerClickToButton(x, y, mask, BUTTON_TEAR_OFF)) return TRUE;
+ if(offerClickToButton(x, y, mask, BUTTON_DOCK)) return TRUE;
// Otherwise pass to drag handle for movement
return mDragHandle->handleMouseDown(x, y, mask);
@@ -1574,6 +1587,13 @@ void LLFloater::setDocked(bool docked, bool pop_on_undock)
{
mDocked = docked;
mButtonsEnabled[BUTTON_DOCK] = !mDocked;
+
+ if (mDocked)
+ {
+ setMinimized(FALSE);
+ mOpenPositioning = LLFloaterEnums::OPEN_POSITIONING_NONE;
+ }
+
updateTitleButtons();
storeDockStateControl();
@@ -1812,7 +1832,7 @@ void LLFloater::draw()
{
drawChild(mButtons[i]);
}
- drawChild(mDragHandle);
+ drawChild(mDragHandle, 0, 0, TRUE);
}
else
{
@@ -2963,6 +2983,7 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
mHeaderHeight = p.header_height;
mLegacyHeaderHeight = p.legacy_header_height;
mSingleInstance = p.single_instance;
+ mReuseInstance = p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance;
mOpenPositioning = p.open_positioning;
mSpecifiedLeft = p.specified_left;
@@ -2991,6 +3012,11 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
{
setCloseCallback(initCommitCallback(p.close_callback));
}
+
+ if (mDragHandle)
+ {
+ mDragHandle->setTitleVisible(p.show_title);
+ }
}
boost::signals2::connection LLFloater::setMinimizeCallback( const commit_signal_t::slot_type& cb )
@@ -3239,7 +3265,6 @@ void LLFloater::stackWith(LLFloater& other)
next_rect.setLeftTopAndSize(next_rect.mLeft, next_rect.mTop, getRect().getWidth(), getRect().getHeight());
- mRectControl.clear(); // don't save rect of stacked floaters
setShape(next_rect);
}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 8beb11507e..73e9c9e831 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -66,9 +66,9 @@ namespace LLFloaterEnums
{
OPEN_POSITIONING_NONE,
OPEN_POSITIONING_CASCADING,
+ OPEN_POSITIONING_CASCADE_GROUP,
OPEN_POSITIONING_CENTERED,
OPEN_POSITIONING_SPECIFIED,
-
OPEN_POSITIONING_COUNT
};
}
@@ -120,6 +120,7 @@ public:
short_title;
Optional<bool> single_instance,
+ reuse_instance,
can_resize,
can_minimize,
can_close,
@@ -128,7 +129,8 @@ public:
save_rect,
save_visibility,
save_dock_state,
- can_dock;
+ can_dock,
+ show_title;
Optional<LLFloaterEnums::EOpenPositioning> open_positioning;
Optional<S32> specified_left;
@@ -209,7 +211,6 @@ public:
std::string getTitle() const;
void setShortTitle( const std::string& short_title );
std::string getShortTitle() const;
- void setTitleVisible(bool visible);
virtual void setMinimized(BOOL b);
void moveResizeHandlesToFront();
void addDependentFloater(LLFloater* dependent, BOOL reposition = TRUE);
@@ -409,6 +410,7 @@ private:
LLUIString mShortTitle;
BOOL mSingleInstance; // TRUE if there is only ever one instance of the floater
+ bool mReuseInstance; // true if we want to hide the floater when we close it instead of destroying it
std::string mInstanceName; // Store the instance name so we can remove ourselves from the list
BOOL mCanTearOff;
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index 0edfc8da2d..e144b68f5e 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -167,6 +167,7 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key)
res->setInstanceName(name);
LLFloater *last_floater = (list.empty() ? NULL : list.back());
+
res->applyControlsAndPosition(last_floater);
gFloaterView->adjustToFitScreen(res, false);
@@ -462,16 +463,16 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
else if (instance->isMinimized())
{
instance->setMinimized(FALSE);
- instance->setFocus(TRUE);
+ instance->setVisibleAndFrontmost();
}
else if (!instance->isShown())
{
instance->openFloater(key);
- instance->setFocus(TRUE);
+ instance->setVisibleAndFrontmost();
}
- else if (!instance->hasFocus() && !instance->getIsChrome())
+ else if (!instance->isFrontmost())
{
- instance->setFocus(TRUE);
+ instance->setVisibleAndFrontmost();
}
else
{
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 4991c4afa6..0e7060e22c 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -47,6 +47,19 @@ void LLLayoutStack::OrientationNames::declareValues()
//
// LLLayoutPanel
//
+LLLayoutPanel::Params::Params()
+: expanded_min_dim("expanded_min_dim", 0),
+ min_dim("min_dim", 0),
+ max_dim("max_dim", S32_MAX),
+ user_resize("user_resize", true),
+ auto_resize("auto_resize", true)
+{
+ addSynonym(min_dim, "min_width");
+ addSynonym(min_dim, "min_height");
+ addSynonym(max_dim, "max_width");
+ addSynonym(max_dim, "max_height");
+}
+
LLLayoutPanel::LLLayoutPanel(const Params& p)
: LLPanel(p),
mExpandedMinDimSpecified(false),
@@ -527,8 +540,8 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
// not enough room to fit existing contents
if (force_resize == FALSE
// layout did not complete by reaching target position
- && ((mOrientation == VERTICAL && cur_y != -mPanelSpacing)
- || (mOrientation == HORIZONTAL && cur_x != getRect().getWidth() + mPanelSpacing)))
+ && ((mOrientation == VERTICAL && llround(cur_y) != -mPanelSpacing)
+ || (mOrientation == HORIZONTAL && llround(cur_x) != getRect().getWidth() + mPanelSpacing)))
{
// do another layout pass with all stacked elements contributing
// even those that don't usually resize
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index 5d79505fc3..ede6149a80 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -161,18 +161,7 @@ public:
Optional<bool> user_resize,
auto_resize;
- Params()
- : expanded_min_dim("expanded_min_dim", 0),
- min_dim("min_dim", 0),
- max_dim("max_dim", 0),
- user_resize("user_resize", true),
- auto_resize("auto_resize", true)
- {
- addSynonym(min_dim, "min_width");
- addSynonym(min_dim, "min_height");
- addSynonym(max_dim, "max_width");
- addSynonym(max_dim, "max_height");
- }
+ Params();
};
~LLLayoutPanel();
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 9c6a76822c..ad1f3c504d 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -548,23 +548,23 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask )
}
S32 tab_count = getTabCount();
- if (tab_count > 0)
+ if (tab_count > 0 && !getTabsHidden())
{
LLTabTuple* firsttuple = getTab(0);
LLRect tab_rect;
if (mIsVertical)
{
tab_rect = LLRect(firsttuple->mButton->getRect().mLeft,
- has_scroll_arrows ? mPrevArrowBtn->getRect().mBottom - tabcntrv_pad : mPrevArrowBtn->getRect().mTop,
- firsttuple->mButton->getRect().mRight,
- has_scroll_arrows ? mNextArrowBtn->getRect().mTop + tabcntrv_pad : mNextArrowBtn->getRect().mBottom );
+ has_scroll_arrows ? mPrevArrowBtn->getRect().mBottom - tabcntrv_pad : mPrevArrowBtn->getRect().mTop,
+ firsttuple->mButton->getRect().mRight,
+ has_scroll_arrows ? mNextArrowBtn->getRect().mTop + tabcntrv_pad : mNextArrowBtn->getRect().mBottom );
}
else
{
tab_rect = LLRect(has_scroll_arrows ? mPrevArrowBtn->getRect().mRight : mJumpPrevArrowBtn->getRect().mLeft,
- firsttuple->mButton->getRect().mTop,
- has_scroll_arrows ? mNextArrowBtn->getRect().mLeft : mJumpNextArrowBtn->getRect().mRight,
- firsttuple->mButton->getRect().mBottom );
+ firsttuple->mButton->getRect().mTop,
+ has_scroll_arrows ? mNextArrowBtn->getRect().mLeft : mJumpNextArrowBtn->getRect().mRight,
+ firsttuple->mButton->getRect().mBottom );
}
if( tab_rect.pointInRect( x, y ) )
{
@@ -681,7 +681,7 @@ BOOL LLTabContainer::handleToolTip( S32 x, S32 y, MASK mask)
{
static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
BOOL handled = LLPanel::handleToolTip( x, y, mask);
- if (!handled && getTabCount() > 0)
+ if (!handled && getTabCount() > 0 && !getTabsHidden())
{
LLTabTuple* firsttuple = getTab(0);
@@ -812,7 +812,9 @@ BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDrag
{
BOOL has_scroll_arrows = (getMaxScrollPos() > 0);
- if( mDragAndDropDelayTimer.getStarted() && mDragAndDropDelayTimer.getElapsedTimeF32() > SCROLL_DELAY_TIME )
+ if( !getTabsHidden()
+ && mDragAndDropDelayTimer.getStarted()
+ && mDragAndDropDelayTimer.getElapsedTimeF32() > SCROLL_DELAY_TIME )
{
if (has_scroll_arrows)
{
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 629c7d9bc7..515605200e 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -217,7 +217,7 @@ bool LLToolBar::addCommand(const LLCommandId& commandId, int rank)
if ((rank >= mButtonCommands.size()) || (rank == RANK_NONE))
{
// In that case, back load
- mButtonCommands.push_back(commandId);
+ mButtonCommands.push_back(command->id());
mButtons.push_back(button);
}
else
@@ -232,7 +232,7 @@ bool LLToolBar::addCommand(const LLCommandId& commandId, int rank)
rank--;
}
// ...then insert
- mButtonCommands.insert(it_command,commandId);
+ mButtonCommands.insert(it_command, command->id());
mButtons.insert(it_button,button);
}
@@ -302,7 +302,50 @@ bool LLToolBar::enableCommand(const LLCommandId& commandId, bool enabled)
command_id_map::iterator it = mButtonMap.find(commandId.uuid());
if (it != mButtonMap.end())
{
- it->second->setEnabled(enabled);
+ command_button = it->second;
+ command_button->setEnabled(enabled);
+ }
+ }
+
+ return (command_button != NULL);
+}
+
+bool LLToolBar::stopCommandInProgress(const LLCommandId& commandId)
+{
+ //
+ // Note from Leslie:
+ //
+ // This implementation was largely put in place to handle EXP-1348 which is related to
+ // dragging and dropping the "speak" button. The "speak" button can be in one of two
+ // modes, i.e., either a toggle action or a push-to-talk action. Because of this it
+ // responds to mouse down and mouse up in different ways, based on which behavior the
+ // button is currently set to obey. This was the simplest way of getting the button
+ // to turn off the microphone for both behaviors without risking duplicate state.
+ //
+
+ LLToolBarButton * command_button = NULL;
+
+ if (commandId != LLCommandId::null)
+ {
+ LLCommand* command = LLCommandManager::instance().getCommand(commandId);
+ llassert(command);
+
+ // If this command has an explicit function for execution stop
+ if (command->executeStopFunctionName().length() > 0)
+ {
+ command_id_map::iterator it = mButtonMap.find(commandId.uuid());
+ if (it != mButtonMap.end())
+ {
+ command_button = it->second;
+ llassert(command_button->mIsRunningSignal);
+
+ // Check to see if it is running
+ if ((*command_button->mIsRunningSignal)(command_button, command->isRunningParameters()))
+ {
+ // Trigger an additional button commit, which calls mouse down, mouse up and commit
+ command_button->onCommit();
+ }
+ }
}
}
@@ -778,7 +821,7 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
if (!commandp) return NULL;
LLToolBarButton::Params button_p;
- button_p.name = id.name();
+ button_p.name = commandp->name();
button_p.label = LLTrans::getString(commandp->labelRef());
button_p.tool_tip = LLTrans::getString(commandp->tooltipRef());
button_p.image_overlay = LLUI::getUIImage(commandp->icon());
@@ -956,13 +999,13 @@ BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask)
{
if (!mIsDragged)
{
- mStartDragItemCallback(x,y,mId.uuid());
+ mStartDragItemCallback(x, y, this);
mIsDragged = true;
handled = TRUE;
}
else
{
- handled = mHandleDragItemCallback(x,y,mId.uuid(),LLAssetType::AT_WIDGET);
+ handled = mHandleDragItemCallback(x, y, mId.uuid(), LLAssetType::AT_WIDGET);
}
}
else
diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h
index 616710ea70..e634e57f93 100644
--- a/indra/llui/lltoolbar.h
+++ b/indra/llui/lltoolbar.h
@@ -36,8 +36,9 @@
#include "llassettype.h"
class LLToolBar;
+class LLToolBarButton;
-typedef boost::function<void (S32 x, S32 y, const LLUUID& uuid)> tool_startdrag_callback_t;
+typedef boost::function<void (S32 x, S32 y, LLToolBarButton* button)> tool_startdrag_callback_t;
typedef boost::function<BOOL (S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)> tool_handledrag_callback_t;
typedef boost::function<BOOL (void* data, S32 x, S32 y, LLToolBar* toolbar)> tool_handledrop_callback_t;
@@ -185,6 +186,7 @@ public:
int removeCommand(const LLCommandId& commandId); // Returns the rank the removed command was at, RANK_NONE if not found
bool hasCommand(const LLCommandId& commandId) const;
bool enableCommand(const LLCommandId& commandId, bool enabled);
+ bool stopCommandInProgress(const LLCommandId& commandId);
void setStartDragCallback(tool_startdrag_callback_t cb) { mStartDragItemCallback = cb; }
void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; }
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 6e91156fe2..1644f53978 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -721,7 +721,7 @@ LLView* LLView::childrenHandleCharEvent(const std::string& desc, const METHOD& m
// XDATA might be MASK, or S32 clicks
template <typename METHOD, typename XDATA>
-LLView* LLView::childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDATA extra)
+LLView* LLView::childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDATA extra, bool allow_mouse_block)
{
BOOST_FOREACH(LLView* viewp, mChildList)
{
@@ -734,7 +734,7 @@ LLView* LLView::childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDA
}
if ((viewp->*method)( local_x, local_y, extra )
- || viewp->blockMouseEvent( local_x, local_y ))
+ || (allow_mouse_block && viewp->blockMouseEvent( local_x, local_y )))
{
viewp->logMouseEvent();
return viewp;
@@ -1021,7 +1021,7 @@ BOOL LLView::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks)
{
- return childrenHandleMouseEvent(&LLView::handleScrollWheel, x, y, clicks);
+ return childrenHandleMouseEvent(&LLView::handleScrollWheel, x, y, clicks, false);
}
// Called during downward traversal
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 6d1dda90af..08828e55e6 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -565,7 +565,7 @@ protected:
private:
template <typename METHOD, typename XDATA>
- LLView* childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDATA extra);
+ LLView* childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDATA extra, bool allow_mouse_block = true);
template <typename METHOD, typename CHARTYPE>
LLView* childrenHandleCharEvent(const std::string& desc, const METHOD& method,