diff options
author | McCabe Maxsted | 2009-11-09 14:58:57 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-11-09 14:58:57 -0700 |
commit | b6f4e9794116c10e30e61e926f40fb68c86141af (patch) | |
tree | 7416a21fbe2b788b828cf394057c70b2bdbbda9f /linden/indra/newview/panelradar.cpp | |
parent | Removed RLVa temporarily from First Use (diff) | |
download | meta-impy-b6f4e9794116c10e30e61e926f40fb68c86141af.zip meta-impy-b6f4e9794116c10e30e61e926f40fb68c86141af.tar.gz meta-impy-b6f4e9794116c10e30e61e926f40fb68c86141af.tar.bz2 meta-impy-b6f4e9794116c10e30e61e926f40fb68c86141af.tar.xz |
Moved 1.2 alerts to the new notification system
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/panelradar.cpp | 51 |
1 files changed, 29 insertions, 22 deletions
diff --git a/linden/indra/newview/panelradar.cpp b/linden/indra/newview/panelradar.cpp index e85af44..1a5f2d4 100644 --- a/linden/indra/newview/panelradar.cpp +++ b/linden/indra/newview/panelradar.cpp | |||
@@ -656,11 +656,11 @@ void PanelRadar::onClickAddFriend(void* user_data) | |||
656 | // Estate tab | 656 | // Estate tab |
657 | // | 657 | // |
658 | 658 | ||
659 | //static | ||
660 | void PanelRadar::callbackFreeze(S32 option, void *user_data) | ||
661 | { | ||
662 | PanelRadar *self = (PanelRadar*)user_data; | ||
663 | 659 | ||
660 | //static | ||
661 | bool PanelRadar::callbackFreeze(const LLSD& notification, const LLSD& response, PanelRadar *self) | ||
662 | { | ||
663 | S32 option = LLNotification::getSelectedOption(notification, response); | ||
664 | if ( option == 0 ) | 664 | if ( option == 0 ) |
665 | { | 665 | { |
666 | sendFreeze(self->mSelectedAvatar, true); | 666 | sendFreeze(self->mSelectedAvatar, true); |
@@ -669,14 +669,14 @@ void PanelRadar::callbackFreeze(S32 option, void *user_data) | |||
669 | { | 669 | { |
670 | sendFreeze(self->mSelectedAvatar, false); | 670 | sendFreeze(self->mSelectedAvatar, false); |
671 | } | 671 | } |
672 | return false; | ||
672 | } | 673 | } |
673 | 674 | ||
674 | 675 | ||
675 | //static | 676 | //static |
676 | void PanelRadar::callbackEject(S32 option, void *user_data) | 677 | bool PanelRadar::callbackEject(const LLSD& notification, const LLSD& response, PanelRadar *self) |
677 | { | 678 | { |
678 | PanelRadar *self = (PanelRadar*)user_data; | 679 | S32 option = LLNotification::getSelectedOption(notification, response); |
679 | |||
680 | if ( option == 0 ) | 680 | if ( option == 0 ) |
681 | { | 681 | { |
682 | sendEject(self->mSelectedAvatar, false); | 682 | sendEject(self->mSelectedAvatar, false); |
@@ -685,14 +685,14 @@ void PanelRadar::callbackEject(S32 option, void *user_data) | |||
685 | { | 685 | { |
686 | sendEject(self->mSelectedAvatar, true); | 686 | sendEject(self->mSelectedAvatar, true); |
687 | } | 687 | } |
688 | return false; | ||
688 | } | 689 | } |
689 | 690 | ||
690 | 691 | ||
691 | //static | 692 | //static |
692 | void PanelRadar::callbackEjectFromEstate(S32 option, void *user_data) | 693 | bool PanelRadar::callbackEjectFromEstate(const LLSD& notification, const LLSD& response, PanelRadar *self) |
693 | { | 694 | { |
694 | PanelRadar *self = (PanelRadar*)user_data; | 695 | S32 option = LLNotification::getSelectedOption(notification, response); |
695 | |||
696 | if ( option == 0 ) | 696 | if ( option == 0 ) |
697 | { | 697 | { |
698 | cmdEstateEject(self->mSelectedAvatar); | 698 | cmdEstateEject(self->mSelectedAvatar); |
@@ -701,16 +701,19 @@ void PanelRadar::callbackEjectFromEstate(S32 option, void *user_data) | |||
701 | { | 701 | { |
702 | cmdEstateBan(self->mSelectedAvatar); | 702 | cmdEstateBan(self->mSelectedAvatar); |
703 | } | 703 | } |
704 | return false; | ||
704 | } | 705 | } |
705 | 706 | ||
706 | 707 | ||
707 | void PanelRadar::onClickFreeze(void *user_data) | 708 | void PanelRadar::onClickFreeze(void *user_data) |
708 | { | 709 | { |
709 | PanelRadar *self = (PanelRadar*)user_data; | 710 | PanelRadar *self = (PanelRadar*)user_data; |
710 | LLStringUtil::format_map_t args; | 711 | LLSD args; |
711 | LLSD payload; | 712 | args["AVATAR_NAME"] = getSelectedName(self->mSelectedAvatar); |
712 | args["[AVATAR_NAME]"] = getSelectedName(self->mSelectedAvatar); | 713 | LLNotifications::instance().add("FreezeAvatarFullname", |
713 | gViewerWindow->alertXml("FreezeAvatarFullname", args, callbackFreeze, user_data); | 714 | args, |
715 | LLSD(), | ||
716 | boost::bind(&callbackFreeze, _1, _2, self)); | ||
714 | } | 717 | } |
715 | 718 | ||
716 | 719 | ||
@@ -718,10 +721,12 @@ void PanelRadar::onClickFreeze(void *user_data) | |||
718 | void PanelRadar::onClickEject(void *user_data) | 721 | void PanelRadar::onClickEject(void *user_data) |
719 | { | 722 | { |
720 | PanelRadar *self = (PanelRadar*)user_data; | 723 | PanelRadar *self = (PanelRadar*)user_data; |
721 | LLStringUtil::format_map_t args; | 724 | LLSD args; |
722 | LLSD payload; | ||
723 | args["AVATAR_NAME"] = getSelectedName(self->mSelectedAvatar); | 725 | args["AVATAR_NAME"] = getSelectedName(self->mSelectedAvatar); |
724 | gViewerWindow->alertXml("EjectAvatarFullName", args, callbackEject, user_data); | 726 | LLNotifications::instance().add("EjectAvatarFullname", |
727 | args, | ||
728 | LLSD(), | ||
729 | boost::bind(&callbackEject, _1, _2, self)); | ||
725 | } | 730 | } |
726 | 731 | ||
727 | 732 | ||
@@ -777,10 +782,12 @@ void PanelRadar::onClickUnmute(void *user_data) | |||
777 | void PanelRadar::onClickEjectFromEstate(void *user_data) | 782 | void PanelRadar::onClickEjectFromEstate(void *user_data) |
778 | { | 783 | { |
779 | PanelRadar *self = (PanelRadar*)user_data; | 784 | PanelRadar *self = (PanelRadar*)user_data; |
780 | LLStringUtil::format_map_t args; | 785 | LLSD args; |
781 | LLSD payload; | ||
782 | args["EVIL_USER"] = getSelectedName(self->mSelectedAvatar); | 786 | args["EVIL_USER"] = getSelectedName(self->mSelectedAvatar); |
783 | gViewerWindow->alertXml("EstateKickUser", args, callbackEjectFromEstate, user_data); | 787 | LLNotifications::instance().add("EstateKickUser", |
788 | args, | ||
789 | LLSD(), | ||
790 | boost::bind(&callbackEjectFromEstate, _1, _2, self)); | ||
784 | } | 791 | } |
785 | 792 | ||
786 | 793 | ||