From c4a1e10a8d29b95f925b64fccefdbeaf292c99dd Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 24 Mar 2010 15:06:40 +0200 Subject: fixed EXT-6458 Recent speakers not sorting properly with Group Voice switched nearby people panel to use active speaker manager instead of local/nearby speaker manager only reviewed by Mike at https://codereview.productengine.com/secondlife/r/88/ --HG-- branch : product-engine --- indra/newview/llpanelpeople.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpanelpeople.cpp') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 03e8ab644e..2025bd52dc 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -178,8 +178,8 @@ public: protected: virtual bool doCompare(const LLAvatarListItem* item1, const LLAvatarListItem* item2) const { - LLPointer lhs = LLLocalSpeakerMgr::instance().findSpeaker(item1->getAvatarId()); - LLPointer rhs = LLLocalSpeakerMgr::instance().findSpeaker(item2->getAvatarId()); + LLPointer lhs = LLActiveSpeakerMgr::instance().findSpeaker(item1->getAvatarId()); + LLPointer rhs = LLActiveSpeakerMgr::instance().findSpeaker(item2->getAvatarId()); if ( lhs.notNull() && rhs.notNull() ) { // Compare by last speaking time @@ -708,7 +708,7 @@ void LLPanelPeople::updateNearbyList() mNearbyList->setDirty(); DISTANCE_COMPARATOR.updateAvatarsPositions(positions, mNearbyList->getIDs()); - LLLocalSpeakerMgr::instance().update(TRUE); + LLActiveSpeakerMgr::instance().update(TRUE); } void LLPanelPeople::updateRecentList() -- cgit v1.2.3 From be66b520571aa89feefc8e1dad6dbc622521f124 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 26 Mar 2010 16:44:43 +0200 Subject: Fixed normal bug EXT-6448 (People -> My Friends list has overlapping text at the top covering the first few contacts.) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unfortunately I was unable to reproduce this bug. But I have some idea about the reason of it. Decision to show or not the help text based on count of people in Inventory/Calling Cards/Friends/All list. So, if this list is empty even if Resident has some friend (and at least one of them is online) both help text & online list were shown at the same time. The reason of why Friends/All can be empty in inventory can be clean cachу & slow connection to upload it from the server. But I could not reproduce it. So, the fix is to check both all friends & online friends lists to prevent overlaping in the future. Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/118/ --HG-- branch : product-engine --- indra/newview/llpanelpeople.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'indra/newview/llpanelpeople.cpp') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 2025bd52dc..325157a064 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -672,11 +672,6 @@ void LLPanelPeople::updateFriendList() lldebugs << "Friends Cards were not found" << llendl; } - // show special help text for just created account to help found friends. EXT-4836 - static LLTextBox* no_friends_text = getChild("no_friends_msg"); - no_friends_text->setVisible(all_friendsp.size() == 0); - - LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); for (; buddy_it != all_buddies.end(); ++buddy_it) { @@ -685,6 +680,14 @@ void LLPanelPeople::updateFriendList() online_friendsp.push_back(buddy_id); } + // show special help text for just created account to help found friends. EXT-4836 + static LLTextBox* no_friends_text = getChild("no_friends_msg"); + + // Seems sometimes all_friends can be empty because of issue with Inventory loading (clear cache, slow connection...) + // So, lets check all lists to avoid overlapping the text with online list. See EXT-6448. + bool any_friend_exists = (all_friendsp.size() > 0) || (online_friendsp.size() > 0); + no_friends_text->setVisible(!any_friend_exists); + /* * Avatarlists will be hidden by showFriendsAccordionsIfNeeded(), if they do not have items. * But avatarlist can be updated only if it is visible @see LLAvatarList::draw(); -- cgit v1.2.3 From 114e5ca0839bace7f247a6eadb6e06a28597501d Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 29 Mar 2010 16:33:35 -0400 Subject: EXT-5940 : Typedef all vector's Superficial cleanup to change all typedef std::vector to use a common typedef uuid_vec_t instead. --- indra/newview/llpanelpeople.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/llpanelpeople.cpp') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 03e8ab644e..8a1be2706c 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -134,13 +134,13 @@ public: typedef std::map < LLUUID, LLVector3d > id_to_pos_map_t; LLAvatarItemDistanceComparator() {}; - void updateAvatarsPositions(std::vector& positions, std::vector& uuids) + void updateAvatarsPositions(std::vector& positions, uuid_vec_t& uuids) { std::vector::const_iterator pos_it = positions.begin(), pos_end = positions.end(); - std::vector::const_iterator + uuid_vec_t::const_iterator id_it = uuids.begin(), id_end = uuids.end(); @@ -756,7 +756,7 @@ void LLPanelPeople::updateButtons() //bool recent_tab_active = (cur_tab == RECENT_TAB_NAME); LLUUID selected_id; - std::vector selected_uuids; + uuid_vec_t selected_uuids; getCurrentItemIDs(selected_uuids); bool item_selected = (selected_uuids.size() == 1); bool multiple_selected = (selected_uuids.size() >= 1); @@ -852,7 +852,7 @@ LLUUID LLPanelPeople::getCurrentItemID() const return LLUUID::null; } -void LLPanelPeople::getCurrentItemIDs(std::vector& selected_uuids) const +void LLPanelPeople::getCurrentItemIDs(uuid_vec_t& selected_uuids) const { std::string cur_tab = getActiveTabName(); @@ -1063,10 +1063,10 @@ void LLPanelPeople::onAddFriendButtonClicked() } } -bool LLPanelPeople::isItemsFreeOfFriends(const std::vector& uuids) +bool LLPanelPeople::isItemsFreeOfFriends(const uuid_vec_t& uuids) { const LLAvatarTracker& av_tracker = LLAvatarTracker::instance(); - for ( std::vector::const_iterator + for ( uuid_vec_t::const_iterator id = uuids.begin(), id_end = uuids.end(); id != id_end; ++id ) @@ -1094,7 +1094,7 @@ void LLPanelPeople::onAddFriendWizButtonClicked() void LLPanelPeople::onDeleteFriendButtonClicked() { - std::vector selected_uuids; + uuid_vec_t selected_uuids; getCurrentItemIDs(selected_uuids); if (selected_uuids.size() == 1) @@ -1121,7 +1121,7 @@ void LLPanelPeople::onChatButtonClicked() void LLPanelPeople::onImButtonClicked() { - std::vector selected_uuids; + uuid_vec_t selected_uuids; getCurrentItemIDs(selected_uuids); if ( selected_uuids.size() == 1 ) { @@ -1143,7 +1143,7 @@ void LLPanelPeople::onActivateButtonClicked() // static void LLPanelPeople::onAvatarPicked( const std::vector& names, - const std::vector& ids) + const uuid_vec_t& ids) { if (!names.empty() && !ids.empty()) LLAvatarActions::requestFriendshipDialog(ids[0], names[0]); @@ -1293,7 +1293,7 @@ bool LLPanelPeople::onRecentViewSortMenuItemCheck(const LLSD& userdata) void LLPanelPeople::onCallButtonClicked() { - std::vector selected_uuids; + uuid_vec_t selected_uuids; getCurrentItemIDs(selected_uuids); if (selected_uuids.size() == 1) -- cgit v1.2.3 From 568d6ed229e6d8a32d761482e06828ccc61209a4 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 2 Apr 2010 15:19:44 -0400 Subject: EXT-5940 : INFRASTRUCTURE: Typedef all vector's Fixed some more typedefs that I missed in first checkin. --- indra/newview/llpanelpeople.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpanelpeople.cpp') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 7f5e63adee..4c24670f47 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -652,8 +652,8 @@ void LLPanelPeople::updateFriendList() av_tracker.copyBuddyList(all_buddies); // save them to the online and all friends vectors - LLAvatarList::uuid_vector_t& online_friendsp = mOnlineFriendList->getIDs(); - LLAvatarList::uuid_vector_t& all_friendsp = mAllFriendList->getIDs(); + uuid_vec_t& online_friendsp = mOnlineFriendList->getIDs(); + uuid_vec_t& all_friendsp = mAllFriendList->getIDs(); all_friendsp.clear(); online_friendsp.clear(); @@ -746,7 +746,7 @@ void LLPanelPeople::buttonSetAction(const std::string& btn_name, const commit_si bool LLPanelPeople::isFriendOnline(const LLUUID& id) { - LLAvatarList::uuid_vector_t ids = mOnlineFriendList->getIDs(); + uuid_vec_t ids = mOnlineFriendList->getIDs(); return std::find(ids.begin(), ids.end(), id) != ids.end(); } -- cgit v1.2.3 From 0bb3f144c0a6712a269246975635962b3b5f48d0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 7 Apr 2010 10:37:07 +0100 Subject: Backed out changeset 63b699f90efd --- indra/newview/llpanelpeople.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelpeople.cpp') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 7f5e63adee..288edeb031 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -619,7 +619,7 @@ BOOL LLPanelPeople::postBuild() if(recent_view_sort) mRecentViewSortMenuHandle = recent_view_sort->getHandle(); - LLVoiceClient::getInstance()->addObserver(this); + gVoiceClient->addObserver(this); // call this method in case some list is empty and buttons can be in inconsistent state updateButtons(); @@ -809,7 +809,7 @@ void LLPanelPeople::updateButtons() } } - bool enable_calls = LLVoiceClient::getInstance()->isVoiceWorking() && LLVoiceClient::getInstance()->voiceEnabled(); + bool enable_calls = gVoiceClient->voiceWorking() && gVoiceClient->voiceEnabled(); buttonSetEnabled("teleport_btn", friends_tab_active && item_selected && isFriendOnline(selected_uuids.front())); buttonSetEnabled("view_profile_btn", item_selected); -- cgit v1.2.3