From 0cd1988ef7f6f0b0330938fc44c7e35004114609 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Thu, 22 Sep 2011 14:41:44 +0300 Subject: EXP-1223 FIXED (Create and register a floater for Places side tab) - Added xml for a new floater and registred it in the floaterreg - Removed side tray dependencies - Added static helper method: LLFloaterSidePanelContainer::showPanel --- indra/newview/llpanelplaces.cpp | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'indra/newview/llpanelplaces.cpp') diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 1e510a2d7b..0129ac753a 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -39,6 +39,7 @@ #include "llfiltereditor.h" #include "llfirstuse.h" #include "llfloaterreg.h" +#include "llfloatersidepanelcontainer.h" #include "llmenubutton.h" #include "llnotificationsutil.h" #include "lltabcontainer.h" @@ -115,7 +116,7 @@ public: LLSD key; key["type"] = "remote_place"; key["id"] = parcel_id; - LLSideTray::getInstance()->showPanel("panel_places", key); + LLFloaterSidePanelContainer::showPanel("places", key); return true; } } @@ -151,18 +152,16 @@ class LLPlacesInventoryObserver : public LLInventoryAddedObserver { public: LLPlacesInventoryObserver(LLPanelPlaces* places_panel) : - mPlaces(places_panel), - mTabsCreated(false) + mPlaces(places_panel) {} /*virtual*/ void changed(U32 mask) { LLInventoryAddedObserver::changed(mask); - if (!mTabsCreated && mPlaces) + if (mPlaces && !mPlaces->tabsCreated()) { mPlaces->createTabs(); - mTabsCreated = true; } } @@ -175,7 +174,6 @@ protected: private: LLPanelPlaces* mPlaces; - bool mTabsCreated; }; class LLPlacesRemoteParcelInfoObserver : public LLRemoteParcelInfoObserver @@ -244,7 +242,8 @@ LLPanelPlaces::LLPanelPlaces() mPlaceMenu(NULL), mLandmarkMenu(NULL), mPosGlobal(), - isLandmarkEditModeOn(false) + isLandmarkEditModeOn(false), + mTabsCreated(false) { mParcelObserver = new LLPlacesParcelObserver(this); mInventoryObserver = new LLPlacesInventoryObserver(this); @@ -252,7 +251,7 @@ LLPanelPlaces::LLPanelPlaces() gInventory.addObserver(mInventoryObserver); - LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback( + mAgentParcelChangedConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback( boost::bind(&LLPanelPlaces::updateVerbs, this)); //buildFromFile( "panel_places.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder() @@ -268,6 +267,11 @@ LLPanelPlaces::~LLPanelPlaces() delete mInventoryObserver; delete mParcelObserver; delete mRemoteParcelObserver; + + if (mAgentParcelChangedConnection.connected()) + { + mAgentParcelChangedConnection.disconnect(); + } } BOOL LLPanelPlaces::postBuild() @@ -349,6 +353,9 @@ BOOL LLPanelPlaces::postBuild() LLComboBox* folder_combo = mLandmarkInfo->getChild("folder_combo"); folder_combo->setCommitCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this)); + createTabs(); + updateVerbs(); + return TRUE; } @@ -1025,7 +1032,7 @@ void LLPanelPlaces::changedParcelSelection() void LLPanelPlaces::createTabs() { - if (!(gInventory.isInventoryUsable() && LLTeleportHistory::getInstance())) + if (!(gInventory.isInventoryUsable() && LLTeleportHistory::getInstance() && !mTabsCreated)) return; LLLandmarksPanel* landmarks_panel = new LLLandmarksPanel(); @@ -1059,6 +1066,8 @@ void LLPanelPlaces::createTabs() // Filter applied to show all items. if (mActivePanel) mActivePanel->onSearchEdit(mActivePanel->getFilterSubString()); + + mTabsCreated = true; } void LLPanelPlaces::changedGlobalPos(const LLVector3d &global_pos) -- cgit v1.2.3 From 9d3fc5d930bd1dae07771350080e5140c0113891 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Thu, 29 Sep 2011 21:43:07 +0300 Subject: EXP-1209 FIXED Sidetray removed. - Removed all sidetray dependencies and the sidetray itself. - Also removed LLFloaterSidetrayTab and LLSidetrayListener as unused. --- indra/newview/llpanelplaces.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llpanelplaces.cpp') diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 0129ac753a..7f8f9b29af 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -65,7 +65,6 @@ #include "llpanelplaceprofile.h" #include "llpanelteleporthistory.h" #include "llremoteparcelrequest.h" -#include "llsidetray.h" #include "llteleporthistorystorage.h" #include "lltoggleablemenu.h" #include "llviewerinventory.h" -- cgit v1.2.3