From 109e2a25f8a71dae79fba7b5a58b9f38fcbeb76d Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 18 Oct 2008 20:46:26 -0700 Subject: Added menu option for inworld browser. --- ChangeLog.txt | 6 ++++++ linden/indra/newview/app_settings/settings.xml | 11 +++++++++++ linden/indra/newview/llfloaterhtmlhelp.cpp | 9 +++++++++ linden/indra/newview/llfloaterhtmlhelp.h | 1 + linden/indra/newview/llviewermenu.cpp | 4 ++++ linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | 5 +++++ 6 files changed, 36 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index fad5530..876ef3e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -79,6 +79,12 @@ 2008-10-18 McCabe Maxsted + * linden\indra\newview\skins\default\xui\en-us\menu_viewer.xml: + Added menu option for inworld browser. + * linden\indra\newview\llviewermenu.cpp: + Ditto. + + * linden/indra/newview/app_settings/settings.xml: Added Home button functionality to the web browser. * linden/indra/newview/llfloaterhtmlhelp.cpp: diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 8093521..209de41 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -686,6 +686,17 @@ Value http://www.imprudenceviewer.org + BrowserLastVisited + + Comment + Last visited page + Persist + 0 + Type + String + Value + + BlockAvatarAppearanceMessages Comment diff --git a/linden/indra/newview/llfloaterhtmlhelp.cpp b/linden/indra/newview/llfloaterhtmlhelp.cpp index a9d2e46..7fe4d59 100644 --- a/linden/indra/newview/llfloaterhtmlhelp.cpp +++ b/linden/indra/newview/llfloaterhtmlhelp.cpp @@ -150,6 +150,7 @@ void LLFloaterMediaBrowser::onLocationChange( const EventType& eventIn ) childSetEnabled("back", mBrowser->canNavigateBack()); childSetEnabled("forward", mBrowser->canNavigateForward()); childSetEnabled("reload", TRUE); + gSavedSettings.setString("BrowserLastVisited", truncated_url); } LLFloaterMediaBrowser* LLFloaterMediaBrowser::showInstance(const LLSD& media_url) @@ -160,6 +161,14 @@ LLFloaterMediaBrowser* LLFloaterMediaBrowser::showInstance(const LLSD& media_url return floaterp; } +void LLFloaterMediaBrowser::show() +{ + //Show home url if new session, last visited if not + std::string last_url = gSavedSettings.getString("BrowserLastVisited"); + if(last_url.empty()) + last_url = gSavedSettings.getString("BrowserHome"); + showInstance(last_url); +} //static void LLFloaterMediaBrowser::onEnterAddress(LLUICtrl* ctrl, void* user_data) { diff --git a/linden/indra/newview/llfloaterhtmlhelp.h b/linden/indra/newview/llfloaterhtmlhelp.h index f6da106..d726b77 100644 --- a/linden/indra/newview/llfloaterhtmlhelp.h +++ b/linden/indra/newview/llfloaterhtmlhelp.h @@ -65,6 +65,7 @@ public: void buildURLHistory(); static LLFloaterMediaBrowser* showInstance(const LLSD& id); + static void show(); static void onEnterAddress(LLUICtrl* ctrl, void* user_data); static void onClickRefresh(void* user_data); static void onClickBack(void* user_data); diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 5e67712..9859710 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -5305,6 +5305,10 @@ class LLShowFloater : public view_listener_t { LLFloaterActiveSpeakers::toggleInstance(LLSD()); } + else if (floater_name == "inworld browser") + { + LLFloaterMediaBrowser::show(); + } return true; } }; diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index a4f367c..67be436 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -271,6 +271,11 @@ + + + + -- cgit v1.1