From 811e2d201bef3dd946e415789676c65e7833f80e Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 7 Sep 2010 22:57:54 -0700 Subject: Fixed floatervicelicense not compiling with the new media changes --- linden/indra/newview/floatervoicelicense.cpp | 31 +++++++++++++--------------- linden/indra/newview/floatervoicelicense.h | 11 +++++----- linden/indra/newview/llfirstuse.cpp | 4 ++-- linden/indra/newview/llprefsvoice.cpp | 4 ++-- linden/indra/newview/llwebbrowserctrl.h | 1 - 5 files changed, 24 insertions(+), 27 deletions(-) diff --git a/linden/indra/newview/floatervoicelicense.cpp b/linden/indra/newview/floatervoicelicense.cpp index 74d16c3..0697b5c 100644 --- a/linden/indra/newview/floatervoicelicense.cpp +++ b/linden/indra/newview/floatervoicelicense.cpp @@ -27,7 +27,7 @@ * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ -/* + #include "llviewerprecompiledheaders.h" #include "floatervoicelicense.h" @@ -122,7 +122,7 @@ BOOL FloaterVoiceLicense::postBuild() LLTextEditor *editor = getChild("license_text"); editor->setVisible( FALSE ); - LLWebBrowserCtrl* web_browser = getChild("license_html"); + LLMediaCtrl* web_browser = getChild("license_html"); if ( web_browser ) { // start to observe it so we see navigate complete events @@ -137,7 +137,7 @@ BOOL FloaterVoiceLicense::postBuild() void FloaterVoiceLicense::setSiteIsAlive( bool alive ) { - LLWebBrowserCtrl* web_browser = getChild("license_html"); + LLMediaCtrl* web_browser = getChild("license_html"); // if the contents of the site was retrieved if ( alive ) { @@ -158,12 +158,6 @@ void FloaterVoiceLicense::setSiteIsAlive( bool alive ) FloaterVoiceLicense::~FloaterVoiceLicense() { - // stop observing events - LLWebBrowserCtrl* web_browser = getChild("license_html"); - if ( web_browser ) - { - web_browser->remObserver( this ); - } // tell the responder we're not here anymore if ( gResponsePtr ) @@ -224,14 +218,17 @@ void FloaterVoiceLicense::onCancel( void* userdata ) } //virtual -void FloaterVoiceLicense::onNavigateComplete( const EventType& eventIn ) +void FloaterVoiceLicense::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event) { - // skip past the loading screen navigate complete - if ( ++mLoadCompleteCount == 2 ) + if(event == MEDIA_EVENT_NAVIGATE_COMPLETE) { - llinfos << "NAVIGATE COMPLETE" << llendl; - // enable Agree to License radio button now that page has loaded - LLCheckBoxCtrl * license_agreement = getChild("agree_chk"); - license_agreement->setEnabled( true ); + // skip past the loading screen navigate complete + if ( ++mLoadCompleteCount == 2 ) + { + llinfos << "NAVIGATE COMPLETE" << llendl; + // enable Agree to License radio button now that page has loaded + LLCheckBoxCtrl * license_agreement = getChild("agree_chk"); + license_agreement->setEnabled( true ); + } } -}*/ +} diff --git a/linden/indra/newview/floatervoicelicense.h b/linden/indra/newview/floatervoicelicense.h index 9d2012d..30dbb2f 100644 --- a/linden/indra/newview/floatervoicelicense.h +++ b/linden/indra/newview/floatervoicelicense.h @@ -35,8 +35,8 @@ #include "llmodaldialog.h" #include "llassetstorage.h" -//imprudence fixme: removed for media plugins #include "llwebbrowserctrl.h" -/* +#include "llmediactrl.h" + class LLButton; class LLRadioGroup; class LLVFS; @@ -45,7 +45,7 @@ class LLUUID; class FloaterVoiceLicense : public LLModalDialog, - public LLViewerMediaObserver + public LLViewerMediaObserver, public LLFloaterSingleton { public: @@ -62,11 +62,12 @@ public: void setSiteIsAlive( bool alive ); - virtual void onNavigateComplete( const EventType& eventIn ); + // inherited from LLViewerMediaObserver + /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); private: int mWebBrowserWindowId; int mLoadCompleteCount; -};*/ +}; #endif // FLOATERVOICELICENSE_H diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp index ca8614c..e82aa96 100644 --- a/linden/indra/newview/llfirstuse.cpp +++ b/linden/indra/newview/llfirstuse.cpp @@ -397,8 +397,8 @@ void LLFirstUse::voiceLicenseAgreement() { gSavedSettings.setWarning("FirstVoiceLicense", FALSE); -// imprudence fixme FloaterVoiceLicense::getInstance()->open(); -// FloaterVoiceLicense::getInstance()->center(); + FloaterVoiceLicense::getInstance()->open(); + FloaterVoiceLicense::getInstance()->center(); } else // currently in STATE_LOGIN_VOICE_LICENSE when arriving here { diff --git a/linden/indra/newview/llprefsvoice.cpp b/linden/indra/newview/llprefsvoice.cpp index 609d30a..7c50f4a 100644 --- a/linden/indra/newview/llprefsvoice.cpp +++ b/linden/indra/newview/llprefsvoice.cpp @@ -153,8 +153,8 @@ void LLPrefsVoice::apply() if (enable_voice && !gSavedSettings.getBOOL("VivoxLicenseAccepted")) { // This window enables voice chat if license is accepted -//imprudence fixme FloaterVoiceLicense::getInstance()->open(); -//imprudence fixme FloaterVoiceLicense::getInstance()->center(); + FloaterVoiceLicense::getInstance()->open(); + FloaterVoiceLicense::getInstance()->center(); } else { diff --git a/linden/indra/newview/llwebbrowserctrl.h b/linden/indra/newview/llwebbrowserctrl.h index 0100807..79b8942 100644 --- a/linden/indra/newview/llwebbrowserctrl.h +++ b/linden/indra/newview/llwebbrowserctrl.h @@ -106,7 +106,6 @@ class LLWebBrowserCtrlObserver #include "lluictrl.h" #include "llframetimer.h" #include "lldynamictexture.h" -#include "llmediamanager.h" #include "llmediaobserver.h" class LLViewBorder; -- cgit v1.1