summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateroutbox.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-12-09 16:19:03 -0800
committerLeslie Linden <leslie@lindenlab.com>2011-12-09 16:19:03 -0800
commitcc92db1f353de96f6d27863b92671b2d847536f4 (patch)
tree75dccadc2f25115712cd48040bb11c5c424ee196 /indra/newview/llfloateroutbox.cpp
parent8878a5e561f292a8afcd933eaafb2c4c65b7bf7f (diff)
Moved outbox import confirmations to window shades on the merchant outbox floater, rather than modal dialogs.
Diffstat (limited to 'indra/newview/llfloateroutbox.cpp')
-rw-r--r--indra/newview/llfloateroutbox.cpp61
1 files changed, 60 insertions, 1 deletions
diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp
index 619be87187..8d64214e8c 100644
--- a/indra/newview/llfloateroutbox.cpp
+++ b/indra/newview/llfloateroutbox.cpp
@@ -33,11 +33,32 @@
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
#include "llmarketplacefunctions.h"
+#include "llnotificationhandler.h"
#include "llnotificationsutil.h"
#include "lltextbox.h"
#include "lltransientfloatermgr.h"
#include "lltrans.h"
#include "llviewernetwork.h"
+#include "llwindowshade.h"
+
+
+///----------------------------------------------------------------------------
+/// LLOutboxNotification class
+///----------------------------------------------------------------------------
+
+bool LLNotificationsUI::LLOutboxNotification::processNotification(const LLSD& notify)
+{
+ LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
+
+ if (notification)
+ {
+ LLFloaterOutbox* outbox_floater = LLFloaterReg::getTypedInstance<LLFloaterOutbox>("outbox");
+
+ outbox_floater->showNotification(notification);
+ }
+
+ return false;
+}
///----------------------------------------------------------------------------
@@ -89,6 +110,7 @@ LLFloaterOutbox::LLFloaterOutbox(const LLSD& key)
, mInventoryText(NULL)
, mInventoryTitle(NULL)
, mImportButton(NULL)
+ , mWindowShade(NULL)
{
}
@@ -121,6 +143,16 @@ BOOL LLFloaterOutbox::postBuild()
return TRUE;
}
+void LLFloaterOutbox::onClose(bool app_quitting)
+{
+ if (mWindowShade)
+ {
+ delete mWindowShade;
+
+ mWindowShade = NULL;
+ }
+}
+
void LLFloaterOutbox::onOpen(const LLSD& key)
{
//
@@ -275,7 +307,8 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
// Pass drag and drop to this floater to the outbox inventory control
- if (LLMarketplaceInventoryImporter::getInstance()->isImportInProgress())
+ if (LLMarketplaceInventoryImporter::getInstance()->isImportInProgress() ||
+ (mWindowShade && mWindowShade->isShown()))
{
return FALSE;
}
@@ -369,3 +402,29 @@ void LLFloaterOutbox::importStatusChanged(bool inProgress)
}
}
+void LLFloaterOutbox::showNotification(LLNotificationPtr notify)
+{
+ if (mWindowShade)
+ {
+ delete mWindowShade;
+ }
+
+ LLRect floater_rect = getLocalRect();
+ floater_rect.mTop -= getHeaderHeight();
+ floater_rect.stretch(-5, 0);
+
+ LLWindowShade::Params params;
+ params.name = "notification_shade";
+ params.rect = floater_rect;
+ params.follows.flags = FOLLOWS_ALL;
+ params.notification = notify;
+ params.modal = true;
+ params.can_close = false;
+ params.text_color = LLColor4::white;
+
+ mWindowShade = LLUICtrlFactory::create<LLWindowShade>(params);
+
+ addChild(mWindowShade);
+ mWindowShade->show();
+}
+