diff options
author | Kent Quirk <q@lindenlab.com> | 2009-01-05 18:59:12 +0000 |
---|---|---|
committer | Kent Quirk <q@lindenlab.com> | 2009-01-05 18:59:12 +0000 |
commit | 667ca55bad0108c4bdf8f007b89e1a52fc766aad (patch) | |
tree | 7bd62ac8d9af079c3994565f3f200ccc250bbc28 /indra/newview/llpanelgroupinvite.cpp | |
parent | 95f365789f4cebc7bd97ccefd538f14d481a8373 (diff) |
svn merge -r106715:HEAD svn+ssh://svn.lindenlab.com/svn/linden/branches/q/notifications-merge-r106715 . QAR-1149 -- Final merge of notifications to trunk.
Diffstat (limited to 'indra/newview/llpanelgroupinvite.cpp')
-rw-r--r-- | indra/newview/llpanelgroupinvite.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index c4af61587c..70440dd75a 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -66,7 +66,7 @@ public: static void callbackAddUsers(const std::vector<std::string>& names, const std::vector<LLUUID>& agent_ids, void* user_data); - static void inviteOwnerCallback(S32 option, void* userdata); + bool inviteOwnerCallback(const LLSD& notification, const LLSD& response); public: LLUUID mGroupID; @@ -158,9 +158,9 @@ void LLPanelGroupInvite::impl::submitInvitations() // owner role: display confirmation and wait for callback if ((role_id == gdatap->mOwnerRole) && (!mConfirmedOwnerInvite)) { - LLStringUtil::format_map_t args; - args["[MESSAGE]"] = mOwnerWarning; - gViewerWindow->alertXml("GenericAlertYesCancel", args, inviteOwnerCallback, this); + LLSD args; + args["MESSAGE"] = mOwnerWarning; + LLNotifications::instance().add("GenericAlertYesCancel", args, LLSD(), boost::bind(&LLPanelGroupInvite::impl::inviteOwnerCallback, this, _1, _2)); return; // we'll be called again if user confirms } } @@ -180,24 +180,23 @@ void LLPanelGroupInvite::impl::submitInvitations() (*mCloseCallback)(mCloseCallbackUserData); } -//static -void LLPanelGroupInvite::impl::inviteOwnerCallback(S32 option, void* userdata) +bool LLPanelGroupInvite::impl::inviteOwnerCallback(const LLSD& notification, const LLSD& response) { - LLPanelGroupInvite::impl* self = (LLPanelGroupInvite::impl*)userdata; - if (!self) return; + S32 option = LLNotification::getSelectedOption(notification, response); switch(option) { case 0: // user confirmed that they really want a new group owner - self->mConfirmedOwnerInvite = true; - self->submitInvitations(); + mConfirmedOwnerInvite = true; + submitInvitations(); break; case 1: // fall through default: break; } + return false; } @@ -396,16 +395,14 @@ void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids) if(dest && dest->isAvatar()) { std::string fullname; - LLStringUtil::format_map_t args; + LLSD args; LLNameValue* nvfirst = dest->getNVPair("FirstName"); LLNameValue* nvlast = dest->getNVPair("LastName"); if(nvfirst && nvlast) { - args["[FIRST]"] = nvfirst->getString(); - args["[LAST]"] = nvlast->getString(); - fullname = nvfirst->getString(); - fullname += " "; - fullname += nvlast->getString(); + args["FIRST"] = std::string(nvfirst->getString()); + args["LAST"] = std::string(nvlast->getString()); + fullname = std::string(nvfirst->getString()) + " " + std::string(nvlast->getString()); } if (!fullname.empty()) { |