summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateroutbox.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-12-19 17:29:17 -0800
committerLeslie Linden <leslie@lindenlab.com>2011-12-19 17:29:17 -0800
commit744484699cec728f60463755d409fbde681429ea (patch)
tree76be938014fa17b443dd55c7e210e53f784c370b /indra/newview/llfloateroutbox.cpp
parent6c26fdea4d62f723c3bdbec9ded032e6d77301b8 (diff)
EXP-1749 FIX -- Merchant outbox import completion messages are to be modal dialogs
* Merchant outbox completion messages now shown as modal dialogs rather than window shades.
Diffstat (limited to 'indra/newview/llfloateroutbox.cpp')
-rw-r--r--indra/newview/llfloateroutbox.cpp42
1 files changed, 32 insertions, 10 deletions
diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp
index 239ba7ad4d..b97cc54dd1 100644
--- a/indra/newview/llfloateroutbox.cpp
+++ b/indra/newview/llfloateroutbox.cpp
@@ -36,6 +36,7 @@
#include "llinventorypanel.h"
#include "llmarketplacefunctions.h"
#include "llnotificationhandler.h"
+#include "llnotificationmanager.h"
#include "llnotificationsutil.h"
#include "lltextbox.h"
#include "lltransientfloatermgr.h"
@@ -43,6 +44,8 @@
#include "llviewernetwork.h"
#include "llwindowshade.h"
+#define USE_WINDOWSHADE_DIALOGS 0
+
///----------------------------------------------------------------------------
/// LLOutboxNotification class
@@ -50,14 +53,9 @@
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);
- }
+ LLFloaterOutbox* outbox_floater = LLFloaterReg::getTypedInstance<LLFloaterOutbox>("outbox");
+
+ outbox_floater->showNotification(notify);
return false;
}
@@ -413,6 +411,7 @@ void LLFloaterOutbox::onOutboxChanged()
}
fetchOutboxContents();
+
updateView();
}
@@ -464,8 +463,19 @@ void LLFloaterOutbox::importStatusChanged(bool inProgress)
}
}
-void LLFloaterOutbox::showNotification(LLNotificationPtr notify)
+void LLFloaterOutbox::showNotification(const LLSD& notify)
{
+ LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
+
+ if (!notification)
+ {
+ llerrs << "Unable to find outbox notification!" << notify.asString() << llendl;
+
+ return;
+ }
+
+#if USE_WINDOWSHADE_DIALOGS
+
if (mWindowShade)
{
delete mWindowShade;
@@ -487,6 +497,18 @@ void LLFloaterOutbox::showNotification(LLNotificationPtr notify)
mWindowShade = LLUICtrlFactory::create<LLWindowShade>(params);
addChild(mWindowShade);
- mWindowShade->show(notify);
+ mWindowShade->show(notification);
+
+#else
+
+ LLNotificationsUI::LLEventHandler * handler =
+ LLNotificationsUI::LLNotificationManager::instance().getHandlerForNotification("alertmodal");
+
+ LLNotificationsUI::LLSysHandler * sys_handler = dynamic_cast<LLNotificationsUI::LLSysHandler *>(handler);
+ llassert(sys_handler);
+
+ sys_handler->processNotification(notify);
+
+#endif
}