summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llnearbychat.cpp9
-rw-r--r--indra/newview/llnearbychat.h1
-rw-r--r--indra/newview/llnotificationgrouphandler.cpp14
-rw-r--r--indra/newview/llnotificationhandler.h3
4 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index ac806d7106..8bf964f0a7 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -292,5 +292,12 @@ void LLNearbyChat::getAllowedRect(LLRect& rect)
{
rect = gViewerWindow->getWorldViewRectRaw();
}
-
+void LLNearbyChat::setMinimized (BOOL minimize)
+{
+ if(minimize && !isDocked())
+ {
+ setVisible(FALSE);
+ }
+ LLDockableFloater::setMinimized(minimize);
+}
diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h
index cb4654654a..ac3f346538 100644
--- a/indra/newview/llnearbychat.h
+++ b/indra/newview/llnearbychat.h
@@ -57,6 +57,7 @@ public:
/*virtual*/ void onOpen (const LLSD& key);
virtual void setRect (const LLRect &rect);
+ virtual void setMinimized (BOOL minimize);
private:
virtual void applySavedVariables();
diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp
index fc6fb25644..26730e1f10 100644
--- a/indra/newview/llnotificationgrouphandler.cpp
+++ b/indra/newview/llnotificationgrouphandler.cpp
@@ -37,6 +37,7 @@
#include "llgroupactions.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
+#include "llnotificationmanager.h"
using namespace LLNotificationsUI;
@@ -47,6 +48,9 @@ LLGroupHandler::LLGroupHandler(e_notification_type type, const LLSD& id)
// Getting a Channel for our notifications
mChannel = LLChannelManager::getInstance()->createNotificationChannel();
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ if(channel)
+ channel->setOnRejectToastCallback(boost::bind(&LLGroupHandler::onRejectToast, this, _1));
}
//--------------------------------------------------------------------------
@@ -118,5 +122,15 @@ void LLGroupHandler::onDeleteToast(LLToast* toast)
}
//--------------------------------------------------------------------------
+void LLGroupHandler::onRejectToast(LLUUID& id)
+{
+ LLNotificationPtr notification = LLNotifications::instance().find(id);
+
+ if (notification && LLNotificationManager::getInstance()->getHandlerForNotification(notification->getType()) == this)
+ {
+ LLNotifications::instance().cancel(notification);
+ }
+}
+//--------------------------------------------------------------------------
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index 23998a0e5d..42cc7cacc2 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -209,6 +209,9 @@ public:
protected:
virtual void onDeleteToast(LLToast* toast);
virtual void initChannel();
+
+ // own handlers
+ void onRejectToast(LLUUID& id);
};
/**