diff options
author | McCabe Maxsted | 2008-10-18 20:46:26 -0700 |
---|---|---|
committer | Jacek Antonelli | 2008-12-15 18:49:01 -0600 |
commit | 109e2a25f8a71dae79fba7b5a58b9f38fcbeb76d (patch) | |
tree | 3d3afefe73779cc3f77d3f1c6203de6263c6b8d0 | |
parent | Added Home button functionality to the web browser. (diff) | |
download | meta-impy-109e2a25f8a71dae79fba7b5a58b9f38fcbeb76d.zip meta-impy-109e2a25f8a71dae79fba7b5a58b9f38fcbeb76d.tar.gz meta-impy-109e2a25f8a71dae79fba7b5a58b9f38fcbeb76d.tar.bz2 meta-impy-109e2a25f8a71dae79fba7b5a58b9f38fcbeb76d.tar.xz |
Added menu option for inworld browser.
-rw-r--r-- | ChangeLog.txt | 6 | ||||
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | linden/indra/newview/llfloaterhtmlhelp.cpp | 9 | ||||
-rw-r--r-- | linden/indra/newview/llfloaterhtmlhelp.h | 1 | ||||
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | 5 |
6 files changed, 36 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index fad5530..876ef3e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -79,6 +79,12 @@ | |||
79 | 79 | ||
80 | 2008-10-18 McCabe Maxsted <hakushakukun@gmail.com> | 80 | 2008-10-18 McCabe Maxsted <hakushakukun@gmail.com> |
81 | 81 | ||
82 | * linden\indra\newview\skins\default\xui\en-us\menu_viewer.xml: | ||
83 | Added menu option for inworld browser. | ||
84 | * linden\indra\newview\llviewermenu.cpp: | ||
85 | Ditto. | ||
86 | |||
87 | |||
82 | * linden/indra/newview/app_settings/settings.xml: | 88 | * linden/indra/newview/app_settings/settings.xml: |
83 | Added Home button functionality to the web browser. | 89 | Added Home button functionality to the web browser. |
84 | * linden/indra/newview/llfloaterhtmlhelp.cpp: | 90 | * 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 @@ | |||
686 | <key>Value</key> | 686 | <key>Value</key> |
687 | <string>http://www.imprudenceviewer.org</string> | 687 | <string>http://www.imprudenceviewer.org</string> |
688 | </map> | 688 | </map> |
689 | <key>BrowserLastVisited</key> | ||
690 | <map> | ||
691 | <key>Comment</key> | ||
692 | <string>Last visited page</string> | ||
693 | <key>Persist</key> | ||
694 | <integer>0</integer> | ||
695 | <key>Type</key> | ||
696 | <string>String</string> | ||
697 | <key>Value</key> | ||
698 | <string></string> | ||
699 | </map> | ||
689 | <key>BlockAvatarAppearanceMessages</key> | 700 | <key>BlockAvatarAppearanceMessages</key> |
690 | <map> | 701 | <map> |
691 | <key>Comment</key> | 702 | <key>Comment</key> |
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 ) | |||
150 | childSetEnabled("back", mBrowser->canNavigateBack()); | 150 | childSetEnabled("back", mBrowser->canNavigateBack()); |
151 | childSetEnabled("forward", mBrowser->canNavigateForward()); | 151 | childSetEnabled("forward", mBrowser->canNavigateForward()); |
152 | childSetEnabled("reload", TRUE); | 152 | childSetEnabled("reload", TRUE); |
153 | gSavedSettings.setString("BrowserLastVisited", truncated_url); | ||
153 | } | 154 | } |
154 | 155 | ||
155 | LLFloaterMediaBrowser* LLFloaterMediaBrowser::showInstance(const LLSD& media_url) | 156 | LLFloaterMediaBrowser* LLFloaterMediaBrowser::showInstance(const LLSD& media_url) |
@@ -160,6 +161,14 @@ LLFloaterMediaBrowser* LLFloaterMediaBrowser::showInstance(const LLSD& media_url | |||
160 | return floaterp; | 161 | return floaterp; |
161 | } | 162 | } |
162 | 163 | ||
164 | void LLFloaterMediaBrowser::show() | ||
165 | { | ||
166 | //Show home url if new session, last visited if not | ||
167 | std::string last_url = gSavedSettings.getString("BrowserLastVisited"); | ||
168 | if(last_url.empty()) | ||
169 | last_url = gSavedSettings.getString("BrowserHome"); | ||
170 | showInstance(last_url); | ||
171 | } | ||
163 | //static | 172 | //static |
164 | void LLFloaterMediaBrowser::onEnterAddress(LLUICtrl* ctrl, void* user_data) | 173 | void LLFloaterMediaBrowser::onEnterAddress(LLUICtrl* ctrl, void* user_data) |
165 | { | 174 | { |
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: | |||
65 | void buildURLHistory(); | 65 | void buildURLHistory(); |
66 | 66 | ||
67 | static LLFloaterMediaBrowser* showInstance(const LLSD& id); | 67 | static LLFloaterMediaBrowser* showInstance(const LLSD& id); |
68 | static void show(); | ||
68 | static void onEnterAddress(LLUICtrl* ctrl, void* user_data); | 69 | static void onEnterAddress(LLUICtrl* ctrl, void* user_data); |
69 | static void onClickRefresh(void* user_data); | 70 | static void onClickRefresh(void* user_data); |
70 | static void onClickBack(void* user_data); | 71 | 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 | |||
5305 | { | 5305 | { |
5306 | LLFloaterActiveSpeakers::toggleInstance(LLSD()); | 5306 | LLFloaterActiveSpeakers::toggleInstance(LLSD()); |
5307 | } | 5307 | } |
5308 | else if (floater_name == "inworld browser") | ||
5309 | { | ||
5310 | LLFloaterMediaBrowser::show(); | ||
5311 | } | ||
5308 | return true; | 5312 | return true; |
5309 | } | 5313 | } |
5310 | }; | 5314 | }; |
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 @@ | |||
271 | <on_enable function="View.EnableLastChatter" /> | 271 | <on_enable function="View.EnableLastChatter" /> |
272 | </menu_item_call> | 272 | </menu_item_call> |
273 | <menu_item_separator /> | 273 | <menu_item_separator /> |
274 | <menu_item_call name="Web Browser" label="Web Browser" | ||
275 | shortcut="control|B"> | ||
276 | <on_click function="ShowFloater" userdata="inworld browser" /> | ||
277 | </menu_item_call> | ||
278 | <menu_item_separator /> | ||
274 | <menu_item_check name="Toolbar" label="Toolbar"> | 279 | <menu_item_check name="Toolbar" label="Toolbar"> |
275 | <on_click function="ShowFloater" userdata="toolbar" /> | 280 | <on_click function="ShowFloater" userdata="toolbar" /> |
276 | <on_check function="FloaterVisible" userdata="toolbar" /> | 281 | <on_check function="FloaterVisible" userdata="toolbar" /> |