merge from PE's viewer-trunk
commit
32fe67ec2f
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -293,6 +293,8 @@ protected:
|
|||
|
||||
BOOL addNoOptions(LLMenuGL* menu) const;
|
||||
|
||||
void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response);
|
||||
|
||||
protected:
|
||||
LLHandle<LLView> mPopupMenuHandle;
|
||||
|
||||
|
|
|
|||
|
|
@ -4021,6 +4021,19 @@ Are you sure you want to quit?
|
|||
<unique/>
|
||||
</notification>
|
||||
|
||||
<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"
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue