diff options
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> |