Merge branch 'future'

This commit is contained in:
TighMacFanatic
2011-09-24 22:36:40 -04:00
1001 changed files with 46799 additions and 16555 deletions

View File

@@ -72,6 +72,8 @@
#include "llmemorystream.h"
#include "llmessageconfig.h"
#include "llmoveview.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llregionhandle.h"
#include "llsd.h"
#include "llsdserialize.h"
@@ -279,11 +281,11 @@ void release_start_screen();
void reset_login();
void apply_udp_blacklist(const std::string& csv);
void callback_cache_name(const LLUUID& id, const std::string& firstname, const std::string& lastname, BOOL is_group, void* data)
void callback_cache_name(const LLUUID& id, const std::string& full_name, bool is_group)
{
LLNameListCtrl::refreshAll(id, firstname, lastname, is_group);
LLNameBox::refreshAll(id, firstname, lastname, is_group);
LLNameEditor::refreshAll(id, firstname, lastname, is_group);
LLNameListCtrl::refreshAll(id, full_name);
LLNameBox::refreshAll(id, full_name, is_group);
LLNameEditor::refreshAll(id, full_name, is_group);
// TODO: Actually be intelligent about the refresh.
// For now, just brute force refresh the dialogs.
@@ -424,12 +426,12 @@ bool idle_startup()
if (LLFeatureManager::getInstance()->isSafe())
{
LLNotifications::instance().add("DisplaySetToSafe");
LLNotificationsUtil::add("DisplaySetToSafe");
}
else if ((gSavedSettings.getS32("LastFeatureVersion") < LLFeatureManager::getInstance()->getVersion()) &&
(gSavedSettings.getS32("LastFeatureVersion") != 0))
{
LLNotifications::instance().add("DisplaySetToRecommended");
LLNotificationsUtil::add("DisplaySetToRecommended");
}
else if (!gViewerWindow->getInitAlert().empty())
{
@@ -1588,7 +1590,7 @@ bool idle_startup()
std::string history_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "saved_logins_sg2.xml");
LLSavedLogins history_data = LLSavedLogins::loadFile(history_file);
std::string grid_nick = gHippoGridManager->getConnectedGrid()->getGridNick();
std::string grid_nick = gHippoGridManager->getConnectedGrid()->getGridName();
history_data.deleteEntry(firstname, lastname, grid_nick);
if (gSavedSettings.getBOOL("RememberLogin"))
{
@@ -1797,7 +1799,6 @@ bool idle_startup()
{
gSavedSettings.setString("MapServerURL", map_server_url);
LLWorldMap::gotMapServerURL(true);
llinfos << "Got Map server URL: " << map_server_url << llendl;
}
// Override grid info with anything sent in the login response
@@ -1874,7 +1875,7 @@ bool idle_startup()
// Bounce back to the login screen.
LLSD args;
args["ERROR_MESSAGE"] = emsg.str();
LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done);
reset_login();
gSavedSettings.setBOOL("AutoLogin", FALSE);
show_connect_box = true;
@@ -1894,7 +1895,7 @@ bool idle_startup()
// Bounce back to the login screen.
LLSD args;
args["ERROR_MESSAGE"] = emsg.str();
LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done);
reset_login();
gSavedSettings.setBOOL("AutoLogin", FALSE);
show_connect_box = true;
@@ -1937,9 +1938,7 @@ bool idle_startup()
// init the shader managers
LLPostProcess::initClass();
LLWLParamManager::initClass();
AscentDayCycleManager::initClass();
LLWaterParamManager::initClass();
// RN: don't initialize VO classes in drone mode, they are too closely tied to rendering
LLViewerObject::initVOClasses();
@@ -2088,21 +2087,7 @@ bool idle_startup()
gXferManager->registerCallbacks(gMessageSystem);
if ( gCacheName == NULL )
{
gCacheName = new LLCacheName(gMessageSystem);
gCacheName->addObserver(callback_cache_name);
// Load stored cache if possible
LLAppViewer::instance()->loadNameCache();
}
// Start cache in not-running state until we figure out if we have
// capabilities for display name lookup
LLAvatarNameCache::initClass(false);
S32 phoenix_name_system = gSavedSettings.getS32("PhoenixNameSystem");
if(phoenix_name_system <= 0 || phoenix_name_system > 2) LLAvatarNameCache::setUseDisplayNames(false);
else LLAvatarNameCache::setUseDisplayNames(true);
LLStartUp::initNameCache();
// *Note: this is where gWorldMap used to be initialized.
@@ -2375,7 +2360,7 @@ bool idle_startup()
system_folder->setUUID(system_folder_id);
gSystemFolderRoot = system_folder_id;
system_folder->setParent(LLUUID::null);
system_folder->setPreferredType(LLAssetType::AT_NONE);
system_folder->setPreferredType(LLFolderType::FT_NONE);
gInventory.addCategory(system_folder);
LLViewerInventoryCategory* settings_folder = new LLViewerInventoryCategory(gAgent.getID());
@@ -2385,7 +2370,7 @@ bool idle_startup()
settings_folder->setUUID(settings_folder_id);
gSystemFolderSettings = settings_folder_id;
settings_folder->setParent(gSystemFolderRoot);
settings_folder->setPreferredType(LLAssetType::AT_NONE);
settings_folder->setPreferredType(LLFolderType::FT_NONE);
gInventory.addCategory(settings_folder);
LLViewerInventoryCategory* assets_folder = new LLViewerInventoryCategory(gAgent.getID());
@@ -2395,7 +2380,7 @@ bool idle_startup()
assets_folder->setUUID(assets_folder_id);
gSystemFolderAssets = assets_folder_id;
assets_folder->setParent(gSystemFolderRoot);
assets_folder->setPreferredType(LLAssetType::AT_NONE);
assets_folder->setPreferredType(LLFolderType::FT_NONE);
gInventory.addCategory(assets_folder);
}
// </edit>
@@ -2643,7 +2628,7 @@ bool idle_startup()
// Could schedule and delay these for later.
const BOOL no_inform_server = FALSE;
const BOOL no_deactivate_similar = FALSE;
gGestureManager.activateGestureWithAsset(item_id, asset_id,
LLGestureMgr::instance().activateGestureWithAsset(item_id, asset_id,
no_inform_server,
no_deactivate_similar);
// We need to fetch the inventory items for these gestures
@@ -2672,9 +2657,6 @@ bool idle_startup()
gForegroundTime.reset();
if (gSavedSettings.getBOOL("FetchInventoryOnLogin")
#ifdef LL_RRINTERFACE_H //MK
|| gRRenabled
#endif //mk
)
{
// Fetch inventory in the background
@@ -2722,7 +2704,7 @@ bool idle_startup()
args["TYPE"] = "home";
args["HELP"] = "You may want to set a new home location.";
}
LLNotifications::instance().add("AvatarMoved", args);
LLNotificationsUtil::add("AvatarMoved", args);
}
else
{
@@ -2823,7 +2805,7 @@ bool idle_startup()
// initial outfit, but if the load hasn't started
// already then something is wrong so fall back
// to generic outfits. JC
LLNotifications::instance().add("WelcomeChooseSex", LLSD(), LLSD(),
LLNotificationsUtil::add("WelcomeChooseSex", LLSD(), LLSD(),
callback_choose_gender);
LLStartUp::setStartupState( STATE_CLEANUP );
return TRUE;
@@ -2831,7 +2813,7 @@ bool idle_startup()
if (wearables_time > MAX_WEARABLES_TIME)
{
LLNotifications::instance().add("ClothingLoading");
LLNotificationsUtil::add("ClothingLoading");
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG);
LLStartUp::setStartupState( STATE_CLEANUP );
return TRUE;
@@ -3119,7 +3101,7 @@ void LLStartUp::deletePasswordFromDisk()
void show_first_run_dialog()
{
LLNotifications::instance().add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback);
LLNotificationsUtil::add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback);
}
bool first_run_dialog_callback(const LLSD& notification, const LLSD& response)
@@ -3406,7 +3388,7 @@ void use_circuit_callback(void**, S32 result)
{
// Make sure user knows something bad happened. JC
LL_WARNS("AppInit") << "Backing up to login screen!" << LL_ENDL;
LLNotifications::instance().add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status);
LLNotificationsUtil::add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status);
reset_login();
}
else
@@ -3850,6 +3832,35 @@ void LLStartUp::multimediaInit()
LLViewerParcelMedia::initClass();
}
void LLStartUp::initNameCache()
{
// Can be called multiple times
if ( gCacheName ) return;
gCacheName = new LLCacheName(gMessageSystem);
gCacheName->addObserver(&callback_cache_name);
gCacheName->localizeCacheName("waiting", LLTrans::getString("AvatarNameWaiting"));
gCacheName->localizeCacheName("nobody", LLTrans::getString("AvatarNameNobody"));
gCacheName->localizeCacheName("none", LLTrans::getString("GroupNameNone"));
// Load stored cache if possible
LLAppViewer::instance()->loadNameCache();
// Start cache in not-running state until we figure out if we have
// capabilities for display name lookup
LLAvatarNameCache::initClass(false);
S32 phoenix_name_system = gSavedSettings.getS32("PhoenixNameSystem");
if(phoenix_name_system <= 0 || phoenix_name_system > 2) LLAvatarNameCache::setUseDisplayNames(false);
else LLAvatarNameCache::setUseDisplayNames(true);
}
void LLStartUp::cleanupNameCache()
{
LLAvatarNameCache::cleanupClass();
delete gCacheName;
gCacheName = NULL;
}
bool LLStartUp::dispatchURL()
{
// ok, if we've gotten this far and have a startup URL
@@ -3964,33 +3975,33 @@ bool LLStartUp::handleSocksProxy(bool reportOK)
case SOCKS_OK:
if (reportOK == true)
{
LLNotifications::instance().add("SOCKS_CONNECT_OK", subs);
LLNotificationsUtil::add("SOCKS_CONNECT_OK", subs);
}
return true;
break;
case SOCKS_CONNECT_ERROR: // TCP Fail
LLNotifications::instance().add("SOCKS_CONNECT_ERROR", subs);
LLNotificationsUtil::add("SOCKS_CONNECT_ERROR", subs);
break;
case SOCKS_NOT_PERMITTED: // Socks5 server rule set refused connection
LLNotifications::instance().add("SOCKS_NOT_PERMITTED", subs);
LLNotificationsUtil::add("SOCKS_NOT_PERMITTED", subs);
break;
case SOCKS_NOT_ACCEPTABLE: // Selected authentication is not acceptable to server
LLNotifications::instance().add("SOCKS_NOT_ACCEPTABLE", subs);
LLNotificationsUtil::add("SOCKS_NOT_ACCEPTABLE", subs);
break;
case SOCKS_AUTH_FAIL: // Authentication failed
LLNotifications::instance().add("SOCKS_AUTH_FAIL", subs);
LLNotificationsUtil::add("SOCKS_AUTH_FAIL", subs);
break;
case SOCKS_UDP_FWD_NOT_GRANTED: // UDP forward request failed
LLNotifications::instance().add("SOCKS_UDP_FWD_NOT_GRANTED", subs);
LLNotificationsUtil::add("SOCKS_UDP_FWD_NOT_GRANTED", subs);
break;
case SOCKS_HOST_CONNECT_FAILED: // Failed to open a TCP channel to the socks server
LLNotifications::instance().add("SOCKS_HOST_CONNECT_FAILED", subs);
LLNotificationsUtil::add("SOCKS_HOST_CONNECT_FAILED", subs);
break;
}