From d294d568d1c97650bba4c388c8a7eab5a5c49c94 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 21 Oct 2025 22:05:07 +0300 Subject: #4411 WIP initial restoring of Legacy Search --- indra/newview/llpaneleventinfo.cpp | 213 +++++++++++++++++++++++++++++++++++++ 1 file changed, 213 insertions(+) create mode 100644 indra/newview/llpaneleventinfo.cpp (limited to 'indra/newview/llpaneleventinfo.cpp') diff --git a/indra/newview/llpaneleventinfo.cpp b/indra/newview/llpaneleventinfo.cpp new file mode 100644 index 0000000000..aaafbc6b32 --- /dev/null +++ b/indra/newview/llpaneleventinfo.cpp @@ -0,0 +1,213 @@ +/** + * @file llpaneleventinfo.cpp + * @brief Info panel for events in the legacy Search + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpaneleventinfo.h" +#include "message.h" +#include "llui.h" + +#include "llagent.h" +#include "llviewerwindow.h" +#include "llbutton.h" +#include "llcachename.h" +#include "lleventflags.h" +#include "llfloater.h" +#include "llfloaterreg.h" +#include "llfloaterworldmap.h" +#include "llinventorymodel.h" +#include "lltextbox.h" +#include "llviewertexteditor.h" +#include "lluiconstants.h" +#include "llviewercontrol.h" +#include "llweb.h" +#include "llworldmap.h" +#include "lluictrlfactory.h" + +static LLPanelInjector t_panel_event_info("panel_event_info"); + +LLPanelEventInfo::LLPanelEventInfo() + : LLPanel() +{ +} + + +LLPanelEventInfo::~LLPanelEventInfo() +{ + if (mEventInfoConnection.connected()) + { + mEventInfoConnection.disconnect(); + } +} + + +bool LLPanelEventInfo::postBuild() +{ + mTBName = getChild("event_name"); + + mTBCategory = getChild("event_category"); + mTBDate = getChild("event_date"); + mTBDuration = getChild("event_duration"); + mTBDesc = getChild("event_desc"); + mTBDesc->setWordWrap(TRUE); + + mTBRunBy = getChild("event_runby"); + mTBLocation = getChild("event_location"); + mTBCover = getChild("event_cover"); + + mTeleportBtn = getChild( "teleport_btn"); + mTeleportBtn->setClickedCallback(boost::bind(&LLPanelEventInfo::onClickTeleport, this)); + + mMapBtn = getChild( "map_btn"); + mMapBtn->setClickedCallback(boost::bind(&LLPanelEventInfo::onClickMap, this)); + + mNotifyBtn = getChild( "notify_btn"); + mNotifyBtn->setClickedCallback(boost::bind(&LLPanelEventInfo::onClickNotify, this)); + + mEventInfoConnection = gEventNotifier.setEventInfoCallback(boost::bind(&LLPanelEventInfo::processEventInfoReply, this, _1)); + + return true; +} + +void LLPanelEventInfo::setEventID(const U32 event_id) +{ + mEventID = event_id; + + if (event_id != 0) + { + sendEventInfoRequest(); + } +} + +void LLPanelEventInfo::sendEventInfoRequest() +{ + LLMessageSystem *msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_EventInfoRequest); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() ); + msg->nextBlockFast(_PREHASH_EventData); + msg->addU32Fast(_PREHASH_EventID, mEventID); + gAgent.sendReliableMessage(); +} + +bool LLPanelEventInfo::processEventInfoReply(LLEventInfo event) +{ + if (event.mID != getEventID()) + return false; + + mTBName->setText(event.mName); + mTBCategory->setText(event.mCategoryStr); + mTBDate->setText(event.mTimeStr); + mTBDesc->setText(event.mDesc); + + mTBDuration->setText(llformat("%d:%.2d", event.mDuration / 60, event.mDuration % 60)); + + if (!event.mHasCover) + { + mTBCover->setText(getString("none")); + } + else + { + mTBCover->setText(llformat("%d", event.mCover)); + } + + F32 global_x = (F32)event.mPosGlobal.mdV[VX]; + F32 global_y = (F32)event.mPosGlobal.mdV[VY]; + + S32 region_x = llround(global_x) % REGION_WIDTH_UNITS; + S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; + S32 region_z = (S32)llround((F32)event.mPosGlobal.mdV[VZ]); + + std::string desc = event.mSimName + llformat(" (%d, %d, %d)", region_x, region_y, region_z); + mTBLocation->setText(desc); + + if (event.mEventFlags & EVENT_FLAG_MATURE) + { + childSetVisible("event_mature_yes", true); + childSetVisible("event_mature_no", false); + } + else + { + childSetVisible("event_mature_yes", false); + childSetVisible("event_mature_no", true); + } + + if (event.mUnixTime < time_corrected()) + { + mNotifyBtn->setEnabled(false); + } + else + { + mNotifyBtn->setEnabled(true); + } + + if (gEventNotifier.hasNotification(event.mID)) + { + mNotifyBtn->setLabel(getString("dont_notify")); + } + else + { + mNotifyBtn->setLabel(getString("notify")); + } + mEventInfo = event; + return true; +} + +void LLPanelEventInfo::onClickTeleport() +{ + LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance(); + if (world_map) + { + world_map->trackLocation(mEventInfo.mPosGlobal); + gAgent.teleportViaLocation(mEventInfo.mPosGlobal); + } +} + +void LLPanelEventInfo::onClickMap() +{ + LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance(); + if (world_map) + { + world_map->trackLocation(mEventInfo.mPosGlobal); + LLFloaterReg::showInstance("world_map", "center"); + } +} + +void LLPanelEventInfo::onClickNotify() +{ + if (!gEventNotifier.hasNotification(mEventID)) + { + gEventNotifier.add(mEventInfo.mID, mEventInfo.mUnixTime, mEventInfo.mTimeStr, mEventInfo.mName); + mNotifyBtn->setLabel(getString("dont_notify")); + } + else + { + gEventNotifier.remove(mEventInfo.mID); + mNotifyBtn->setLabel(getString("notify")); + } +} -- cgit v1.3 From b0c975724510b2685fc08cee060da670361c93c9 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 23 Oct 2025 01:28:13 +0300 Subject: #4411 WIP add Web tab to legacy Search --- indra/newview/CMakeLists.txt | 2 + indra/newview/llfloaterdirectory.cpp | 2 + indra/newview/llpaneldirbrowser.cpp | 49 +++---- indra/newview/llpaneldirbrowser.h | 51 +++---- indra/newview/llpaneldirplaces.cpp | 15 --- indra/newview/llpaneldirweb.cpp | 149 +++++++++++++++++++++ indra/newview/llpaneldirweb.h | 63 +++++++++ indra/newview/llpaneleventinfo.cpp | 26 +--- .../skins/default/xui/en/floater_directory.xml | 11 ++ .../newview/skins/default/xui/en/panel_dir_web.xml | 76 +++++++++++ .../skins/default/xui/en/panel_event_info.xml | 30 ++--- 11 files changed, 359 insertions(+), 115 deletions(-) create mode 100644 indra/newview/llpaneldirweb.cpp create mode 100644 indra/newview/llpaneldirweb.h create mode 100644 indra/newview/skins/default/xui/en/panel_dir_web.xml (limited to 'indra/newview/llpaneleventinfo.cpp') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index be9df8a6df..d56ac36190 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -449,6 +449,7 @@ set(viewer_SOURCE_FILES llpaneldirland.cpp llpaneldirpeople.cpp llpaneldirplaces.cpp + llpaneldirweb.cpp llpaneleditsky.cpp llpaneleditwater.cpp llpaneleditwearable.cpp @@ -1125,6 +1126,7 @@ set(viewer_HEADER_FILES llpaneldirland.h llpaneldirpeople.h llpaneldirplaces.h + llpaneldirweb.h llpaneleditsky.h llpaneleditwater.h llpaneleditwearable.h diff --git a/indra/newview/llfloaterdirectory.cpp b/indra/newview/llfloaterdirectory.cpp index 04a6a45af3..35f0f7ef5a 100644 --- a/indra/newview/llfloaterdirectory.cpp +++ b/indra/newview/llfloaterdirectory.cpp @@ -35,6 +35,7 @@ #include "llpaneldirgroups.h" #include "llpaneldirplaces.h" #include "llpaneldirclassified.h" +#include "llpaneldirweb.h" #include "llscrollbar.h" #include "llviewercontrol.h" #include "llpanelavatar.h" @@ -75,6 +76,7 @@ bool LLFloaterDirectory::postBuild() panel_tab->setFloaterDirectory(this); } } + findChild("panel_dir_web")->setFloaterDirectory(this); mPanelAvatarp = findChild("panel_profile_secondlife"); mPanelAvatarp->setAllowEdit(false); diff --git a/indra/newview/llpaneldirbrowser.cpp b/indra/newview/llpaneldirbrowser.cpp index 2ef7bb122d..2391ced6ed 100644 --- a/indra/newview/llpaneldirbrowser.cpp +++ b/indra/newview/llpaneldirbrowser.cpp @@ -1,32 +1,26 @@ -/** +/** * @file llpaneldirbrowser.cpp - * @brief LLPanelDirBrowser class implementation + * @brief Base class for panels in the legacy Search directory. * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Copyright (C) 2025, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -41,7 +35,6 @@ // linden library includes #include "lldir.h" #include "lleventflags.h" -#include "llfontgl.h" #include "llqueryflags.h" #include "message.h" @@ -61,9 +54,7 @@ #include "llscrolllistctrl.h" #include "lltextbox.h" #include "lltrans.h" -#include "lluiconstants.h" #include "llviewercontrol.h" -#include "llviewermessage.h" #include "llfloaterdirectory.h" #include "llpanelprofile.h" #include "llpanelplaces.h" diff --git a/indra/newview/llpaneldirbrowser.h b/indra/newview/llpaneldirbrowser.h index b6aa564725..e3bc94c2c8 100644 --- a/indra/newview/llpaneldirbrowser.h +++ b/indra/newview/llpaneldirbrowser.h @@ -1,45 +1,34 @@ -/** +/** * @file llpaneldirbrowser.h - * @brief LLPanelDirBrowser class definition + * @brief Base class for panels in the legacy Search directory. * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Copyright (C) 2025, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -// Base class for the various search panels/results browsers -// in the Find floater. For example, Find > Popular Places -// is derived from this. - #ifndef LL_LLPANELDIRBROWSER_H #define LL_LLPANELDIRBROWSER_H #include "llpanel.h" -#include "lluuid.h" #include "llframetimer.h" class LLMessageSystem; diff --git a/indra/newview/llpaneldirplaces.cpp b/indra/newview/llpaneldirplaces.cpp index 2e221f393a..631057b101 100644 --- a/indra/newview/llpaneldirplaces.cpp +++ b/indra/newview/llpaneldirplaces.cpp @@ -28,15 +28,11 @@ #include "llpaneldirplaces.h" -// linden library includes -#include "llfontgl.h" #include "message.h" -#include "lldir.h" #include "llparcel.h" #include "llregionflags.h" #include "llqueryflags.h" -// viewer project includes #include "llagent.h" #include "llbutton.h" #include "llcheckboxctrl.h" @@ -73,24 +69,13 @@ bool LLPanelDirPlaces::postBuild() childSetVisible("Category", true); childSetEnabled("Category", true); - // Don't prepopulate the places list, as it hurts the database as of 2006-12-04. JC - // initialQuery(); - return true; } LLPanelDirPlaces::~LLPanelDirPlaces() { - // MBW -- HACK!!! - // This looks like some sort of compiler bug. We have a mysterious crash during initialization on powerpc boxes. - // The crash seems unrelated to this code, but the commit that introduced it was narrowed down to this file. - // Adding llinfos calls to both the constructor and destructor here makes the crash go away, even though they don't get called before the point of the crash. - // This is wrong on many levels and scares the hell out of me. - LL_INFOS() << "called" << LL_ENDL; - // Children all cleaned up by default view destructor. } - // virtual void LLPanelDirPlaces::draw() { diff --git a/indra/newview/llpaneldirweb.cpp b/indra/newview/llpaneldirweb.cpp new file mode 100644 index 0000000000..ec0635a407 --- /dev/null +++ b/indra/newview/llpaneldirweb.cpp @@ -0,0 +1,149 @@ +/** + * @file llpaneldirweb.cpp + * @brief Web panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpaneldirweb.h" + +#include "llagent.h" +#include "llbutton.h" +#include "llfloaterdirectory.h" +#include "lltextbox.h" +#include "llviewercontrol.h" +#include "llweb.h" + +static LLPanelInjector t_panel_dir_web("panel_dir_web"); + +LLPanelDirWeb::LLPanelDirWeb() +: LLPanel(), + mFloaterDirectory(nullptr), + mWebBrowser(nullptr) +{ +} + +bool LLPanelDirWeb::postBuild() +{ + childSetAction("home_btn", onClickHome, this); + + mBtnBack = getChild("back_btn"); + mBtnForward = getChild("forward_btn"); + mStatusBarText = getChild("statusbartext"); + + mBtnBack->setClickedCallback([this](LLUICtrl*, const LLSD&) { mWebBrowser->navigateBack(); }); + mBtnForward->setClickedCallback([this](LLUICtrl*, const LLSD&) { mWebBrowser->navigateForward(); }); + + mWebBrowser = findChild("web_search"); + navigateToDefaultPage(); + mWebBrowser->addObserver(this); + + return true; +} + +void LLPanelDirWeb::draw() +{ + // Asynchronous so we need to keep checking + mBtnBack->setEnabled(mWebBrowser->canNavigateBack()); + mBtnForward->setEnabled(mWebBrowser->canNavigateForward()); + + LLPanel::draw(); +} + +LLPanelDirWeb::~LLPanelDirWeb() +{ +} + +// When we show any browser-based view, we want to hide all +// the right-side XUI detail panels. +// virtual +void LLPanelDirWeb::onVisibilityChange(bool new_visibility) +{ + if (new_visibility && mFloaterDirectory) + { + mFloaterDirectory->hideAllDetailPanels(); + } + LLPanel::onVisibilityChange(new_visibility); +} + +void LLPanelDirWeb::navigateToDefaultPage() +{ + std::string url = gSavedSettings.getString("SearchURL"); + + LLSD subs; + subs["QUERY"] = ""; + subs["TYPE"] = "standard"; + // Default to PG + std::string maturity = "g"; + if (gAgent.prefersAdult()) + { + // PG,Mature,Adult + maturity = "gma"; + } + else if (gAgent.prefersMature()) + { + // PG,Mature + maturity = "gm"; + } + subs["MATURITY"] = maturity; + + url = LLWeb::expandURLSubstitutions(url, subs); + mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); +} + +// static +void LLPanelDirWeb::onClickHome( void* data ) +{ + LLPanelDirWeb* self = (LLPanelDirWeb*)data; + if (!self) + return; + self->navigateToDefaultPage(); +} + +void LLPanelDirWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) +{ + if (event == MEDIA_EVENT_LOCATION_CHANGED) + { + const std::string url = self->getLocation(); + if (url.length()) + mStatusBarText->setText(url); + } + else if (event == MEDIA_EVENT_NAVIGATE_COMPLETE) + { + // we populate the status bar with URLs as they change so clear it now we're done + const std::string end_str = ""; + mStatusBarText->setText(end_str); + } + else if (event == MEDIA_EVENT_STATUS_TEXT_CHANGED) + { + const std::string text = self->getStatusText(); + if (text.length()) + mStatusBarText->setText(text); + } + else if (event == MEDIA_EVENT_LINK_HOVERED) + { + const std::string link = self->getHoverLink(); + mStatusBarText->setText(link); + } +} diff --git a/indra/newview/llpaneldirweb.h b/indra/newview/llpaneldirweb.h new file mode 100644 index 0000000000..0287c5006c --- /dev/null +++ b/indra/newview/llpaneldirweb.h @@ -0,0 +1,63 @@ +/** + * @file llpaneldirweb.h + * @brief Web panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLPANELDIRWEB_H +#define LL_LLPANELDIRWEB_H + +#include "llpanel.h" +#include "llmediactrl.h" + +class LLTextBox; +class LLFloaterDirectory; +class LLWebBrowserCtrlObserver; + +class LLPanelDirWeb : public LLPanel, public LLViewerMediaObserver +{ +public: + LLPanelDirWeb(); + ~LLPanelDirWeb(); + + bool postBuild() override; + void onVisibilityChange(bool new_visibility); + void draw(); + + void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); + + void navigateToDefaultPage(); + + void setFloaterDirectory(LLFloaterDirectory* floater) { mFloaterDirectory = floater; } + +protected: + static void onClickHome( void* data ); + + LLButton* mBtnBack; + LLButton* mBtnForward; + LLTextBox* mStatusBarText; + LLFloaterDirectory* mFloaterDirectory; + LLMediaCtrl* mWebBrowser; +}; + +#endif diff --git a/indra/newview/llpaneleventinfo.cpp b/indra/newview/llpaneleventinfo.cpp index aaafbc6b32..43b20b3851 100644 --- a/indra/newview/llpaneleventinfo.cpp +++ b/indra/newview/llpaneleventinfo.cpp @@ -27,25 +27,15 @@ #include "llviewerprecompiledheaders.h" #include "llpaneleventinfo.h" -#include "message.h" -#include "llui.h" #include "llagent.h" -#include "llviewerwindow.h" #include "llbutton.h" -#include "llcachename.h" #include "lleventflags.h" -#include "llfloater.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" -#include "llinventorymodel.h" #include "lltextbox.h" #include "llviewertexteditor.h" -#include "lluiconstants.h" -#include "llviewercontrol.h" -#include "llweb.h" #include "llworldmap.h" -#include "lluictrlfactory.h" static LLPanelInjector t_panel_event_info("panel_event_info"); @@ -54,7 +44,6 @@ LLPanelEventInfo::LLPanelEventInfo() { } - LLPanelEventInfo::~LLPanelEventInfo() { if (mEventInfoConnection.connected()) @@ -63,7 +52,6 @@ LLPanelEventInfo::~LLPanelEventInfo() } } - bool LLPanelEventInfo::postBuild() { mTBName = getChild("event_name"); @@ -72,7 +60,7 @@ bool LLPanelEventInfo::postBuild() mTBDate = getChild("event_date"); mTBDuration = getChild("event_duration"); mTBDesc = getChild("event_desc"); - mTBDesc->setWordWrap(TRUE); + mTBDesc->setWordWrap(true); mTBRunBy = getChild("event_runby"); mTBLocation = getChild("event_location"); @@ -121,9 +109,11 @@ bool LLPanelEventInfo::processEventInfoReply(LLEventInfo event) return false; mTBName->setText(event.mName); + mTBName->setToolTip(event.mName); mTBCategory->setText(event.mCategoryStr); mTBDate->setText(event.mTimeStr); mTBDesc->setText(event.mDesc); + mTBRunBy->setText(LLSLURL("agent", event.mRunByID, "inspect").getSLURLString()); mTBDuration->setText(llformat("%d:%.2d", event.mDuration / 60, event.mDuration % 60)); @@ -136,15 +126,7 @@ bool LLPanelEventInfo::processEventInfoReply(LLEventInfo event) mTBCover->setText(llformat("%d", event.mCover)); } - F32 global_x = (F32)event.mPosGlobal.mdV[VX]; - F32 global_y = (F32)event.mPosGlobal.mdV[VY]; - - S32 region_x = llround(global_x) % REGION_WIDTH_UNITS; - S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; - S32 region_z = (S32)llround((F32)event.mPosGlobal.mdV[VZ]); - - std::string desc = event.mSimName + llformat(" (%d, %d, %d)", region_x, region_y, region_z); - mTBLocation->setText(desc); + mTBLocation->setText(LLSLURL(event.mSimName, event.mPosGlobal).getSLURLString()); if (event.mEventFlags & EVENT_FLAG_MATURE) { diff --git a/indra/newview/skins/default/xui/en/floater_directory.xml b/indra/newview/skins/default/xui/en/floater_directory.xml index 143bfdc0d9..9dd15bfed5 100644 --- a/indra/newview/skins/default/xui/en/floater_directory.xml +++ b/indra/newview/skins/default/xui/en/floater_directory.xml @@ -85,6 +85,17 @@ left="0" top="0" bottom="-1" /> + + +