diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp index a6640cc073e672c14845b9ffa1687e083dc30324..8156f673158b45e8b93093e64ca2343d25479a1e 100644 --- a/indra/newview/llfloaterevent.cpp +++ b/indra/newview/llfloaterevent.cpp @@ -3,8 +3,9 @@ * @brief Display for events in the finder * * $LicenseInfo:firstyear=2004&license=viewerlgpl$ - * Second Life Viewer Source Code + * Alchemy Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2014, Cinder Roxley @ Second Life * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,92 +28,20 @@ #include "llviewerprecompiledheaders.h" #include "llfloaterevent.h" - -#include "message.h" -#include "llnotificationsutil.h" -#include "llui.h" - -#include "llagent.h" -#include "llviewerwindow.h" -#include "llbutton.h" -#include "llcachename.h" -#include "llcommandhandler.h" // secondlife:///app/chat/ support -#include "lleventflags.h" -#include "llmediactrl.h" -#include "llexpandabletextbox.h" -#include "llfloater.h" -#include "llfloaterreg.h" -#include "llmediactrl.h" -#include "llfloaterworldmap.h" -#include "llinventorymodel.h" -#include "llslurl.h" -#include "lltextbox.h" -#include "lltexteditor.h" -#include "lluiconstants.h" -#include "llviewercontrol.h" -#include "llweb.h" -#include "llworldmap.h" -#include "llworldmapmessage.h" -#include "lluictrlfactory.h" -#include "lltrans.h" +#include "llpaneleventinfo.h" LLFloaterEvent::LLFloaterEvent(const LLSD& key) - : LLFloater(key), - LLViewerMediaObserver(), - mBrowser(NULL), - mEventID(0) -{ -} - - -LLFloaterEvent::~LLFloaterEvent() +: LLFloater(key) +, mEventId(0) { -} - - -BOOL LLFloaterEvent::postBuild() -{ - mBrowser = getChild<LLMediaCtrl>("browser"); - if (mBrowser) - { - mBrowser->addObserver(this); - } - - return TRUE; -} - -void LLFloaterEvent::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event) -{ - switch (event) - { - case MEDIA_EVENT_NAVIGATE_BEGIN: - getChild<LLUICtrl>("status_text")->setValue(getString("loading_text")); - break; - - case MEDIA_EVENT_NAVIGATE_COMPLETE: - getChild<LLUICtrl>("status_text")->setValue(getString("done_text")); - break; - - default: - break; - } + } void LLFloaterEvent::setEventID(const U32 event_id) { - mEventID = event_id; - - if (event_id != 0) - { - LLSD subs; - subs["EVENT_ID"] = (S32)event_id; - // get the search URL and expand all of the substitutions - // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) - std::ostringstream url; - url << gSavedSettings.getString("EventURL") << event_id << std::endl; - // and load the URL in the web view - mBrowser->navigateTo(url.str()); - - } + mEventId = event_id; + if (event_id == 0) closeFloater(); + + getChild<LLPanel>("event_panel")->onOpen(mEventId); } diff --git a/indra/newview/llfloaterevent.h b/indra/newview/llfloaterevent.h index 1698e62a912edaa47a94fd0d7981203798e32caf..918e34d285803274f35f63d282f8d5b8817663c0 100644 --- a/indra/newview/llfloaterevent.h +++ b/indra/newview/llfloaterevent.h @@ -3,8 +3,9 @@ * @brief Display for events in the finder * * $LicenseInfo:firstyear=2004&license=viewerlgpl$ - * Second Life Viewer Source Code + * Alchemy Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2014, Cinder Roxley @ Second Life * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -28,35 +29,17 @@ #define LL_LLFLOATEREVENT_H #include "llfloater.h" -#include "llviewermediaobserver.h" - -class LLMediaCtrl; -class LLButton; - -class LLFloaterEvent final : public LLFloater, - public LLViewerMediaObserver +class LLFloaterEvent final : public LLFloater { public: LLFloaterEvent(const LLSD& key); - /*virtual*/ ~LLFloaterEvent(); - - /*virtual*/ BOOL postBuild(); - + /*virtual*/ ~LLFloaterEvent() = default; void setEventID(const U32 event_id); - - U32 getEventID() { return mEventID; } - - - -protected: - /*virtual*/ void handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event); - U32 mEventID; - - LLMediaCtrl* mBrowser; - +private: + S32 mEventId; }; #endif // LL_LLFLOATEREVENT_H diff --git a/indra/newview/skins/default/xui/en/floater_event.xml b/indra/newview/skins/default/xui/en/floater_event.xml index cf61b7d24d4409b1f0db01787af31438a212681f..e12b10df3a0d0de5f99845516c227bae830c35b8 100644 --- a/indra/newview/skins/default/xui/en/floater_event.xml +++ b/indra/newview/skins/default/xui/en/floater_event.xml @@ -1,39 +1,23 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater - height="400" + height="590" can_resize="true" help_topic="event_details" label="Event" layout="topleft" name="Event" - save_rect="true" save_visibility="false" - title="EVENT DETAILS" - width="600"> - <floater.string - name="loading_text"> - Loading... - </floater.string> - <floater.string - name="done_text"> - Done - </floater.string> - <web_browser - trusted_content="true" - follows="left|right|top|bottom" - layout="topleft" - left="10" - name="browser" - height="365" - width="580" - top="0"/> - <text - follows="bottom|left" - height="16" - layout="topleft" - left_delta="0" - name="status_text" - top_pad="10" - width="150" /> + title="EVENT DETAILS" + max_width="320" + width="313"> + <panel + follows="all" + name="event_panel" + top="0" + bottom="590" + left="0" + right="313" + class="panel_event_info" + filename="panel_event_info.xml" /> </floater>