Fixed low bug EXT-4146 - IM window appears after double click on "i" button.
--HG-- branch : product-enginemeow-7.2.2
parent
eb12963eec
commit
1317cdbf8f
|
|
@ -320,6 +320,11 @@ boost::signals2::connection LLAvatarList::setRefreshCompleteCallback(const commi
|
|||
return mRefreshCompleteSignal.connect(cb);
|
||||
}
|
||||
|
||||
boost::signals2::connection LLAvatarList::setItemDoubleClickCallback(const mouse_signal_t::slot_type& cb)
|
||||
{
|
||||
return mItemDoubleClickSignal.connect(cb);
|
||||
}
|
||||
|
||||
void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos)
|
||||
{
|
||||
LLAvatarListItem* item = new LLAvatarListItem();
|
||||
|
|
@ -333,6 +338,8 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is
|
|||
item->setShowProfileBtn(mShowProfileBtn);
|
||||
item->showSpeakingIndicator(mShowSpeakingIndicator);
|
||||
|
||||
item->setDoubleClickCallback(boost::bind(&LLAvatarList::onItemDoucleClicked, this, _1, _2, _3, _4));
|
||||
|
||||
addItem(item, id, pos);
|
||||
}
|
||||
|
||||
|
|
@ -400,6 +407,11 @@ void LLAvatarList::updateLastInteractionTimes()
|
|||
}
|
||||
}
|
||||
|
||||
void LLAvatarList::onItemDoucleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask)
|
||||
{
|
||||
mItemDoubleClickSignal(ctrl, x, y, mask);
|
||||
}
|
||||
|
||||
bool LLAvatarItemComparator::compare(const LLPanel* item1, const LLPanel* item2) const
|
||||
{
|
||||
const LLAvatarListItem* avatar_item1 = dynamic_cast<const LLAvatarListItem*>(item1);
|
||||
|
|
|
|||
|
|
@ -92,6 +92,8 @@ public:
|
|||
|
||||
boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb);
|
||||
|
||||
boost::signals2::connection setItemDoubleClickCallback(const mouse_signal_t::slot_type& cb);
|
||||
|
||||
protected:
|
||||
void refresh();
|
||||
|
||||
|
|
@ -101,6 +103,7 @@ protected:
|
|||
std::vector<LLUUID>& vadded,
|
||||
std::vector<LLUUID>& vremoved);
|
||||
void updateLastInteractionTimes();
|
||||
void onItemDoucleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask);
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -120,6 +123,7 @@ private:
|
|||
LLAvatarListItem::ContextMenu* mContextMenu;
|
||||
|
||||
commit_signal_t mRefreshCompleteSignal;
|
||||
mouse_signal_t mItemDoubleClickSignal;
|
||||
};
|
||||
|
||||
/** Abstract comparator for avatar items */
|
||||
|
|
|
|||
|
|
@ -258,6 +258,21 @@ void LLAvatarListItem::onProfileBtnClick()
|
|||
LLAvatarActions::showProfile(mAvatarId);
|
||||
}
|
||||
|
||||
BOOL LLAvatarListItem::handleDoubleClick(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if(mInfoBtn->getRect().pointInRect(x, y))
|
||||
{
|
||||
onInfoBtnClick();
|
||||
return TRUE;
|
||||
}
|
||||
if(mProfileBtn->getRect().pointInRect(x, y))
|
||||
{
|
||||
onProfileBtnClick();
|
||||
return TRUE;
|
||||
}
|
||||
return LLPanel::handleDoubleClick(x, y, mask);
|
||||
}
|
||||
|
||||
void LLAvatarListItem::setValue( const LLSD& value )
|
||||
{
|
||||
if (!value.isMap()) return;;
|
||||
|
|
|
|||
|
|
@ -103,6 +103,8 @@ public:
|
|||
void onInfoBtnClick();
|
||||
void onProfileBtnClick();
|
||||
|
||||
/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Contains indicator to show voice activity.
|
||||
|
|
|
|||
|
|
@ -532,10 +532,10 @@ BOOL LLPanelPeople::postBuild()
|
|||
friends_panel->childSetAction("add_btn", boost::bind(&LLPanelPeople::onAddFriendWizButtonClicked, this));
|
||||
friends_panel->childSetAction("del_btn", boost::bind(&LLPanelPeople::onDeleteFriendButtonClicked, this));
|
||||
|
||||
mOnlineFriendList->setDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, mOnlineFriendList));
|
||||
mAllFriendList->setDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, mAllFriendList));
|
||||
mNearbyList->setDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, mNearbyList));
|
||||
mRecentList->setDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, mRecentList));
|
||||
mOnlineFriendList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1));
|
||||
mAllFriendList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1));
|
||||
mNearbyList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1));
|
||||
mRecentList->setItemDoubleClickCallback(boost::bind(&LLPanelPeople::onAvatarListDoubleClicked, this, _1));
|
||||
|
||||
mOnlineFriendList->setCommitCallback(boost::bind(&LLPanelPeople::onAvatarListCommitted, this, mOnlineFriendList));
|
||||
mAllFriendList->setCommitCallback(boost::bind(&LLPanelPeople::onAvatarListCommitted, this, mAllFriendList));
|
||||
|
|
@ -1005,12 +1005,15 @@ void LLPanelPeople::onTabSelected(const LLSD& param)
|
|||
mFilterEditor->setLabel(getString("people_filter_label"));
|
||||
}
|
||||
|
||||
void LLPanelPeople::onAvatarListDoubleClicked(LLAvatarList* list)
|
||||
void LLPanelPeople::onAvatarListDoubleClicked(LLUICtrl* ctrl)
|
||||
{
|
||||
LLUUID clicked_id = list->getSelectedUUID();
|
||||
|
||||
if (clicked_id.isNull())
|
||||
LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(ctrl);
|
||||
if(!item)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLUUID clicked_id = item->getAvatarId();
|
||||
|
||||
#if 0 // SJB: Useful for testing, but not currently functional or to spec
|
||||
LLAvatarActions::showProfile(clicked_id);
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ private:
|
|||
void onNearbyViewSortButtonClicked();
|
||||
void onFriendsViewSortButtonClicked();
|
||||
void onGroupsViewSortButtonClicked();
|
||||
void onAvatarListDoubleClicked(LLAvatarList* list);
|
||||
void onAvatarListDoubleClicked(LLUICtrl* ctrl);
|
||||
void onAvatarListCommitted(LLAvatarList* list);
|
||||
void onGroupPlusButtonClicked();
|
||||
void onGroupMinusButtonClicked();
|
||||
|
|
|
|||
Loading…
Reference in New Issue