diff options
Diffstat (limited to 'linden/indra/newview/llpaneldirfind.cpp')
-rw-r--r-- | linden/indra/newview/llpaneldirfind.cpp | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/linden/indra/newview/llpaneldirfind.cpp b/linden/indra/newview/llpaneldirfind.cpp index 609f5cc..14c4a90 100644 --- a/linden/indra/newview/llpaneldirfind.cpp +++ b/linden/indra/newview/llpaneldirfind.cpp | |||
@@ -50,6 +50,7 @@ | |||
50 | #include "llviewercontrol.h" | 50 | #include "llviewercontrol.h" |
51 | #include "llmenucommands.h" | 51 | #include "llmenucommands.h" |
52 | #include "llmenugl.h" | 52 | #include "llmenugl.h" |
53 | #include "llpluginclassmedia.h" | ||
53 | #include "lltextbox.h" | 54 | #include "lltextbox.h" |
54 | #include "lluiconstants.h" | 55 | #include "lluiconstants.h" |
55 | #include "llviewerimagelist.h" | 56 | #include "llviewerimagelist.h" |
@@ -143,9 +144,11 @@ BOOL LLPanelDirFind::postBuild() | |||
143 | } | 144 | } |
144 | 145 | ||
145 | 146 | ||
146 | mWebBrowser = getChild<LLWebBrowserCtrl>(mBrowserName); | 147 | mWebBrowser = getChild<LLMediaCtrl>(mBrowserName); |
147 | if (mWebBrowser) | 148 | if (mWebBrowser) |
148 | { | 149 | { |
150 | mWebBrowser->addObserver(this); | ||
151 | |||
149 | // new pages appear in same window as the results page now | 152 | // new pages appear in same window as the results page now |
150 | mWebBrowser->setOpenInInternalBrowser( false ); | 153 | mWebBrowser->setOpenInInternalBrowser( false ); |
151 | mWebBrowser->setOpenInExternalBrowser( false ); | 154 | mWebBrowser->setOpenInExternalBrowser( false ); |
@@ -156,9 +159,6 @@ BOOL LLPanelDirFind::postBuild() | |||
156 | // redirect 404 pages from S3 somewhere else | 159 | // redirect 404 pages from S3 somewhere else |
157 | mWebBrowser->set404RedirectUrl( getString("redirect_404_url") ); | 160 | mWebBrowser->set404RedirectUrl( getString("redirect_404_url") ); |
158 | 161 | ||
159 | // Track updates for progress display. | ||
160 | mWebBrowser->addObserver(this); | ||
161 | |||
162 | navigateToDefaultPage(); | 162 | navigateToDefaultPage(); |
163 | } | 163 | } |
164 | 164 | ||
@@ -167,8 +167,6 @@ BOOL LLPanelDirFind::postBuild() | |||
167 | 167 | ||
168 | LLPanelDirFind::~LLPanelDirFind() | 168 | LLPanelDirFind::~LLPanelDirFind() |
169 | { | 169 | { |
170 | if (mWebBrowser) | ||
171 | mWebBrowser->remObserver(this); | ||
172 | } | 170 | } |
173 | 171 | ||
174 | // virtual | 172 | // virtual |
@@ -485,19 +483,27 @@ void LLPanelDirFind::onClickSearch(void* data) | |||
485 | LLFloaterDirectory::sNewSearchCount++; | 483 | LLFloaterDirectory::sNewSearchCount++; |
486 | } | 484 | } |
487 | 485 | ||
488 | void LLPanelDirFind::onNavigateBegin( const EventType& eventIn ) | 486 | void LLPanelDirFind::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) |
489 | { | ||
490 | childSetText("status_text", getString("loading_text")); | ||
491 | } | ||
492 | |||
493 | void LLPanelDirFind::onNavigateComplete( const EventType& eventIn ) | ||
494 | { | 487 | { |
495 | childSetText("status_text", getString("done_text")); | 488 | switch(event) |
496 | } | 489 | { |
497 | 490 | case MEDIA_EVENT_NAVIGATE_BEGIN: | |
498 | void LLPanelDirFind::onLocationChange( const EventType& eventIn ) | 491 | childSetText("status_text", getString("loading_text")); |
499 | { | 492 | break; |
500 | llinfos << eventIn.getStringValue() << llendl; | 493 | |
494 | case MEDIA_EVENT_NAVIGATE_COMPLETE: | ||
495 | childSetText("status_text", getString("done_text")); | ||
496 | break; | ||
497 | |||
498 | case MEDIA_EVENT_LOCATION_CHANGED: | ||
499 | // Debugging info to console | ||
500 | llinfos << self->getLocation() << llendl; | ||
501 | break; | ||
502 | |||
503 | default: | ||
504 | // Having a default case makes the compiler happy. | ||
505 | break; | ||
506 | } | ||
501 | } | 507 | } |
502 | 508 | ||
503 | //--------------------------------------------------------------------------- | 509 | //--------------------------------------------------------------------------- |