From 9da625d439a9a911733564177e32facc3669dc58 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Thu, 6 Dec 2012 20:28:25 -0800 Subject: CHUI-494: WIP First pass at getting the suppression of events in DND working. --- indra/newview/llviewerwindow.cpp | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1b45e6f85d..7b1cf6e180 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -39,6 +39,7 @@ #include "llagentcamera.h" #include "llfloaterreg.h" #include "llmeshrepository.h" +#include "llnotificationhandler.h" #include "llpanellogin.h" #include "llviewerkeyboard.h" #include "llviewermenu.h" @@ -127,6 +128,7 @@ #include "llmorphview.h" #include "llmoveview.h" #include "llnavigationbar.h" +#include "llnotificationhandler.h" #include "llpanelpathfindingrebakenavmesh.h" #include "llpaneltopinfobar.h" #include "llpopupview.h" @@ -1554,11 +1556,13 @@ LLViewerWindow::LLViewerWindow(const Params& p) mWindowListener.reset(new LLWindowListener(this, boost::lambda::var(gKeyboard))); mViewerWindowListener.reset(new LLViewerWindowListener(this)); - mAlertsChannel.reset(new LLNotificationChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alert"))); - mModalAlertsChannel.reset(new LLNotificationChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alertmodal"))); + mSystemChannel.reset(new LLNotificationChannel("System", "Visible", LLNotificationFilters::includeEverything)); + mCommunicationChannel.reset(new LLNotificationChannel("Communication", "Visible", boost::bind(&LLAgent::isDoNotDisturb, &gAgent))); + mAlertsChannel.reset(new LLNotificationsUI::LLViewerAlertHandler("VW_alerts", "alert")); + mModalAlertsChannel.reset(new LLNotificationsUI::LLViewerAlertHandler("VW_alertmodal", "alertmodal")); - mAlertsChannel->connectChanged(&LLViewerWindow::onAlert); - mModalAlertsChannel->connectChanged(&LLViewerWindow::onAlert); + //mAlertsChannel->connectChanged(&LLViewerWindow::onAlert); + //mModalAlertsChannel->connectChanged(&LLViewerWindow::onAlert); bool ignore = gSavedSettings.getBOOL("IgnoreAllNotifications"); LLNotifications::instance().setIgnoreAllNotifications(ignore); if (ignore) @@ -5001,25 +5005,6 @@ LLRect LLViewerWindow::getChatConsoleRect() //---------------------------------------------------------------------------- -//static -bool LLViewerWindow::onAlert(const LLSD& notify) -{ - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - if (gHeadlessClient) - { - llinfos << "Alert: " << notification->getName() << llendl; - } - - // If we're in mouselook, the mouse is hidden and so the user can't click - // the dialog buttons. In that case, change to First Person instead. - if( gAgentCamera.cameraMouselook() ) - { - gAgentCamera.changeCameraToDefault(); - } - return false; -} - void LLViewerWindow::setUIVisibility(bool visible) { mUIVisible = visible; -- cgit v1.2.3