diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 852add435..1be856fdb 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -154,7 +154,6 @@ public: LLLoginRefreshHandler gLoginRefreshHandler; - //--------------------------------------------------------------------------- // Public methods //--------------------------------------------------------------------------- @@ -191,7 +190,7 @@ LLPanelLogin::LLPanelLogin(const LLRect& rect) password_edit->setCommitCallback(mungePassword, this); password_edit->setDrawAsterixes(TRUE); - getChild("remove_login")->setCommitCallback(boost::bind(&LLPanelLogin::removeLogin, this)); + getChild("remove_login")->setCommitCallback(boost::bind(&LLPanelLogin::confirmDelete, this)); // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("channel_text")); @@ -1132,8 +1131,14 @@ void LLPanelLogin::clearPassword() sInstance->mMungedPassword = blank; } -void LLPanelLogin::removeLogin() +void LLPanelLogin::confirmDelete() { + LLNotificationsUtil::add("ConfirmDeleteUser", LLSD(), LLSD(), boost::bind(&LLPanelLogin::removeLogin, this, boost::bind(LLNotificationsUtil::getSelectedOption, _1, _2))); +} + +void LLPanelLogin::removeLogin(bool not) +{ + if (not) return; LLComboBox* combo(getChild("username_combo")); const std::string label(combo->getTextEntry()); if (combo->isTextDirty() || !combo->itemExists(label)) return; // Text entries aren't in the list diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 1030eb332..6ede5cd35 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -118,7 +118,8 @@ private: void onLoginComboLostFocus(LLComboBox* combo_box); static void onNameCheckChanged(LLUICtrl* ctrl, void* data); static void clearPassword(); - void removeLogin(); + void confirmDelete(); + void removeLogin(bool not); public: diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml index eadbfe982..3fb2d93fe 100644 --- a/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/indra/newview/skins/default/xui/en-us/notifications.xml @@ -9780,6 +9780,17 @@ AntiSpam: Blocked newline flood from [SOURCE] (over [AMOUNT] newlines). + +Are you sure you want to delete the selected user? + + + - + -