merging
commit
2fe6fce018
|
|
@ -593,12 +593,12 @@ BOOL LLMenuItemSeparatorGL::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
{
|
||||
// the menu items are in the child list in bottom up order
|
||||
LLView* prev_menu_item = parent_menu->findNextSibling(this);
|
||||
return prev_menu_item ? prev_menu_item->handleMouseDown(x, prev_menu_item->getRect().getHeight(), mask) : FALSE;
|
||||
return (prev_menu_item && prev_menu_item->getVisible() && prev_menu_item->getEnabled()) ? prev_menu_item->handleMouseDown(x, prev_menu_item->getRect().getHeight(), mask) : FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLView* next_menu_item = parent_menu->findPrevSibling(this);
|
||||
return next_menu_item ? next_menu_item->handleMouseDown(x, 0, mask) : FALSE;
|
||||
return (next_menu_item && next_menu_item->getVisible() && next_menu_item->getEnabled()) ? next_menu_item->handleMouseDown(x, 0, mask) : FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -608,12 +608,12 @@ BOOL LLMenuItemSeparatorGL::handleMouseUp(S32 x, S32 y, MASK mask)
|
|||
if (y > getRect().getHeight() / 2)
|
||||
{
|
||||
LLView* prev_menu_item = parent_menu->findNextSibling(this);
|
||||
return prev_menu_item ? prev_menu_item->handleMouseUp(x, prev_menu_item->getRect().getHeight(), mask) : FALSE;
|
||||
return (prev_menu_item && prev_menu_item->getVisible() && prev_menu_item->getEnabled()) ? prev_menu_item->handleMouseUp(x, prev_menu_item->getRect().getHeight(), mask) : FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLView* next_menu_item = parent_menu->findPrevSibling(this);
|
||||
return next_menu_item ? next_menu_item->handleMouseUp(x, 0, mask) : FALSE;
|
||||
return (next_menu_item && next_menu_item->getVisible() && next_menu_item->getEnabled()) ? next_menu_item->handleMouseUp(x, 0, mask) : FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
#include "lluuid.h"
|
||||
#include "llvoiceclient.h"
|
||||
#include "llviewercontrol.h" // for gSavedSettings
|
||||
#include "lltooldraganddrop.h"
|
||||
|
||||
static LLDefaultChildRegistry::Register<LLAvatarList> r("avatar_list");
|
||||
|
||||
|
|
@ -462,6 +463,57 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
return handled;
|
||||
}
|
||||
|
||||
BOOL LLAvatarList::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
gFocusMgr.setMouseCapture(this);
|
||||
|
||||
S32 screen_x;
|
||||
S32 screen_y;
|
||||
localPointToScreen(x, y, &screen_x, &screen_y);
|
||||
LLToolDragAndDrop::getInstance()->setDragStart(screen_x, screen_y);
|
||||
|
||||
return LLFlatListViewEx::handleMouseDown(x, y, mask);
|
||||
}
|
||||
|
||||
BOOL LLAvatarList::handleMouseUp( S32 x, S32 y, MASK mask )
|
||||
{
|
||||
if(hasMouseCapture())
|
||||
{
|
||||
gFocusMgr.setMouseCapture(NULL);
|
||||
}
|
||||
|
||||
return LLFlatListViewEx::handleMouseUp(x, y, mask);
|
||||
}
|
||||
|
||||
BOOL LLAvatarList::handleHover(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
bool handled = hasMouseCapture();
|
||||
if(handled)
|
||||
{
|
||||
S32 screen_x;
|
||||
S32 screen_y;
|
||||
localPointToScreen(x, y, &screen_x, &screen_y);
|
||||
|
||||
if(LLToolDragAndDrop::getInstance()->isOverThreshold(screen_x, screen_y))
|
||||
{
|
||||
// First, create the global drag and drop object
|
||||
std::vector<EDragAndDropType> types;
|
||||
uuid_vec_t cargo_ids;
|
||||
getSelectedUUIDs(cargo_ids);
|
||||
types.resize(cargo_ids.size(), DAD_PERSON);
|
||||
LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_PEOPLE;
|
||||
LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, src);
|
||||
}
|
||||
}
|
||||
|
||||
if(!handled)
|
||||
{
|
||||
handled = LLFlatListViewEx::handleHover(x, y, mask);
|
||||
}
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
bool LLAvatarList::isAvalineItemSelected()
|
||||
{
|
||||
std::vector<LLPanel*> selected_items;
|
||||
|
|
|
|||
|
|
@ -84,6 +84,9 @@ public:
|
|||
bool getIconsVisible() const { return mShowIcons; }
|
||||
const std::string getIconParamName() const{return mIconParamName;}
|
||||
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask );
|
||||
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
|
||||
|
||||
// Return true if filter has at least one match.
|
||||
bool filterHasMatches();
|
||||
|
|
|
|||
|
|
@ -368,61 +368,6 @@ BOOL LLAvatarListItem::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
return LLPanel::handleDoubleClick(x, y, mask);
|
||||
}
|
||||
|
||||
BOOL LLAvatarListItem::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if (LLUICtrl::handleMouseDown(x, y, mask))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gFocusMgr.setMouseCapture(this);
|
||||
|
||||
S32 screen_x;
|
||||
S32 screen_y;
|
||||
localPointToScreen(x, y, &screen_x, &screen_y);
|
||||
LLToolDragAndDrop::getInstance()->setDragStart(screen_x, screen_y);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLAvatarListItem::handleMouseUp( S32 x, S32 y, MASK mask )
|
||||
{
|
||||
if (LLUICtrl::childrenHandleMouseUp(x, y, mask))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if(hasMouseCapture())
|
||||
{
|
||||
gFocusMgr.setMouseCapture(NULL);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLAvatarListItem::handleHover(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
bool handled = hasMouseCapture();
|
||||
if(handled)
|
||||
{
|
||||
S32 screen_x;
|
||||
S32 screen_y;
|
||||
localPointToScreen(x, y, &screen_x, &screen_y);
|
||||
|
||||
if(LLToolDragAndDrop::getInstance()->isOverThreshold(screen_x, screen_y))
|
||||
{
|
||||
// First, create the global drag and drop object
|
||||
std::vector<EDragAndDropType> types;
|
||||
uuid_vec_t cargo_ids;
|
||||
types.push_back(DAD_PERSON);
|
||||
cargo_ids.push_back(mAvatarId);
|
||||
LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_PEOPLE;
|
||||
LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, src);
|
||||
}
|
||||
}
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
void LLAvatarListItem::setValue( const LLSD& value )
|
||||
{
|
||||
if (!value.isMap()) return;;
|
||||
|
|
|
|||
|
|
@ -115,9 +115,6 @@ public:
|
|||
void onProfileBtnClick();
|
||||
|
||||
/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask );
|
||||
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1043,6 +1043,19 @@ void LLFloaterIMSession::processSessionUpdate(const LLSD& session_update)
|
|||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLFloaterIMSession::draw()
|
||||
{
|
||||
// add people who were added via dropPerson()
|
||||
if (!mPendingParticipants.empty())
|
||||
{
|
||||
addSessionParticipants(mPendingParticipants);
|
||||
mPendingParticipants.clear();
|
||||
}
|
||||
|
||||
LLFloaterIMSessionTab::draw();
|
||||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
EDragAndDropType cargo_type,
|
||||
|
|
@ -1081,7 +1094,9 @@ bool LLFloaterIMSession::dropPerson(LLUUID* person_id, bool drop)
|
|||
res = canAddSelectedToChat(ids);
|
||||
if(res && drop)
|
||||
{
|
||||
addSessionParticipants(ids);
|
||||
// these people will be added during the next draw() call
|
||||
// (so they can be added all at once)
|
||||
mPendingParticipants.push_back(*person_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,13 @@ public:
|
|||
/*virtual*/ BOOL getVisible();
|
||||
// Check typing timeout timer.
|
||||
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg);
|
||||
|
||||
static LLFloaterIMSession* findInstance(const LLUUID& session_id);
|
||||
static LLFloaterIMSession* getInstance(const LLUUID& session_id);
|
||||
|
||||
|
|
@ -117,13 +124,6 @@ public:
|
|||
void processAgentListUpdates(const LLSD& body);
|
||||
void processSessionUpdate(const LLSD& session_update);
|
||||
|
||||
/*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg);
|
||||
|
||||
|
||||
//used as a callback on receiving new IM message
|
||||
static void sRemoveTypingIndicator(const LLSD& data);
|
||||
static void onIMChicletCreated(const LLUUID& session_id);
|
||||
|
|
@ -189,6 +189,7 @@ private:
|
|||
LLSD mQueuedMsgsForInit;
|
||||
|
||||
uuid_vec_t mInvitedParticipants;
|
||||
uuid_vec_t mPendingParticipants;
|
||||
|
||||
// connection to voice channel state change signal
|
||||
boost::signals2::connection mVoiceChannelStateChangeConnection;
|
||||
|
|
|
|||
Loading…
Reference in New Issue