Anonymous avatar Anonymous committed 2998ca4

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

Comments (0)

Files changed (2)

indra/newview/llimview.cpp

 
 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<LLAvatarIconCtrl>("avatar_icon");
 	LLGroupIconCtrl* group_icon = getChild<LLGroupIconCtrl>("group_icon");
 	{
 		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()
 
 	LLUICtrl* caller_name_widget = getChild<LLUICtrl>("caller name");
 	caller_name_widget->setValue(caller_name + " " + call_type);
-	if (is_avatar)
-	{
-		setIcon(session_id, caller_id);
-	}
-	else
-	{
-		LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon");
-		icon->setValue("Avaline_Icon");
-	}
+	setIcon(session_id, caller_id);
 
 	childSetAction("Accept", onAccept, this);
 	childSetAction("Reject", onReject, this);

indra/newview/llimview.h

 	 * Sets icon depend on session.
 	 *
 	 * If passed session_id is a group id group icon will be shown, otherwise avatar icon for participant_id
+	 *
+	 * @param session_id - UUID of session
+	 * @param participant_id - UUID of other participant
 	 */
 	void setIcon(const LLSD& session_id, const LLSD& participant_id);
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.