aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-07-14 00:02:08 -0700
committerMcCabe Maxsted2010-07-15 02:10:04 -0700
commite085b89db33622230a578c6581031697b5f91d4e (patch)
tree1eac19a2b79e3695b871f368c151e2e57f50845a /linden
parentFixed Advanced Build Options default object size (#374). (diff)
downloadmeta-impy-e085b89db33622230a578c6581031697b5f91d4e.zip
meta-impy-e085b89db33622230a578c6581031697b5f91d4e.tar.gz
meta-impy-e085b89db33622230a578c6581031697b5f91d4e.tar.bz2
meta-impy-e085b89db33622230a578c6581031697b5f91d4e.tar.xz
Fixed #186: View > Web Browser broken
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/newview/llfloaterhtmlhelp.cpp36
-rw-r--r--linden/indra/newview/llfloaterhtmlhelp.h6
-rw-r--r--linden/indra/newview/llviewermenu.cpp2
3 files changed, 11 insertions, 33 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{
diff --git a/linden/indra/newview/llfloaterhtmlhelp.h b/linden/indra/newview/llfloaterhtmlhelp.h
index fa04f06..83f15cd 100644
--- a/linden/indra/newview/llfloaterhtmlhelp.h
+++ b/linden/indra/newview/llfloaterhtmlhelp.h
@@ -50,9 +50,8 @@ public:
50class LLComboBox; 50class LLComboBox;
51class LLWebBrowserCtrl; 51class LLWebBrowserCtrl;
52 52
53class LLFloaterMediaBrowser : public LLFloater, public LLUISingleton<LLFloaterMediaBrowser, VisibilityPolicy<LLFloater> >, public LLWebBrowserCtrlObserver 53class LLFloaterMediaBrowser : public LLFloater, public LLFloaterSingleton<LLFloaterMediaBrowser>, public LLWebBrowserCtrlObserver
54{ 54{
55 friend class LLUISingleton<LLFloaterMediaBrowser, VisibilityPolicy<LLFloater> >;
56public: 55public:
57 LLFloaterMediaBrowser(const LLSD& media_data); 56 LLFloaterMediaBrowser(const LLSD& media_data);
58 57
@@ -65,9 +64,6 @@ public:
65 void openMedia(const std::string& media_url); 64 void openMedia(const std::string& media_url);
66 void buildURLHistory(); 65 void buildURLHistory();
67 66
68 static LLFloaterMediaBrowser* showInstance(const LLSD& id);
69
70 static void toggle();
71 static void helpF1(); 67 static void helpF1();
72 68
73private: 69private:
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index ee2f2bc..a95c3c6 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -5937,7 +5937,7 @@ class LLShowFloater : public view_listener_t
5937 } 5937 }
5938 else if (floater_name == "inworld browser") 5938 else if (floater_name == "inworld browser")
5939 { 5939 {
5940 LLFloaterMediaBrowser::toggle(); 5940 LLFloaterMediaBrowser::toggleInstance(LLSD());
5941 } 5941 }
5942 else if (floater_name == "beacons") 5942 else if (floater_name == "beacons")
5943 { 5943 {