aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelgroupgeneral.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llpanelgroupgeneral.cpp
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpanelgroupgeneral.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp
index e2572f1..1709ad2 100644
--- a/linden/indra/newview/llpanelgroupgeneral.cpp
+++ b/linden/indra/newview/llpanelgroupgeneral.cpp
@@ -33,7 +33,7 @@
33 33
34#include "llpanelgroupgeneral.h" 34#include "llpanelgroupgeneral.h"
35 35
36#include "llvieweruictrlfactory.h" 36#include "lluictrlfactory.h"
37#include "llagent.h" 37#include "llagent.h"
38#include "roles_constants.h" 38#include "roles_constants.h"
39#include "llfloateravatarinfo.h" 39#include "llfloateravatarinfo.h"
@@ -304,7 +304,7 @@ void LLPanelGroupGeneral::onCommitTitle(LLUICtrl* ctrl, void* data)
304{ 304{
305 LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data; 305 LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data;
306 if (self->mGroupID.isNull() || !self->mAllowEdit) return; 306 if (self->mGroupID.isNull() || !self->mAllowEdit) return;
307 gGroupMgr->sendGroupTitleUpdate(self->mGroupID,self->mComboActiveTitle->getCurrentID()); 307 LLGroupMgr::getInstance()->sendGroupTitleUpdate(self->mGroupID,self->mComboActiveTitle->getCurrentID());
308 self->update(GC_TITLES); 308 self->update(GC_TITLES);
309} 309}
310 310
@@ -329,7 +329,7 @@ void LLPanelGroupGeneral::onClickJoin(void *userdata)
329 329
330 lldebugs << "joining group: " << self->mGroupID << llendl; 330 lldebugs << "joining group: " << self->mGroupID << llendl;
331 331
332 LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(self->mGroupID); 332 LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(self->mGroupID);
333 333
334 if (gdatap) 334 if (gdatap)
335 { 335 {
@@ -350,7 +350,7 @@ void LLPanelGroupGeneral::onClickJoin(void *userdata)
350 } 350 }
351 else 351 else
352 { 352 {
353 llwarns << "gGroupMgr->getGroupData(" << self->mGroupID 353 llwarns << "LLGroupMgr::getInstance()->getGroupData(" << self->mGroupID
354 << ") was NULL" << llendl; 354 << ") was NULL" << llendl;
355 } 355 }
356} 356}
@@ -366,7 +366,7 @@ void LLPanelGroupGeneral::joinDlgCB(S32 which, void *userdata)
366 return; 366 return;
367 } 367 }
368 368
369 gGroupMgr->sendGroupMemberJoin(self->mGroupID); 369 LLGroupMgr::getInstance()->sendGroupMemberJoin(self->mGroupID);
370} 370}
371 371
372// static 372// static
@@ -392,17 +392,17 @@ bool LLPanelGroupGeneral::needsApply(LLString& mesg)
392 392
393void LLPanelGroupGeneral::activate() 393void LLPanelGroupGeneral::activate()
394{ 394{
395 LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mGroupID); 395 LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
396 if (mGroupID.notNull() 396 if (mGroupID.notNull()
397 && (!gdatap || mFirstUse)) 397 && (!gdatap || mFirstUse))
398 { 398 {
399 gGroupMgr->sendGroupTitlesRequest(mGroupID); 399 LLGroupMgr::getInstance()->sendGroupTitlesRequest(mGroupID);
400 gGroupMgr->sendGroupPropertiesRequest(mGroupID); 400 LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mGroupID);
401 401
402 402
403 if (!gdatap || !gdatap->isMemberDataComplete() ) 403 if (!gdatap || !gdatap->isMemberDataComplete() )
404 { 404 {
405 gGroupMgr->sendGroupMembersRequest(mGroupID); 405 LLGroupMgr::getInstance()->sendGroupMembersRequest(mGroupID);
406 } 406 }
407 407
408 mFirstUse = FALSE; 408 mFirstUse = FALSE;
@@ -446,12 +446,12 @@ bool LLPanelGroupGeneral::apply(LLString& mesg)
446 LLString::format_map_t args; 446 LLString::format_map_t args;
447 args["[MESSAGE]"] = mConfirmGroupCreateStr; 447 args["[MESSAGE]"] = mConfirmGroupCreateStr;
448 gViewerWindow->alertXml("GenericAlertYesCancel", args, 448 gViewerWindow->alertXml("GenericAlertYesCancel", args,
449 createGroupCallback,this); 449 createGroupCallback,new LLHandle<LLPanel>(getHandle()));
450 450
451 return false; 451 return false;
452 } 452 }
453 453
454 LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mGroupID); 454 LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
455 455
456 if (!gdatap) 456 if (!gdatap)
457 { 457 {
@@ -496,7 +496,7 @@ bool LLPanelGroupGeneral::apply(LLString& mesg)
496 496
497 if (can_change_ident || can_change_member_opts) 497 if (can_change_ident || can_change_member_opts)
498 { 498 {
499 gGroupMgr->sendUpdateGroupInfo(mGroupID); 499 LLGroupMgr::getInstance()->sendUpdateGroupInfo(mGroupID);
500 } 500 }
501 } 501 }
502 502
@@ -526,7 +526,10 @@ void LLPanelGroupGeneral::cancel()
526// static 526// static
527void LLPanelGroupGeneral::createGroupCallback(S32 option, void* userdata) 527void LLPanelGroupGeneral::createGroupCallback(S32 option, void* userdata)
528{ 528{
529 LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)userdata; 529 LLHandle<LLPanel> panel_handle = *(LLHandle<LLPanel>*)userdata;
530 delete (LLHandle<LLPanel>*)userdata;
531
532 LLPanelGroupGeneral* self = dynamic_cast<LLPanelGroupGeneral*>(panel_handle.get());
530 if (!self) return; 533 if (!self) return;
531 534
532 switch(option) 535 switch(option)
@@ -537,7 +540,7 @@ void LLPanelGroupGeneral::createGroupCallback(S32 option, void* userdata)
537 U32 enrollment_fee = (self->mCtrlEnrollmentFee->get() ? 540 U32 enrollment_fee = (self->mCtrlEnrollmentFee->get() ?
538 (U32) self->mSpinEnrollmentFee->get() : 0); 541 (U32) self->mSpinEnrollmentFee->get() : 0);
539 542
540 gGroupMgr->sendCreateGroupRequest(self->mGroupNameEditor->getText(), 543 LLGroupMgr::getInstance()->sendCreateGroupRequest(self->mGroupNameEditor->getText(),
541 self->mEditCharter->getText(), 544 self->mEditCharter->getText(),
542 self->mCtrlShowInGroupList->get(), 545 self->mCtrlShowInGroupList->get(),
543 self->mInsignia->getImageAssetID(), 546 self->mInsignia->getImageAssetID(),
@@ -563,7 +566,7 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
563{ 566{
564 if (mGroupID.isNull()) return; 567 if (mGroupID.isNull()) return;
565 568
566 LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mGroupID); 569 LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
567 570
568 if (!gdatap) return; 571 if (!gdatap) return;
569 572
@@ -734,7 +737,7 @@ void LLPanelGroupGeneral::updateMembers()
734{ 737{
735 mPendingMemberUpdate = FALSE; 738 mPendingMemberUpdate = FALSE;
736 739
737 LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mGroupID); 740 LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
738 741
739 if (!mListVisibleMembers || !gdatap 742 if (!mListVisibleMembers || !gdatap
740 || !gdatap->isMemberDataComplete()) 743 || !gdatap->isMemberDataComplete())