diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterhtmlhelp.cpp | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/linden/indra/newview/llfloaterhtmlhelp.cpp b/linden/indra/newview/llfloaterhtmlhelp.cpp index 5337c07..9f07e0f 100644 --- a/linden/indra/newview/llfloaterhtmlhelp.cpp +++ b/linden/indra/newview/llfloaterhtmlhelp.cpp | |||
@@ -35,6 +35,8 @@ | |||
35 | #include "llfloaterhtmlhelp.h" | 35 | #include "llfloaterhtmlhelp.h" |
36 | #include "llfloaterhtml.h" | 36 | #include "llfloaterhtml.h" |
37 | 37 | ||
38 | #include "llchat.h" | ||
39 | #include "llfloaterchat.h" | ||
38 | #include "llparcel.h" | 40 | #include "llparcel.h" |
39 | #include "lluictrlfactory.h" | 41 | #include "lluictrlfactory.h" |
40 | #include "llwebbrowserctrl.h" | 42 | #include "llwebbrowserctrl.h" |
@@ -42,6 +44,7 @@ | |||
42 | #include "llviewercontrol.h" | 44 | #include "llviewercontrol.h" |
43 | #include "llviewerparcelmgr.h" | 45 | #include "llviewerparcelmgr.h" |
44 | #include "llweb.h" | 46 | #include "llweb.h" |
47 | #include "lltrans.h" | ||
45 | #include "llui.h" | 48 | #include "llui.h" |
46 | #include "roles_constants.h" | 49 | #include "roles_constants.h" |
47 | 50 | ||
@@ -440,18 +443,32 @@ void LLFloaterHtmlHelp::onClickBack( void* data ) | |||
440 | 443 | ||
441 | //////////////////////////////////////////////////////////////////////////////// | 444 | //////////////////////////////////////////////////////////////////////////////// |
442 | // | 445 | // |
443 | void LLFloaterHtmlHelp::onClickHome( void* data ) | 446 | void LLFloaterMediaBrowser::onClickHome(void* user_data) |
444 | { | 447 | { |
445 | LLFloaterHtmlHelp* self = ( LLFloaterHtmlHelp* )data; | 448 | LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; |
446 | if ( self ) | 449 | if (self) |
447 | { | 450 | { |
448 | // get the home page URL (which can differ from the start URL) from XML and go there | 451 | if (self->mBrowser) |
449 | LLWebBrowserCtrl* web_browser = self->getChild<LLWebBrowserCtrl>("html_help_browser" ); | ||
450 | if ( web_browser ) | ||
451 | { | 452 | { |
452 | web_browser->navigateHome(); | 453 | std::string home_url = gSavedSettings.getString("BrowserHome"); |
453 | }; | 454 | self->mBrowser->navigateTo(home_url); |
454 | }; | 455 | } |
456 | } | ||
457 | } | ||
458 | |||
459 | void LLFloaterMediaBrowser::onClickSetHome(void* user_data) | ||
460 | { | ||
461 | LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; | ||
462 | std::string url = self->mCurrentURL; | ||
463 | if(!url.empty()) | ||
464 | { | ||
465 | LLChat chat; | ||
466 | std::string log_message = LLTrans::getString("new_home_page") + " "; | ||
467 | log_message += url; | ||
468 | chat.mText = log_message; | ||
469 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
470 | gSavedSettings.setString("BrowserHome", url); | ||
471 | } | ||
455 | } | 472 | } |
456 | 473 | ||
457 | //////////////////////////////////////////////////////////////////////////////// | 474 | //////////////////////////////////////////////////////////////////////////////// |