diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 2be96b9b78c59e2150cb73b731359079ec4adcb5..de11e866ec590595893f7d4eddf0387269abbb77 100755 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -1217,3 +1217,32 @@ static void onSLURLBuilt(std::string& slurl) LLNotificationsUtil::add("CopySLURL", args); } + +// Ahhhhhhhhhhh! +static LLPanelInjector<LLHackyHackPlacesPanel> t_hacky_places("hacky_places"); + +void LLHackyHackPlacesPanel::createTabs() +{ + if (!LLTeleportHistory::getInstance() && mTabsCreated) return; + + LLTeleportHistoryPanel* teleport_history_panel = new LLTeleportHistoryPanel(); + if (teleport_history_panel) + { + teleport_history_panel->setPanelPlacesButtons(this); + + mTabContainer->addTabPanel(LLTabContainer::TabPanelParams(). + panel(teleport_history_panel). + label(getString("teleport_history_tab_title")). + insert_at(LLTabContainer::END)); + } + + mTabContainer->selectFirstTab(); + + mActivePanel = dynamic_cast<LLPanelPlacesTab*>(mTabContainer->getCurrentPanel()); + + // Filter applied to show all items. + if (mActivePanel) + mActivePanel->onSearchEdit(mActivePanel->getFilterSubString()); + + mTabsCreated = true; +} diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index c3d1b9bc534bb05e6acb16dfb3fd930d13363e98..5939b4fbfa7a3d5b45ae8ed045d96637bdac826b 100755 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -64,7 +64,7 @@ public: void changedParcelSelection(); // Called once on agent inventory first change to find out when inventory gets usable // and to create "My Landmarks" and "Teleport History" tabs. - void createTabs(); + virtual void createTabs(); // Called when we receive the global 3D position of a parcel. void changedGlobalPos(const LLVector3d &global_pos); @@ -80,6 +80,12 @@ public: bool tabsCreated() { return mTabsCreated;} /*virtual*/ S32 notifyParent(const LLSD& info); + +protected: + LLPanelPlacesTab* mActivePanel; + LLTabContainer* mTabContainer; + // Holds info whether "My Landmarks" and "Teleport History" tabs have been created. + bool mTabsCreated; private: void onLandmarkLoaded(LLLandmark* landmark); @@ -109,8 +115,6 @@ private: LLPanelPlaceInfo* getCurrentInfoPanel(); LLFilterEditor* mFilterEditor; - LLPanelPlacesTab* mActivePanel; - LLTabContainer* mTabContainer; LLPanelPlaceProfile* mPlaceProfile; LLPanelLandmarkInfo* mLandmarkInfo; @@ -148,12 +152,15 @@ private: bool isLandmarkEditModeOn; - // Holds info whether "My Landmarks" and "Teleport History" tabs have been created. - bool mTabsCreated; - LLSafeHandle<LLParcelSelection> mParcel; boost::signals2::connection mAgentParcelChangedConnection; }; +// This crazy little class is just a workaround for directory search until the landmarks panel is fixed! +class LLHackyHackPlacesPanel : public LLPanelPlaces +{ + void createTabs(); +}; + #endif //LL_LLPANELPLACES_H diff --git a/indra/newview/skins/default/xui/en/floater_directory.xml b/indra/newview/skins/default/xui/en/floater_directory.xml index 3c6d0cb7fee1f17c5a061f15982c43aef2957e74..dc92d62536a09b0071d0d497deed68ffdabaff41 100644 --- a/indra/newview/skins/default/xui/en/floater_directory.xml +++ b/indra/newview/skins/default/xui/en/floater_directory.xml @@ -221,7 +221,7 @@ Your search terms were missing a query string. bottom="-1" left="0" width="313" - class="panel_places" + class="hacky_places" filename="panel_places.xml" /> <panel follows="all"