aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterhtmlhelp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfloaterhtmlhelp.cpp')
-rw-r--r--linden/indra/newview/llfloaterhtmlhelp.cpp36
1 files changed, 9 insertions, 27 deletions
diff --git a/linden/indra/newview/llfloaterhtmlhelp.cpp b/linden/indra/newview/llfloaterhtmlhelp.cpp
index ff69394..5caf7b1 100644
--- a/linden/indra/newview/llfloaterhtmlhelp.cpp
+++ b/linden/indra/newview/llfloaterhtmlhelp.cpp
@@ -95,6 +95,15 @@ BOOL LLFloaterMediaBrowser::postBuild()
95 childSetAction("set_home", onClickSetHome, this); 95 childSetAction("set_home", onClickSetHome, this);
96 96
97 buildURLHistory(); 97 buildURLHistory();
98
99 //Show home url if new session, last visited if not
100 std::string last_url = gSavedSettings.getString("BrowserLastVisited");
101 if (last_url.empty())
102 {
103 last_url = gSavedSettings.getString("BrowserHome");
104 }
105 openMedia(last_url);
106
98 return TRUE; 107 return TRUE;
99} 108}
100 109
@@ -158,33 +167,6 @@ void LLFloaterMediaBrowser::onLocationChange( const EventType& eventIn )
158 gSavedSettings.setString("BrowserLastVisited", truncated_url); 167 gSavedSettings.setString("BrowserLastVisited", truncated_url);
159} 168}
160 169
161LLFloaterMediaBrowser* LLFloaterMediaBrowser::showInstance(const LLSD& media_url)
162{
163 LLFloaterMediaBrowser* floaterp = LLUISingleton<LLFloaterMediaBrowser, VisibilityPolicy<LLFloater> >::showInstance(media_url);
164
165 floaterp->openMedia(media_url.asString());
166 return floaterp;
167}
168
169//static
170void LLFloaterMediaBrowser::toggle()
171{
172 LLFloaterMediaBrowser* self = LLFloaterMediaBrowser::getInstance();
173
174 if(self->getVisible())
175 {
176 self->close();
177 }
178 else
179 {
180 //Show home url if new session, last visited if not
181 std::string last_url = gSavedSettings.getString("BrowserLastVisited");
182 if(last_url.empty())
183 last_url = gSavedSettings.getString("BrowserHome");
184 showInstance(last_url);
185 }
186}
187
188//static 170//static
189void LLFloaterMediaBrowser::helpF1() 171void LLFloaterMediaBrowser::helpF1()
190{ 172{