FIRE-2700: Delete notecard confirmation

Cinders 2013-11-30 19:22:29 -07:00
parent 5dba68ae80
commit c6896185f8
3 changed files with 40 additions and 0 deletions

View File

@ -403,6 +403,15 @@ void LLPreviewNotecard::onClickSave(void* user_data)
// static
void LLPreviewNotecard::onClickDelete(void* user_data)
{
// [FS:CR] FIRE-2700
LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data;
LLNotificationsUtil::add("DeleteNotecard", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleDeleteChangesDialog, preview, _1, _2));
}
// static
void LLPreviewNotecard::onConfirmDelete(void* user_data)
{
// [/FS:CR]
LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data;
if(preview)
{
@ -628,4 +637,17 @@ bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const
return false;
}
// [FS:CR] FIRE-2700
bool LLPreviewNotecard::handleDeleteChangesDialog(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
LLPreviewNotecard::onConfirmDelete((void*)this);
}
return false;
}
// [/FS:CR]
// EOF

View File

@ -102,6 +102,11 @@ protected:
S32 status, LLExtStat ext_status);
bool handleSaveChangesDialog(const LLSD& notification, const LLSD& response);
// [FS:CR] FIRE-2700
bool handleDeleteChangesDialog(const LLSD& notification, const LLSD& response);
static void onConfirmDelete(void* user_data);
// [FS:CR]
protected:
LLViewerTextEditor* mEditor;

View File

@ -1168,6 +1168,19 @@ Save Changes?
yestext="Save"/>
</notification>
<notification
icon="alertmodal.tga"
name="DeleteNotecard"
type="alertmodal">
Are you sure you want to delete this notecard?
<tag>confirm</tag>
<usetemplate
ignoretext="Confirm notecard deletion"
name="okcancelignore"
notext="Cancel"
yestext="Ok"/>
</notification>
<notification
icon="alertmodal.tga"
name="GestureSaveFailedTooManySteps"