From a8b2a10c61e62a378178f396e4683d6a8c004ff6 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Fri, 31 May 2013 04:46:38 -0500 Subject: [PATCH 1/2] Switch pie menu over to ui-local transform matrix stack. --- indra/llui/llmenugl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 8b16476ed..f1f61a045 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3749,9 +3749,9 @@ void LLPieMenu::draw() F32 center_y = height/2; S32 steps = 100; - gGL.pushMatrix(); + gGL.pushUIMatrix(); { - gGL.translatef(center_x, center_y, 0.f); + gGL.translateUI(center_x, center_y, 0.f); F32 line_width = LLUI::sConfigGroup->getF32("PieMenuLineWidth"); LLColor4 line_color = LLUI::sColorsGroup->getColor("PieMenuLineColor"); @@ -3799,7 +3799,7 @@ void LLPieMenu::draw() LLUI::setLineWidth(1.0f); } - gGL.popMatrix(); + gGL.popUIMatrix(); mHoverThisFrame = FALSE; @@ -3815,9 +3815,9 @@ void LLPieMenu::drawBackground(LLMenuItemGL* itemp, LLColor4& color) S32 steps = 100; gGL.color4fv( color.mV ); - gGL.pushMatrix(); + gGL.pushUIMatrix(); { - gGL.translatef(center_x - itemp->getRect().mLeft, center_y - itemp->getRect().mBottom, 0.f); + gGL.translateUI(center_x - itemp->getRect().mLeft, center_y - itemp->getRect().mBottom, 0.f); item_list_t::iterator item_iter; S32 i = 0; @@ -3837,7 +3837,7 @@ void LLPieMenu::drawBackground(LLMenuItemGL* itemp, LLColor4& color) i++; } } - gGL.popMatrix(); + gGL.popUIMatrix(); } // virtual From 07165961dcf87e4361682d224172a23932313e70 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Sun, 2 Jun 2013 17:51:17 -0500 Subject: [PATCH 2/2] Handle "indeterminate" login response (indicating login server redirection). (This changeset will conflict in a future merge. Prefer this commits changeset where there's overlap) --- indra/newview/llstartup.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 9f44db11b..a8624f7b0 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -391,6 +391,7 @@ bool idle_startup() static LLUUID web_login_key; static std::string password; static std::vector requested_options; + static std::string redirect_uri; static LLVector3 initial_sun_direction(1.f, 0.f, 0.f); static LLVector3 agent_start_position_region(10.f, 10.f, 10.f); // default for when no space server @@ -1255,6 +1256,8 @@ bool idle_startup() if (STATE_LOGIN_AUTHENTICATE == LLStartUp::getStartupState()) { + redirect_uri.clear(); + LL_DEBUGS("AppInit") << "STATE_LOGIN_AUTHENTICATE" << LL_ENDL; set_startup_status(progress, auth_desc, auth_message); @@ -1342,6 +1345,9 @@ bool idle_startup() LLViewerLogin* vl = LLViewerLogin::getInstance(); std::string grid_uri = vl->getCurrentGridURI(); + if(!redirect_uri.empty()) + grid_uri = redirect_uri; + //redirect_uri.clear(); //Should this be cleared immediately after consumption? Doing this will break retrying on http error. llinfos << "Authenticating with " << grid_uri << llendl; @@ -1460,6 +1466,24 @@ bool idle_startup() successful_login = true; Debug(if (gCurlIo) dc::curlio.off()); // Login succeeded: restore dc::curlio to original state. } + else if(login_response == "indeterminate") + { + progress += 0.01f; + auth_message = message_response; + auth_method = response["next_method"].asString(); + redirect_uri = response["next_url"].asString(); + if(auth_method.substr(0, 5) == "login") + { + auth_desc = LLTrans::getString("LoginAuthenticating"); + } + else + { + auth_desc = LLTrans::getString("LoginMaintenance"); + } + set_startup_status(progress, auth_desc, auth_message); + LLStartUp::setStartupState(STATE_XMLRPC_LEGACY_LOGIN ); + return false; + } else { emsg << LLTrans::getString("LoginFailed") + "\n";