diff options
Diffstat (limited to 'indra/newview/llpanelteleporthistory.cpp')
-rwxr-xr-x | indra/newview/llpanelteleporthistory.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 9c380f63bd..652d2be6f6 100755 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -341,6 +341,7 @@ LLContextMenu* LLTeleportHistoryPanel::ContextMenu::createMenu() registrar.add("TeleportHistory.CopyToClipboard",boost::bind(&LLTeleportHistoryPanel::ContextMenu::onCopyToClipboard, this)); // create the context menu from the XUI + llassert(LLMenuGL::sMenuContainer != NULL); return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( "menu_teleport_history_item.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); } @@ -421,7 +422,7 @@ BOOL LLTeleportHistoryPanel::postBuild() // All accordion tabs are collapsed initially setAccordionCollapsedByUser(tab, true); - mItemContainers.put(tab); + mItemContainers.push_back(tab); LLFlatListView* fl = getFlatListViewFromTab(tab); if (fl) @@ -437,14 +438,14 @@ BOOL LLTeleportHistoryPanel::postBuild() // Open first 2 accordion tabs if (mItemContainers.size() > 1) { - LLAccordionCtrlTab* tab = mItemContainers.get(mItemContainers.size() - 1); + LLAccordionCtrlTab* tab = mItemContainers.at(mItemContainers.size() - 1); tab->setDisplayChildren(true); setAccordionCollapsedByUser(tab, false); } if (mItemContainers.size() > 2) { - LLAccordionCtrlTab* tab = mItemContainers.get(mItemContainers.size() - 2); + LLAccordionCtrlTab* tab = mItemContainers.at(mItemContainers.size() - 2); tab->setDisplayChildren(true); setAccordionCollapsedByUser(tab, false); } @@ -688,7 +689,7 @@ void LLTeleportHistoryPanel::refresh() tab_idx = mItemContainers.size() - 1 - tab_idx; if (tab_idx >= 0) { - LLAccordionCtrlTab* tab = mItemContainers.get(tab_idx); + LLAccordionCtrlTab* tab = mItemContainers.at(tab_idx); tab->setVisible(true); // Expand all accordion tabs when filtering @@ -722,7 +723,7 @@ void LLTeleportHistoryPanel::refresh() mCurrentItem, filter_string); if ( !curr_flat_view->addItem(item, LLUUID::null, ADD_BOTTOM, false) ) - llerrs << "Couldn't add flat item to teleport history." << llendl; + LL_ERRS() << "Couldn't add flat item to teleport history." << LL_ENDL; if (mLastSelectedItemIndex == mCurrentItem) curr_flat_view->selectItem(item, true); } @@ -735,7 +736,7 @@ void LLTeleportHistoryPanel::refresh() for (S32 n = mItemContainers.size() - 1; n >= 0; --n) { - LLAccordionCtrlTab* tab = mItemContainers.get(n); + LLAccordionCtrlTab* tab = mItemContainers.at(n); LLFlatListView* fv = getFlatListViewFromTab(tab); if (fv) { @@ -797,7 +798,7 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index) // to point to the right item in LLTeleportHistoryStorage for (S32 tab_idx = mItemContainers.size() - 1; tab_idx >= 0; --tab_idx) { - LLAccordionCtrlTab* tab = mItemContainers.get(tab_idx); + LLAccordionCtrlTab* tab = mItemContainers.at(tab_idx); if (!tab->getVisible()) continue; @@ -851,7 +852,7 @@ void LLTeleportHistoryPanel::showTeleportHistory() for (S32 n = mItemContainers.size() - 1; n >= 0; --n) { - LLAccordionCtrlTab* tab = mItemContainers.get(n); + LLAccordionCtrlTab* tab = mItemContainers.at(n); if (tab) { tab->setVisible(false); @@ -878,7 +879,7 @@ void LLTeleportHistoryPanel::handleItemSelect(LLFlatListView* selected) for (S32 n = 0; n < tabs_cnt; n++) { - LLAccordionCtrlTab* tab = mItemContainers.get(n); + LLAccordionCtrlTab* tab = mItemContainers.at(n); if (!tab->getVisible()) continue; @@ -935,6 +936,7 @@ void LLTeleportHistoryPanel::onAccordionTabRightClick(LLView *view, S32 x, S32 y registrar.add("TeleportHistory.TabClose", boost::bind(&LLTeleportHistoryPanel::onAccordionTabClose, this, tab)); // create the context menu from the XUI + llassert(LLMenuGL::sMenuContainer != NULL); mAccordionTabMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( "menu_teleport_history_tab.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); @@ -963,7 +965,7 @@ void LLTeleportHistoryPanel::onExpandAllFolders() for (S32 n = 0; n < tabs_cnt; n++) { - mItemContainers.get(n)->setDisplayChildren(true); + mItemContainers.at(n)->setDisplayChildren(true); } mHistoryAccordion->arrange(); } @@ -974,7 +976,7 @@ void LLTeleportHistoryPanel::onCollapseAllFolders() for (S32 n = 0; n < tabs_cnt; n++) { - mItemContainers.get(n)->setDisplayChildren(false); + mItemContainers.at(n)->setDisplayChildren(false); } mHistoryAccordion->arrange(); @@ -1029,7 +1031,7 @@ bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const for (S32 n = 0; n < tabs_cnt; n++) { - LLAccordionCtrlTab* tab = mItemContainers.get(n); + LLAccordionCtrlTab* tab = mItemContainers.at(n); if (!tab->getVisible()) continue; |