From 3fca923949667d1c713119043cd4aaeae4acfe09 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 29 Mar 2010 11:58:31 -0700 Subject: Fix initial outfit selection dialog to choose initial outfit based on what's passed up from login.cgi instead of just using hardcoded values. If nothing is passed up, it defaults to values in settings.xml --- indra/newview/app_settings/settings.xml | 23 +++++++++++++++++++++++ indra/newview/lllogininstance.cpp | 1 + indra/newview/llstartup.cpp | 31 +++++++++++++++++-------------- 3 files changed, 41 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6cbb6d05f4..aaa6b874d9 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2388,6 +2388,29 @@ Value 0 + DefaultFemaleAvatar + + Comment + Default Female Avatar + Persist + 1 + Type + String + Value + Female Shape & Outfit + + DefaultMaleAvatar + + Comment + Default Male Avatar + Persist + 1 + Type + String + Value + Male Shape & Outfit + + DefaultObjectTexture Comment diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index df7aa6f79d..0459c85050 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -148,6 +148,7 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia requested_options.append("adult_compliant"); //requested_options.append("inventory-targets"); requested_options.append("buddy-list"); + requested_options.append("newuser-config"); requested_options.append("ui-config"); #endif requested_options.append("voice-config"); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index a726d8c476..6bdae3cba9 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2360,8 +2360,6 @@ void asset_callback_nothing(LLVFS*, const LLUUID&, LLAssetType::EType, void*, S3 const std::string COMMON_GESTURES_FOLDER = "Common Gestures"; const std::string MALE_GESTURES_FOLDER = "Male Gestures"; const std::string FEMALE_GESTURES_FOLDER = "Female Gestures"; -const std::string MALE_OUTFIT_FOLDER = "Male Shape & Outfit"; -const std::string FEMALE_OUTFIT_FOLDER = "Female Shape & Outfit"; const S32 OPT_CLOSED_WINDOW = -1; const S32 OPT_MALE = 0; const S32 OPT_FEMALE = 1; @@ -2369,23 +2367,28 @@ const S32 OPT_TRUST_CERT = 0; const S32 OPT_CANCEL_TRUST = 1; bool callback_choose_gender(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); +{ + + // These defaults are returned from the server on login. They are set in login.xml. + // If no default is returned from the server, they are retrieved from settings.xml. + + S32 option = LLNotification::getSelectedOption(notification, response); switch(option) { - case OPT_MALE: - LLStartUp::loadInitialOutfit( MALE_OUTFIT_FOLDER, "male" ); - break; - - case OPT_FEMALE: - case OPT_CLOSED_WINDOW: - default: - LLStartUp::loadInitialOutfit( FEMALE_OUTFIT_FOLDER, "female" ); - break; + case OPT_MALE: + LLStartUp::loadInitialOutfit( gSavedSettings.getString("DefaultMaleAvatar"), "male" ); + break; + + case OPT_FEMALE: + case OPT_CLOSED_WINDOW: + default: + LLStartUp::loadInitialOutfit( gSavedSettings.getString("DefaultFemaleAvatar"), "female" ); + break; } return false; } + void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, const std::string& gender_name ) { @@ -3011,7 +3014,7 @@ bool process_login_success_response() LLStringOps::setupDatetimeInfo(pacific_daylight_time); } - static const char* CONFIG_OPTIONS[] = {"voice-config"}; + static const char* CONFIG_OPTIONS[] = {"voice-config", "newuser-config"}; for (int i = 0; i < sizeof(CONFIG_OPTIONS)/sizeof(CONFIG_OPTIONS[0]); i++) { LLSD options = response[CONFIG_OPTIONS[i]]; -- cgit v1.2.3