summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp152
1 files changed, 70 insertions, 82 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index e6f93d34ac..e51e6363dd 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2,25 +2,31 @@
* @file llstartup.cpp
* @brief startup routines.
*
- * $LicenseInfo:firstyear=2004&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2004&license=viewergpl$
+ *
+ * Copyright (c) 2004-2009, Linden Research, Inc.
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
*
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
@@ -193,6 +199,7 @@
#include "llstartuplistener.h"
#if LL_WINDOWS
+#include "llwindebug.h"
#include "lldxhardware.h"
#endif
@@ -774,6 +781,9 @@ bool idle_startup()
gViewerWindow->getWindow()->show();
display_startup();
+ //DEV-10530. do cleanup. remove at some later date. jan-2009
+ LLFloaterPreference::cleanupBadSetting();
+
// DEV-16927. The following code removes errant keystrokes that happen while the window is being
// first made visible.
#ifdef _WIN32
@@ -1110,6 +1120,8 @@ bool idle_startup()
LLVoiceClient::getInstance()->userAuthorized(gUserCredential->userID(), gAgentID);
// create the default proximal channel
LLVoiceChannel::initClass();
+ // update the voice settings
+ LLVoiceClient::getInstance()->updateSettings();
LLGridManager::getInstance()->setFavorite();
LLStartUp::setStartupState( STATE_WORLD_INIT);
}
@@ -1292,10 +1304,6 @@ bool idle_startup()
LLAppViewer::instance()->loadNameCache();
}
- // update the voice settings *after* gCacheName initialization
- // so that we can construct voice UI that relies on the name cache
- LLVoiceClient::getInstance()->updateSettings();
-
//gCacheName is required for nearby chat history loading
//so I just moved nearby history loading a few states further
if (!gNoRender && gSavedPerAccountSettings.getBOOL("LogShowHistory"))
@@ -2368,12 +2376,9 @@ void asset_callback_nothing(LLVFS*, const LLUUID&, LLAssetType::EType, void*, S3
}
// *HACK: Must match name in Library or agent inventory
-const std::string ROOT_GESTURES_FOLDER = "Gestures";
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 SPEECH_GESTURES_FOLDER = "Speech Gestures";
-const std::string OTHER_GESTURES_FOLDER = "Other Gestures";
const S32 OPT_CLOSED_WINDOW = -1;
const S32 OPT_MALE = 0;
const S32 OPT_FEMALE = 1;
@@ -2402,60 +2407,6 @@ bool callback_choose_gender(const LLSD& notification, const LLSD& response)
return false;
}
-void LLStartUp::copyLibraryGestures(const std::string& same_gender_gestures)
-{
- llinfos << "Copying library gestures" << llendl;
-
- // Copy gestures
- LLUUID lib_gesture_cat_id =
- gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE,false,true);
- if (lib_gesture_cat_id.isNull())
- {
- llwarns << "Unable to copy gestures, source category not found" << llendl;
- }
- LLUUID dst_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE);
-
- std::vector<std::string> gesture_folders_to_copy;
- gesture_folders_to_copy.push_back(MALE_GESTURES_FOLDER);
- gesture_folders_to_copy.push_back(FEMALE_GESTURES_FOLDER);
- gesture_folders_to_copy.push_back(COMMON_GESTURES_FOLDER);
- gesture_folders_to_copy.push_back(SPEECH_GESTURES_FOLDER);
- gesture_folders_to_copy.push_back(OTHER_GESTURES_FOLDER);
-
- for(std::vector<std::string>::iterator it = gesture_folders_to_copy.begin();
- it != gesture_folders_to_copy.end();
- ++it)
- {
- std::string& folder_name = *it;
-
- LLPointer<LLInventoryCallback> cb(NULL);
-
- if (folder_name == same_gender_gestures ||
- folder_name == COMMON_GESTURES_FOLDER ||
- folder_name == OTHER_GESTURES_FOLDER)
- {
- cb = new ActivateGestureCallback;
- }
-
-
- LLUUID cat_id = findDescendentCategoryIDByName(lib_gesture_cat_id,folder_name);
- if (cat_id.isNull())
- {
- llwarns << "failed to find gesture folder for " << folder_name << llendl;
- }
- else
- {
- llinfos << "initiating fetch and copy for " << folder_name << " cat_id " << cat_id << llendl;
- LLAppearanceMgr* app_mgr = LLAppearanceMgr::getInstance();
- callAfterCategoryFetch(cat_id,
- boost::bind(&LLAppearanceMgr::shallowCopyCategory,
- app_mgr,
- cat_id,
- dst_id,
- cb));
- }
- }
-}
void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
const std::string& gender_name )
@@ -2468,16 +2419,16 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
S32 gender = 0;
- std::string same_gender_gestures;
+ std::string gestures;
if (gender_name == "male")
{
gender = OPT_MALE;
- same_gender_gestures = MALE_GESTURES_FOLDER;
+ gestures = MALE_GESTURES_FOLDER;
}
else
{
gender = OPT_FEMALE;
- same_gender_gestures = FEMALE_GESTURES_FOLDER;
+ gestures = FEMALE_GESTURES_FOLDER;
}
// try to find the outfit - if not there, create some default
@@ -2500,8 +2451,38 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
}
// Copy gestures
- copyLibraryGestures(same_gender_gestures);
-
+ LLUUID dst_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE);
+ LLPointer<LLInventoryCallback> cb(NULL);
+ LLAppearanceMgr *app_mgr = &(LLAppearanceMgr::instance());
+
+ // - Copy gender-specific gestures.
+ LLUUID gestures_cat_id = findDescendentCategoryIDByName(
+ gInventory.getLibraryRootFolderID(),
+ gestures);
+ if (gestures_cat_id.notNull())
+ {
+ callAfterCategoryFetch(gestures_cat_id,
+ boost::bind(&LLAppearanceMgr::shallowCopyCategory,
+ app_mgr,
+ gestures_cat_id,
+ dst_id,
+ cb));
+ }
+
+ // - Copy common gestures.
+ LLUUID common_gestures_cat_id = findDescendentCategoryIDByName(
+ gInventory.getLibraryRootFolderID(),
+ COMMON_GESTURES_FOLDER);
+ if (common_gestures_cat_id.notNull())
+ {
+ callAfterCategoryFetch(common_gestures_cat_id,
+ boost::bind(&LLAppearanceMgr::shallowCopyCategory,
+ app_mgr,
+ common_gestures_cat_id,
+ dst_id,
+ cb));
+ }
+
// This is really misnamed -- it means we have started loading
// an outfit/shape that will give the avatar a gender eventually. JC
gAgent.setGenderChosen(TRUE);
@@ -2517,7 +2498,8 @@ void LLStartUp::saveInitialOutfit()
{
sWearablesLoadedCon.disconnect();
}
- LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit,false);
+
+ LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit);
}
std::string& LLStartUp::getInitialOutfitName()
@@ -2660,6 +2642,12 @@ void reset_login()
//---------------------------------------------------------------------------
+
+bool LLStartUp::canGoFullscreen()
+{
+ return gStartupState >= STATE_WORLD_INIT;
+}
+
// Initialize all plug-ins except the web browser (which was initialized
// early, before the login screen). JC
void LLStartUp::multimediaInit()