diff options
-rw-r--r-- | indra/newview/llpanelhome.cpp | 28 | ||||
-rw-r--r-- | indra/newview/llpanelhome.h | 10 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_help_browser.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_search.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_side_tray.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml | 5 |
6 files changed, 39 insertions, 7 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; } + diff --git a/indra/newview/llpanelhome.h b/indra/newview/llpanelhome.h index 2c60eecc39..d75e2c0d80 100644 --- a/indra/newview/llpanelhome.h +++ b/indra/newview/llpanelhome.h @@ -35,6 +35,9 @@ #define LL_LLPANELHOME_H #include "llpanel.h" +#include "llsd.h" + +class LLMediaCtrl; /** * Base class for web-based Home side tray @@ -44,7 +47,12 @@ class LLPanelHome : public LLPanel public: LLPanelHome(); - void reshape(S32 width, S32 height, BOOL called_from_parent); + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); + +private: + LLMediaCtrl *mBrowser; + bool mFirstView; }; #endif //LL_LLPANELHOME_H diff --git a/indra/newview/skins/default/xui/en/floater_help_browser.xml b/indra/newview/skins/default/xui/en/floater_help_browser.xml index f50ff01230..55a6179afb 100644 --- a/indra/newview/skins/default/xui/en/floater_help_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_help_browser.xml @@ -43,6 +43,7 @@ left="0" name="browser" top="0" + start_url="data:text/html,%3Chtml%3E%3Cbody bgcolor=%22#2A2A2A%22%3E%3C/body%3E%3C/html%3E" width="570" /> <button follows="bottom|left" diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index d9498586af..d363452204 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -47,6 +47,7 @@ left="0" name="browser" top="0" + start_url="data:text/html,%3Chtml%3E%3Cbody bgcolor=%22#2A2A2A%22%3E%3C/body%3E%3C/html%3E" width="570" /> <text follows="bottom|left" diff --git a/indra/newview/skins/default/xui/en/panel_side_tray.xml b/indra/newview/skins/default/xui/en/panel_side_tray.xml index 95242a9639..63b7112c17 100644 --- a/indra/newview/skins/default/xui/en/panel_side_tray.xml +++ b/indra/newview/skins/default/xui/en/panel_side_tray.xml @@ -23,6 +23,7 @@ background_visible="true" > <panel + class="panel_sidetray_home" name="panel_home" filename="panel_sidetray_home_tab.xml" label="home" diff --git a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml index e04a07b177..4fe1e08bf0 100644 --- a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml +++ b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml @@ -11,7 +11,6 @@ name="home_tab" width="333"> <panel - class="panel_sidetray_home" follows="all" height="550" layout="topleft" @@ -26,8 +25,8 @@ height="550" layout="topleft" left="0" - name="sidetray_home_browser" - start_url="about:blank" + name="browser" + start_url="data:text/html,%3Chtml%3E%3Cbody bgcolor=%22#2A2A2A%22 text=%22eeeeee%22%3E %3Ch3%3E %0D%0A%0D%0ALoading... %3C/h3%3E %3C/body%3E%3C/html%3E" top="0" width="313" /> </panel> |