aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterhtmlhelp.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterhtmlhelp.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/linden/indra/newview/llfloaterhtmlhelp.cpp b/linden/indra/newview/llfloaterhtmlhelp.cpp
index 10afce8..70de21d 100644
--- a/linden/indra/newview/llfloaterhtmlhelp.cpp
+++ b/linden/indra/newview/llfloaterhtmlhelp.cpp
@@ -49,14 +49,13 @@ class LLFloaterHtmlHelp :
49 public LLWebBrowserCtrlObserver 49 public LLWebBrowserCtrlObserver
50{ 50{
51public: 51public:
52 LLFloaterHtmlHelp(std::string start_url = ""); 52 LLFloaterHtmlHelp(std::string start_url, std::string title);
53 virtual ~LLFloaterHtmlHelp(); 53 virtual ~LLFloaterHtmlHelp();
54 54
55 virtual void onClose( bool app_quitting ); 55 virtual void onClose( bool app_quitting );
56 virtual void draw(); 56 virtual void draw();
57 57
58 static void show(); 58 static void show(std::string url, std::string title);
59 static void show(std::string url);
60 static void onClickBack( void* data ); 59 static void onClickBack( void* data );
61 static void onClickHome( void* data ); 60 static void onClickHome( void* data );
62 static void onClickForward( void* data ); 61 static void onClickForward( void* data );
@@ -88,7 +87,7 @@ BOOL LLFloaterHtmlHelp::sFloaterOpened = FALSE;
88 87
89//////////////////////////////////////////////////////////////////////////////// 88////////////////////////////////////////////////////////////////////////////////
90// 89//
91LLFloaterHtmlHelp::LLFloaterHtmlHelp(std::string start_url) 90LLFloaterHtmlHelp::LLFloaterHtmlHelp(std::string start_url, std::string title)
92: LLFloater( "HTML Help" ), 91: LLFloater( "HTML Help" ),
93 mWebBrowser( 0 ), 92 mWebBrowser( 0 ),
94 mStatusTextContents( "" ), 93 mStatusTextContents( "" ),
@@ -102,10 +101,12 @@ LLFloaterHtmlHelp::LLFloaterHtmlHelp(std::string start_url)
102 childSetAction("back_btn", onClickBack, this); 101 childSetAction("back_btn", onClickBack, this);
103 childSetAction("home_btn", onClickHome, this); 102 childSetAction("home_btn", onClickHome, this);
104 childSetAction("forward_btn", onClickForward, this); 103 childSetAction("forward_btn", onClickForward, this);
105 childSetAction("close_btn", onClickClose, this);
106 104
107 setDefaultBtn("close_btn"); 105 if (!title.empty())
108 106 {
107 setTitle(title);
108 }
109
109 mWebBrowser = LLViewerUICtrlFactory::getWebBrowserByName(this, "html_help_browser" ); 110 mWebBrowser = LLViewerUICtrlFactory::getWebBrowserByName(this, "html_help_browser" );
110 if ( mWebBrowser ) 111 if ( mWebBrowser )
111 { 112 {
@@ -168,7 +169,7 @@ void LLFloaterHtmlHelp::draw()
168 169
169//////////////////////////////////////////////////////////////////////////////// 170////////////////////////////////////////////////////////////////////////////////
170// 171//
171void LLFloaterHtmlHelp::show(std::string url) 172void LLFloaterHtmlHelp::show(std::string url, std::string title)
172{ 173{
173 gViewerWindow->alertXml("ClickOpenF1Help", onClickF1HelpLoadURL, (void*) NULL); 174 gViewerWindow->alertXml("ClickOpenF1Help", onClickF1HelpLoadURL, (void*) NULL);
174 175
@@ -188,7 +189,7 @@ void LLFloaterHtmlHelp::show(std::string url)
188 return; 189 return;
189 } 190 }
190 191
191 LLFloaterHtmlHelp* self = new LLFloaterHtmlHelp(url); 192 LLFloaterHtmlHelp* self = new LLFloaterHtmlHelp(url, title);
192 193
193 // reposition floater from saved settings 194 // reposition floater from saved settings
194 LLRect rect = gSavedSettings.getRect( "HtmlHelpRect" ); 195 LLRect rect = gSavedSettings.getRect( "HtmlHelpRect" );
@@ -313,9 +314,9 @@ LLViewerHtmlHelp::~LLViewerHtmlHelp()
313 LLUI::setHtmlHelp(NULL); 314 LLUI::setHtmlHelp(NULL);
314} 315}
315 316
316void LLViewerHtmlHelp::show(std::string url) 317void LLViewerHtmlHelp::show(std::string url, std::string title)
317{ 318{
318 LLFloaterHtmlHelp::show(url); 319 LLFloaterHtmlHelp::show(url, title);
319} 320}
320 321
321BOOL LLViewerHtmlHelp::getFloaterOpened() 322BOOL LLViewerHtmlHelp::getFloaterOpened()