From 8aa424128ad06567f4c32c6672dc63d9b2111efa Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Thu, 11 Oct 2012 10:38:34 -0700 Subject: CHUI-380: Before code review changes. Now the user selects a conversation or participant of a conversation the correct chat floater will appear. Focus will be redirected to the chat input text box automatically allowing the user to type into the input text box. --- indra/newview/llconversationview.cpp | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'indra/newview/llconversationview.cpp') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index d4eb551f7a..112c38d8b8 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -32,6 +32,8 @@ #include #include "llagentdata.h" #include "llconversationmodel.h" +#include "llimfloater.h" +#include "llnearbychat.h" #include "llimconversation.h" #include "llimfloatercontainer.h" #include "llfloaterreg.h" @@ -407,21 +409,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(this->getParentFolder()->getViewModelItem()) : NULL; + + if(vmi) + { + //When null, show the nearby chat conversation floater + if(vmi->getUUID().isNull()) + { + LLNearbyChat* nearbyChat = LLFloaterReg::findTypedInstance("nearby_chat"); + nearbyChat->show(); + } + //Otherwise, show the IM conversation floater + else + { + LLIMFloater::show(vmi->getUUID()); + } + } + + LLFolderViewItem::selectItem(); +} void LLConversationViewParticipant::refresh() { -- cgit v1.2.3 From f4b10aaebbaf8eb66d41ffa703f6ed7b909ba7e7 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Thu, 11 Oct 2012 17:48:39 -0700 Subject: CHUI-380: Fixing a bug that occurred when right clicking nearby chat and then right clicking a participant under a conversation. This would result in both the participant and conversation to be highlighted. Still a work in progress. This change involves introducing an old bug CHUI 289 and finding a different approach to solving it. --- indra/newview/llconversationview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llconversationview.cpp') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index f9a3a05e59..70f2446752 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -415,7 +415,7 @@ void LLConversationViewParticipant::draw() F32 text_left = (F32)getLabelXPos(); LLColor4 color = mIsSelected ? sHighlightFgColor : sFgColor; - drawHighlight(show_context, true, sHighlightBgColor, sFocusOutlineColor, sMouseOverColor); + drawHighlight(show_context, mIsSelected, sHighlightBgColor, sFocusOutlineColor, sMouseOverColor); drawLabel(font, text_left, y, color, right_x); LLView::draw(); -- cgit v1.2.3 From d7d0416547958792517a9b739b370e51c717fb23 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Fri, 12 Oct 2012 20:15:57 -0700 Subject: CHUI-380: (In progress) Refactoring needed to fix focusing issues when selecting an existing conversation item. This commit resolves re-introducing bug CHUI-289. Will code review and cleanup code in next commit. --- indra/newview/llconversationview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llconversationview.cpp') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 70f2446752..637f30635e 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -424,8 +424,10 @@ void LLConversationViewParticipant::draw() void LLConversationViewParticipant::selectItem() { LLConversationItem* vmi = this->getParentFolder() ? static_cast(this->getParentFolder()->getViewModelItem()) : NULL; - - if(vmi) + LLIMFloaterContainer* container = LLIMFloaterContainer::getInstance(); + + //Only execute when switching floaters (conversations) + if(vmi && vmi->getUUID() != container->getSelectedSession()) { //When null, show the nearby chat conversation floater if(vmi->getUUID().isNull()) -- cgit v1.2.3 From d0f9600f37a87b2d6c7a2c3cfbbc5d793e505872 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Mon, 15 Oct 2012 16:06:02 -0700 Subject: CHUI-380: Bug fix after merge. When selecting the participant of a conversation focus would be lost on the converstation floater. This was because focus would be set to the participant folder item. Resolution: Now delegate focus from the particiapnt folder item to the conversation floater. --- indra/newview/llconversationview.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llconversationview.cpp') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 637f30635e..b7ebb70e86 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -425,6 +425,7 @@ void LLConversationViewParticipant::selectItem() { LLConversationItem* vmi = this->getParentFolder() ? static_cast(this->getParentFolder()->getViewModelItem()) : NULL; LLIMFloaterContainer* container = LLIMFloaterContainer::getInstance(); + LLFloater* session_floater; //Only execute when switching floaters (conversations) if(vmi && vmi->getUUID() != container->getSelectedSession()) @@ -441,6 +442,12 @@ void LLConversationViewParticipant::selectItem() LLIMFloater::show(vmi->getUUID()); } } + //Focus the current conversation floater (it is already visible so just focus it) + else + { + session_floater = LLIMConversation::getConversation(vmi->getUUID()); + session_floater->setFocus(TRUE); + } LLFolderViewItem::selectItem(); } -- cgit v1.2.3 From ae093e02a126666c9137d9eb6d9aeea0c1c73a8a Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 16 Oct 2012 11:38:36 -0700 Subject: CHUI-380: Realized that the when clicking the participant/conversation item that the active session wasn't being stored. This caused the right side conversation floater to not change when selecting a participant under a conersation. Resolution: now when clicking on a conversation or participant the active session is stored using setActiveSession(). --- indra/newview/llconversationview.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llconversationview.cpp') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index b7ebb70e86..1b450665b3 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -242,6 +242,9 @@ void LLConversationViewSession::selectItem() // Set the focus on the selected floater session_floater->setFocus(TRUE); + // Store the active session + LLIMFloaterContainer::getInstance()->setSelectedSession(item->getUUID()); + LLFolderViewItem::selectItem(); } @@ -441,6 +444,9 @@ void LLConversationViewParticipant::selectItem() { LLIMFloater::show(vmi->getUUID()); } + + // Store the active session + container->setSelectedSession(vmi->getUUID()); } //Focus the current conversation floater (it is already visible so just focus it) else -- cgit v1.2.3 From 30a04430df02c6f3e949af0e457fe4ed49474ee3 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Wed, 17 Oct 2012 19:16:13 +0300 Subject: CHUI-419 FIXED Selecting the drop down arrow to list participants for a conversation does not select that conversation --- indra/newview/llconversationview.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llconversationview.cpp') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 1b450665b3..9144f402b4 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -222,6 +222,13 @@ void LLConversationViewSession::toggleOpen() if (!mMinimizedMode) { LLFolderViewFolder::toggleOpen(); + + // do item's selection when opened + if (LLFolderViewFolder::isOpen()) + { + getParentFolder()->setSelection(this, true); + } + } } -- cgit v1.2.3