diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index a163bc408aede6f932f657eb91859aedf2440637..cf20f3c1040c622e731840a1007c1293997a18d6 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -79,6 +79,7 @@ static const std::string LANDMARK_INFO_TYPE = "landmark"; static const std::string REMOTE_PLACE_INFO_TYPE = "remote_place"; static const std::string TELEPORT_HISTORY_INFO_TYPE = "teleport_history"; static const std::string LANDMARK_TAB_INFO_TYPE = "open_landmark_tab"; +static const std::string TELEPORT_HISTORY_TAB_INFO_TYPE = "open_teleport_history_tab"; // Support for secondlife:///app/parcel/{UUID}/about SLapps class LLParcelHandler final : public LLCommandHandler @@ -382,6 +383,20 @@ void LLPanelPlaces::onOpen(const LLSD& key) // Update the buttons at the bottom of the panel updateVerbs(); } + else if (key_type == TELEPORT_HISTORY_TAB_INFO_TYPE) + { + togglePlaceInfoPanel(FALSE); + mPlaceInfoType = LANDMARK_TAB_INFO_TYPE; + + mLandmarkInfo->setVisible(FALSE); + LLTeleportHistoryPanel * teleport_history_panel = (LLTeleportHistoryPanel*)mTabContainer->getPanelByName("Teleport History"); + if (teleport_history_panel) + { + mTabContainer->selectTabPanel(teleport_history_panel); + onTabSelected(); + updateVerbs(); + } + } else { mFilterEditor->clear(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1cba05381adde981f336ef5aec1f02b27b41e612..13ec9ccb72fa810a8f6babc1c73afc115939c5aa 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9039,6 +9039,23 @@ void show_topinfobar_context_menu(LLView* ctrl, S32 x, S32 y) LLMenuGL::showPopup(ctrl, show_topbarinfo_context_menu, x, y); } +void toggleTeleportHistory() +{ + LLFloater* floater = LLFloaterReg::findInstance("places"); + if (floater && floater->isMinimized()) + { + floater->setMinimized(FALSE); + } + else if (LLFloater::isShown(floater)) + { + LLFloaterReg::hideInstance("places"); + } + else + { + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "open_teleport_history_tab")); + } +} + void initialize_edit_menu() { view_listener_t::addMenu(new LLEditUndo(), "Edit.Undo"); @@ -9578,4 +9595,5 @@ void initialize_menus() } // [/RLVa:KB] ALViewerMenu::initialize_menus(); + commit.add("ToggleTeleportHistory", boost::bind(&toggleTeleportHistory)); } diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 26f4f55333ac08f460f36f26263b34b13a9928c9..df5eca9c2387ad1ce5be727c58abe0d5b3f1573a 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -61,6 +61,13 @@ function="Floater.ToggleOrBringToFront" parameter="places" /> </menu_item_call> + <menu_item_call + label="Teleport History" + name="Teleport History" + shortcut="alt|H"> + <menu_item_call.on_click + function="ToggleTeleportHistory"/> + </menu_item_call> <menu_item_call label="Picks..." name="Picks">