summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.cpp45
-rw-r--r--indra/llui/lltoolbar.h1
-rw-r--r--indra/llui/llview.cpp6
-rw-r--r--indra/llui/llview.h2
-rw-r--r--indra/newview/llappviewer.cpp3
-rw-r--r--indra/newview/llcallfloater.cpp5
-rw-r--r--indra/newview/llcallfloater.h7
-rw-r--r--indra/newview/lltoolbarview.cpp6
-rw-r--r--indra/newview/skins/default/xui/en/floater_voice_controls.xml8
12 files changed, 98 insertions, 35 deletions
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..c559a2bf1d 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -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();
+ }
+ }
}
}
diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h
index 616710ea70..ad42d1fa35 100644
--- a/indra/llui/lltoolbar.h
+++ b/indra/llui/lltoolbar.h
@@ -185,6 +185,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 fdb84f1ec5..3fd7e48428 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,
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 20fa26915b..36a8b41d8b 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -89,6 +89,7 @@
#include "llweb.h"
#include "llsecondlifeurls.h"
#include "llupdaterservice.h"
+#include "llcallfloater.h"
// Linden library includes
#include "llavatarnamecache.h"
@@ -112,6 +113,7 @@
#include <boost/foreach.hpp>
+
#if LL_WINDOWS
# include <share.h> // For _SH_DENYWR in initMarkerFile
#else
@@ -1183,6 +1185,7 @@ bool LLAppViewer::mainLoop()
LLVoiceChannel::initClass();
LLVoiceClient::getInstance()->init(gServicePump);
+ LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1), true);
LLTimer frameTimer,idleTimer;
LLTimer debugTime;
LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 5ad2a560bc..e3217668c5 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -44,6 +44,7 @@
#include "llparticipantlist.h"
#include "llspeakers.h"
#include "lltextutil.h"
+#include "lltransientfloatermgr.h"
#include "llviewercontrol.h"
#include "llviewerdisplayname.h"
#include "llviewerwindow.h"
@@ -96,7 +97,7 @@ static void* create_non_avatar_caller(void*)
LLVoiceChannel* LLCallFloater::sCurrentVoiceChannel = NULL;
LLCallFloater::LLCallFloater(const LLSD& key)
-: LLFloater(key)
+: LLTransientDockableFloater(NULL, false, key)
, mSpeakerManager(NULL)
, mParticipants(NULL)
, mAvatarList(NULL)
@@ -112,6 +113,7 @@ LLCallFloater::LLCallFloater(const LLSD& key)
mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL);
LLVoiceClient::instance().addObserver(this);
+ LLTransientFloaterMgr::getInstance()->addControlView(this);
// update the agent's name if display name setting change
LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLCallFloater::updateAgentModeratorState, this));
@@ -134,6 +136,7 @@ LLCallFloater::~LLCallFloater()
{
LLVoiceClient::getInstance()->removeObserver(this);
}
+ LLTransientFloaterMgr::getInstance()->removeControlView(this);
}
// virtual
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index 7282f7a8be..00a3f76e56 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -28,7 +28,7 @@
#ifndef LL_LLCALLFLOATER_H
#define LL_LLCALLFLOATER_H
-#include "llfloater.h"
+#include "lltransientdockablefloater.h"
#include "llvoicechannel.h"
#include "llvoiceclient.h"
@@ -52,7 +52,7 @@ class LLSpeakersDelayActionsStorage;
* When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel
* also provides a 'Leave Call' button to allow the Resident to leave that voice channel.
*/
-class LLCallFloater : public LLFloater, LLVoiceClientParticipantObserver
+class LLCallFloater : public LLTransientDockableFloater, LLVoiceClientParticipantObserver
{
public:
@@ -262,6 +262,9 @@ private:
*/
static LLVoiceChannel* sCurrentVoiceChannel;
+ /* virtual */
+ LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; }
+
boost::signals2::connection mVoiceChannelStateChangeConnection;
};
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 21e682f072..c7c8268eb9 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -355,6 +355,12 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp
LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_VIEWER;
LLUUID srcID;
LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, src, srcID);
+
+ // Second, stop the command if it is in progress and requires stopping!
+ LLCommandId command_id = LLCommandId(uuid);
+ gToolBarView->mToolbarLeft->stopCommandInProgress(command_id);
+ gToolBarView->mToolbarRight->stopCommandInProgress(command_id);
+ gToolBarView->mToolbarBottom->stopCommandInProgress(command_id);
// Second, check if the command is present in one of the 3 toolbars
// If it is, store the command, the toolbar and the rank in the toolbar and
diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
index 1a2b248b16..14a722e3be 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
@@ -19,19 +19,19 @@
width="282">
<string
name="title_nearby">
- Nearby voice
+ VOICE SETTINGS
</string>
<string
name="title_group">
- Group call with [GROUP]
+ GROUP CALL WITH [GROUP]
</string>
<string
name="title_adhoc">
- Conference call
+ CONFERENCE CALL
</string>
<string
name="title_peer_2_peer">
- Call with [NAME]
+ CALL WITH [NAME]
</string>
<string
name="no_one_near">