summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroup.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-10-16 23:20:05 +0000
committerJames Cook <james@lindenlab.com>2009-10-16 23:20:05 +0000
commita4c657a49dd055cdc773c95b04713f403ea9c44c (patch)
treeab4731917d9d330c636773d4ce5015f59dd070a4 /indra/newview/llpanelgroup.cpp
parente3c4b5ad26e6c4583fc2a736aea1370cc06ac6b2 (diff)
Group inspectors now work. They are hooked up to About Land, build tools floater, and anywhere secondlife:///app/group URLs appear. Reviewed with Leyla.
Diffstat (limited to 'indra/newview/llpanelgroup.cpp')
-rw-r--r--indra/newview/llpanelgroup.cpp46
1 files changed, 7 insertions, 39 deletions
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<LLPanelGroup*>(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()