summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llconversationview.cpp')
-rwxr-xr-xindra/newview/llconversationview.cpp28
1 files changed, 25 insertions, 3 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 416e6da2da..f9a3a05e59 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -32,6 +32,8 @@
#include <boost/bind.hpp>
#include "llagentdata.h"
#include "llconversationmodel.h"
+#include "llimfloater.h"
+#include "llnearbychat.h"
#include "llimconversation.h"
#include "llimfloatercontainer.h"
#include "llfloaterreg.h"
@@ -405,21 +407,41 @@ void LLConversationViewParticipant::draw()
static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE);
- const BOOL filled = show_context || (getRoot() ? getRoot()->getParentPanel()->hasFocus() : FALSE); // If we have keyboard focus, draw selection filled
const LLFontGL* font = getLabelFontForStyle(mLabelStyle);
F32 right_x = 0;
F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad;
F32 text_left = (F32)getLabelXPos();
- LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor;
+ LLColor4 color = mIsSelected ? sHighlightFgColor : sFgColor;
- drawHighlight(show_context, filled, sHighlightBgColor, sFocusOutlineColor, sMouseOverColor);
+ drawHighlight(show_context, true, sHighlightBgColor, sFocusOutlineColor, sMouseOverColor);
drawLabel(font, text_left, y, color, right_x);
LLView::draw();
}
+void LLConversationViewParticipant::selectItem()
+{
+ LLConversationItem* vmi = this->getParentFolder() ? static_cast<LLConversationItem*>(this->getParentFolder()->getViewModelItem()) : NULL;
+
+ if(vmi)
+ {
+ //When null, show the nearby chat conversation floater
+ if(vmi->getUUID().isNull())
+ {
+ LLNearbyChat* nearbyChat = LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat");
+ nearbyChat->show();
+ }
+ //Otherwise, show the IM conversation floater
+ else
+ {
+ LLIMFloater::show(vmi->getUUID());
+ }
+ }
+
+ LLFolderViewItem::selectItem();
+}
void LLConversationViewParticipant::refresh()
{