diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llpanelgroup.cpp | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-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 'linden/indra/newview/llpanelgroup.cpp')
-rw-r--r-- | linden/indra/newview/llpanelgroup.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/linden/indra/newview/llpanelgroup.cpp b/linden/indra/newview/llpanelgroup.cpp index b6f4681..84f6594 100644 --- a/linden/indra/newview/llpanelgroup.cpp +++ b/linden/indra/newview/llpanelgroup.cpp | |||
@@ -42,7 +42,7 @@ | |||
42 | #include "lltabcontainer.h" | 42 | #include "lltabcontainer.h" |
43 | #include "lltextbox.h" | 43 | #include "lltextbox.h" |
44 | #include "llviewermessage.h" | 44 | #include "llviewermessage.h" |
45 | #include "llvieweruictrlfactory.h" | 45 | #include "lluictrlfactory.h" |
46 | #include "llviewerwindow.h" | 46 | #include "llviewerwindow.h" |
47 | #include "llappviewer.h" | 47 | #include "llappviewer.h" |
48 | 48 | ||
@@ -160,16 +160,16 @@ LLPanelGroup::LLPanelGroup(const std::string& filename, | |||
160 | mFactoryMap["roles_sub_tab"] = LLCallbackMap(LLPanelGroupRolesSubTab::createTab, &mID); | 160 | mFactoryMap["roles_sub_tab"] = LLCallbackMap(LLPanelGroupRolesSubTab::createTab, &mID); |
161 | mFactoryMap["actions_sub_tab"] = LLCallbackMap(LLPanelGroupActionsSubTab::createTab, &mID); | 161 | mFactoryMap["actions_sub_tab"] = LLCallbackMap(LLPanelGroupActionsSubTab::createTab, &mID); |
162 | 162 | ||
163 | gGroupMgr->addObserver(this); | 163 | LLGroupMgr::getInstance()->addObserver(this); |
164 | 164 | ||
165 | // Pass on construction of this panel to the control factory. | 165 | // Pass on construction of this panel to the control factory. |
166 | gUICtrlFactory->buildPanel(this, filename, &getFactoryMap()); | 166 | LLUICtrlFactory::getInstance()->buildPanel(this, filename, &getFactoryMap()); |
167 | mFilename = filename; | 167 | mFilename = filename; |
168 | } | 168 | } |
169 | 169 | ||
170 | LLPanelGroup::~LLPanelGroup() | 170 | LLPanelGroup::~LLPanelGroup() |
171 | { | 171 | { |
172 | gGroupMgr->removeObserver(this); | 172 | LLGroupMgr::getInstance()->removeObserver(this); |
173 | 173 | ||
174 | int i; | 174 | int i; |
175 | int tab_count = mTabContainer->getTabCount(); | 175 | int tab_count = mTabContainer->getTabCount(); |
@@ -360,9 +360,9 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) | |||
360 | { | 360 | { |
361 | LLRect rect(getRect()); | 361 | LLRect rect(getRect()); |
362 | 362 | ||
363 | gGroupMgr->removeObserver(this); | 363 | LLGroupMgr::getInstance()->removeObserver(this); |
364 | mID = group_id; | 364 | mID = group_id; |
365 | gGroupMgr->addObserver(this); | 365 | LLGroupMgr::getInstance()->addObserver(this); |
366 | //TODO: this is really bad, we should add a method | 366 | //TODO: this is really bad, we should add a method |
367 | // where the panels can just update themselves | 367 | // where the panels can just update themselves |
368 | // on a group id change. Similar to update() but with a group | 368 | // on a group id change. Similar to update() but with a group |
@@ -371,7 +371,7 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) | |||
371 | // For now, rebuild panel | 371 | // For now, rebuild panel |
372 | //delete children and rebuild panel | 372 | //delete children and rebuild panel |
373 | deleteAllChildren(); | 373 | deleteAllChildren(); |
374 | gUICtrlFactory->buildPanel(this, mFilename, &getFactoryMap()); | 374 | LLUICtrlFactory::getInstance()->buildPanel(this, mFilename, &getFactoryMap()); |
375 | } | 375 | } |
376 | 376 | ||
377 | void LLPanelGroup::selectTab(std::string tab_name) | 377 | void LLPanelGroup::selectTab(std::string tab_name) |
@@ -603,7 +603,7 @@ void LLPanelGroup::draw() | |||
603 | 603 | ||
604 | void LLPanelGroup::refreshData() | 604 | void LLPanelGroup::refreshData() |
605 | { | 605 | { |
606 | gGroupMgr->clearGroupData(getID()); | 606 | LLGroupMgr::getInstance()->clearGroupData(getID()); |
607 | mCurrentTab->activate(); | 607 | mCurrentTab->activate(); |
608 | 608 | ||
609 | // 5 second timeout | 609 | // 5 second timeout |
@@ -616,14 +616,13 @@ void LLPanelGroup::close() | |||
616 | { | 616 | { |
617 | // Pass this to the parent, if it is a floater. | 617 | // Pass this to the parent, if it is a floater. |
618 | LLView* viewp = getParent(); | 618 | LLView* viewp = getParent(); |
619 | if (viewp | 619 | LLFloater* floaterp = dynamic_cast<LLFloater*>(viewp); |
620 | && WIDGET_TYPE_FLOATER == viewp->getWidgetType()) | 620 | if (floaterp) |
621 | { | 621 | { |
622 | // First, set the force close flag, since the floater | 622 | // First, set the force close flag, since the floater |
623 | // will be asking us whether it can close. | 623 | // will be asking us whether it can close. |
624 | mForceClose = TRUE; | 624 | mForceClose = TRUE; |
625 | // Tell the parent floater to close. | 625 | // Tell the parent floater to close. |
626 | LLFloater* floaterp = (LLFloater*) viewp; | ||
627 | floaterp->close(); | 626 | floaterp->close(); |
628 | } | 627 | } |
629 | } | 628 | } |