From a4c657a49dd055cdc773c95b04713f403ea9c44c Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 16 Oct 2009 23:20:05 +0000 Subject: Group inspectors now work. They are hooked up to About Land, build tools floater, and anywhere secondlife:///app/group URLs appear. Reviewed with Leyla. --- indra/newview/llpanelgroup.cpp | 46 +++++++----------------------------------- 1 file changed, 7 insertions(+), 39 deletions(-) (limited to 'indra/newview/llpanelgroup.cpp') diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 206d8428be..f9e93a1d38 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -33,19 +33,22 @@ #include "llpanelgroup.h" +// Library includes #include "llbutton.h" #include "lltabcontainer.h" #include "lltextbox.h" -#include "llviewermessage.h" #include "lluictrlfactory.h" + +// Viewer includes +#include "llviewermessage.h" #include "llviewerwindow.h" #include "llappviewer.h" #include "llnotifications.h" #include "llfloaterreg.h" #include "llfloater.h" +#include "llgroupactions.h" #include "llagent.h" -#include "llstatusbar.h" // can_afford_transaction() #include "llsidetraypanelcontainer.h" @@ -274,46 +277,11 @@ void LLPanelGroup::onBtnApply(void* user_data) LLPanelGroup* self = static_cast(user_data); self->apply(); } + void LLPanelGroup::onBtnJoin() { lldebugs << "joining group: " << mID << llendl; - - LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mID); - - if (gdatap) - { - S32 cost = gdatap->mMembershipFee; - LLSD args; - args["COST"] = llformat("%d", cost); - LLSD payload; - payload["group_id"] = mID; - - if (can_afford_transaction(cost)) - { - LLNotifications::instance().add("JoinGroupCanAfford", args, payload, LLPanelGroup::joinDlgCB); - } - else - { - LLNotifications::instance().add("JoinGroupCannotAfford", args, payload); - } - } - else - { - llwarns << "LLGroupMgr::getInstance()->getGroupData(" << mID << ") was NULL" << llendl; - } -} -bool LLPanelGroup::joinDlgCB(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotification::getSelectedOption(notification, response); - - if (option == 1) - { - // user clicked cancel - return false; - } - - LLGroupMgr::getInstance()->sendGroupMemberJoin(notification["payload"]["group_id"].asUUID()); - return false; + LLGroupActions::join(mID); } void LLPanelGroup::onBtnCancel() -- cgit v1.2.3