From 87f64b2d8deeeb415bf765268d35b0c0af76b61d Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Mon, 21 Dec 2009 13:48:46 -0800 Subject: EXT-3550 Fixed messages from login.cgi not being displayed. Handling message from "indeterminate" state - feeding them to the llprogressview. Handling showing error message from incomplete login. --- indra/newview/llprogressview.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'indra/newview/llprogressview.cpp') diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 5f6b210767..f723d9f240 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -72,10 +72,12 @@ const S32 ANIMATION_FRAMES = 1; //13; LLProgressView::LLProgressView(const LLRect &rect) : LLPanel(), mPercentDone( 0.f ), - mMouseDownInActiveArea( false ) + mMouseDownInActiveArea( false ), + mUpdateEvents("LLProgressView") { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_progress.xml"); reshape(rect.getWidth(), rect.getHeight()); + mUpdateEvents.listen("self", boost::bind(&LLProgressView::handleUpdate, this, _1)); } BOOL LLProgressView::postBuild() @@ -260,3 +262,26 @@ void LLProgressView::onClickMessage(void* data) } } } + +bool LLProgressView::handleUpdate(const LLSD& event_data) +{ + LLSD message = event_data.get("message"); + LLSD desc = event_data.get("desc"); + LLSD percent = event_data.get("percent"); + + if(message.isUndefined()) + { + setMessage(message.asString()); + } + + if(desc.isDefined()) + { + setText(desc.asString()); + } + + if(percent.isDefined()) + { + setPercent(percent.asReal()); + } + return false; +} -- cgit v1.3 From e6349ac1927cb311c714e37c710c069b6de67a0b Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Mon, 21 Dec 2009 14:27:02 -0800 Subject: EXT-3550 Post-review fixes to previous commit. Reviewed by Nat --- indra/newview/llprogressview.cpp | 2 +- indra/newview/llstartup.cpp | 26 ++++++++++++-------------- indra/newview/llstartup.h | 1 + 3 files changed, 14 insertions(+), 15 deletions(-) (limited to 'indra/newview/llprogressview.cpp') diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index f723d9f240..7a48f890e0 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -269,7 +269,7 @@ bool LLProgressView::handleUpdate(const LLSD& event_data) LLSD desc = event_data.get("desc"); LLSD percent = event_data.get("percent"); - if(message.isUndefined()) + if(message.isDefined()) { setMessage(message.asString()); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index fdf8fa171d..786bcb5742 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1082,6 +1082,17 @@ bool idle_startup() credentials["passwd"] = gPassword; login->connect(credentials); + LLStartUp::setStartupState( STATE_LOGIN_CURL_UNSTUCK ); + return FALSE; + } + + if(STATE_LOGIN_CURL_UNSTUCK == LLStartUp::getStartupState()) + { + // If we get here we have gotten past the potential stall + // in curl, so take "may appear frozen" out of progress bar. JC + auth_desc = LLTrans::getString("LoginInProgressNoFrozen"); + set_startup_status(progress, auth_desc, auth_message); + LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE ); return FALSE; } @@ -1168,20 +1179,6 @@ bool idle_startup() show_connect_box = true; } } - else - { - // If we get here we have gotten past the potential stall - // in curl, so take "may appear frozen" out of progress bar. JC - // *NOTE:Mani - Actual responses handled by LLLoginInstance::handleLoginEvent() - static bool has_set_unfrozen_msg = false; - if(!has_set_unfrozen_msg) - { - auth_desc = LLTrans::getString("LoginInProgressNoFrozen"); - set_startup_status(progress, auth_desc, auth_message); - has_set_unfrozen_msg = true; - } - } - return FALSE; } @@ -2703,6 +2700,7 @@ std::string LLStartUp::startupStateToString(EStartupState state) RTNENUM( STATE_LOGIN_WAIT ); RTNENUM( STATE_LOGIN_CLEANUP ); RTNENUM( STATE_LOGIN_AUTH_INIT ); + RTNENUM( STATE_LOGIN_CURL_UNSTUCK ); RTNENUM( STATE_LOGIN_PROCESS_RESPONSE ); RTNENUM( STATE_WORLD_INIT ); RTNENUM( STATE_MULTIMEDIA_INIT ); diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index ab11b42e74..92fe9521d3 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -55,6 +55,7 @@ typedef enum { STATE_LOGIN_WAIT, // Wait for user input at login screen STATE_LOGIN_CLEANUP, // Get rid of login screen and start login STATE_LOGIN_AUTH_INIT, // Start login to SL servers + STATE_LOGIN_CURL_UNSTUCK, // Update progress to remove "SL appears frozen" msg. STATE_LOGIN_PROCESS_RESPONSE, // Check authentication reply STATE_WORLD_INIT, // Start building the world STATE_MULTIMEDIA_INIT, // Init the rest of multimedia library -- cgit v1.3