diff options
| -rw-r--r-- | indra/llui/llwindowshade.cpp | 5 | ||||
| -rw-r--r-- | indra/llui/llwindowshade.h | 2 | ||||
| -rw-r--r-- | indra/newview/llfloateroutbox.cpp | 61 | ||||
| -rw-r--r-- | indra/newview/llfloateroutbox.h | 8 | ||||
| -rw-r--r-- | indra/newview/llnotificationhandler.h | 10 | ||||
| -rw-r--r-- | indra/newview/llnotificationmanager.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/textures/textures.xml | 19 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 35 | 
8 files changed, 112 insertions, 30 deletions
| diff --git a/indra/llui/llwindowshade.cpp b/indra/llui/llwindowshade.cpp index cf76202215..b21c088a1f 100644 --- a/indra/llui/llwindowshade.cpp +++ b/indra/llui/llwindowshade.cpp @@ -297,6 +297,11 @@ void LLWindowShade::hide()  	setMouseOpaque(false);  } +bool LLWindowShade::isShown() const +{ +	return getChildRef<LLLayoutPanel>("notification_area").getVisible(); +} +  void LLWindowShade::onCloseNotification()  {  	LLNotifications::instance().cancel(mNotification); diff --git a/indra/llui/llwindowshade.h b/indra/llui/llwindowshade.h index 09ffc2cd54..cb8f223a84 100644 --- a/indra/llui/llwindowshade.h +++ b/indra/llui/llwindowshade.h @@ -48,6 +48,8 @@ public:  	void show();  	/*virtual*/ void draw();  	void hide(); +	 +	bool isShown() const;  private:  	friend class LLUICtrlFactory; 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(); +} + diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 3d2ce86144..8023434675 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -30,6 +30,7 @@  #include "llfloater.h"  #include "llfoldertype.h" +#include "llnotificationptr.h"  class LLButton; @@ -37,8 +38,10 @@ class LLInventoryCategoriesObserver;  class LLInventoryCategoryAddedObserver;  class LLInventoryPanel;  class LLLoadingIndicator; +class LLNotification;  class LLTextBox;  class LLView; +class LLWindowShade;  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -55,12 +58,15 @@ public:  	// virtuals  	BOOL postBuild(); +	void onClose(bool app_quitting);  	void onOpen(const LLSD& key);  	BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,  						   EDragAndDropType cargo_type,  						   void* cargo_data,  						   EAcceptance* accept,  						   std::string& tooltip_msg); +	 +	void showNotification(LLNotificationPtr notify);  protected:  	void importReportResults(U32 status, const LLSD& content); @@ -86,6 +92,8 @@ private:  	LLTextBox *				mInventoryTitle;  	LLButton *		mImportButton; +	 +	LLWindowShade *	mWindowShade;  };  #endif // LL_LLFLOATEROUTBOX_H diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 28a69f2373..23dbb6b047 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -283,9 +283,17 @@ class LLBrowserNotification : public LLSingleton<LLBrowserNotification>  {  public:  	virtual bool processNotification(const LLSD& notify); +}; +/** + * Handler for outbox notifications + */ +class LLOutboxNotification : public LLSingleton<LLOutboxNotification> +{ +public: +	virtual bool processNotification(const LLSD& notify);  }; - +	  class LLHandlerUtil  {  public: diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp index 6988227128..6105eff8ea 100644 --- a/indra/newview/llnotificationmanager.cpp +++ b/indra/newview/llnotificationmanager.cpp @@ -62,6 +62,7 @@ void LLNotificationManager::init()  	LLNotificationChannel::buildChannel("Offer", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "offer"));  	LLNotificationChannel::buildChannel("Hints", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "hint"));  	LLNotificationChannel::buildChannel("Browser", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "browser")); +	LLNotificationChannel::buildChannel("Outbox", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "outbox"));  	LLNotifications::instance().getChannel("Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));  	LLNotifications::instance().getChannel("NotificationTips")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); @@ -72,6 +73,7 @@ void LLNotificationManager::init()  	LLNotifications::instance().getChannel("Offer")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));  	LLNotifications::instance().getChannel("Hints")->connectChanged(boost::bind(&LLHintHandler::processNotification, LLHintHandler::getInstance(), _1));  	LLNotifications::instance().getChannel("Browser")->connectChanged(boost::bind(&LLBrowserNotification::processNotification, LLBrowserNotification::getInstance(), _1)); +	LLNotifications::instance().getChannel("Outbox")->connectChanged(boost::bind(&LLOutboxNotification::processNotification, LLOutboxNotification::getInstance(), _1));  	mNotifyHandlers["notify"] = boost::shared_ptr<LLEventHandler>(new LLScriptHandler(NT_NOTIFY, LLSD()));  	mNotifyHandlers["notifytip"] =  boost::shared_ptr<LLEventHandler>(new LLTipHandler(NT_NOTIFY, LLSD())); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 5da1276881..e4a8622a4b 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -387,22 +387,9 @@ with the same filename but different name    <texture name="OptionsMenu_Off" file_name="icons/OptionsMenu_Off.png" preload="false" />    <texture name="OptionsMenu_Press" file_name="icons/OptionsMenu_Press.png" preload="false" /> -  <texture name="OutboxPush_Disabled" file_name="icons/OutboxPush_Disabled.png" preload="true" /> -  <texture name="OutboxPush_Off" file_name="icons/OutboxPush_Off.png" preload="true" /> -  <texture name="OutboxPush_On" file_name="icons/OutboxPush_On.png" preload="true" /> -  <texture name="OutboxPush_On_Over" file_name="icons/OutboxPush_On_Over.png" preload="true" /> -  <texture name="OutboxPush_Over" file_name="icons/OutboxPush_Over.png" preload="true" /> -  <texture name="OutboxPush_Press" file_name="icons/OutboxPush_Press.png" preload="true" /> -  <texture name="OutboxPush_Progress_1" file_name="icons/OutboxPush_Progress_1.png" preload="true" /> -  <texture name="OutboxPush_Progress_2" file_name="icons/OutboxPush_Progress_2.png" preload="true" /> -  <texture name="OutboxPush_Progress_3" file_name="icons/OutboxPush_Progress_3.png" preload="true" /> -  <texture name="OutboxPush_Progress_4" file_name="icons/OutboxPush_Progress_4.png" preload="true" /> -  <texture name="OutboxPush_Progress_5" file_name="icons/OutboxPush_Progress_5.png" preload="true" /> -  <texture name="OutboxPush_Progress_6" file_name="icons/OutboxPush_Progress_6.png" preload="true" /> -  <texture name="OutboxPush_Selected" file_name="icons/OutboxPush_Selected.png" preload="true" /> -  <texture name="OutboxPush_Selected_Disabled" file_name="icons/OutboxPush_Selected_Disabled.png" preload="true" /> -  <texture name="OutboxPush_Selected_Over" file_name="icons/OutboxPush_Selected_Over.png" preload="true" /> -  <texture name="OutboxPush_Selected_Press" file_name="icons/OutboxPush_Selected_Press.png" preload="true" /> +  <texture name="OutboxStatus_Success" file_name="green_checkmark.png" preload="false" /> +  <texture name="OutboxStatus_Warning" file_name="icons/pop_up_caution.png" preload="false" /> +  <texture name="OutboxStatus_Error" file_name="red_x.png" preload="false" />    <texture name="PanOrbit_Off" file_name="bottomtray/PanOrbit_Off.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 8d0d76b58e..b174d51421 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -212,33 +212,44 @@ Save changes to current clothing/body part?      </notification>    <notification -   icon="alertmodal.tga" +   icon="OutboxStatus_Success"     name="OutboxImportComplete" -   type="alertmodal"> -Marketplace import complete. +   type="outbox"> +Success + +All folders were successfully sent to the Marketplace. +          <usetemplate           name="okbutton" -         yestext="Hooray!"/> +         yestext="OK"/>    </notification>    <notification -   icon="alertmodal.tga" +   icon="OutboxStatus_Warning"     name="OutboxImportHadErrors" -   type="alertmodal"> -Marketplace import completed with errors!  Please correct the problems in your outbox and retry.  Thanks. +   type="outbox"> +Some folders did not transfer + +Errors occurred when some folders were sent to the Marketplace.  Those folders are still in your Merchant Outbox.  See the error log for more information. +          <usetemplate           name="okbutton" -         yestext="Boo!"/> +         yestext="OK"/>    </notification>    <notification -   icon="alertmodal.tga" +   icon="OutboxStatus_Error"     name="OutboxImportFailed" -   type="alertmodal"> -Marketplace import failed with error [ERROR_CODE]!  Please try again later.  Thanks. +   type="outbox"> +Transfer failed + +No folders were sent to the Marketplace because of a system or network error.  Try again later. + +Error [ERROR_CODE] +          <usetemplate           name="okbutton" -         yestext="Rats!"/> +         yestext="OK"/>    </notification> | 
