summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llfloater.h2
-rwxr-xr-xindra/llui/llfolderviewitem.h2
-rwxr-xr-xindra/newview/llavataractions.cpp2
-rwxr-xr-xindra/newview/llconversationview.cpp39
-rwxr-xr-xindra/newview/llconversationview.h9
-rw-r--r--indra/newview/llfloaterimcontainer.cpp14
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp44
-rw-r--r--indra/newview/llimview.cpp80
-rw-r--r--indra/newview/llvoicevivox.cpp6
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_chat.xml20
10 files changed, 125 insertions, 93 deletions
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index a657538eb7..9ad566a1a1 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -302,6 +302,7 @@ public:
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); // do not override
void setFrontmost(BOOL take_focus = TRUE);
+ virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE);
// Defaults to false.
virtual BOOL canSaveAs() const { return FALSE; }
@@ -373,7 +374,6 @@ protected:
void setInstanceName(const std::string& name);
virtual void bringToFront(S32 x, S32 y);
- virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE);
void setExpandedRect(const LLRect& rect) { mExpandedRect = rect; } // size when not minimized
const LLRect& getExpandedRect() const { return mExpandedRect; }
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index c5d6d26e84..2e633a39e5 100755
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -264,7 +264,7 @@ public:
// virtual void handleDropped();
virtual void draw();
- virtual void drawOpenFolderArrow(const Params& default_params, const LLUIColor& fg_color);
+ void drawOpenFolderArrow(const Params& default_params, const LLUIColor& fg_color);
void drawHighlight(const BOOL showContent, const BOOL hasKeyboardFocus, const LLUIColor &bgColor, const LLUIColor &outlineColor, const LLUIColor &mouseOverColor);
void drawLabel(const LLFontGL * font, const F32 x, const F32 y, const LLColor4& color, F32 &right_x);
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index f5d8998ce5..1969a0bc5f 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -215,7 +215,7 @@ void LLAvatarActions::endIM(const LLUUID& id)
static void on_avatar_name_cache_start_call(const LLUUID& agent_id,
const LLAvatarName& av_name)
{
- std::string name = av_name.getCompleteName();
+ std::string name = av_name.mDisplayName;
LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, agent_id, true);
if (session_id != LLUUID::null)
{
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index e40d57c318..1b1d61e6d6 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -80,7 +80,8 @@ LLConversationViewSession::LLConversationViewSession(const LLConversationViewSes
mSessionTitle(NULL),
mSpeakingIndicator(NULL),
mVoiceClientObserver(NULL),
- mMinimizedMode(false)
+ mCollapsedMode(false),
+ mHasArrow(true)
{
mFlashTimer = new LLFlashTimer();
}
@@ -135,6 +136,7 @@ BOOL LLConversationViewSession::postBuild()
icon->setVisible(true);
icon->setValue(session->mOtherParticipantID);
mSpeakingIndicator->setSpeakerId(gAgentID, session->mSessionID, true);
+ mHasArrow = false;
}
break;
}
@@ -183,11 +185,10 @@ void LLConversationViewSession::draw()
const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE);
// we don't draw the open folder arrow in minimized mode
- if (!mMinimizedMode)
+ if (mHasArrow && !mCollapsedMode)
{
// update the rotation angle of open folder arrow
updateLabelRotation();
-
drawOpenFolderArrow(default_params, sFgColor);
}
@@ -227,21 +228,25 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
// virtual
S32 LLConversationViewSession::arrange(S32* width, S32* height)
{
- S32 h_pad = getIndentation() + mArrowSize;
- LLRect rect(mMinimizedMode ? getLocalRect().mLeft : h_pad,
+ //LLFolderViewFolder::arrange computes value for getIndentation() function below
+ S32 arranged = LLFolderViewFolder::arrange(width, height);
+
+ S32 h_pad = mHasArrow ? getIndentation() + mArrowSize : getIndentation();
+
+ LLRect rect(mCollapsedMode ? getLocalRect().mLeft : h_pad,
getLocalRect().mTop,
getLocalRect().mRight,
getLocalRect().mTop - getItemHeight());
mItemPanel->setShape(rect);
- return LLFolderViewFolder::arrange(width, height);
+ return arranged;
}
// virtual
void LLConversationViewSession::toggleOpen()
{
// conversations should not be opened while in minimized mode
- if (!mMinimizedMode)
+ if (!mCollapsedMode)
{
LLFolderViewFolder::toggleOpen();
@@ -254,16 +259,17 @@ void LLConversationViewSession::toggleOpen()
}
}
-void LLConversationViewSession::toggleMinimizedMode(bool is_minimized)
+void LLConversationViewSession::toggleCollapsedMode(bool is_collapsed)
{
- mMinimizedMode = is_minimized;
+ mCollapsedMode = is_collapsed;
// hide the layout stack which contains all item's child widgets
// except for the icon which we display in minimized mode
- getChild<LLView>("conversation_item_stack")->setVisible(!mMinimizedMode);
+ getChild<LLView>("conversation_item_stack")->setVisible(!mCollapsedMode);
- S32 h_pad = getIndentation() + mArrowSize;
- mItemPanel->translate(mMinimizedMode ? -h_pad : h_pad, 0);
+ S32 h_pad = mHasArrow ? getIndentation() + mArrowSize : getIndentation();
+
+ mItemPanel->translate(mCollapsedMode ? -h_pad : h_pad, 0);
}
void LLConversationViewSession::setVisibleIfDetached(BOOL visible)
@@ -340,15 +346,6 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi
}
}
-void LLConversationViewSession::drawOpenFolderArrow(const LLFolderViewItem::Params& default_params, const LLUIColor& fg_color)
-{
- LLConversationItem * itemp = dynamic_cast<LLConversationItem*>(getViewModelItem());
- if (itemp && itemp->getType() != LLConversationItem::CONV_SESSION_1_ON_1)
- {
- LLFolderViewFolder::drawOpenFolderArrow(default_params, fg_color);
- }
-}
-
//
// Implementation of conversations list participant (avatar) widgets
//
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index acd7128b7d..a6f408403b 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -72,11 +72,9 @@ public:
/*virtual*/ void toggleOpen();
- /*virtual*/ bool isMinimized() { return mMinimizedMode; }
+ /*virtual*/ bool isCollapsed() { return mCollapsedMode; }
- /*virtual*/ void drawOpenFolderArrow(const LLFolderViewItem::Params& default_params, const LLUIColor& fg_color);
-
- void toggleMinimizedMode(bool is_minimized);
+ void toggleCollapsedMode(bool is_collapsed);
void setVisibleIfDetached(BOOL visible);
LLConversationViewParticipant* findParticipant(const LLUUID& participant_id);
@@ -97,7 +95,8 @@ private:
LLOutputMonitorCtrl* mSpeakingIndicator;
LLFlashTimer* mFlashTimer;
- bool mMinimizedMode;
+ bool mCollapsedMode;
+ bool mHasArrow;
LLVoiceClientStatusObserver* mVoiceClientObserver;
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index ae66a5f2cf..a04b8d79d6 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -640,7 +640,7 @@ void LLFloaterIMContainer::collapseConversationsPane(bool collapse)
LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second);
if (widget)
{
- widget->toggleMinimizedMode(collapse);
+ widget->toggleCollapsedMode(collapse);
// force closing all open conversations when collapsing to minimized state
if (collapse)
@@ -1320,7 +1320,7 @@ LLConversationItem* LLFloaterIMContainer::addConversationListItem(const LLUUID&
}
// set the widget to minimized mode if conversations pane is collapsed
- widget->toggleMinimizedMode(mConversationsPane->isCollapsed());
+ widget->toggleCollapsedMode(mConversationsPane->isCollapsed());
if (isWidgetSelected)
{
@@ -1361,10 +1361,12 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
setFocus(TRUE);
if(new_selection != NULL)
{
+ if (mConversationsWidgets.size() == 1)
+ new_selection = new_selection->getParentFolder();
LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem());
if(vmi != NULL)
{
- selectConversation(vmi->getUUID());
+ selectConversationPair(vmi->getUUID(), true);
}
}
}
@@ -1381,6 +1383,12 @@ LLConversationViewSession* LLFloaterIMContainer::createConversationItemWidget(LL
params.tool_tip = params.name;
params.container = this;
+ //Indentation for aligning the p2p converstation image with the nearby chat arrow
+ if(item->getType() == LLConversationItem::CONV_SESSION_1_ON_1)
+ {
+ params.folder_indentation = 3;
+ }
+
return LLUICtrlFactory::create<LLConversationViewSession>(params);
}
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index ab81b85d04..d9c461e836 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -41,6 +41,7 @@
#include "llfloaterreg.h"//for LLFloaterReg::getTypedInstance
#include "llviewerwindow.h"//for screen channel position
#include "llfloaterimnearbychat.h"
+#include "llfloaterimcontainer.h"
#include "llrootview.h"
#include "lllayoutstack.h"
@@ -283,12 +284,6 @@ bool LLFloaterIMNearbyChatScreenChannel::createPoolToast()
void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
{
- //Ignore Nearby Toasts
- if(gSavedSettings.getString("NotificationNearbyChatOptions") != "toast")
- {
- return;
- }
-
//look in pool. if there is any message
if(mStopProcessing)
return;
@@ -606,19 +601,30 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
toast_msg = chat_msg.mText;
}
- // Add a nearby chat toast.
- LLUUID id;
- id.generate();
- chat["id"] = id;
- std::string r_color_name = "White";
- F32 r_color_alpha = 1.0f;
- LLViewerChat::getChatColor( chat_msg, r_color_name, r_color_alpha);
-
- chat["text_color"] = r_color_name;
- chat["color_alpha"] = r_color_alpha;
- chat["font_size"] = (S32)LLViewerChat::getChatFontSize() ;
- chat["message"] = toast_msg;
- channel->addChat(chat);
+
+ //Will show toast when chat preference is set
+ if(gSavedSettings.getString("NotificationNearbyChatOptions") == "toast")
+ {
+ // Add a nearby chat toast.
+ LLUUID id;
+ id.generate();
+ chat["id"] = id;
+ std::string r_color_name = "White";
+ F32 r_color_alpha = 1.0f;
+ LLViewerChat::getChatColor( chat_msg, r_color_name, r_color_alpha);
+
+ chat["text_color"] = r_color_name;
+ chat["color_alpha"] = r_color_alpha;
+ chat["font_size"] = (S32)LLViewerChat::getChatFontSize() ;
+ chat["message"] = toast_msg;
+ channel->addChat(chat);
+ }
+ //Will show Conversations floater when chat preference is set
+ else if(gSavedSettings.getString("NotificationNearbyChatOptions") == "openconversations")
+ {
+ LLFloaterReg::showInstance("im_container");
+ }
+
}
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index db52a50aa1..581043a3d0 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -116,79 +116,83 @@ static void on_avatar_name_cache_toast(const LLUUID& agent_id,
void on_new_message(const LLSD& msg)
{
- std::string action;
- LLUUID participant_id = msg["from_id"].asUUID();
- LLUUID session_id = msg["session_id"].asUUID();
+ std::string action;
+ LLUUID participant_id = msg["from_id"].asUUID();
+ LLUUID session_id = msg["session_id"].asUUID();
LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);
// determine action for this session
if (session_id.isNull())
{
- action = gSavedSettings.getString("NotificationNearbyChatOptions");
+ action = gSavedSettings.getString("NotificationNearbyChatOptions");
}
else if(session->isP2PSessionType())
{
if (LLAvatarTracker::instance().isBuddy(participant_id))
{
- action = gSavedSettings.getString("NotificationFriendIMOptions");
+ action = gSavedSettings.getString("NotificationFriendIMOptions");
}
else
{
- action = gSavedSettings.getString("NotificationNonFriendIMOptions");
+ action = gSavedSettings.getString("NotificationNonFriendIMOptions");
}
}
else if(session->isAdHocSessionType())
{
- action = gSavedSettings.getString("NotificationConferenceIMOptions");
+ action = gSavedSettings.getString("NotificationConferenceIMOptions");
}
else if(session->isGroupSessionType())
{
- action = gSavedSettings.getString("NotificationGroupChatOptions");
+ action = gSavedSettings.getString("NotificationGroupChatOptions");
}
- // do not show notification in "do not disturb" mode or it goes from agent
- if (gAgent.isDoNotDisturb() || gAgent.getID() == participant_id)
- {
- return;
- }
+ // do not show notification in "do not disturb" mode or it goes from agent
+ if (gAgent.isDoNotDisturb() || gAgent.getID() == participant_id)
+ {
+ return;
+ }
- // execution of the action
+ // execution of the action
- if ("toast" == action)
- {
- // Skip toasting if we have open window of IM with this session id
+ if ("toast" == action)
+ {
+ // Skip toasting if we have open window of IM with this session id
LLFloaterIMSession* open_im_floater = LLFloaterIMSession::findInstance(session_id);
if (
- open_im_floater
- && open_im_floater->isInVisibleChain()
- && open_im_floater->hasFocus()
- && !open_im_floater->isMinimized()
- && !(open_im_floater->getHost()
- && open_im_floater->getHost()->isMinimized())
- )
+ open_im_floater
+ && open_im_floater->isInVisibleChain()
+ && open_im_floater->hasFocus()
+ && !open_im_floater->isMinimized()
+ && !(open_im_floater->getHost()
+ && open_im_floater->getHost()->isMinimized())
+ )
{
return;
}
- // Skip toasting for system messages
- if (participant_id.isNull())
- {
- return;
- }
+ // Skip toasting for system messages
+ if (participant_id.isNull())
+ {
+ return;
+ }
//Show toast
- LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
- }
- else if ("flash" == action)
- {
- LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
- if (im_box)
+ LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
+ }
+ else if ("flash" == action)
+ {
+ LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+ if (im_box)
{
- im_box->flashConversationItemWidget(session_id, true); // flashing of the conversation's item
+ im_box->flashConversationItemWidget(session_id, true); // flashing of the conversation's item
}
gToolBarView->flashCommand(LLCommandId("chat"), true); // flashing of the FUI button "Chat"
- }
+ }
+ else if("openconversations" == action)
+ {
+ LLFloaterReg::showInstance("im_container");
+ }
}
LLIMModel::LLIMModel()
@@ -1725,7 +1729,7 @@ BOOL LLCallDialog::postBuild()
return FALSE;
dockToToolbarButton("speak");
-
+
return TRUE;
}
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 3a26f14772..37491e5b58 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -6200,10 +6200,8 @@ void LLVivoxVoiceClient::lookupName(const LLUUID &id)
void LLVivoxVoiceClient::onAvatarNameCache(const LLUUID& agent_id,
const LLAvatarName& av_name)
{
- // For Vivox, we use the legacy name because I'm uncertain whether or
- // not their service can tolerate switching to Username or Display Name
- std::string legacy_name = av_name.getLegacyName();
- avatarNameResolved(agent_id, legacy_name);
+ std::string display_name = av_name.mDisplayName;
+ avatarNameResolved(agent_id, display_name);
}
void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string &name)
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index 712e8bff7f..0c94b6b223 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -135,6 +135,10 @@
name="FriendIMOptions"
width="223">
<combo_box.item
+ label="Open Conversations window"
+ name="OpenConversationsWindow"
+ value="openconversations"/>
+ <combo_box.item
label="Pop up the message"
name="PopUpMessage"
value="toast"/>
@@ -166,6 +170,10 @@
name="NonFriendIMOptions"
width="223">
<combo_box.item
+ label="Open Conversations window"
+ name="OpenConversationsWindow"
+ value="openconversations"/>
+ <combo_box.item
label="Pop up the message"
name="PopUpMessage"
value="toast"/>
@@ -197,6 +205,10 @@
name="ConferenceIMOptions"
width="223">
<combo_box.item
+ label="Open Conversations window"
+ name="OpenConversationsWindow"
+ value="openconversations"/>
+ <combo_box.item
label="Pop up the message"
name="PopUpMessage"
value="toast"/>
@@ -228,6 +240,10 @@
name="GroupChatOptions"
width="223">
<combo_box.item
+ label="Open Conversations window"
+ name="OpenConversationsWindow"
+ value="openconversations"/>
+ <combo_box.item
label="Pop up the message"
name="PopUpMessage"
value="toast"/>
@@ -259,6 +275,10 @@
name="NearbyChatOptions"
width="223">
<combo_box.item
+ label="Open Conversations window"
+ name="OpenConversationsWindow"
+ value="openconversations"/>
+ <combo_box.item
label="Pop up the message"
name="PopUpMessage"
value="toast"/>