diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-08 13:33:21 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-08 13:33:21 -0500 |
commit | 37848d29d9030e00086c3a499d28237cdf943e1b (patch) | |
tree | d4af1d371cf94a1970f9449b1adc8ba29e86bb9d /indra/newview/llpanelhome.cpp | |
parent | 51a196416d9bde106ae0cb3cfd77003a68a6265b (diff) | |
parent | e07ef0d0e0e8cbd58afd4c6ee970634bd2f783e7 (diff) |
automated merge viewer2.0->avp
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llpanelhome.cpp')
-rw-r--r-- | indra/newview/llpanelhome.cpp | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/indra/newview/llpanelhome.cpp b/indra/newview/llpanelhome.cpp index de7a85836d..92b6d2f619 100644 --- a/indra/newview/llpanelhome.cpp +++ b/indra/newview/llpanelhome.cpp @@ -35,6 +35,7 @@ #include "llpanelhome.h" #include "llmediactrl.h" +#include "llviewerhome.h" static LLRegisterPanelClassWrapper<LLPanelHome> t_people("panel_sidetray_home"); @@ -62,51 +63,17 @@ BOOL LLPanelHome::postBuild() mBrowser = getChild<LLMediaCtrl>("browser"); if (mBrowser) { + // read the URL to display from settings.xml + std::string url = LLViewerHome::getHomeURL(); + mBrowser->addObserver(this); mBrowser->setTrusted(true); - mBrowser->setHomePageUrl("http://www.secondlife.com/"); - - childSetAction("back", onClickBack, this); - childSetAction("forward", onClickForward, this); - childSetAction("home", onClickHome, this); + mBrowser->setHomePageUrl(url); } return TRUE; } -//static -void LLPanelHome::onClickBack(void* user_data) -{ - LLPanelHome *self = (LLPanelHome*)user_data; - if (self && self->mBrowser) - { - self->mBrowser->navigateBack(); - } -} - -//static -void LLPanelHome::onClickForward(void* user_data) -{ - LLPanelHome *self = (LLPanelHome*)user_data; - if (self && self->mBrowser) - { - self->mBrowser->navigateForward(); - } -} - -//static -void LLPanelHome::onClickHome(void* user_data) -{ - LLPanelHome *self = (LLPanelHome*)user_data; - if (self && self->mBrowser) - { - self->mBrowser->navigateHome(); - } -} - void LLPanelHome::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event) { - // update back/forward button state - childSetEnabled("back", mBrowser->canNavigateBack()); - childSetEnabled("forward", mBrowser->canNavigateForward()); } |