diff options
author | Dave SIMmONs <simon@lindenlab.com> | 2011-03-09 14:33:11 -0800 |
---|---|---|
committer | Dave SIMmONs <simon@lindenlab.com> | 2011-03-09 14:33:11 -0800 |
commit | 543a63e51a99583c670deb8eb28adc9237ed90d3 (patch) | |
tree | 71af9cca512c52beb495948902e5e88c9980313b /indra/newview/llavatarlist.cpp | |
parent | bdd994d186369afdfd263d4c40689b165b75bee6 (diff) | |
parent | 58b393bb1eb2ef15597803741fded4942f3dc647 (diff) |
Merge latest
Diffstat (limited to 'indra/newview/llavatarlist.cpp')
-rw-r--r-- | indra/newview/llavatarlist.cpp | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index ff7dfccc0a..771419f60a 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -240,6 +240,9 @@ void LLAvatarList::addAvalineItem(const LLUUID& item_id, const LLUUID& session_i LLAvalineListItem* item = new LLAvalineListItem(/*hide_number=*/false); item->setAvatarId(item_id, session_id, true, false); item->setName(item_name); + item->showLastInteractionTime(mShowLastInteractionTime); + item->showSpeakingIndicator(mShowSpeakingIndicator); + item->setOnline(false); addItem(item, item_id); mIDs.push_back(item_id); @@ -286,9 +289,18 @@ void LLAvatarList::refresh() { // *NOTE: If you change the UI to show a different string, // be sure to change the filter code below. - addNewItem(buddy_id, - av_name.mDisplayName.empty() ? waiting_str : av_name.mDisplayName, - LLAvatarTracker::instance().isBuddyOnline(buddy_id)); + if (LLRecentPeople::instance().isAvalineCaller(buddy_id)) + { + const LLSD& call_data = LLRecentPeople::instance().getData(buddy_id); + addAvalineItem(buddy_id, call_data["session_id"].asUUID(), call_data["call_number"].asString()); + } + else + { + addNewItem(buddy_id, + av_name.mDisplayName.empty() ? waiting_str : av_name.mDisplayName, + LLAvatarTracker::instance().isBuddyOnline(buddy_id)); + } + modified = true; nadded++; } @@ -440,7 +452,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask) { BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask); - if ( mContextMenu ) + if ( mContextMenu && !isAvalineItemSelected()) { uuid_vec_t selected_uuids; getSelectedUUIDs(selected_uuids); @@ -449,6 +461,21 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask) return handled; } +bool LLAvatarList::isAvalineItemSelected() +{ + std::vector<LLPanel*> selected_items; + getSelectedItems(selected_items); + std::vector<LLPanel*>::iterator it = selected_items.begin(); + + for(; it != selected_items.end(); ++it) + { + if (dynamic_cast<LLAvalineListItem*>(*it)) + return true; + } + + return false; +} + void LLAvatarList::setVisible(BOOL visible) { if ( visible == FALSE && mContextMenu ) |