diff options
| author | Andrew Dyukov <adyukov@productengine.com> | 2010-08-10 19:16:18 +0300 | 
|---|---|---|
| committer | Andrew Dyukov <adyukov@productengine.com> | 2010-08-10 19:16:18 +0300 | 
| commit | 79be630d0830a50c7c40bf8a787ccbeced82caf4 (patch) | |
| tree | 42128d07b9d9298c2546e44a0ba87f929805c3e8 /indra/newview | |
| parent | f88890afe5fa45e25f196a2546620102935887aa (diff) | |
EXT-8255 FIXED Added confirmation dialog when removing items.
Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/849/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llfolderview.cpp | 12 | ||||
| -rw-r--r-- | indra/newview/llfolderview.h | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 13 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 4 | 
4 files changed, 31 insertions, 0 deletions
| diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index e8891d1cc5..ab36a76153 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -62,6 +62,7 @@  #include "llviewerwindow.h"  #include "llvoavatar.h"  #include "llfloaterproperties.h" +#include "llnotificationsutil.h"  // Linden library includes  #include "lldbstrings.h" @@ -1024,6 +1025,17 @@ void LLFolderView::closeRenamer( void )  void LLFolderView::removeSelectedItems( void )  { +	if (mSelectedItems.empty()) return; +	LLSD args; +	args["QUESTION"] = LLTrans::getString(mSelectedItems.size() > 1 ? "DeleteItems" :  "DeleteItem"); +	LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLFolderView::onItemsRemovalConfirmation, this, _1, _2)); +} + +void LLFolderView::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response) +{ +	S32 option = LLNotificationsUtil::getSelectedOption(notification, response); +	if (option != 0) return; // canceled +  	if(getVisible() && getEnabled())  	{  		// just in case we're removing the renaming item. diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index a7763e8eeb..f5f229a602 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -293,6 +293,8 @@ protected:  	BOOL addNoOptions(LLMenuGL* menu) const; +	void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response); +  protected:  	LLHandle<LLView>					mPopupMenuHandle; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 3576462cca..609a9b09be 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4023,6 +4023,19 @@ Are you sure you want to quit?    <notification     icon="alertmodal.tga" +   name="DeleteItems" +   type="alertmodal"> +    [QUESTION] +    <usetemplate +     ignoretext="Confirm before deleting items" +     name="okcancelignore" +     notext="Cancel" +     yestext="OK"/> +    <unique/> +  </notification> + +  <notification +   icon="alertmodal.tga"     name="HelpReportAbuseEmailLL"     type="alert">  Use this tool to report violations of the [http://secondlife.com/corporate/tos.php Terms of Service] and [http://secondlife.com/corporate/cs.php Community Standards]. diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 9941732c30..2aa34b746b 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3258,4 +3258,8 @@ Abuse Report</string>    <string name="Notices">Notices</string>    <string name="Chat">Chat</string> +  <!-- Question strings for delete items notifications --> +  <string name="DeleteItems">Delete selected items?</string> +  <string name="DeleteItem">Delete selected item?</string> +    </strings> | 
