diff options
author | Jacek Antonelli | 2008-08-15 23:45:07 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:07 -0500 |
commit | 8465910c79b8e746e04fd581cca2d60399e569b9 (patch) | |
tree | f43fec3e83c46e0d6190dca923d6fb268b52ffdd /linden/indra/newview/llpanellogin.cpp | |
parent | Second Life viewer sources 1.18.2.1 (diff) | |
download | meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.zip meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.gz meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.bz2 meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.xz |
Second Life viewer sources 1.18.3.2-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanellogin.cpp | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 7a0482b..2df1097 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "llmd5.h" | 36 | #include "llmd5.h" |
37 | #include "llsecondlifeurls.h" | 37 | #include "llsecondlifeurls.h" |
38 | #include "llwindow.h" // shell_open() | 38 | #include "llwindow.h" // shell_open() |
39 | #include "llversion.h" | 39 | #include "llversionviewer.h" |
40 | #include "v4color.h" | 40 | #include "v4color.h" |
41 | 41 | ||
42 | #include "llbutton.h" | 42 | #include "llbutton.h" |
@@ -139,6 +139,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, | |||
139 | { | 139 | { |
140 | llwarns << "Duplicate instance of login view deleted" << llendl; | 140 | llwarns << "Duplicate instance of login view deleted" << llendl; |
141 | delete LLPanelLogin::sInstance; | 141 | delete LLPanelLogin::sInstance; |
142 | |||
143 | // Don't leave bad pointer in gFocusMgr | ||
144 | gFocusMgr.setDefaultKeyboardFocus(NULL); | ||
142 | } | 145 | } |
143 | 146 | ||
144 | LLPanelLogin::sInstance = this; | 147 | LLPanelLogin::sInstance = this; |
@@ -525,9 +528,10 @@ void LLPanelLogin::show(const LLRect &rect, | |||
525 | { | 528 | { |
526 | // Grab focus and move cursor to first enabled control | 529 | // Grab focus and move cursor to first enabled control |
527 | sInstance->setFocus(TRUE); | 530 | sInstance->setFocus(TRUE); |
528 | // make sure that focus always goes here | ||
529 | gFocusMgr.setDefaultKeyboardFocus(sInstance); | ||
530 | } | 531 | } |
532 | |||
533 | // Make sure that focus always goes here (and use the latest sInstance that was just created) | ||
534 | gFocusMgr.setDefaultKeyboardFocus(sInstance); | ||
531 | } | 535 | } |
532 | 536 | ||
533 | // static | 537 | // static |
@@ -608,35 +612,40 @@ void LLPanelLogin::getFields(LLString &firstname, LLString &lastname, LLString & | |||
608 | } | 612 | } |
609 | 613 | ||
610 | 614 | ||
611 | // static | 615 | // static. Return TRUE if user made a choice from the popup |
612 | void LLPanelLogin::getServer(LLString &server, S32 &domain_name) | 616 | BOOL LLPanelLogin::getServer(LLString &server, S32 &domain_name) |
613 | { | 617 | { |
618 | BOOL user_picked = FALSE; | ||
614 | if (!sInstance) | 619 | if (!sInstance) |
615 | { | 620 | { |
616 | llwarns << "Attempted getServer with no login view shown" << llendl; | 621 | llwarns << "Attempted getServer with no login view shown" << llendl; |
617 | return; | ||
618 | } | 622 | } |
619 | 623 | else | |
620 | LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo"); | ||
621 | if (combo) | ||
622 | { | 624 | { |
623 | LLSD combo_val = combo->getValue(); | 625 | LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo"); |
624 | if (LLSD::TypeInteger == combo_val.type()) | 626 | if (combo) |
625 | { | 627 | { |
626 | domain_name = combo->getValue().asInteger(); | 628 | LLSD combo_val = combo->getValue(); |
629 | if (LLSD::TypeInteger == combo_val.type()) | ||
630 | { | ||
631 | domain_name = combo->getValue().asInteger(); | ||
627 | 632 | ||
628 | if ((S32)USERSERVER_OTHER == domain_name) | 633 | if ((S32)USERSERVER_OTHER == domain_name) |
634 | { | ||
635 | server = gUserServerName; | ||
636 | } | ||
637 | } | ||
638 | else | ||
629 | { | 639 | { |
630 | server = gUserServerName; | 640 | // no valid selection, return other |
641 | domain_name = (S32)USERSERVER_OTHER; | ||
642 | server = combo_val.asString(); | ||
631 | } | 643 | } |
632 | } | 644 | user_picked = combo->isDirty(); |
633 | else | ||
634 | { | ||
635 | // no valid selection, return other | ||
636 | domain_name = (S32)USERSERVER_OTHER; | ||
637 | server = combo_val.asString(); | ||
638 | } | 645 | } |
639 | } | 646 | } |
647 | |||
648 | return user_picked; | ||
640 | } | 649 | } |
641 | 650 | ||
642 | // static | 651 | // static |