diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloateroutbox.cpp | 42 | ||||
-rw-r--r-- | indra/newview/llfloateroutbox.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 4 |
3 files changed, 35 insertions, 13 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 } diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 5cb487be64..cc4a7207ca 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -64,7 +64,7 @@ public: EAcceptance* accept, std::string& tooltip_msg); - void showNotification(LLNotificationPtr notify); + void showNotification(const LLSD& notify); protected: void fetchOutboxContents(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 871a9d4a1d..858764006f 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -203,8 +203,8 @@ Save changes to current clothing/body part? icon="alertmodal.tga" name="ConfirmNoCopyToOutbox" type="alertmodal"> - You don't have permission to copy this item to the Marketplace Outbox. Are you sure you want to move the following item? - [ITEM_NAME] +You don't have permission to copy this item to the Marketplace Outbox. Are you sure you want to move the following item? +[ITEM_NAME] <usetemplate name="okcancelbuttons" notext="No" |