diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llpaneldirfind.cpp | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2 meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz |
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/newview/llpaneldirfind.cpp')
-rw-r--r-- | linden/indra/newview/llpaneldirfind.cpp | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/linden/indra/newview/llpaneldirfind.cpp b/linden/indra/newview/llpaneldirfind.cpp index b3d1580..5d34d47 100644 --- a/linden/indra/newview/llpaneldirfind.cpp +++ b/linden/indra/newview/llpaneldirfind.cpp | |||
@@ -98,17 +98,13 @@ private: | |||
98 | // Debugging info to console | 98 | // Debugging info to console |
99 | 99 | ||
100 | private: | 100 | private: |
101 | #if LL_LIBXUL_ENABLED | ||
102 | LLWebBrowserCtrl* mWebBrowser; | 101 | LLWebBrowserCtrl* mWebBrowser; |
103 | #endif // LL_LIBXUL_ENABLED | ||
104 | }; | 102 | }; |
105 | 103 | ||
106 | 104 | ||
107 | LLPanelDirFindAll::LLPanelDirFindAll(const std::string& name, LLFloaterDirectory* floater) | 105 | LLPanelDirFindAll::LLPanelDirFindAll(const std::string& name, LLFloaterDirectory* floater) |
108 | : LLPanelDirBrowser(name, floater) | 106 | : LLPanelDirBrowser(name, floater) |
109 | #if LL_LIBXUL_ENABLED | ||
110 | ,mWebBrowser(NULL) | 107 | ,mWebBrowser(NULL) |
111 | #endif // LL_LIBXUL_ENABLED | ||
112 | { | 108 | { |
113 | mMinSearchChars = 3; | 109 | mMinSearchChars = 3; |
114 | } | 110 | } |
@@ -129,7 +125,6 @@ BOOL LLPanelDirFindAll::postBuild() | |||
129 | childSetValue("mature_check", false); | 125 | childSetValue("mature_check", false); |
130 | } | 126 | } |
131 | 127 | ||
132 | #if LL_LIBXUL_ENABLED | ||
133 | mWebBrowser = LLViewerUICtrlFactory::getWebBrowserByName(this, "find_browser"); | 128 | mWebBrowser = LLViewerUICtrlFactory::getWebBrowserByName(this, "find_browser"); |
134 | if (mWebBrowser) | 129 | if (mWebBrowser) |
135 | { | 130 | { |
@@ -141,30 +136,27 @@ BOOL LLPanelDirFindAll::postBuild() | |||
141 | mWebBrowser->setOpenAppSLURLs( true ); | 136 | mWebBrowser->setOpenAppSLURLs( true ); |
142 | 137 | ||
143 | // redirect 404 pages from S3 somewhere else | 138 | // redirect 404 pages from S3 somewhere else |
144 | mWebBrowser->set404RedirectUrl( childGetText("redirect_404_url") ); | 139 | mWebBrowser->set404RedirectUrl( getString("redirect_404_url") ); |
145 | 140 | ||
146 | // Track updates for progress display. | 141 | // Track updates for progress display. |
147 | mWebBrowser->addObserver(this); | 142 | mWebBrowser->addObserver(this); |
148 | 143 | ||
149 | navigateToDefaultPage(); | 144 | navigateToDefaultPage(); |
150 | } | 145 | } |
151 | #endif // LL_LIBXUL_ENABLED | ||
152 | 146 | ||
153 | return TRUE; | 147 | return TRUE; |
154 | } | 148 | } |
155 | 149 | ||
156 | LLPanelDirFindAll::~LLPanelDirFindAll() | 150 | LLPanelDirFindAll::~LLPanelDirFindAll() |
157 | { | 151 | { |
158 | #if LL_LIBXUL_ENABLED | 152 | if (mWebBrowser) |
159 | if (mWebBrowser) mWebBrowser->remObserver(this); | 153 | mWebBrowser->remObserver(this); |
160 | #endif // LL_LIBXUL_ENABLED | ||
161 | } | 154 | } |
162 | 155 | ||
163 | // virtual | 156 | // virtual |
164 | void LLPanelDirFindAll::draw() | 157 | void LLPanelDirFindAll::draw() |
165 | { | 158 | { |
166 | // enable/disable buttons depending on state | 159 | // enable/disable buttons depending on state |
167 | #if LL_LIBXUL_ENABLED | ||
168 | if ( mWebBrowser ) | 160 | if ( mWebBrowser ) |
169 | { | 161 | { |
170 | bool enable_back = mWebBrowser->canNavigateBack(); | 162 | bool enable_back = mWebBrowser->canNavigateBack(); |
@@ -173,7 +165,6 @@ void LLPanelDirFindAll::draw() | |||
173 | bool enable_forward = mWebBrowser->canNavigateForward(); | 165 | bool enable_forward = mWebBrowser->canNavigateForward(); |
174 | childSetEnabled( "forward_btn", enable_forward ); | 166 | childSetEnabled( "forward_btn", enable_forward ); |
175 | } | 167 | } |
176 | #endif // LL_LIBXUL_ENABLED | ||
177 | 168 | ||
178 | LLPanelDirBrowser::draw(); | 169 | LLPanelDirBrowser::draw(); |
179 | } | 170 | } |
@@ -218,12 +209,10 @@ void LLPanelDirFindAll::search(const std::string& search_text) | |||
218 | 209 | ||
219 | llinfos << "url " << url << llendl; | 210 | llinfos << "url " << url << llendl; |
220 | 211 | ||
221 | #if LL_LIBXUL_ENABLED | ||
222 | if (mWebBrowser) | 212 | if (mWebBrowser) |
223 | { | 213 | { |
224 | mWebBrowser->navigateTo(url); | 214 | mWebBrowser->navigateTo(url); |
225 | } | 215 | } |
226 | #endif // LL_LIBXUL_ENABLED | ||
227 | } | 216 | } |
228 | else | 217 | else |
229 | { | 218 | { |
@@ -247,12 +236,10 @@ void LLPanelDirFindAll::navigateToDefaultPage() | |||
247 | 236 | ||
248 | llinfos << "default url: " << start_url << llendl; | 237 | llinfos << "default url: " << start_url << llendl; |
249 | 238 | ||
250 | #if LL_LIBXUL_ENABLED | ||
251 | if (mWebBrowser) | 239 | if (mWebBrowser) |
252 | { | 240 | { |
253 | mWebBrowser->navigateTo( start_url ); | 241 | mWebBrowser->navigateTo( start_url ); |
254 | } | 242 | } |
255 | #endif //LL_LIBXUL_ENABLED | ||
256 | } | 243 | } |
257 | 244 | ||
258 | // static | 245 | // static |
@@ -317,37 +304,31 @@ std::string LLPanelDirFindAll::getSearchURLSuffix(bool mature_in) | |||
317 | // static | 304 | // static |
318 | void LLPanelDirFindAll::onClickBack( void* data ) | 305 | void LLPanelDirFindAll::onClickBack( void* data ) |
319 | { | 306 | { |
320 | #if LL_LIBXUL_ENABLED | ||
321 | LLPanelDirFindAll* self = ( LLPanelDirFindAll* )data; | 307 | LLPanelDirFindAll* self = ( LLPanelDirFindAll* )data; |
322 | if ( self->mWebBrowser ) | 308 | if ( self->mWebBrowser ) |
323 | { | 309 | { |
324 | self->mWebBrowser->navigateBack(); | 310 | self->mWebBrowser->navigateBack(); |
325 | } | 311 | } |
326 | #endif // LL_LIBXUL_ENABLED | ||
327 | } | 312 | } |
328 | 313 | ||
329 | // static | 314 | // static |
330 | void LLPanelDirFindAll::onClickForward( void* data ) | 315 | void LLPanelDirFindAll::onClickForward( void* data ) |
331 | { | 316 | { |
332 | #if LL_LIBXUL_ENABLED | ||
333 | LLPanelDirFindAll* self = ( LLPanelDirFindAll* )data; | 317 | LLPanelDirFindAll* self = ( LLPanelDirFindAll* )data; |
334 | if ( self->mWebBrowser ) | 318 | if ( self->mWebBrowser ) |
335 | { | 319 | { |
336 | self->mWebBrowser->navigateForward(); | 320 | self->mWebBrowser->navigateForward(); |
337 | } | 321 | } |
338 | #endif // LL_LIBXUL_ENABLED | ||
339 | } | 322 | } |
340 | 323 | ||
341 | // static | 324 | // static |
342 | void LLPanelDirFindAll::onClickHome( void* data ) | 325 | void LLPanelDirFindAll::onClickHome( void* data ) |
343 | { | 326 | { |
344 | #if LL_LIBXUL_ENABLED | ||
345 | LLPanelDirFindAll* self = ( LLPanelDirFindAll* )data; | 327 | LLPanelDirFindAll* self = ( LLPanelDirFindAll* )data; |
346 | if ( self->mWebBrowser ) | 328 | if ( self->mWebBrowser ) |
347 | { | 329 | { |
348 | self->mWebBrowser->navigateHome(); | 330 | self->mWebBrowser->navigateHome(); |
349 | } | 331 | } |
350 | #endif // LL_LIBXUL_ENABLED | ||
351 | } | 332 | } |
352 | 333 | ||
353 | // static | 334 | // static |
@@ -368,12 +349,12 @@ void LLPanelDirFindAll::onClickSearch(void* data) | |||
368 | 349 | ||
369 | void LLPanelDirFindAll::onNavigateBegin( const EventType& eventIn ) | 350 | void LLPanelDirFindAll::onNavigateBegin( const EventType& eventIn ) |
370 | { | 351 | { |
371 | childSetText("status_text", childGetText("loading_text")); | 352 | childSetText("status_text", getString("loading_text")); |
372 | } | 353 | } |
373 | 354 | ||
374 | void LLPanelDirFindAll::onNavigateComplete( const EventType& eventIn ) | 355 | void LLPanelDirFindAll::onNavigateComplete( const EventType& eventIn ) |
375 | { | 356 | { |
376 | childSetText("status_text", childGetText("done_text")); | 357 | childSetText("status_text", getString("done_text")); |
377 | } | 358 | } |
378 | 359 | ||
379 | void LLPanelDirFindAll::onLocationChange( const EventType& eventIn ) | 360 | void LLPanelDirFindAll::onLocationChange( const EventType& eventIn ) |