diff options
author | Armin Weatherwax | 2009-06-26 09:39:58 +0200 |
---|---|---|
committer | Armin Weatherwax | 2009-07-11 13:42:35 +0200 |
commit | 7067b31a6114089217e482bfecc58fd56bed4272 (patch) | |
tree | e0bb99a42c64cdb75e9ca15a38bc1171377c7739 /linden/indra/newview/authentication_floater.cpp | |
parent | Updated URL for Mac OpenAL libs package. (diff) | |
download | meta-impy-7067b31a6114089217e482bfecc58fd56bed4272.zip meta-impy-7067b31a6114089217e482bfecc58fd56bed4272.tar.gz meta-impy-7067b31a6114089217e482bfecc58fd56bed4272.tar.bz2 meta-impy-7067b31a6114089217e482bfecc58fd56bed4272.tar.xz |
BROKEN logoff/relog crashing inconsistently on various startup states.
Diffstat (limited to 'linden/indra/newview/authentication_floater.cpp')
-rw-r--r-- | linden/indra/newview/authentication_floater.cpp | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/linden/indra/newview/authentication_floater.cpp b/linden/indra/newview/authentication_floater.cpp new file mode 100644 index 0000000..2fc7add --- /dev/null +++ b/linden/indra/newview/authentication_floater.cpp | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * AuthenticationFloater.cpp | ||
3 | * Cross-grid authentication system view. | ||
4 | * | ||
5 | * Created by RMS on 7/1/08. | ||
6 | * | ||
7 | */ | ||
8 | |||
9 | |||
10 | #include "llviewerprecompiledheaders.h" | ||
11 | #include "authentication_floater.h" | ||
12 | #include "lluictrlfactory.h" | ||
13 | |||
14 | // Statics | ||
15 | AuthenticationFloater* AuthenticationFloater::sInstance = NULL; | ||
16 | AuthenticationController* AuthenticationFloater::sController = NULL; | ||
17 | |||
18 | AuthenticationFloater::AuthenticationFloater() | ||
19 | : LLFloater("floater_authentication") | ||
20 | { | ||
21 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_authentication.xml"); | ||
22 | |||
23 | childSetTextArg("Intro_text", "[TARGET_GRID]", sController->getTargetGrid()); | ||
24 | |||
25 | childSetCommitCallback("User_edit", controller()->onCommitUser, this); | ||
26 | childSetCommitCallback("Password_edit", controller()->onCommitPassword, this); | ||
27 | childSetCommitCallback("Remember_check", controller()->onCommitRemember, this); | ||
28 | |||
29 | childSetAction("OK", controller()->onAccept, this); | ||
30 | childSetAction("Cancel", controller()->onCancel, this); | ||
31 | childSetAction("Register", controller()->onClickRegister, this); | ||
32 | |||
33 | setDefaultBtn("OK"); | ||
34 | } | ||
35 | |||
36 | AuthenticationFloater::~AuthenticationFloater() | ||
37 | { | ||
38 | sInstance = NULL; | ||
39 | delete sController; | ||
40 | sController = NULL; | ||
41 | } | ||
42 | |||
43 | // static | ||
44 | void AuthenticationFloater::show(void* userdata) | ||
45 | { | ||
46 | std::string target_grid; | ||
47 | void (*cb)(void*) = NULL; | ||
48 | |||
49 | if (!userdata) | ||
50 | { | ||
51 | target_grid = "Authentication Test"; | ||
52 | } | ||
53 | |||
54 | if (!sInstance) | ||
55 | sInstance = new AuthenticationFloater(); | ||
56 | if (!sController) | ||
57 | sController = new AuthenticationController(target_grid, cb); | ||
58 | |||
59 | sInstance->open(); | ||
60 | } | ||
61 | |||
62 | void AuthenticationFloater::accept() | ||
63 | { | ||
64 | llinfos << "accept" << llendl; | ||
65 | } | ||
66 | |||
67 | void AuthenticationFloater::cancel() | ||
68 | { | ||
69 | llinfos << "cancel" << llendl; | ||
70 | } | ||
71 | |||
72 | AuthenticationController* AuthenticationFloater::controller() | ||
73 | { | ||
74 | return sController; | ||
75 | } | ||