diff options
| author | Lynx Linden <lynx@lindenlab.com> | 2009-12-02 16:52:19 +0000 |
|---|---|---|
| committer | Lynx Linden <lynx@lindenlab.com> | 2009-12-02 16:52:19 +0000 |
| commit | a6b9765d6237f6a251eb875d38164b53c0eb2bd2 (patch) | |
| tree | b0afbc6be930ef6d831ce8524b6c337a74160865 /indra/newview/llpanelhome.cpp | |
| parent | 3d3f2fa4be8b28041b46983010547fb804ff8144 (diff) | |
DEV-43439: Initial implementation of web-based Home panel.
The home panel now displays a web page - hardcoded to secondlife.com
until we have something more relevant to display.
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; } + |
