diff options
author | Palmer <palmer@lindenlab.com> | 2009-08-06 14:51:11 -0700 |
---|---|---|
committer | Palmer <palmer@lindenlab.com> | 2009-08-06 14:51:11 -0700 |
commit | b2632c50efc12eacdcadace64e6c0f1906b86ff6 (patch) | |
tree | c32d7e9b29e37d5c30ac16dfac55733456d7eee0 /indra/newview/lltoolbar.cpp | |
parent | 27cf39cdbf27fe52dcf9c70cfdadcc18ddf2e75c (diff) | |
parent | a8d216e194327c7bee8a42c983f7f2ca01adb385 (diff) |
Merge of my DEV-36732 work and all the main line login api work that went on.
Diffstat (limited to 'indra/newview/lltoolbar.cpp')
-rw-r--r-- | indra/newview/lltoolbar.cpp | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index d27958c2ac..5478e0005a 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -52,7 +52,7 @@ #include "lluiconstants.h" #include "llvoavatarself.h" #include "lltooldraganddrop.h" -#include "llinventoryview.h" +#include "llfloaterinventory.h" #include "llfloaterchatterbox.h" #include "llfloaterfriends.h" #include "llfloatersnapshot.h" @@ -157,7 +157,7 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, LLButton* inventory_btn = getChild<LLButton>("inventory_btn"); if (!inventory_btn) return FALSE; - LLInventoryView* active_inventory = LLInventoryView::getActiveInventory(); + LLFloaterInventory* active_inventory = LLFloaterInventory::getActiveInventory(); LLRect button_screen_rect; inventory_btn->localRectToScreen(inventory_btn->getRect(),&button_screen_rect); @@ -173,7 +173,7 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, if (!(active_inventory && active_inventory->getVisible()) && mInventoryAutoOpenTimer.getElapsedTimeF32() > sInventoryAutoOpenTime) { - LLInventoryView::showAgentInventory(); + LLFloaterInventory::showAgentInventory(); } } else @@ -253,7 +253,7 @@ void LLToolBar::refresh() BOOL sitting = FALSE; if (gAgent.getAvatarObject()) { - sitting = gAgent.getAvatarObject()->mIsSitting; + sitting = gAgent.getAvatarObject()->isSitting(); } if (!gAgent.canFly()) @@ -332,8 +332,11 @@ void LLToolBar::updateCommunicateList() communicate_button->addSeparator(ADD_TOP); communicate_button->add(getString("Redock Windows"), LLSD("redock"), ADD_TOP); communicate_button->addSeparator(ADD_TOP); - communicate_button->add(LLFloaterReg::getTypedInstance<LLFloaterMute>("mute")->getShortTitle(), LLSD("mute list"), ADD_TOP); - + LLFloaterMute* mute_instance = LLFloaterReg::getTypedInstance<LLFloaterMute>("mute"); + if(mute_instance) + { + communicate_button->add(mute_instance->getShortTitle(), LLSD("mute list"), ADD_TOP); + } std::set<LLHandle<LLFloater> >::const_iterator floater_handle_it; if (gIMMgr->getIMFloaterHandles().size() > 0) @@ -385,25 +388,29 @@ void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, const LLSD& user_data) } else if (selected_option.asString() == "redock") { - LLFloaterChatterBox::getInstance()->addFloater(LLFloaterMyFriends::getInstance(), FALSE); - LLFloaterChatterBox::getInstance()->addFloater(LLFloaterChat::getInstance(), FALSE); - LLUUID session_to_show; - - std::set<LLHandle<LLFloater> >::const_iterator floater_handle_it; - for(floater_handle_it = gIMMgr->getIMFloaterHandles().begin(); floater_handle_it != gIMMgr->getIMFloaterHandles().end(); ++floater_handle_it) + LLFloaterChatterBox* chatterbox_instance = LLFloaterChatterBox::getInstance(); + if(chatterbox_instance) { - LLFloater* im_floaterp = floater_handle_it->get(); - if (im_floaterp) + chatterbox_instance->addFloater(LLFloaterMyFriends::getInstance(), FALSE); + chatterbox_instance->addFloater(LLFloaterChat::getInstance(), FALSE); + + LLUUID session_to_show; + + std::set<LLHandle<LLFloater> >::const_iterator floater_handle_it; + for(floater_handle_it = gIMMgr->getIMFloaterHandles().begin(); floater_handle_it != gIMMgr->getIMFloaterHandles().end(); ++floater_handle_it) { - if (im_floaterp->isFrontmost()) + LLFloater* im_floaterp = floater_handle_it->get(); + if (im_floaterp) { - session_to_show = ((LLFloaterIMPanel*)im_floaterp)->getSessionID(); + if (im_floaterp->isFrontmost()) + { + session_to_show = ((LLFloaterIMPanel*)im_floaterp)->getSessionID(); + } + chatterbox_instance->addFloater(im_floaterp, FALSE); } - LLFloaterChatterBox::getInstance()->addFloater(im_floaterp, FALSE); } + LLFloaterReg::showInstance("communicate", session_to_show); } - - LLFloaterReg::showInstance("communicate", session_to_show); } else if (selected_option.asString() == "mute list") { |