diff options
Diffstat (limited to 'indra/newview/llpanelhome.cpp')
-rw-r--r-- | indra/newview/llpanelhome.cpp | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/indra/newview/llpanelhome.cpp b/indra/newview/llpanelhome.cpp index 7f2d24ab34..5e7b9ef6bb 100644 --- a/indra/newview/llpanelhome.cpp +++ b/indra/newview/llpanelhome.cpp @@ -34,14 +34,36 @@ #include "llviewerprecompiledheaders.h" #include "llpanelhome.h" +#include "llmediactrl.h" + static LLRegisterPanelClassWrapper<LLPanelHome> t_people("panel_sidetray_home"); LLPanelHome::LLPanelHome() : - LLPanel() + LLPanel(), + mBrowser(NULL), + mFirstView(true) +{ +} + +void LLPanelHome::onOpen(const LLSD& key) { + // display the home page the first time we open the panel + if (mFirstView && mBrowser) + { + mBrowser->navigateHome(); + } + mFirstView = false; } -void LLPanelHome::reshape(S32 width, S32 height, BOOL called_from_parent) +BOOL LLPanelHome::postBuild() { - return LLPanel::reshape(width, height, called_from_parent); + mBrowser = getChild<LLMediaCtrl>("browser"); + if (mBrowser) + { + mBrowser->setTrusted(true); + mBrowser->setHomePageUrl("http://www.secondlife.com/"); + } + + return TRUE; } + |