From 102908a2f204247005ae4a562c4f34668a983f4a Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 15 May 2015 11:43:13 +0300 Subject: MAINT-5206 FIXED always show Nearby chat on first opening of IMcontainer floater. --- indra/newview/llfloaterimcontainer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index ab57e8c170..66278f4987 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -261,6 +261,8 @@ BOOL LLFloaterIMContainer::postBuild() mInitialized = true; + mIsFirstOpen = true; + // Add callbacks: // We'll take care of view updates on idle gIdleCallbacks.addFunction(idle, this); @@ -636,14 +638,16 @@ void LLFloaterIMContainer::setVisible(BOOL visible) { // Make sure we have the Nearby Chat present when showing the conversation container nearby_chat = LLFloaterReg::findTypedInstance("nearby_chat"); - if (nearby_chat == NULL) + if ((nearby_chat == NULL) || mIsFirstOpen) { // If not found, force the creation of the nearby chat conversation panel // *TODO: find a way to move this to XML as a default panel or something like that LLSD name("nearby_chat"); LLFloaterReg::toggleInstanceOrBringToFront(name); selectConversationPair(LLUUID(NULL), false, false); + mIsFirstOpen = false; } + flashConversationItemWidget(mSelectedSession,false); LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(mSelectedSession); -- cgit v1.2.3 From 193a298266c251a6be153cf37f5b2d2aa8513101 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 19 May 2015 12:01:32 +0300 Subject: MAINT-5201 FIXED 'Chat history' option in context menu does not works for multiperson chat. --- indra/newview/llfloaterimcontainer.cpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 66278f4987..04f8c09ca0 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1220,7 +1220,22 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command, { if (selectedIDS.size() > 0) { - LLAvatarActions::viewChatHistory(selectedIDS.front()); + if(conversationItem->getType() == LLConversationItem::CONV_SESSION_GROUP) + { + LLFloaterReg::showInstance("preview_conversation", conversationItem->getUUID(), true); + } + else if(conversationItem->getType() == LLConversationItem::CONV_SESSION_AD_HOC) + { + LLConversation* conv = LLConversationLog::instance().findConversation(LLIMModel::getInstance()->findIMSession(conversationItem->getUUID())); + if(conv) + { + LLFloaterReg::showInstance("preview_conversation", conv->getSessionID(), true); + } + } + else + { + LLAvatarActions::viewChatHistory(selectedIDS.front()); + } } } else @@ -1320,6 +1335,15 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) { return LLLogChat::isNearbyTranscriptExist(); } + else if (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_AD_HOC) + { + const LLConversation* conv = LLConversationLog::instance().findConversation(LLIMModel::getInstance()->findIMSession(uuids.front())); + if(conv) + { + return LLLogChat::isAdHocTranscriptExist(conv->getHistoryFileName()); + } + return false; + } else { bool is_group = (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP); -- cgit v1.2.3 From 394952e4769d343773989dfbb3f5237f71cacf5a Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 26 May 2015 17:27:53 +0300 Subject: MAINT-5233 FIXED Viewer fall into recourse and crash when try open chat floater --- indra/newview/llfloaterimcontainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 04f8c09ca0..46fc6ea0cd 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -640,12 +640,12 @@ void LLFloaterIMContainer::setVisible(BOOL visible) nearby_chat = LLFloaterReg::findTypedInstance("nearby_chat"); if ((nearby_chat == NULL) || mIsFirstOpen) { + mIsFirstOpen = false; // If not found, force the creation of the nearby chat conversation panel // *TODO: find a way to move this to XML as a default panel or something like that LLSD name("nearby_chat"); LLFloaterReg::toggleInstanceOrBringToFront(name); selectConversationPair(LLUUID(NULL), false, false); - mIsFirstOpen = false; } flashConversationItemWidget(mSelectedSession,false); -- cgit v1.2.3 From 9e64435bd2168ce0c9213e7a7fb746da33f5e7e6 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 13 Aug 2015 07:53:38 +0300 Subject: MAINT-5219 FIXED "Ban Member" from the group chatters list context menu is greyed out when you have the ability to manage the ban list --- indra/newview/llfloaterimcontainer.cpp | 42 +++++++++++++++------------------- 1 file changed, 18 insertions(+), 24 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 46fc6ea0cd..f1a6ef78a6 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1909,22 +1909,28 @@ bool LLFloaterIMContainer::canBanSelectedMember(const LLUUID& participant_uuid) return false; } - if (!gdatap->mMembers.size()) + if (gdatap->mPendingBanRequest) { return false; } - LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find((participant_uuid)); - if (mi == gdatap->mMembers.end()) + if (gdatap->isRoleMemberDataComplete()) { - return false; - } + if (!gdatap->mMembers.size()) + { + return false; + } - LLGroupMemberData* member_data = (*mi).second; - // Is the member an owner? - if ( member_data && member_data->isInRole(gdatap->mOwnerRole) ) - { - return false; + LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find((participant_uuid)); + if (mi != gdatap->mMembers.end()) + { + LLGroupMemberData* member_data = (*mi).second; + // Is the member an owner? + if (member_data && member_data->isInRole(gdatap->mOwnerRole)) + { + return false; + } + } } if( gAgent.hasPowerInGroup(group_uuid, GP_ROLE_REMOVE_MEMBER) && @@ -1952,20 +1958,8 @@ void LLFloaterIMContainer::banSelectedMember(const LLUUID& participant_uuid) LL_WARNS("Groups") << "Unable to get group data for group " << group_uuid << LL_ENDL; return; } - std::vector ids; - ids.push_back(participant_uuid); - - LLGroupBanData ban_data; - gdatap->createBanEntry(participant_uuid, ban_data); - LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, group_uuid, LLGroupMgr::BAN_CREATE, ids); - LLGroupMgr::getInstance()->sendGroupMemberEjects(group_uuid, ids); - LLGroupMgr::getInstance()->sendGroupMembersRequest(group_uuid); - LLSD args; - std::string name; - gCacheName->getFullName(participant_uuid, name); - args["AVATAR_NAME"] = name; - args["GROUP_NAME"] = gdatap->mName; - LLNotifications::instance().add(LLNotification::Params("EjectAvatarFromGroup").substitutions(args)); + + gdatap->banMemberById(participant_uuid); } -- cgit v1.2.3 From 540493b315d8b8380b4c0bc63e7021ad499a62f8 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 1 Sep 2015 23:16:58 +0300 Subject: MAINT-5297 Allow global toggle of 'View People Icons' - Chat window part --HG-- branch : develop --- indra/newview/llfloaterimcontainer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index f1a6ef78a6..1c9b2e6acb 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -924,6 +924,10 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata) { setSortOrderParticipants(LLConversationFilter::SO_DISTANCE); } + if ("view_icons" == command) + { + gSavedSettings.setBOOL("ChatShowIcons", !gSavedSettings.getBOOL("ChatShowIcons")); + } if ("chat_preferences" == command) { LLFloaterPreference * floater_prefp = LLFloaterReg::showTypedInstance("preferences"); @@ -974,6 +978,10 @@ BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata) { return (order.getSortOrderParticipants() == LLConversationFilter::SO_DISTANCE); } + if ("view_icons" == command) + { + return gSavedSettings.getBOOL("ChatShowIcons"); + } if ("Translating.Enabled" == command) { return gSavedPerAccountSettings.getBOOL("TranslatingEnabled"); -- cgit v1.2.3 From 70136a7e3d1ce1600ecc1b607923b6dd408b8d0e Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 2 Sep 2015 01:16:18 +0300 Subject: MAINT-5297 Allow global toggle of 'View People Icons' - Global switch part --HG-- branch : develop --- indra/newview/llfloaterimcontainer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 1c9b2e6acb..0a5a6e8e13 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -926,7 +926,8 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata) } if ("view_icons" == command) { - gSavedSettings.setBOOL("ChatShowIcons", !gSavedSettings.getBOOL("ChatShowIcons")); + gSavedSettings.setBOOL("ChatShowIcons", !(gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride"))); + gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL("ChatShowIcons") && gSavedSettings.getBOOL("GlobalShowIconsOverride"))); } if ("chat_preferences" == command) { @@ -980,7 +981,7 @@ BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata) } if ("view_icons" == command) { - return gSavedSettings.getBOOL("ChatShowIcons"); + return gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride"); } if ("Translating.Enabled" == command) { -- cgit v1.2.3 From eccafc5c405e7e3727aa5b793ff508f34afd7648 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 27 Oct 2015 14:04:25 +0200 Subject: MAINT-5758 FIXED "Ban Member" from the group chatters list context menu is greyed out once you have performed a ban, until you load the group members list from group info. --- indra/newview/llfloaterimcontainer.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 0a5a6e8e13..91a0af3e8d 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1925,19 +1925,17 @@ bool LLFloaterIMContainer::canBanSelectedMember(const LLUUID& participant_uuid) if (gdatap->isRoleMemberDataComplete()) { - if (!gdatap->mMembers.size()) - { - return false; - } - - LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find((participant_uuid)); - if (mi != gdatap->mMembers.end()) - { - LLGroupMemberData* member_data = (*mi).second; - // Is the member an owner? - if (member_data && member_data->isInRole(gdatap->mOwnerRole)) + if (gdatap->mMembers.size()) + { + LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find((participant_uuid)); + if (mi != gdatap->mMembers.end()) { - return false; + LLGroupMemberData* member_data = (*mi).second; + // Is the member an owner? + if (member_data && member_data->isInRole(gdatap->mOwnerRole)) + { + return false; + } } } } -- cgit v1.2.3 From 0c4ec8642471bacb4bf9d61283aa28af8015985a Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 19 Nov 2015 22:17:37 +0200 Subject: MAINT-5297 Backed out changeset: dd9e3cbf10e5 --- indra/newview/llfloaterimcontainer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 91a0af3e8d..fc87e5dc5a 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -926,8 +926,7 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata) } if ("view_icons" == command) { - gSavedSettings.setBOOL("ChatShowIcons", !(gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL("ChatShowIcons") && gSavedSettings.getBOOL("GlobalShowIconsOverride"))); + gSavedSettings.setBOOL("ChatShowIcons", !gSavedSettings.getBOOL("ChatShowIcons")); } if ("chat_preferences" == command) { @@ -981,7 +980,7 @@ BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata) } if ("view_icons" == command) { - return gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride"); + return gSavedSettings.getBOOL("ChatShowIcons"); } if ("Translating.Enabled" == command) { -- cgit v1.2.3 From d6284458e562c3c792415d1f64929d0e20f2963c Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 19 Nov 2015 22:17:54 +0200 Subject: MAINT-5297 Backed out changeset: bfef055de5f5 --- indra/newview/llfloaterimcontainer.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index fc87e5dc5a..15b67b905d 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -924,10 +924,6 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata) { setSortOrderParticipants(LLConversationFilter::SO_DISTANCE); } - if ("view_icons" == command) - { - gSavedSettings.setBOOL("ChatShowIcons", !gSavedSettings.getBOOL("ChatShowIcons")); - } if ("chat_preferences" == command) { LLFloaterPreference * floater_prefp = LLFloaterReg::showTypedInstance("preferences"); @@ -978,10 +974,6 @@ BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata) { return (order.getSortOrderParticipants() == LLConversationFilter::SO_DISTANCE); } - if ("view_icons" == command) - { - return gSavedSettings.getBOOL("ChatShowIcons"); - } if ("Translating.Enabled" == command) { return gSavedPerAccountSettings.getBOOL("TranslatingEnabled"); -- cgit v1.2.3