aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llwebbrowserctrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llwebbrowserctrl.cpp')
-rw-r--r--linden/indra/newview/llwebbrowserctrl.cpp42
1 files changed, 40 insertions, 2 deletions
diff --git a/linden/indra/newview/llwebbrowserctrl.cpp b/linden/indra/newview/llwebbrowserctrl.cpp
index e819f21..21270ed 100644
--- a/linden/indra/newview/llwebbrowserctrl.cpp
+++ b/linden/indra/newview/llwebbrowserctrl.cpp
@@ -43,6 +43,7 @@
43#include "llfloaterhtml.h" 43#include "llfloaterhtml.h"
44#include "llweb.h" 44#include "llweb.h"
45#include "llurlsimstring.h" 45#include "llurlsimstring.h"
46#include "llviewercontrol.h"
46 47
47// linden library includes 48// linden library includes
48#include "llfocusmgr.h" 49#include "llfocusmgr.h"
@@ -219,9 +220,8 @@ BOOL LLWebBrowserCtrl::handleMouseDown( S32 x, S32 y, MASK mask )
219// 220//
220BOOL LLWebBrowserCtrl::handleDoubleClick( S32 x, S32 y, MASK mask ) 221BOOL LLWebBrowserCtrl::handleDoubleClick( S32 x, S32 y, MASK mask )
221{ 222{
222 llinfos << "JAMESDEBUG handleDoubleClick web ctrl" << llendl;
223 convertInputCoords(x, y); 223 convertInputCoords(x, y);
224 //LLMozLib::getInstance()->mouseLeftDoubleClick( mEmbeddedBrowserWindowId, x, y ); 224 LLMozLib::getInstance()->mouseLeftDoubleClick( mEmbeddedBrowserWindowId, x, y );
225 225
226 gViewerWindow->setMouseCapture( this ); 226 gViewerWindow->setMouseCapture( this );
227 227
@@ -419,6 +419,44 @@ void LLWebBrowserCtrl::navigateTo( std::string urlIn )
419 } 419 }
420} 420}
421 421
422
423void LLWebBrowserCtrl::navigateToLocalPage( const std::string& subdir, const std::string& filename_in )
424{
425 std::string language = gSavedSettings.getString("Language");
426
427 if(language == "default")
428 {
429 language = gSavedSettings.getString("SystemLanguage");
430 }
431
432 std::string delim = gDirUtilp->getDirDelimiter();
433 std::string filename;
434
435 filename += subdir;
436 filename += delim;
437 filename += filename_in;
438
439 std::string expanded_filename = gDirUtilp->getExpandedFilename(LL_PATH_HTML, language, filename);
440
441 if (gDirUtilp->fileExists(expanded_filename))
442 {
443 navigateTo(expanded_filename);
444 return;
445 }
446 if (language != "en-us")
447 {
448 expanded_filename = gDirUtilp->getExpandedFilename(LL_PATH_HTML, "en-us", filename);
449 if (gDirUtilp->fileExists(expanded_filename))
450 {
451 navigateTo(expanded_filename);
452 return;
453 }
454 }
455
456 llwarns << "File " << subdir << delim << filename_in << "not found" << llendl;
457}
458
459
422//////////////////////////////////////////////////////////////////////////////// 460////////////////////////////////////////////////////////////////////////////////
423// 461//
424void LLWebBrowserCtrl::navigateHome() 462void LLWebBrowserCtrl::navigateHome()