From 70e6b5a7f7027b7f9c005ca1ce43601f953dc951 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Sat, 26 Dec 2009 18:56:19 +0200 Subject: Fixed low bug EXT-3684 ("Default" icon is used always for group calls in the voice notifications instead of group icon) -- implemented LLGroupIconCtrl to show group icon for passed group UUID. -- added LLGroupIconCtrl to incoming and outgoing dialogs --HG-- branch : product-engine --- indra/newview/llimview.cpp | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 37ab144934..d34bab8c4d 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -57,6 +57,7 @@ #include "llhttpnode.h" #include "llimfloater.h" #include "llimpanel.h" +#include "llgroupiconctrl.h" #include "llresizebar.h" #include "lltabcontainer.h" #include "llviewercontrol.h" @@ -1495,6 +1496,27 @@ void LLCallDialog::draw() } } +void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id) +{ + bool is_group = gAgent.isInGroup(session_id); + + LLAvatarIconCtrl* avatar_icon = getChild("avatar_icon"); + LLGroupIconCtrl* group_icon = getChild("group_icon"); + + avatar_icon->setVisible(!is_group); + group_icon->setVisible(is_group); + + if (is_group) + { + group_icon->setValue(session_id); + } + else + { + avatar_icon->setValue(participant_id); + } + +} + bool LLOutgoingCallDialog::lifetimeHasExpired() { if (mLifetimeTimer.getStarted()) @@ -1556,8 +1578,9 @@ void LLOutgoingCallDialog::show(const LLSD& key) LLSD callee_id = mPayload["other_user_id"]; childSetTextArg("calling", "[CALLEE_NAME]", callee_name); childSetTextArg("connecting", "[CALLEE_NAME]", callee_name); - LLAvatarIconCtrl* icon = getChild("avatar_icon"); - icon->setValue(callee_id); + + // for outgoing group calls callee_id == group id == session id + setIcon(callee_id, callee_id); // stop timer by default mLifetimeTimer.stop(); @@ -1711,13 +1734,13 @@ BOOL LLIncomingCallDialog::postBuild() LLUICtrl* caller_name_widget = getChild("caller name"); caller_name_widget->setValue(caller_name + " " + call_type); - LLAvatarIconCtrl* icon = getChild("avatar_icon"); if (is_avatar) { - icon->setValue(caller_id); + setIcon(session_id, caller_id); } else { + LLAvatarIconCtrl* icon = getChild("avatar_icon"); icon->setValue("Avaline_Icon"); } -- cgit v1.2.3 From e9f9a19eccec8757edd7965bc6ccf6e145d7dd74 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 28 Dec 2009 12:24:47 +0200 Subject: Work on low task EXT-3682 (Dedicated icon is required for AvaLine callers in the VCP) -- improved changes for bug EXT-3684 ("Default" icon is used always for group calls in the voice notifications instead of group icon) to process avaline calls --HG-- branch : product-engine --- indra/newview/llimview.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d34bab8c4d..a7ce027416 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1498,7 +1498,10 @@ void LLCallDialog::draw() void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id) { - bool is_group = gAgent.isInGroup(session_id); + // *NOTE: 12/28/2009: check avaline calls: LLVoiceClient::isParticipantAvatar returns false for them + bool participant_is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id); + + bool is_group = participant_is_avatar && gAgent.isInGroup(session_id); LLAvatarIconCtrl* avatar_icon = getChild("avatar_icon"); LLGroupIconCtrl* group_icon = getChild("group_icon"); @@ -1510,11 +1513,15 @@ void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id) { group_icon->setValue(session_id); } - else + else if (participant_is_avatar) { avatar_icon->setValue(participant_id); } - + else + { + avatar_icon->setValue("Avaline_Icon"); + avatar_icon->setToolTip(std::string("")); + } } bool LLOutgoingCallDialog::lifetimeHasExpired() @@ -1734,15 +1741,7 @@ BOOL LLIncomingCallDialog::postBuild() LLUICtrl* caller_name_widget = getChild("caller name"); caller_name_widget->setValue(caller_name + " " + call_type); - if (is_avatar) - { - setIcon(session_id, caller_id); - } - else - { - LLAvatarIconCtrl* icon = getChild("avatar_icon"); - icon->setValue("Avaline_Icon"); - } + setIcon(session_id, caller_id); childSetAction("Accept", onAccept, this); childSetAction("Reject", onReject, this); -- cgit v1.2.3