From 9f0890fc3a6931562843e4597c009778424ee5bc Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Tue, 11 Oct 2011 16:17:23 -0700 Subject: EXP-1293 Nearby chat toasts no longer appear. EXP-1316 Minimized Snapshot floater has a snapshot preview image attached below. EXP-1318 Clicking on nearby chat toasts should bring up Nearby Chat history --- indra/newview/llchatitemscontainerctrl.cpp | 5 +++-- indra/newview/llfloatersnapshot.cpp | 2 +- indra/newview/llnearbychatbar.cpp | 10 ++++++++++ indra/newview/llnearbychatbar.h | 2 ++ indra/newview/llnearbychathandler.cpp | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 8584885bc9..9a84280f25 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -35,6 +35,7 @@ #include "llfloaterreg.h" #include "lllocalcliprect.h" #include "lltrans.h" +#include "llnearbychatbar.h" #include "llviewercontrol.h" #include "llagentdata.h" @@ -315,12 +316,12 @@ BOOL LLNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask) return TRUE; else { - LLFloaterReg::showInstance("nearby_chat",LLSD()); + LLNearbyChatBar::getInstance()->showHistory(); return FALSE; } } - LLFloaterReg::showInstance("nearby_chat",LLSD()); + LLNearbyChatBar::getInstance()->showHistory(); return LLPanel::handleMouseUp(x,y,mask); } diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 9d020517d8..8105844b0d 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -2217,7 +2217,7 @@ void LLFloaterSnapshot::draw() LLFloater::draw(); - if (previewp) + if (previewp && !isMinimized()) { if(previewp->getThumbnailImage()) { diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 3073a19d83..cd84275ef0 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -135,6 +135,16 @@ LLNearbyChatBar* LLNearbyChatBar::getInstance() return LLFloaterReg::getTypedInstance("chat_bar"); } +void LLNearbyChatBar::showHistory() +{ + if (!getChildView("nearby_chat")->getVisible()) + { + onToggleNearbyChatPanel(); + } + + openFloater(); +} + void LLNearbyChatBar::draw() { displaySpeakingIndicator(); diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index a6fd6e5665..5a7edac1bb 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -59,6 +59,8 @@ public: static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); + void showHistory(); + protected: static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str); static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata); diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index dcf444b048..7503164fe6 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -581,7 +581,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not sChatWatcher->post(notification); - if( nearby_chat->getVisible() + if( chat_bar->getVisible() && nearby_chat->getVisible() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT && gSavedSettings.getBOOL("UseChatBubbles") ) || !mChannel->getShowToasts() ) // to prevent toasts in Busy mode -- cgit v1.2.3 From dacfe7b2bdc845640f18db33992924033494e470 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 11 Oct 2011 16:20:02 -0700 Subject: EXP-1300 : Fix caret position in bottom bar, fix misplacement when moving within same toolbar, suppress visible caret in some situations, no caret if toolbar empty --- indra/llui/lltoolbar.cpp | 5 +++-- indra/newview/lltoolbarview.cpp | 27 +++++++++++++++++++++------ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index d4633d7c3b..a1ea4ba18b 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -425,12 +425,12 @@ int LLToolBar::getRankFromPosition(S32& x, S32& y) } if (it_button != end_button) { - x = button_rect.mRight + dx; + x = button_rect.mLeft + dx; y = button_rect.mTop + dy; } else { - x = button_rect.mLeft + dx; + x = button_rect.mRight + dx; y = button_rect.mBottom + dy; } @@ -655,6 +655,7 @@ void LLToolBar::draw() LLUICtrl::draw(); caret->setVisible(FALSE); + mDragAndDropTarget = false; } void LLToolBar::reshape(S32 width, S32 height, BOOL called_from_parent) diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 8ae9328f6d..86f6477710 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -406,20 +406,35 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t if (command) { // Convert the (x,y) position in rank in toolbar - int rank = 0; + int new_rank = LLToolBar::RANK_NONE; if (!toolbar->isReadOnly()) { - rank = toolbar->getRankFromPosition(x,y); + new_rank = toolbar->getRankFromPosition(x,y); } // Suppress the command from the toolbars (including the one it's dropped in, // this will handle move position). - gToolBarView->mToolbarLeft->removeCommand(command_id); - gToolBarView->mToolbarRight->removeCommand(command_id); - gToolBarView->mToolbarBottom->removeCommand(command_id); + int old_rank = LLToolBar::RANK_NONE; + int rank; + if ((rank = gToolBarView->mToolbarLeft->removeCommand(command_id)) != LLToolBar::RANK_NONE) + { + old_rank = rank; + } + if ((rank = gToolBarView->mToolbarRight->removeCommand(command_id)) != LLToolBar::RANK_NONE) + { + old_rank = rank; + } + if ((rank = gToolBarView->mToolbarBottom->removeCommand(command_id)) != LLToolBar::RANK_NONE) + { + old_rank = rank; + } // Now insert it in the toolbar at the detected rank if (!toolbar->isReadOnly()) { - toolbar->addCommand(command->id(),rank); + if ((old_rank != LLToolBar::RANK_NONE) && (old_rank < new_rank)) + { + new_rank -= 1; + } + toolbar->addCommand(command->id(),new_rank); } } else -- cgit v1.2.3