summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsessiontab.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-30 03:04:47 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-30 03:04:47 +0300
commit0fa5fc47a2069a2c151536baa917b9c6978480e4 (patch)
tree2964096f28a6a5e7f08e5a0aa83f2ffe76d42421 /indra/newview/llfloaterimsessiontab.cpp
parent498b72aacd6d10dfcd4f15e1d16532dc138f0461 (diff)
parentce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff)
Merge branch 'master' into DRTVWR-527-maint
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp41
1 files changed, 39 insertions, 2 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index d604d0a789..e7f428c06a 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -32,6 +32,8 @@
#include "llagent.h"
#include "llagentcamera.h"
#include "llavataractions.h"
+#include "llavatariconctrl.h"
+#include "llgroupiconctrl.h"
#include "llchatentry.h"
#include "llchathistory.h"
#include "llchiclet.h"
@@ -45,6 +47,9 @@
#include "llfloaterimnearbychat.h"
const F32 REFRESH_INTERVAL = 1.0f;
+const std::string ICN_GROUP("group_chat_icon");
+const std::string ICN_NEARBY("nearby_chat_icon");
+const std::string ICN_AVATAR("avatar_icon");
void cb_group_do_nothing()
{
@@ -529,8 +534,7 @@ void LLFloaterIMSessionTab::removeConversationViewParticipant(const LLUUID& part
LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,participant_id);
if (widget)
{
- mConversationsRoot->extractItem(widget);
- delete widget;
+ widget->destroyView();
}
mConversationsWidgets.erase(participant_id);
}
@@ -700,6 +704,39 @@ void LLFloaterIMSessionTab::updateSessionName(const std::string& name)
mInputEditor->setLabel(LLTrans::getString("IM_to_label") + " " + name);
}
+void LLFloaterIMSessionTab::updateChatIcon(const LLUUID& id)
+{
+ if (mSession)
+ {
+ if (mSession->isP2PSessionType())
+ {
+ LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>(ICN_AVATAR);
+ icon->setVisible(true);
+ icon->setValue(id);
+ }
+ if (mSession->isAdHocSessionType())
+ {
+ LLGroupIconCtrl* icon = getChild<LLGroupIconCtrl>(ICN_GROUP);
+ icon->setVisible(true);
+ }
+ if (mSession->isGroupSessionType())
+ {
+ LLGroupIconCtrl* icon = getChild<LLGroupIconCtrl>(ICN_GROUP);
+ icon->setVisible(true);
+ icon->setValue(id);
+ }
+ }
+ else
+ {
+ if (mIsNearbyChat)
+ {
+ LLIconCtrl* icon = getChild<LLIconCtrl>(ICN_NEARBY);
+ icon->setVisible(true);
+ }
+ }
+
+}
+
void LLFloaterIMSessionTab::hideAllStandardButtons()
{
for (S32 i = 0; i < BUTTON_COUNT; i++)