diff --git a/indra/llaudio/llvorbisencode.cpp b/indra/llaudio/llvorbisencode.cpp index 2e1ed9b505..f11e33e577 100755 --- a/indra/llaudio/llvorbisencode.cpp +++ b/indra/llaudio/llvorbisencode.cpp @@ -66,7 +66,10 @@ #endif -S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& error_msg) +// FIRE-17812: Increase sounds length to 60s on OpenSim +//S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& error_msg) +S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& error_msg, bool is_in_secondlife) +// { U16 num_channels = 0; U32 sample_rate = 0; @@ -189,7 +192,10 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro F32 clip_length = (F32)raw_data_length/(F32)bytes_per_sec; - if (clip_length > LLVORBIS_CLIP_MAX_TIME) + // FIRE-17812: Increase sounds length to 60s on OpenSim + //if (clip_length > LLVORBIS_CLIP_MAX_TIME) + if (clip_length > (is_in_secondlife ? LLVORBIS_CLIP_MAX_TIME : LLVORBIS_CLIP_MAX_TIME_OPENSIM)) + // { error_msg = "SoundFileInvalidTooLong"; return(LLVORBISENC_CLIP_TOO_LONG); @@ -198,7 +204,10 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro return(LLVORBISENC_NOERR); } -S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname) +// FIRE-17812: Increase sounds length to 60s on OpenSim +//S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname) +S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname, bool is_in_secondlife) +// { #define READ_BUFFER 1024 unsigned char readbuffer[READ_BUFFER*4+44]; /* out of the data segment, not the stack */ /*Flawfinder: ignore*/ @@ -222,7 +231,10 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname S32 format_error = 0; std::string error_msg; - if ((format_error = check_for_invalid_wav_formats(in_fname, error_msg))) + // FIRE-17812: Increase sounds length to 60s on OpenSim + //if ((format_error = check_for_invalid_wav_formats(in_fname, error_msg))) + if ((format_error = check_for_invalid_wav_formats(in_fname, error_msg, is_in_secondlife))) + // { LL_WARNS() << error_msg << ": " << in_fname << LL_ENDL; return(format_error); diff --git a/indra/llaudio/llvorbisencode.h b/indra/llaudio/llvorbisencode.h index 6b22a2cb59..933200329e 100755 --- a/indra/llaudio/llvorbisencode.h +++ b/indra/llaudio/llvorbisencode.h @@ -41,6 +41,7 @@ const S32 LLVORBISENC_CLIP_TOO_LONG = 10; // source file is too l const S32 LLVORBISENC_CHUNK_SIZE_ERR = 11; // chunk size is wrong const F32 LLVORBIS_CLIP_MAX_TIME = 10.0f; +const F32 LLVORBIS_CLIP_MAX_TIME_OPENSIM = 60.0f; // FIRE-17812: Increase sounds length to 60s on OpenSim const U8 LLVORBIS_CLIP_MAX_CHANNELS = 2; const U32 LLVORBIS_CLIP_SAMPLE_RATE = 44100; const U32 LLVORBIS_CLIP_MAX_SAMPLES_PER_CHANNEL = (U32)(LLVORBIS_CLIP_MAX_TIME * LLVORBIS_CLIP_SAMPLE_RATE); @@ -52,8 +53,12 @@ const size_t LLVORBIS_CLIP_MAX_SAMPLE_DATA = LLVORBIS_CLIP_MAX_SAMPL const size_t LLVORBIS_CLIP_REJECT_SAMPLES = LLVORBIS_CLIP_MAX_SAMPLES * 3; const size_t LLVORBIS_CLIP_REJECT_SIZE = LLVORBIS_CLIP_MAX_SAMPLE_DATA * 3; -S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& error_msg); -S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname); +// FIRE-17812: Increase sounds length to 60s on OpenSim +//S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& error_msg); +//S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname); +S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& error_msg, bool is_in_secondlife); +S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname, bool is_in_secondlife); +// #endif diff --git a/indra/newview/fspanellogin.cpp b/indra/newview/fspanellogin.cpp index 15702e0384..3049ffe7ee 100644 --- a/indra/newview/fspanellogin.cpp +++ b/indra/newview/fspanellogin.cpp @@ -77,7 +77,6 @@ #include "llsdserialize.h" -const S32 BLACK_BORDER_HEIGHT = 160; const S32 MAX_PASSWORD_SL = 16; const S32 MAX_PASSWORD_OPENSIM = 255; @@ -177,9 +176,11 @@ FSPanelLogin::FSPanelLogin(const LLRect &rect, void (*callback)(S32 option, void* user_data), void *cb_data) : LLPanel(), - mLogoImage(), mCallback(callback), mCallbackData(cb_data), + mUsernameLength(0), + mPasswordLength(0), + mLocationLength(0), mShowFavorites(false) { setBackgroundVisible(FALSE); @@ -194,9 +195,6 @@ FSPanelLogin::FSPanelLogin(const LLRect &rect, login_holder->addChild(this); } - // Logo - mLogoImage = LLUI::getUIImage("startup_logo"); - buildFromFile( "panel_fs_login.xml"); reshape(rect.getWidth(), rect.getHeight()); @@ -211,13 +209,13 @@ FSPanelLogin::FSPanelLogin(const LLRect &rect, // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("forgot_password_text")); - LLComboBox* location_combo = getChild("start_location_combo"); + LLComboBox* favorites_combo = getChild("start_location_combo"); updateLocationSelectorsVisibility(); // separate so that it can be called from preferences - location_combo->setFocusLostCallback(boost::bind(&FSPanelLogin::onLocationSLURL, this)); + favorites_combo->setFocusLostCallback(boost::bind(&FSPanelLogin::onLocationSLURL, this)); LLComboBox* server_choice_combo = getChild("server_combo"); server_choice_combo->setCommitCallback(boost::bind(&FSPanelLogin::onSelectServer, this)); - + updateServer(); if(LLStartUp::getStartSLURL().getType() != LLSLURL::LOCATION) { @@ -225,44 +223,18 @@ FSPanelLogin::FSPanelLogin(const LLRect &rect, LLStartUp::setStartSLURL(slurl); } - childSetAction("remove_user_btn", onClickRemove, this); - childSetAction("connect_btn", onClickConnect, this); - - getChild("login")->setDefaultBtn(findChild("connect_btn")); - getChild("start_location_panel")->setDefaultBtn(findChild("connect_btn")); - - std::string channel = LLVersionInfo::getChannel(); - std::string version = llformat("%s (%d)", - LLVersionInfo::getShortVersion().c_str(), - LLVersionInfo::getBuild()); - - LLTextBox* forgot_password_text = getChild("forgot_password_text"); - forgot_password_text->setClickedCallback(onClickForgotPassword, NULL); - LLTextBox* create_new_account_text = getChild("create_new_account_text"); create_new_account_text->setClickedCallback(onClickNewAccount, NULL); LLTextBox* grid_mgr_help_text = getChild("grid_login_text"); grid_mgr_help_text->setClickedCallback(onClickGridMgrHelp, NULL); - - // get the web browser control - LLMediaCtrl* web_browser = getChild("login_html"); - web_browser->addObserver(this); - - reshapeBrowser(); - - // Show last logged in user favorites in "Start at" combo. - LLComboBox* username_combo(getChild("username_combo")); - username_combo->setCommitCallback(boost::bind(&FSPanelLogin::onSelectUser, this)); - username_combo->setFocusLostCallback(boost::bind(&FSPanelLogin::onSelectUser, this)); - mPreviousUsername = username_combo->getValue().asString(); LLSLURL start_slurl(LLStartUp::getStartSLURL()); - if ( !start_slurl.isSpatial() ) // has a start been established by the command line or NextLoginLocation ? + if ( !start_slurl.isSpatial() ) // has a start been established by the command line or NextLoginLocation ? { - // no, so get the preference setting + // no, so get the preference setting std::string defaultStartLocation = gSavedSettings.getString("LoginLocation"); - LL_INFOS("AppInit") << "default LoginLocation '" << defaultStartLocation << "'" << LL_ENDL; + LL_INFOS("AppInit")<<"default LoginLocation '"<("login")->setDefaultBtn(findChild("connect_btn")); + getChild("start_location_panel")->setDefaultBtn(findChild("connect_btn")); + + std::string channel = LLVersionInfo::getChannel(); + std::string version = llformat("%s (%d)", + LLVersionInfo::getShortVersion().c_str(), + LLVersionInfo::getBuild()); + + LLTextBox* forgot_password_text = getChild("forgot_password_text"); + forgot_password_text->setClickedCallback(onClickForgotPassword, NULL); + loadLoginPage(); + + LLComboBox* username_combo(getChild("username_combo")); + username_combo->setTextChangedCallback(boost::bind(&FSPanelLogin::onUsernameTextChanged, this)); + username_combo->setCommitCallback(boost::bind(&FSPanelLogin::onSelectUser, this)); + username_combo->setFocusLostCallback(boost::bind(&FSPanelLogin::onSelectUser, this)); + mPreviousUsername = username_combo->getValue().asString(); } void FSPanelLogin::addFavoritesToStartLocation() @@ -307,6 +299,8 @@ void FSPanelLogin::addFavoritesToStartLocation() std::string current_user = canonical_user_name + " @ " + current_grid; LL_DEBUGS("Favorites") << "Current user: \"" << current_user << "\"" << LL_ENDL; std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); + mUsernameLength = current_user.length(); + updateLoginButtons(); LLSD fav_llsd; llifstream file; @@ -316,6 +310,7 @@ void FSPanelLogin::addFavoritesToStartLocation() return; } LLSDSerialize::fromXML(fav_llsd, file); + for (LLSD::map_const_iterator iter = fav_llsd.beginMap(); iter != fav_llsd.endMap(); ++iter) { @@ -349,21 +344,6 @@ void FSPanelLogin::addFavoritesToStartLocation() LLFloaterPreference::updateShowFavoritesCheckbox(mShowFavorites); } -// force the size to be correct (XML doesn't seem to be sufficient to do this) -// (with some padding so the other login screen doesn't show through) -void FSPanelLogin::reshapeBrowser() -{ - LLMediaCtrl* web_browser = getChild("login_html"); - LLRect rect = gViewerWindow->getWindowRectScaled(); - LLRect html_rect; - html_rect.setCenterAndSize( - rect.getCenterX() - 2, rect.getCenterY() + 40, - rect.getWidth() + 6, rect.getHeight() - 78 ); - web_browser->setRect( html_rect ); - web_browser->reshape( html_rect.getWidth(), html_rect.getHeight(), TRUE ); - reshape( rect.getWidth(), rect.getHeight(), 1 ); -} - FSPanelLogin::~FSPanelLogin() { FSPanelLogin::sInstance = NULL; @@ -374,50 +354,6 @@ FSPanelLogin::~FSPanelLogin() } // virtual -void FSPanelLogin::draw() -{ - gGL.pushMatrix(); - { - F32 image_aspect = 1.333333f; - F32 view_aspect = (F32)getRect().getWidth() / (F32)getRect().getHeight(); - // stretch image to maintain aspect ratio - if (image_aspect > view_aspect) - { - gGL.translatef(-0.5f * (image_aspect / view_aspect - 1.f) * getRect().getWidth(), 0.f, 0.f); - gGL.scalef(image_aspect / view_aspect, 1.f, 1.f); - } - - S32 width = getRect().getWidth(); - S32 height = getRect().getHeight(); - - if (getChild("login_widgets")->getVisible()) - { - // draw a background box in black - gl_rect_2d( 0, height - 264, width, 264, LLColor4::black ); - // draw the bottom part of the background image - // just the blue background to the native client UI - mLogoImage->draw(0, -264, width + 8, mLogoImage->getHeight()); - }; - } - gGL.popMatrix(); - - LLPanel::draw(); -} - -// virtual -BOOL FSPanelLogin::handleKeyHere(KEY key, MASK mask) -{ - if ( KEY_F1 == key ) - { - LLViewerHelp* vhelp = LLViewerHelp::getInstance(); - vhelp->showTopic(vhelp->f1HelpTopic()); - return TRUE; - } - - return LLPanel::handleKeyHere(key, mask); -} - -// virtual void FSPanelLogin::setFocus(BOOL b) { if(b != hasFocus()) @@ -481,7 +417,7 @@ void FSPanelLogin::showLoginWidgets() // It seems to be part of the defunct? reg-in-client project. sInstance->getChildView("login_widgets")->setVisible( true); LLMediaCtrl* web_browser = sInstance->getChild("login_html"); - sInstance->reshapeBrowser(); + // *TODO: Append all the usual login parameters, like first_login=Y etc. std::string splash_screen_url = LLGridManager::getInstance()->getLoginPage(); web_browser->navigateTo( splash_screen_url, HTTP_CONTENT_TEXT_HTML ); @@ -495,17 +431,10 @@ void FSPanelLogin::show(const LLRect &rect, void (*callback)(S32 option, void* user_data), void* callback_data) { - // instance management - if (FSPanelLogin::sInstance) - { - LL_WARNS("AppInit") << "Duplicate instance of login view deleted" << LL_ENDL; - // Don't leave bad pointer in gFocusMgr - gFocusMgr.setDefaultKeyboardFocus(NULL); - - delete FSPanelLogin::sInstance; - } - - new FSPanelLogin(rect, callback, callback_data); + if (!FSPanelLogin::sInstance) + { + new FSPanelLogin(rect, callback, callback_data); + } if( !gFocusMgr.getKeyboardFocus() ) { @@ -557,17 +486,19 @@ void FSPanelLogin::setFields(LLPointer credential, bool from_start LLSD authenticator = credential->getAuthenticator(); LL_INFOS("Credentials") << "Setting authenticator field " << authenticator["type"].asString() << LL_ENDL; bool remember; - if (authenticator.isMap() && - authenticator.has("secret") && + if(authenticator.isMap() && + authenticator.has("secret") && (authenticator["secret"].asString().size() > 0)) { // This is a MD5 hex digest of a password. // We don't actually use the password input field, // fill it with MAX_PASSWORD_SL characters so we get a - // nice row of asterixes. + // nice row of asterisks. const std::string filler("123456789!123456"); sInstance->getChild("password_edit")->setText(filler); + sInstance->mPasswordLength = filler.length(); + sInstance->updateLoginButtons(); remember = true; // We run into this case, if a user tries to login with a newly entered password @@ -584,6 +515,8 @@ void FSPanelLogin::setFields(LLPointer credential, bool from_start (stored_credential->getAuthenticator().has("secret") && stored_credential->getAuthenticator()["secret"].asString() != authenticator["secret"].asString())) { sInstance->getChild("password_edit")->setText(sPassword); + sInstance->mPasswordLength = sPassword.length(); + sInstance->updateLoginButtons(); sInstance->mPasswordModified = TRUE; } } @@ -591,6 +524,8 @@ void FSPanelLogin::setFields(LLPointer credential, bool from_start else { sInstance->getChild("password_edit")->clear(); + sInstance->mPasswordLength = 0; + sInstance->updateLoginButtons(); remember = false; } if (from_startup) @@ -672,7 +607,7 @@ void FSPanelLogin::getFields(LLPointer& credential, std::string last; if (separator_index != username.npos) { - last = username.substr(separator_index + 1, username.npos); + last = username.substr(separator_index+1, username.npos); LLStringUtil::trim(last); } else @@ -728,7 +663,7 @@ BOOL FSPanelLogin::areCredentialFieldsDirty() return true; } } - return false; + return false; } @@ -784,6 +719,8 @@ void FSPanelLogin::onUpdateStartSLURL(const LLSLURL& new_start_slurl) updateServer(); // to change the links and splash screen } location_combo->setTextEntry(new_start_slurl.getLocationString()); + sInstance->mLocationLength = new_start_slurl.getLocationString().length(); + sInstance->updateLoginButtons(); } else { @@ -865,6 +802,13 @@ void FSPanelLogin::loadLoginPage() LL_DEBUGS("AppInit") << "login_page: " << login_page << LL_ENDL; + // allow users (testers really) to specify a different login content URL + std::string force_login_url = gSavedSettings.getString("ForceLoginURL"); + if ( force_login_url.length() > 0 ) + { + login_page = LLURI(force_login_url); + } + // Language params["lang"] = LLUI::getLanguage(); @@ -889,6 +833,9 @@ void FSPanelLogin::loadLoginPage() // sourceid params["sourceid"] = gSavedSettings.getString("sourceid"); + // login page (web) content version + params["login_content_version"] = gSavedSettings.getString("LoginContentVersion"); + // Make an LLURI with this augmented info LLURI login_uri(LLURI::buildHTTP(login_page.authority(), login_page.path(), @@ -941,52 +888,44 @@ void FSPanelLogin::onClickConnect(void *) std::string password = sInstance->getChild("password_edit")->getValue().asString(); gSavedSettings.setString("UserLoginInfo", credentialName()); - LLSD blocked = FSData::instance().allowedLogin(); - if (!blocked.isMap()) //hack for testing for an empty LLSD + if(username.empty()) { - if(username.empty()) - { - // user must type in something into the username field - LLNotificationsUtil::add("MustHaveAccountToLogIn"); - } - else if(password.empty()) - { - LLNotificationsUtil::add("MustEnterPasswordToLogIn"); - } - else - { - LLPointer cred; - BOOL remember; - getFields(cred, remember); - std::string identifier_type; - cred->identifierType(identifier_type); - LLSD allowed_credential_types; - LLGridManager::getInstance()->getLoginIdentifierTypes(allowed_credential_types); - - // check the typed in credential type against the credential types expected by the server. - for(LLSD::array_iterator i = allowed_credential_types.beginArray(); - i != allowed_credential_types.endArray(); - i++) - { - - if(i->asString() == identifier_type) - { - // yay correct credential type - sInstance->mCallback(0, sInstance->mCallbackData); - return; - } - } - - // Right now, maingrid is the only thing that is picky about - // credential format, as it doesn't yet allow account (single username) - // format creds. - Rox. James, we wanna fix the message when we change - // this. - LLNotificationsUtil::add("InvalidCredentialFormat"); - } + // user must type in something into the username field + LLNotificationsUtil::add("MustHaveAccountToLogIn"); + } + else if(password.empty()) + { + LLNotificationsUtil::add("MustEnterPasswordToLogIn"); } else { - LLNotificationsUtil::add("BlockLoginInfo", blocked); + LLPointer cred; + BOOL remember; + getFields(cred, remember); + std::string identifier_type; + cred->identifierType(identifier_type); + LLSD allowed_credential_types; + LLGridManager::getInstance()->getLoginIdentifierTypes(allowed_credential_types); + + // check the typed in credential type against the credential types expected by the server. + for(LLSD::array_iterator i = allowed_credential_types.beginArray(); + i != allowed_credential_types.endArray(); + i++) + { + + if(i->asString() == identifier_type) + { + // yay correct credential type + sInstance->mCallback(0, sInstance->mCallbackData); + return; + } + } + + // Right now, maingrid is the only thing that is picky about + // credential format, as it doesn't yet allow account (single username) + // format creds. - Rox. James, we wanna fix the message when we change + // this. + LLNotificationsUtil::add("InvalidCredentialFormat"); } } } @@ -1045,48 +984,58 @@ void FSPanelLogin::onClickHelp(void*) // static void FSPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) { - FSPanelLogin *This = (FSPanelLogin *) user_data; - This->mPasswordModified = TRUE; + FSPanelLogin *self = (FSPanelLogin *)user_data; + self->mPasswordModified = TRUE; if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == FALSE) { // *TODO: use another way to notify user about enabled caps lock, see EXT-6858 sCapslockDidNotification = TRUE; } + + LLLineEditor* password_edit(self->getChild("password_edit")); + self->mPasswordLength = password_edit->getText().length(); + self->updateLoginButtons(); } void FSPanelLogin::updateServer() { - if (!sInstance) + if (sInstance) { - return; - } - try - { - // if they've selected another grid, we should load the credentials - // for that grid and set them to the UI. - if(!sInstance->areCredentialFieldsDirty()) + try { - LLPointer credential = gSecAPIHandler->loadCredential(credentialName()); - sInstance->setFields(credential); - } + // if they've selected another grid, we should load the credentials + // for that grid and set them to the UI. + if(!sInstance->areCredentialFieldsDirty()) + { + LLPointer credential = gSecAPIHandler->loadCredential(credentialName()); + sInstance->setFields(credential); + } - // grid changed so show new splash screen (possibly) - updateServerCombo(); - loadLoginPage(); + // grid changed so show new splash screen (possibly) + updateServerCombo(); + loadLoginPage(); #ifdef OPENSIM - sInstance->getChild("password_edit")->setMaxTextLength(LLGridManager::getInstance()->isInSecondLife() ? MAX_PASSWORD_SL : MAX_PASSWORD_OPENSIM); + sInstance->getChild("password_edit")->setMaxTextLength(LLGridManager::getInstance()->isInSecondLife() ? MAX_PASSWORD_SL : MAX_PASSWORD_OPENSIM); #endif + } + catch (LLInvalidGridName ex) + { + LL_WARNS("AppInit")<<"server '"<("connect_btn"); + + login_btn->setEnabled(mUsernameLength != 0 && mPasswordLength != 0); } void FSPanelLogin::onSelectServer() @@ -1131,9 +1080,10 @@ void FSPanelLogin::onSelectServer() location_combo->setCurrentByIndex(0); // last location on the new grid location_combo->setTextEntry(LLStringUtil::null); } - } + } break; } + updateServer(); } @@ -1141,7 +1091,7 @@ void FSPanelLogin::onLocationSLURL() { LLComboBox* location_combo = getChild("start_location_combo"); std::string location = location_combo->getValue().asString(); - LL_DEBUGS("AppInit") << location << LL_ENDL; + LL_DEBUGS("AppInit")<addFavoritesToStartLocation(); sInstance->mPreviousUsername = combo->getValue().asString(); + sInstance->mUsernameLength = combo->getValue().asString().length(); + sInstance->updateLoginButtons(); sInstance->getChild("remove_user_btn")->setEnabled(FALSE); return; } @@ -1360,9 +1312,6 @@ void FSPanelLogin::updateServerCombo() { if (!sInstance) return; -#ifdef OPENSIM - LLGridManager::getInstance()->addGridListChangedCallback(&FSPanelLogin::gridListChanged); -#endif // OPENSIM // We add all of the possible values, sorted, and then add a bar and the current value at the top LLComboBox* server_choice_combo = sInstance->getChild("server_combo"); server_choice_combo->removeall(); @@ -1413,6 +1362,25 @@ void FSPanelLogin::gridListChanged(bool success) updateServer(); } +// static +bool FSPanelLogin::getShowFavorites() +{ + if (sInstance) + { + return sInstance->mShowFavorites; + } + else + { + return gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin"); + } +} + +void FSPanelLogin::onUsernameTextChanged() +{ + mUsernameLength = getChild("username_combo")->getValue().asString().length(); + updateLoginButtons(); +} + ///////////////////////// // Mode selector // ///////////////////////// @@ -1449,16 +1417,3 @@ void FSPanelLogin::onModeChangeConfirm(const LLSD& original_value, const LLSD& n break; } } - -// static -bool FSPanelLogin::getShowFavorites() -{ - if (sInstance) - { - return sInstance->mShowFavorites; - } - else - { - return gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin"); - } -} diff --git a/indra/newview/fspanellogin.h b/indra/newview/fspanellogin.h index 420b56f5ff..656e6654b5 100644 --- a/indra/newview/fspanellogin.h +++ b/indra/newview/fspanellogin.h @@ -24,7 +24,7 @@ * $/LicenseInfo$ */ -// Original file: llpanellogin.cpp +// Original file: llpanellogin.h #ifndef FS_PANELLOGIN_H #define FS_PANELLOGIN_H @@ -32,11 +32,8 @@ #include "llpanel.h" #include "llpointer.h" // LLPointer<> #include "llmediactrl.h" // LLMediaCtrlObserver -#include class LLLineEditor; -class LLUIImage; -class LLPanelLoginListener; class LLSLURL; class LLCredential; @@ -51,14 +48,8 @@ public: void *callback_data); ~FSPanelLogin(); - virtual BOOL handleKeyHere(KEY key, MASK mask); - virtual void draw(); virtual void setFocus( BOOL b ); - // Show the XUI first name, last name, and password widgets. They are - // hidden on startup for reg-in-client - static void showLoginWidgets(); - static void show(const LLRect &rect, void (*callback)(S32 option, void* user_data), void* callback_data); @@ -78,6 +69,8 @@ public: void setSiteIsAlive( bool alive ); + void showLoginWidgets(); + static void loadLoginPage(); static void giveFocus(); static void setAlwaysRefresh(bool refresh); @@ -89,14 +82,12 @@ public: /// to be called from LLStartUp::setStartSLURL static void onUpdateStartSLURL(const LLSLURL& new_start_slurl); - // called from prefs when initializing pane + // called from prefs when initializing panel static bool getShowFavorites(); static void clearPassword() { sPassword.clear(); } private: - friend class LLPanelLoginListener; - void reshapeBrowser(); void addFavoritesToStartLocation(); void addUsersToCombo(BOOL show_server); void onSelectUser(); @@ -104,6 +95,7 @@ private: void onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response); void onSelectServer(); void onLocationSLURL(); + void onUsernameTextChanged(); static void onClickConnect(void*); static void onClickNewAccount(void*); @@ -119,19 +111,22 @@ private: static std::string credentialName(); private: - LLPointer mLogoImage; + void updateLoginButtons(); void (*mCallback)(S32 option, void *userdata); void* mCallbackData; - BOOL mPasswordModified; + BOOL mPasswordModified; bool mShowFavorites; static FSPanelLogin* sInstance; static BOOL sCapslockDidNotification; - std::string mPreviousUsername; + unsigned int mUsernameLength; + unsigned int mPasswordLength; + unsigned int mLocationLength; + std::string mPreviousUsername; static std::string sPassword; }; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 27a679122e..d3f5fbedfa 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -4474,6 +4474,7 @@ void LLPanelPreferenceOpensim::onSelectGrid() void LLPanelPreferenceOpensim::apply() { LLGridManager::getInstance()->saveGridList(); + FSPanelLogin::updateServer(); } void LLPanelPreferenceOpensim::cancel() @@ -4575,6 +4576,8 @@ bool LLPanelPreferenceOpensim::removeGridCB(const LLSD& notification, const LLSD void LLPanelPreferenceOpensim::refreshGridList(bool success) { + FSPanelLogin::updateServer(); + getChild("grid_management_panel")->setEnabled(TRUE); if (!mGridListControl) diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp index 20f7b3a7fa..0230be2e2c 100755 --- a/indra/newview/llloginhandler.cpp +++ b/indra/newview/llloginhandler.cpp @@ -99,35 +99,6 @@ bool LLLoginHandler::handle(const LLSD& tokens, return true; } - // [FS Login Panel] - if (tokens.size() == 1 - && tokens[0].asString() == "show") - { - // We're using reg-in-client, so show the XUI login widgets - FSPanelLogin::showLoginWidgets(); - return true; - } - - if (tokens.size() == 1 - && tokens[0].asString() == "reg") - { - LLWindow* window = gViewerWindow->getWindow(); - window->incBusyCount(); - window->setCursor(UI_CURSOR_ARROW); - - // Do this first, as it may be slow and we want to keep something - // on the user's screen as long as possible - LLWeb::loadURLExternal( "http://join.eniac15.lindenlab.com/" ); - - window->decBusyCount(); - window->setCursor(UI_CURSOR_ARROW); - - // Then hide the window - window->minimize(); - return true; - } - // [FS Login Panel] - // Make sure window is visible LLWindow* window = gViewerWindow->getWindow(); if (window->getMinimized()) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d632923091..7ac876306d 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1142,6 +1142,17 @@ bool idle_startup() if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState()) { + // Login block + LLSD blocked = FSData::instance().allowedLogin(); + if (blocked.isMap()) //hack for testing for an empty LLSD + { + LLNotificationsUtil::add("BlockLoginInfo", blocked, LLSD(), login_alert_done); + LLStartUp::setStartupState(STATE_LOGIN_CONFIRM_NOTIFICATON); + show_connect_box = true; + return FALSE; + } + // + // Post login screen, we should see if any settings have changed that may // require us to either start/stop or change the socks proxy. As various communications // past this point may require the proxy to be up. diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 65b4153ba3..b529273282 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -51,6 +51,8 @@ #include "llpreviewgesture.h" #include "llcoproceduremanager.h" +#include "llviewernetwork.h" + void dialog_refresh_all(); LLResourceUploadInfo::LLResourceUploadInfo(LLTransactionID transactId, @@ -392,7 +394,10 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() LL_INFOS() << "Attempting to encode wav as an ogg file" << LL_ENDL; - encodeResult = encode_vorbis_file(getFileName(), filename); + // FIRE-17812: Increase sounds length to 60s on OpenSim + //encodeResult = encode_vorbis_file(getFileName(), filename); + encodeResult = encode_vorbis_file(getFileName(), filename, LLGridManager::instance().isInSecondLife()); + // if (LLVORBISENC_NOERR != encodeResult) { diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 30506e29ab..622d8f9b6b 100755 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -80,6 +80,8 @@ #include "llinventorydefines.h" +#include "llviewernetwork.h" + class LLFileEnableUpload : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -465,11 +467,12 @@ static void show_floater_callback(const std::string& floater, const std::string& { // pre-qualify wavs to make sure the format is acceptable std::string error_msg; - if (check_for_invalid_wav_formats(filename,error_msg)) + if (check_for_invalid_wav_formats(filename, error_msg, LLGridManager::instance().isInSecondLife())) { LL_INFOS() << error_msg << ": " << filename << LL_ENDL; LLSD args; args["FILE"] = filename; + args["MAX_LENGTH"] = llformat("%.0f", (LLGridManager::instance().isInSecondLife() ? LLVORBIS_CLIP_MAX_TIME : LLVORBIS_CLIP_MAX_TIME_OPENSIM)); LLNotificationsUtil::add( error_msg, args ); return; } diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 66fc02be03..524ccef37f 100755 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -836,7 +836,7 @@ Erwartet wurde [VALIDS] [FILE] - Audiodatei ist zu lang (max. 10 Sekunden): + Audiodatei ist zu lang (max. [MAX_LENGTH] Sekunden): [FILE] diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index c2d74934c7..966d2bd82a 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2144,7 +2144,7 @@ Wrong chunk size in WAV file: icon="alertmodal.tga" name="SoundFileInvalidTooLong" type="alertmodal"> -Audio file is too long (10 second maximum): +Audio file is too long ([MAX_LENGTH] second maximum): [FILE] fail diff --git a/indra/newview/skins/default/xui/en/panel_fs_login.xml b/indra/newview/skins/default/xui/en/panel_fs_login.xml index 49ef145546..9fdccec641 100644 --- a/indra/newview/skins/default/xui/en/panel_fs_login.xml +++ b/indra/newview/skins/default/xui/en/panel_fs_login.xml @@ -1,13 +1,15 @@ + background_visible="true" + bg_opaque_color="0.16 0.16 0.16 1" + background_opaque="true" + width="1024"> http://phoenixviewer.com/app/loginV3/ @@ -19,20 +21,18 @@ name="forgot_password_url"> http://secondlife.com/account/request.php - + top="18" + height="670" + width="1024" /> Password: - + - El archivo de audio es demasiado largo (debe ser como máximo de10 segundos): + El archivo de audio es demasiado largo (debe ser como máximo de [MAX_LENGTH] segundos): [FILE] diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index 60e170cf7f..0f692b8df1 100755 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -602,7 +602,7 @@ Wrong chunk size in WAV file: [FILE] -Audio file is too long (10 second maximum): +Audio file is too long ([MAX_LENGTH] second maximum): [FILE] diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml index 5194be094f..d8a7e871d7 100755 --- a/indra/newview/skins/default/xui/it/notifications.xml +++ b/indra/newview/skins/default/xui/it/notifications.xml @@ -796,7 +796,7 @@ Attese [VALIDS] [FILE] - Il file audio è troppo lungo (deve essere al massimo 10 secondi): + Il file audio è troppo lungo (deve essere al massimo [MAX_LENGTH] secondi): [FILE] diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml index 2da5b26af6..3e78b497fd 100644 --- a/indra/newview/skins/default/xui/ja/notifications.xml +++ b/indra/newview/skins/default/xui/ja/notifications.xml @@ -834,7 +834,7 @@ L$ が不足しているのでこのグループに参加することができ [FILE] - オーディオファイルが長すぎます。(最大 10 秒): + オーディオファイルが長すぎます。(最大 [MAX_LENGTH] 秒): [FILE] diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml index e16d1386b6..e9d84e13a6 100755 --- a/indra/newview/skins/default/xui/pl/notifications.xml +++ b/indra/newview/skins/default/xui/pl/notifications.xml @@ -759,7 +759,7 @@ Oczekiwane: [VALIDS] [FILE] - Plik audio jest zbyt długi (10 sekund maksimum): + Plik audio jest zbyt długi ([MAX_LENGTH] sekund maksimum): [FILE] diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index 81e9d2fca4..8502243b5b 100755 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -792,7 +792,7 @@ Esperada [VALIDS] [FILE] - Arquivo de áudio é muito longo (no máximo 10 segundos): + Arquivo de áudio é muito longo (no máximo [MAX_LENGTH] segundos): [FILE] diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml index d27952e384..54b23cfccd 100755 --- a/indra/newview/skins/default/xui/ru/notifications.xml +++ b/indra/newview/skins/default/xui/ru/notifications.xml @@ -840,7 +840,7 @@ [FILE] - Аудиофайл слишком длинный (максимум 10 секунд): + Аудиофайл слишком длинный (максимум [MAX_LENGTH] секунд): [FILE] diff --git a/indra/newview/skins/default/xui/tr/notifications.xml b/indra/newview/skins/default/xui/tr/notifications.xml index 281d8a1b5f..3401e1a4d1 100755 --- a/indra/newview/skins/default/xui/tr/notifications.xml +++ b/indra/newview/skins/default/xui/tr/notifications.xml @@ -798,7 +798,7 @@ Beklenen [VALIDS] [FILE] - Ses dosyası çok uzun (En fazla 10 saniye olmalı): + Ses dosyası çok uzun (En fazla [MAX_LENGTH] saniye olmalı): [FILE] diff --git a/indra/newview/skins/default/xui/zh/notifications.xml b/indra/newview/skins/default/xui/zh/notifications.xml index f7b7aad016..987b0d745d 100755 --- a/indra/newview/skins/default/xui/zh/notifications.xml +++ b/indra/newview/skins/default/xui/zh/notifications.xml @@ -798,7 +798,7 @@ [FILE] - 音頻檔太長(最大值 10 秒): + 音頻檔太長(最大值 [MAX_LENGTH] 秒): [FILE] diff --git a/indra/newview/skins/starlightcui/xui/en/panel_fs_login.xml b/indra/newview/skins/starlightcui/xui/en/panel_fs_login.xml index 2a0e9ab6d0..fe22c52893 100644 --- a/indra/newview/skins/starlightcui/xui/en/panel_fs_login.xml +++ b/indra/newview/skins/starlightcui/xui/en/panel_fs_login.xml @@ -1,14 +1,15 @@ + bg_opaque_color="0.16 0.16 0.16 1" + background_opaque="true" + width="1024"> http://phoenixviewer.com/app/loginV3/ @@ -20,20 +21,18 @@ name="forgot_password_url"> http://secondlife.com/account/request.php - + top="18" + height="670" + width="1024" /> Password: + + name="Typeregionname" value="" />