From 6a134c92d82746a2bfbf011e53aa04bdec67655f Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Fri, 18 Jan 2013 00:05:51 +0200 Subject: CHUI-661 User cannot select multiple p2p conversation names in list to start conference chat --- indra/newview/llfloaterimcontainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 8264a90325..ac5ecc4b80 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1290,9 +1290,9 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool { BOOL handled = TRUE; LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); - + /* widget processing */ - if (select_widget) + if (select_widget && mConversationsRoot->getSelectedCount() <= 1) { LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,session_id); if (widget && widget->getParentFolder()) -- cgit v1.2.3 From 651f230500646dfcd695a9caa0650f81fa29b9bf Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Wed, 23 Jan 2013 10:23:16 +0200 Subject: CHUI-678 (Voice indicators not shown for participants in torn off conference conversations) --- indra/newview/llconversationview.cpp | 32 ++++++++++++++++++++++++++-- indra/newview/llconversationview.h | 4 ++++ indra/newview/llspeakingindicatormanager.cpp | 13 ++--------- 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 903dd2a407..bdd5dfc51a 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -82,6 +82,7 @@ LLConversationViewSession::LLConversationViewSession(const LLConversationViewSes mVoiceClientObserver(NULL), mCollapsedMode(false), mHasArrow(true), + mIsInActiveVoiceChannel(false), mFlashStateOn(false), mFlashStarted(false) { @@ -178,6 +179,7 @@ BOOL LLConversationViewSession::postBuild() LLIconCtrl* icon = mItemPanel->getChild("nearby_chat_icon"); icon->setVisible(true); mSpeakingIndicator->setSpeakerId(gAgentID, LLUUID::null, true); + mIsInActiveVoiceChannel = true; if(LLVoiceClient::instanceExists()) { LLNearbyVoiceClientStatusObserver* mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this); @@ -232,6 +234,8 @@ void LLConversationViewSession::draw() (*iit)->setVisible(draw_children); } + refresh(); + LLView::draw(); } @@ -351,6 +355,25 @@ void LLConversationViewSession::refresh() // Update all speaking indicators LLSpeakingIndicatorManager::updateSpeakingIndicators(); + + // we should show indicator for specified voice session only if this is current channel. EXT-5562. + if (!mIsInActiveVoiceChannel) + { + if (mSpeakingIndicator) + { + mSpeakingIndicator->setVisible(false); + } + LLConversationViewParticipant* participant = NULL; + items_t::const_iterator iter; + for (iter = getItemsBegin(); iter != getItemsEnd(); iter++) + { + participant = dynamic_cast(*iter); + if (participant) + { + participant->hideSpeakingIndicator(); + } + } + } // Do the regular upstream refresh LLFolderViewFolder::refresh(); @@ -362,8 +385,8 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi if (vmi) { - bool is_active = vmi->getUUID() == session_id; - mCallIconLayoutPanel->setVisible(is_active); + mIsInActiveVoiceChannel = vmi->getUUID() == session_id; + mCallIconLayoutPanel->setVisible(mIsInActiveVoiceChannel); } } @@ -623,5 +646,10 @@ LLView* LLConversationViewParticipant::getItemChildView(EAvatarListItemChildInde return child_view; } +void LLConversationViewParticipant::hideSpeakingIndicator() +{ + mSpeakingIndicator->setVisible(false); +} + // EOF diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 5f6acfb9ab..f2fa2fb042 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -102,6 +102,8 @@ private: bool mCollapsedMode; bool mHasArrow; + bool mIsInActiveVoiceChannel; + LLVoiceClientStatusObserver* mVoiceClientObserver; boost::signals2::connection mActiveVoiceChannelConnection; @@ -137,6 +139,8 @@ public: /*virtual*/ S32 getLabelXPos(); + void hideSpeakingIndicator(); + protected: friend class LLUICtrlFactory; LLConversationViewParticipant( const Params& p ); diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index 76da7d1aee..07e9371124 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -237,18 +237,9 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea { was_found = true; LLSpeakingIndicator* indicator = (*it_indicator).second; + was_switched_on = was_switched_on || switch_on; - BOOL switch_current_on = switch_on; - - // we should show indicator for specified voice session only if this is current channel. EXT-5562. - if (switch_current_on) - { - switch_current_on = indicator->getTargetSessionID() == session_id; - LL_DEBUGS("SpeakingIndicator") << "Session: " << session_id << ", target: " << indicator->getTargetSessionID() << ", the same? = " << switch_current_on << LL_ENDL; - } - was_switched_on = was_switched_on || switch_current_on; - - indicator->switchIndicator(switch_current_on); + indicator->switchIndicator(switch_on); } if (was_found) -- cgit v1.2.3 From d0204ab367f5ceb5eab89e2273b897975acbfe5a Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Wed, 23 Jan 2013 09:51:17 -0800 Subject: CHUI-687: Problem: User sees inventory offer notifications for deleted items when logging in from do not disturb mode. Resolution: If an item that is deletes has a DND notification saved, then remove that notification so that it doesn't appear onec the user exists DND mode. --- indra/llui/llfolderview.cpp | 6 +++++- indra/llui/llfolderview.h | 3 ++- .../newview/lldonotdisturbnotificationstorage.cpp | 22 +++++++++++++--------- indra/newview/lldonotdisturbnotificationstorage.h | 6 +++++- indra/newview/llfloaterimcontainer.cpp | 2 +- indra/newview/llimview.cpp | 2 +- indra/newview/llinventoryfunctions.cpp | 22 ++++++++++++++++++++++ indra/newview/llinventoryfunctions.h | 1 + 8 files changed, 50 insertions(+), 14 deletions(-) diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 324142f6c3..7c1ca017d7 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -399,6 +399,10 @@ LLFolderViewItem* LLFolderView::getCurSelectedItem( void ) return NULL; } +LLFolderView::selected_items_t& LLFolderView::getSelectedItems( void ) +{ + return mSelectedItems; +} // Record the selected item and pass it down the hierachy. BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL openitem, @@ -752,8 +756,8 @@ void LLFolderView::removeSelectedItems() { // change selection on successful delete setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel->hasFocus()); - } } + } arrangeAll(); } else if (count > 1) diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index a6e0a3b4c0..05b2abb9d3 100644 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -101,6 +101,7 @@ public: }; friend class LLFolderViewScrollContainer; + typedef std::deque selected_items_t; LLFolderView(const Params&); virtual ~LLFolderView( void ); @@ -138,6 +139,7 @@ public: // Get the last selected item virtual LLFolderViewItem* getCurSelectedItem( void ); + selected_items_t& getSelectedItems( void ); // Record the selected item and pass it down the hierarchy. virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, @@ -261,7 +263,6 @@ protected: protected: LLHandle mPopupMenuHandle; - typedef std::deque selected_items_t; selected_items_t mSelectedItems; BOOL mKeyboardSelection; BOOL mAllowMultiSelect; diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp index 824ff67972..abceb5c10d 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.cpp +++ b/indra/newview/lldonotdisturbnotificationstorage.cpp @@ -43,7 +43,8 @@ #include "lluuid.h" static const F32 DND_TIMER = 3.0; -const std::string toastName = "IMToast"; +const char * LLDoNotDisturbNotificationStorage::toastName = "IMToast"; +const char * LLDoNotDisturbNotificationStorage::offerName = "UserGiveItem"; LLDoNotDisturbNotificationStorageTimer::LLDoNotDisturbNotificationStorageTimer() : LLEventTimer(DND_TIMER) { @@ -72,6 +73,8 @@ LLDoNotDisturbNotificationStorage::LLDoNotDisturbNotificationStorage() , LLNotificationStorage(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "dnd_notifications.xml")) , mDirty(false) { + nameToPayloadParameterMap[toastName] = "SESSION_ID"; + nameToPayloadParameterMap[offerName] = "object_id"; } LLDoNotDisturbNotificationStorage::~LLDoNotDisturbNotificationStorage() @@ -234,15 +237,16 @@ LLNotificationChannelPtr LLDoNotDisturbNotificationStorage::getCommunicationChan return channelPtr; } -void LLDoNotDisturbNotificationStorage::removeIMNotification(const LLUUID& session_id) +void LLDoNotDisturbNotificationStorage::removeNotification(const char * name, const LLUUID& id) { LLNotifications& instance = LLNotifications::instance(); LLNotificationChannelPtr channelPtr = getCommunicationChannel(); LLCommunicationChannel *commChannel = dynamic_cast(channelPtr.get()); LLNotificationPtr notification; - LLSD substitutions; - LLUUID notificationSessionID; + LLSD payload; + LLUUID notificationObjectID; std::string notificationName; + std::string payloadVariable = nameToPayloadParameterMap[name]; LLCommunicationChannel::history_list_t::iterator it; std::vector itemsToRemove; @@ -252,18 +256,18 @@ void LLDoNotDisturbNotificationStorage::removeIMNotification(const LLUUID& sessi ++it) { notification = it->second; - substitutions = notification->getSubstitutions(); - notificationSessionID = substitutions["SESSION_ID"].asUUID(); + payload = notification->getPayload(); + notificationObjectID = payload[payloadVariable].asUUID(); notificationName = notification->getName(); - if(notificationName == toastName - && session_id == notificationSessionID) + if(notificationName == name + && id == notificationObjectID) { itemsToRemove.push_back(it); } } - + //Remove the notifications if(itemsToRemove.size()) { diff --git a/indra/newview/lldonotdisturbnotificationstorage.h b/indra/newview/lldonotdisturbnotificationstorage.h index fd7cc7ee82..6e68b0d1be 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.h +++ b/indra/newview/lldonotdisturbnotificationstorage.h @@ -49,6 +49,9 @@ class LLDoNotDisturbNotificationStorage : public LLSingleton nameToPayloadParameterMap; }; #endif // LL_LLDONOTDISTURBNOTIFICATIONSTORAGE_H diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index f73db6b166..6e9f7a380f 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1316,7 +1316,7 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal if(gAgent.isDoNotDisturb() && session_id.notNull()) { - LLDoNotDisturbNotificationStorage::getInstance()->removeIMNotification(session_id); + LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, session_id); } } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d0a8dfc0c8..cb03c1d234 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -144,7 +144,7 @@ static void on_avatar_name_cache_toast(const LLUUID& agent_id, args["FROM"] = av_name.getCompleteName(); args["FROM_ID"] = msg["from_id"]; args["SESSION_ID"] = msg["session_id"]; - LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLFloaterIMContainer::showConversation, LLFloaterIMContainer::getInstance(), msg["session_id"].asUUID())); + LLNotificationsUtil::add("IMToast", args, args, boost::bind(&LLFloaterIMContainer::showConversation, LLFloaterIMContainer::getInstance(), msg["session_id"].asUUID())); } void on_new_message(const LLSD& msg) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 6474d56414..7f9474ae70 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -46,6 +46,7 @@ #include "llappearancemgr.h" #include "llappviewer.h" #include "llclipboard.h" +#include "lldonotdisturbnotificationstorage.h" #include "llfloaterinventory.h" #include "llfloatersidepanelcontainer.h" #include "llfocusmgr.h" @@ -1132,11 +1133,32 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root } } +void LLInventoryAction::removeItemFromDND(LLFolderView* root) +{ + //Get selected items + LLFolderView::selected_items_t selectedItems = root->getSelectedItems(); + LLFolderViewModelItemInventory * viewModel = NULL; + + //If user is in DND and deletes item, make sure the notification is not displayed by removing the notification + //from DND history and .xml file. Once this is done, upon exit of DND mode the item deleted will not show a notification. + for(LLFolderView::selected_items_t::iterator it = selectedItems.begin(); it != selectedItems.end(); ++it) + { + viewModel = dynamic_cast((*it)->getViewModelItem()); + + if(viewModel && viewModel->getUUID().notNull()) + { + //Will remove the item offer notification + LLDoNotDisturbNotificationStorage::instance().removeNotification(LLDoNotDisturbNotificationStorage::offerName, viewModel->getUUID()); + } + } +} + void LLInventoryAction::onItemsRemovalConfirmation( const LLSD& notification, const LLSD& response, LLFolderView* root ) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { + removeItemFromDND(root); root->removeSelectedItems(); } } diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 11fc17ce9b..f1066a4dc9 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -433,6 +433,7 @@ struct LLInventoryAction static void doToSelected(class LLInventoryModel* model, class LLFolderView* root, const std::string& action); static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLFolderView* root); + static void removeItemFromDND(LLFolderView* root); }; -- cgit v1.2.3 From 6bb1c88db2b329665d547eb86d083a062732a8dd Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 23 Jan 2013 10:13:20 -0800 Subject: CHUI-480 : Fixed : Fetch group membership when starting group chat and populate speakers list --- indra/newview/llspeakers.cpp | 51 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 88f29d7587..a90d9111cb 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -31,6 +31,7 @@ #include "llagent.h" #include "llappviewer.h" #include "llimview.h" +#include "llgroupmgr.h" #include "llsdutil.h" #include "lluicolortable.h" #include "llviewerobjectlist.h" @@ -321,7 +322,11 @@ LLSpeakerMgr::~LLSpeakerMgr() LLPointer LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::string& name, LLSpeaker::ESpeakerStatus status, LLSpeaker::ESpeakerType type) { - if (id.isNull()) return NULL; + LLUUID session_id = getSessionID(); + if (id.isNull() || (id == session_id)) + { + return NULL; + } LLPointer speakerp; if (mSpeakers.find(id) == mSpeakers.end()) @@ -527,22 +532,52 @@ void LLSpeakerMgr::updateSpeakerList() LLUUID session_id = getSessionID(); if ((mSpeakers.size() == 0) && (!session_id.isNull())) { - // If the list is empty, we update it with whatever was used to initiate the call so that it doesn't stay empty too long. + // If the list is empty, we update it with whatever we have locally so that it doesn't stay empty too long. // *TODO: Fix the server side code that sometimes forgets to send back the list of agents after a chat started // (IOW, fix why we get no ChatterBoxSessionAgentListUpdates message after the initial ChatterBoxSessionStartReply) LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); - for (uuid_vec_t::iterator it = session->mInitialTargetIDs.begin();it!=session->mInitialTargetIDs.end();++it) + if (session->isGroupSessionType()) + { + // For groups, we need to hit the group manager + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(session_id); + if (!gdatap) + { + // Request the data the first time around + LLGroupMgr::getInstance()->sendCapGroupMembersRequest(session_id); + } + else if (gdatap->isMemberDataComplete() && !gdatap->mMembers.empty()) + { + LLGroupMgrGroupData::member_list_t::iterator member_it = gdatap->mMembers.begin(); + while (member_it != gdatap->mMembers.end()) + { + LLGroupMemberData* member = member_it->second; + // Add only the members who are online + if (member->getOnlineStatus() == "Online") + { + setSpeaker(member_it->first, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); + } + ++member_it; + } + // Always add the current agent (it has to be there no matter what...) + setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); + } + } + else { - // Add buddies if they are on line, add any other avatar. - if (!LLAvatarTracker::instance().isBuddy(*it) || LLAvatarTracker::instance().isBuddyOnline(*it)) + // For all other types (ad-hoc, P2P, avaline), we use the initial targets list + for (uuid_vec_t::iterator it = session->mInitialTargetIDs.begin();it!=session->mInitialTargetIDs.end();++it) { - setSpeaker(*it, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); + // Add buddies if they are on line, add any other avatar. + if (!LLAvatarTracker::instance().isBuddy(*it) || LLAvatarTracker::instance().isBuddyOnline(*it)) + { + setSpeaker(*it, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); + } } + // Always add the current agent (it has to be there no matter what...) + setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); } } } - // Finally, always add the current agent (it has to be there no matter what...) - setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); } void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp) -- cgit v1.2.3 From 0911dafd81b8360235eb6f6b85fac7153a5d4a02 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Wed, 23 Jan 2013 11:39:33 -0800 Subject: CHUI-687: post code review changes. Now upon deletion of an item, DND mode must be enabled in order to remove a notification from the DND history. --- .../newview/lldonotdisturbnotificationstorage.cpp | 2 +- indra/newview/llinventoryfunctions.cpp | 27 +++++++++++++--------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp index abceb5c10d..15c42e8285 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.cpp +++ b/indra/newview/lldonotdisturbnotificationstorage.cpp @@ -260,7 +260,7 @@ void LLDoNotDisturbNotificationStorage::removeNotification(const char * name, co notificationObjectID = payload[payloadVariable].asUUID(); notificationName = notification->getName(); - if(notificationName == name + if((notificationName == name) && id == notificationObjectID) { itemsToRemove.push_back(it); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 7f9474ae70..ad0a730dd1 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -1135,20 +1135,23 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root void LLInventoryAction::removeItemFromDND(LLFolderView* root) { - //Get selected items - LLFolderView::selected_items_t selectedItems = root->getSelectedItems(); - LLFolderViewModelItemInventory * viewModel = NULL; - - //If user is in DND and deletes item, make sure the notification is not displayed by removing the notification - //from DND history and .xml file. Once this is done, upon exit of DND mode the item deleted will not show a notification. - for(LLFolderView::selected_items_t::iterator it = selectedItems.begin(); it != selectedItems.end(); ++it) + if(gAgent.isDoNotDisturb()) { - viewModel = dynamic_cast((*it)->getViewModelItem()); + //Get selected items + LLFolderView::selected_items_t selectedItems = root->getSelectedItems(); + LLFolderViewModelItemInventory * viewModel = NULL; - if(viewModel && viewModel->getUUID().notNull()) + //If user is in DND and deletes item, make sure the notification is not displayed by removing the notification + //from DND history and .xml file. Once this is done, upon exit of DND mode the item deleted will not show a notification. + for(LLFolderView::selected_items_t::iterator it = selectedItems.begin(); it != selectedItems.end(); ++it) { - //Will remove the item offer notification - LLDoNotDisturbNotificationStorage::instance().removeNotification(LLDoNotDisturbNotificationStorage::offerName, viewModel->getUUID()); + viewModel = dynamic_cast((*it)->getViewModelItem()); + + if(viewModel && viewModel->getUUID().notNull()) + { + //Will remove the item offer notification + LLDoNotDisturbNotificationStorage::instance().removeNotification(LLDoNotDisturbNotificationStorage::offerName, viewModel->getUUID()); + } } } } @@ -1158,6 +1161,8 @@ void LLInventoryAction::onItemsRemovalConfirmation( const LLSD& notification, co S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { + //Need to remove item from DND before item is removed from root folder view + //because once removed from root folder view the item is no longer a selected item removeItemFromDND(root); root->removeSelectedItems(); } -- cgit v1.2.3 From 46a74c4e01e19c07b5ee966ebe9882c4209dc89c Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 23 Jan 2013 17:45:25 -0800 Subject: CHUI-480 : Fixed : Flagged when local update is made and prevent doing it multiple times, allow group to graw by 1 (me) then the rest (prevent having group remaining hidden). --- indra/newview/llspeakers.cpp | 34 +++++++++++++++++++++------------- indra/newview/llspeakers.h | 1 + 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index a90d9111cb..a2d8874cea 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -306,9 +306,10 @@ private: // LLSpeakerMgr::LLSpeakerMgr(LLVoiceChannel* channelp) : - mVoiceChannel(channelp) -, mVoiceModerated(false) -, mModerateModeHandledFirstTime(false) + mVoiceChannel(channelp), + mVoiceModerated(false), + mModerateModeHandledFirstTime(false), + mSpeakerListUpdated(false) { static LLUICachedControl remove_delay ("SpeakerParticipantRemoveDelay", 10.0); @@ -530,15 +531,16 @@ void LLSpeakerMgr::updateSpeakerList() { // If not, check if the list is empty, except if it's Nearby Chat (session_id NULL). LLUUID session_id = getSessionID(); - if ((mSpeakers.size() == 0) && (!session_id.isNull())) + if (!session_id.isNull() && !mSpeakerListUpdated) { // If the list is empty, we update it with whatever we have locally so that it doesn't stay empty too long. - // *TODO: Fix the server side code that sometimes forgets to send back the list of agents after a chat started + // *TODO: Fix the server side code that sometimes forgets to send back the list of participants after a chat started. // (IOW, fix why we get no ChatterBoxSessionAgentListUpdates message after the initial ChatterBoxSessionStartReply) LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); - if (session->isGroupSessionType()) + if (session->isGroupSessionType() && (mSpeakers.size() <= 1)) { - // For groups, we need to hit the group manager + // For groups, we need to hit the group manager. + // Note: The session uuid and the group uuid are actually one and the same. If that was to change, this will fail. LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(session_id); if (!gdatap) { @@ -547,6 +549,7 @@ void LLSpeakerMgr::updateSpeakerList() } else if (gdatap->isMemberDataComplete() && !gdatap->mMembers.empty()) { + // Add group members when we get the complete list (note: can take a while before we get that list) LLGroupMgrGroupData::member_list_t::iterator member_it = gdatap->mMembers.begin(); while (member_it != gdatap->mMembers.end()) { @@ -558,13 +561,12 @@ void LLSpeakerMgr::updateSpeakerList() } ++member_it; } - // Always add the current agent (it has to be there no matter what...) - setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); + mSpeakerListUpdated = true; } } - else + else if (mSpeakers.size() == 0) { - // For all other types (ad-hoc, P2P, avaline), we use the initial targets list + // For all other session type (ad-hoc, P2P, avaline), we use the initial participants targets list for (uuid_vec_t::iterator it = session->mInitialTargetIDs.begin();it!=session->mInitialTargetIDs.end();++it) { // Add buddies if they are on line, add any other avatar. @@ -573,11 +575,17 @@ void LLSpeakerMgr::updateSpeakerList() setSpeaker(*it, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); } } - // Always add the current agent (it has to be there no matter what...) - setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); + mSpeakerListUpdated = true; + } + else + { + // The list has been updated the normal way (i.e. by a ChatterBoxSessionAgentListUpdates received from the server) + mSpeakerListUpdated = true; } } } + // Always add the current agent (it has to be there...). Will do nothing if already there. + setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); } void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp) diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 7d518fe07b..5f5095097e 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -263,6 +263,7 @@ protected: typedef std::map > speaker_map_t; speaker_map_t mSpeakers; + bool mSpeakerListUpdated; speaker_list_t mSpeakersSorted; LLFrameTimer mSpeechTimer; -- cgit v1.2.3 From a6c4d127dd6ad66f9953344387e100bcff000ce5 Mon Sep 17 00:00:00 2001 From: "maxim@mnikolenko" Date: Fri, 25 Jan 2013 14:33:44 +0200 Subject: CHUI-697 FIXED We don't need to update form for Inventory offer notification --- indra/newview/llviewermessage.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d235ba5f96..8489e92d15 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1649,12 +1649,6 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& delete this; } - if (notification_ptr != NULL) - { - notification_ptr->updateForm(modified_form); - notification_ptr->repost(); - } - return false; } -- cgit v1.2.3 From daa9db305a5ae2c0c5b0c2425d6482de6dee7b2c Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Wed, 23 Jan 2013 19:47:01 +0200 Subject: CHUI-695 Viewer crashes after attempt to accept a friendship in IM: remove an infinity loop of reshape() --- indra/newview/lltoastnotifypanel.cpp | 6 ++---- indra/newview/lltoastpanel.cpp | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 268b68b539..0aab514531 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -537,11 +537,9 @@ LLIMToastNotifyPanel::~LLIMToastNotifyPanel() } void LLIMToastNotifyPanel::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) - { - LLToastPanel::reshape(width, height, called_from_parent); - +{ snapToMessageHeight(mTextBox, MAX_LENGTH); - } +} void LLIMToastNotifyPanel::compactButtons() { diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index 187aee207c..54d3912136 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -81,7 +81,9 @@ void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount) S32 newTextHeight = llmin(requiredTextHeight, maxTextHeight); heightDelta = newTextHeight - oldTextHeight; - S32 new_panel_height = llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT); + S32 new_panel_height = llmin( + llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT), + maxTextHeight); //reshape the panel with new height if (new_panel_height != getRect().getHeight()) -- cgit v1.2.3