From 0207d7e9e4e5b509b5905256a56ac2138b35cac3 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 27 Sep 2011 15:41:06 -0700 Subject: EXP-1247 Nearby chat as part of chat floater --- indra/newview/llnearbychathandler.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 957b6d5f94..dcf444b048 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -41,6 +41,7 @@ #include "llfloaterreg.h"//for LLFloaterReg::getTypedInstance #include "llviewerwindow.h"//for screen channel position +#include "llnearbychatbar.h" //add LLNearbyChatHandler to LLNotificationsUI namespace using namespace LLNotificationsUI; @@ -473,8 +474,9 @@ LLNearbyChatHandler::~LLNearbyChatHandler() void LLNearbyChatHandler::initChannel() { - LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat", LLSD()); - LLView* chat_box = LLBottomTray::getInstance()->getChildView("chat_box"); + LLNearbyChatBar* chat_bar = LLFloaterReg::getTypedInstance("chat_bar", LLSD()); + LLView* chat_box = chat_bar->getChatBox(); + LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); S32 channel_right_bound = nearby_chat->getRect().mRight; mChannel->init(chat_box->getRect().mLeft, channel_right_bound); } @@ -502,7 +504,10 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not tmp_chat.mText = tmp_chat.mText.substr(3); } - LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat", LLSD()); + LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar"); + + LLNearbyChat* nearby_chat = chat_bar->findChild("nearby_chat"); + { //sometimes its usefull to have no name at all... //if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null) -- cgit v1.2.3 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/llnearbychathandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llnearbychathandler.cpp') 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 bdf6363e6aa4216913607e83bfc5e159f2535407 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Fri, 14 Oct 2011 01:07:16 +0300 Subject: EXP-1282 FIXED Bottom bar removed. - LLBottomTray code and XUI removed. - "Speak" buttom which resided in Bottom bar removed. - Voice connection status update moved from LLBottomTray to LLVivoxVoiceClient. --- indra/newview/llnearbychathandler.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 7503164fe6..49f2dc082c 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -29,7 +29,6 @@ #include "llagentdata.h" // for gAgentID #include "llnearbychathandler.h" -#include "llbottomtray.h" #include "llchatitemscontainerctrl.h" #include "llfirstuse.h" #include "llfloaterscriptdebug.h" -- cgit v1.2.3 From d3ef6289529aafda3675b811ccc3ab9058d54dfa Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 13 Oct 2011 19:16:54 -0700 Subject: EXP-1319 FIX Nearby chat toasts should not underlap toolbars --- indra/newview/llnearbychathandler.cpp | 64 ++++++++++++++++------------------- 1 file changed, 30 insertions(+), 34 deletions(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 7503164fe6..573985b76e 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -42,6 +42,8 @@ #include "llfloaterreg.h"//for LLFloaterReg::getTypedInstance #include "llviewerwindow.h"//for screen channel position #include "llnearbychatbar.h" +#include "llrootview.h" +#include "lllayoutstack.h" //add LLNearbyChatHandler to LLNotificationsUI namespace using namespace LLNotificationsUI; @@ -62,7 +64,7 @@ public: typedef std::vector > toast_vec_t; typedef std::list > toast_list_t; - LLNearbyChatScreenChannel(const LLUUID& id):LLScreenChannelBase(id) + LLNearbyChatScreenChannel(const Params& p):LLScreenChannelBase(p) { mStopProcessing = false; @@ -81,7 +83,6 @@ public: void addNotification (LLSD& notification); void arrangeToasts (); - void showToastsBottom (); typedef boost::function create_toast_panel_callback_t; void setCreatePanelCallback(create_toast_panel_callback_t value) { m_create_toast_panel_callback_t = value;} @@ -150,6 +151,7 @@ protected: toast_list_t m_toast_pool; bool mStopProcessing; + bool mChannelRect; }; //----------------------------------------------------------------------------------------------- @@ -352,27 +354,6 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) arrangeToasts(); } -void LLNearbyChatScreenChannel::arrangeToasts() -{ - if(!isHovering()) - { - showToastsBottom(); - } - - if (m_active_toasts.empty()) - { - LLHints::registerHintTarget("incoming_chat", LLHandle()); - } - else - { - LLToast* toast = m_active_toasts.front().get(); - if (toast) - { - LLHints::registerHintTarget("incoming_chat", m_active_toasts.front().get()->LLView::getHandle()); - } - } -} - static bool sort_toasts_predicate(LLHandle first, LLHandle second) { if (!first.get() || !second.get()) return false; // STORM-1352 @@ -382,14 +363,30 @@ static bool sort_toasts_predicate(LLHandle first, LLHandle sec return v1 > v2; } -void LLNearbyChatScreenChannel::showToastsBottom() +void LLNearbyChatScreenChannel::arrangeToasts() { - if(mStopProcessing) + if(mStopProcessing || isHovering()) + return; + LLLayoutStack::updateClass(); + LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region"); + + if (!getParent()) + { + // connect to floater snap region to get resize events + floater_snap_region->addChild(this); + setFollows(FOLLOWS_ALL); + } + LLRect toast_rect; updateBottom(); - S32 channel_bottom = getRect().mBottom; + + LLRect channel_rect; + floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &channel_rect, gFloaterView); + channel_rect.mRight = channel_rect.mLeft + 300; + + S32 channel_bottom = channel_rect.mBottom; S32 bottom = channel_bottom; S32 margin = gSavedSettings.getS32("ToastGap"); @@ -410,7 +407,7 @@ void LLNearbyChatScreenChannel::showToastsBottom() S32 toast_top = bottom + toast->getRect().getHeight() + margin; - if(toast_top > gFloaterView->getRect().getHeight()) + if(toast_top > channel_rect.getHeight()) { while(it!=m_active_toasts.end()) { @@ -421,7 +418,7 @@ void LLNearbyChatScreenChannel::showToastsBottom() } toast_rect = toast->getRect(); - toast_rect.setLeftTopAndSize(getRect().mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight()); + toast_rect.setLeftTopAndSize(channel_rect.mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight()); toast->setRect(toast_rect); bottom += toast_rect.getHeight() - toast->getTopPad() + margin; @@ -458,7 +455,9 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i mType = type; // Getting a Channel for our notifications - LLNearbyChatScreenChannel* channel = new LLNearbyChatScreenChannel(LLUUID(gSavedSettings.getString("NearByChatChannelUUID"))); + LLNearbyChatScreenChannel::Params p; + p.id = LLUUID(gSavedSettings.getString("NearByChatChannelUUID")); + LLNearbyChatScreenChannel* channel = new LLNearbyChatScreenChannel(p); LLNearbyChatScreenChannel::create_toast_panel_callback_t callback = createToastPanel; @@ -474,11 +473,8 @@ LLNearbyChatHandler::~LLNearbyChatHandler() void LLNearbyChatHandler::initChannel() { - LLNearbyChatBar* chat_bar = LLFloaterReg::getTypedInstance("chat_bar", LLSD()); - LLView* chat_box = chat_bar->getChatBox(); - LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); - S32 channel_right_bound = nearby_chat->getRect().mRight; - mChannel->init(chat_box->getRect().mLeft, channel_right_bound); + //LLRect snap_rect = gFloaterView->getSnapRect(); + //mChannel->init(snap_rect.mLeft, snap_rect.mLeft + 200); } -- cgit v1.2.3 From a0a3790f1c08522a8b8e6fa6fc76eb9fcb0f2120 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 14 Oct 2011 16:06:29 -0700 Subject: updated chat toast with 10 pixel padding --- indra/newview/llnearbychathandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 573985b76e..d39f83875e 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -374,7 +374,7 @@ void LLNearbyChatScreenChannel::arrangeToasts() if (!getParent()) { - // connect to floater snap region to get resize events + // connect to floater snap region just to get resize events, we don't care about being a proper widget floater_snap_region->addChild(this); setFollows(FOLLOWS_ALL); } @@ -384,11 +384,12 @@ void LLNearbyChatScreenChannel::arrangeToasts() LLRect channel_rect; floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &channel_rect, gFloaterView); + channel_rect.mLeft += 10; channel_rect.mRight = channel_rect.mLeft + 300; S32 channel_bottom = channel_rect.mBottom; - S32 bottom = channel_bottom; + S32 bottom = channel_bottom + 10; S32 margin = gSavedSettings.getS32("ToastGap"); //sort active toasts -- cgit v1.2.3 From 0976964f8315aab5879678f07318267b6887ed95 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 14 Oct 2011 18:25:30 -0700 Subject: EXP-1336 FIX Move Notifications to upper right also made toolbar buttons not trigger if enabled callback returns false --- indra/newview/llnearbychathandler.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 3faf190618..1ba1d2f0f0 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -89,8 +89,6 @@ public: void onToastDestroyed (LLToast* toast, bool app_quitting); void onToastFade (LLToast* toast); - void reshape (S32 width, S32 height, BOOL called_from_parent); - void redrawToasts() { arrangeToasts(); @@ -379,7 +377,7 @@ void LLNearbyChatScreenChannel::arrangeToasts() } LLRect toast_rect; - updateBottom(); + updateRect(); LLRect channel_rect; floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &channel_rect, gFloaterView); @@ -436,15 +434,10 @@ void LLNearbyChatScreenChannel::arrangeToasts() } } - } - -void LLNearbyChatScreenChannel::reshape (S32 width, S32 height, BOOL called_from_parent) -{ - LLScreenChannelBase::reshape(width, height, called_from_parent); - arrangeToasts(); } + //----------------------------------------------------------------------------------------------- //LLNearbyChatHandler //----------------------------------------------------------------------------------------------- -- cgit v1.2.3 From ffa53cf63f28539c9bed92dc70f916a7f068de71 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Mon, 17 Oct 2011 16:42:14 +0200 Subject: EXP-1333 FIXED (Move IM toasts to upper right and flip vertically) - Nearby chat toasts flipped vertically - Fixed notification and IM well floaters docking state saving. --- indra/newview/llnearbychathandler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 1ba1d2f0f0..8607718e90 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -384,9 +384,9 @@ void LLNearbyChatScreenChannel::arrangeToasts() channel_rect.mLeft += 10; channel_rect.mRight = channel_rect.mLeft + 300; - S32 channel_bottom = channel_rect.mBottom; + S32 channel_top = channel_rect.mTop; - S32 bottom = channel_bottom + 10; + S32 top = channel_top - 10; S32 margin = gSavedSettings.getS32("ToastGap"); //sort active toasts @@ -403,9 +403,9 @@ void LLNearbyChatScreenChannel::arrangeToasts() continue; } - S32 toast_top = bottom + toast->getRect().getHeight() + margin; + S32 toast_bottom = top - toast->getRect().getHeight() - margin; - if(toast_top > channel_rect.getHeight()) + if(toast_bottom < channel_rect.mBottom) { while(it!=m_active_toasts.end()) { @@ -416,10 +416,10 @@ void LLNearbyChatScreenChannel::arrangeToasts() } toast_rect = toast->getRect(); - toast_rect.setLeftTopAndSize(channel_rect.mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight()); + toast_rect.setOriginAndSize(channel_rect.mLeft , toast_bottom, toast_rect.getWidth() ,toast_rect.getHeight()); toast->setRect(toast_rect); - bottom += toast_rect.getHeight() - toast->getTopPad() + margin; + top -= toast_rect.getHeight() - toast->getTopPad() + margin; } // use reverse order to provide correct z-order and avoid toast blinking -- cgit v1.2.3 From 795695a2db6de25a85fb319e79c44f8a4e1903b2 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 17 Oct 2011 13:55:37 -0700 Subject: EXP-1396 FIX -- Local chat toasts appear is upper left corner, reviewed by Richard. --- indra/newview/llnearbychathandler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 8607718e90..1ba1d2f0f0 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -384,9 +384,9 @@ void LLNearbyChatScreenChannel::arrangeToasts() channel_rect.mLeft += 10; channel_rect.mRight = channel_rect.mLeft + 300; - S32 channel_top = channel_rect.mTop; + S32 channel_bottom = channel_rect.mBottom; - S32 top = channel_top - 10; + S32 bottom = channel_bottom + 10; S32 margin = gSavedSettings.getS32("ToastGap"); //sort active toasts @@ -403,9 +403,9 @@ void LLNearbyChatScreenChannel::arrangeToasts() continue; } - S32 toast_bottom = top - toast->getRect().getHeight() - margin; + S32 toast_top = bottom + toast->getRect().getHeight() + margin; - if(toast_bottom < channel_rect.mBottom) + if(toast_top > channel_rect.getHeight()) { while(it!=m_active_toasts.end()) { @@ -416,10 +416,10 @@ void LLNearbyChatScreenChannel::arrangeToasts() } toast_rect = toast->getRect(); - toast_rect.setOriginAndSize(channel_rect.mLeft , toast_bottom, toast_rect.getWidth() ,toast_rect.getHeight()); + toast_rect.setLeftTopAndSize(channel_rect.mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight()); toast->setRect(toast_rect); - top -= toast_rect.getHeight() - toast->getTopPad() + margin; + bottom += toast_rect.getHeight() - toast->getTopPad() + margin; } // use reverse order to provide correct z-order and avoid toast blinking -- cgit v1.2.3 From dfd1d822ff28046bb24fa41dbd11a636d393a40a Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 17 Oct 2011 15:21:17 -0700 Subject: EXP-1382 FIX -- Viewer crashes when updating UI size in preferences Reviewed by Richard. --- indra/newview/llnearbychathandler.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 1ba1d2f0f0..330a21ef65 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -363,10 +363,8 @@ static bool sort_toasts_predicate(LLHandle first, LLHandle sec void LLNearbyChatScreenChannel::arrangeToasts() { if(mStopProcessing || isHovering()) - return; - LLLayoutStack::updateClass(); LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region"); if (!getParent()) -- cgit v1.2.3