diff options
Diffstat (limited to 'linden/indra/newview/llpanellogin.cpp')
-rw-r--r-- | linden/indra/newview/llpanellogin.cpp | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index e604493..d0f2041 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2008, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -86,6 +86,25 @@ const S32 MAX_PASSWORD = 16; | |||
86 | LLPanelLogin *LLPanelLogin::sInstance = NULL; | 86 | LLPanelLogin *LLPanelLogin::sInstance = NULL; |
87 | 87 | ||
88 | 88 | ||
89 | class LLLoginRefreshHandler : public LLCommandHandler | ||
90 | { | ||
91 | public: | ||
92 | LLLoginRefreshHandler() : LLCommandHandler("login_refresh") { } | ||
93 | bool handle(const LLSD& tokens, const LLSD& queryMap) | ||
94 | { | ||
95 | #if LL_LIBXUL_ENABLED | ||
96 | if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) | ||
97 | { | ||
98 | LLPanelLogin::loadLoginPage(); | ||
99 | } | ||
100 | #endif | ||
101 | return true; | ||
102 | } | ||
103 | }; | ||
104 | |||
105 | LLLoginRefreshHandler gLoginRefreshHandler; | ||
106 | |||
107 | |||
89 | //parses the input url and returns true if afterwards | 108 | //parses the input url and returns true if afterwards |
90 | //a web-login-key, firstname and lastname is set | 109 | //a web-login-key, firstname and lastname is set |
91 | bool LLLoginHandler::parseDirectLogin(std::string url) | 110 | bool LLLoginHandler::parseDirectLogin(std::string url) |
@@ -527,6 +546,7 @@ void LLPanelLogin::show(const LLRect &rect, | |||
527 | { | 546 | { |
528 | new LLPanelLogin(rect, show_server, callback, callback_data); | 547 | new LLPanelLogin(rect, show_server, callback, callback_data); |
529 | 548 | ||
549 | #if LL_LIBXUL_ENABLED | ||
530 | LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(sInstance, "login_html"); | 550 | LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(sInstance, "login_html"); |
531 | 551 | ||
532 | if (!web_browser) return; | 552 | if (!web_browser) return; |
@@ -539,6 +559,7 @@ void LLPanelLogin::show(const LLRect &rect, | |||
539 | 559 | ||
540 | // Make sure that focus always goes here (and use the latest sInstance that was just created) | 560 | // Make sure that focus always goes here (and use the latest sInstance that was just created) |
541 | gFocusMgr.setDefaultKeyboardFocus(web_browser); | 561 | gFocusMgr.setDefaultKeyboardFocus(web_browser); |
562 | #endif | ||
542 | } | 563 | } |
543 | 564 | ||
544 | 565 | ||
@@ -561,12 +582,14 @@ void LLPanelLogin::setAlwaysRefresh(bool refresh) | |||
561 | { | 582 | { |
562 | if (LLStartUp::getStartupState() >= STATE_LOGIN_CLEANUP) return; | 583 | if (LLStartUp::getStartupState() >= STATE_LOGIN_CLEANUP) return; |
563 | 584 | ||
585 | #if LL_LIBXUL_ENABLED | ||
564 | LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(sInstance, "login_html"); | 586 | LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(sInstance, "login_html"); |
565 | 587 | ||
566 | if (web_browser) | 588 | if (web_browser) |
567 | { | 589 | { |
568 | web_browser->setAlwaysRefresh(refresh); | 590 | web_browser->setAlwaysRefresh(refresh); |
569 | } | 591 | } |
592 | #endif | ||
570 | } | 593 | } |
571 | 594 | ||
572 | 595 | ||
@@ -577,8 +600,6 @@ void LLPanelLogin::loadLoginPage() | |||
577 | 600 | ||
578 | LLURLSimString::sInstance.parse(); | 601 | LLURLSimString::sInstance.parse(); |
579 | 602 | ||
580 | LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(sInstance, "login_html"); | ||
581 | |||
582 | std::ostringstream oStr; | 603 | std::ostringstream oStr; |
583 | 604 | ||
584 | LLString location; | 605 | LLString location; |
@@ -690,8 +711,12 @@ void LLPanelLogin::loadLoginPage() | |||
690 | oStr << "&show_grid=TRUE"; | 711 | oStr << "&show_grid=TRUE"; |
691 | #endif | 712 | #endif |
692 | 713 | ||
714 | #if LL_LIBXUL_ENABLED | ||
715 | LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(sInstance, "login_html"); | ||
716 | |||
693 | // navigate to the "real" page | 717 | // navigate to the "real" page |
694 | web_browser->navigateTo( oStr.str() ); | 718 | web_browser->navigateTo( oStr.str() ); |
719 | #endif | ||
695 | } | 720 | } |
696 | 721 | ||
697 | #if LL_LIBXUL_ENABLED | 722 | #if LL_LIBXUL_ENABLED |