diff options
Diffstat (limited to 'linden/indra/newview/llstartup.cpp')
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 221 |
1 files changed, 98 insertions, 123 deletions
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 2623b05..a84590f 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llstartup.cpp | 2 | * @file llstartup.cpp |
3 | * @brief startup routines. | 3 | * @brief startup routines. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2004&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2004-2007, Linden Research, Inc. | 7 | * Copyright (c) 2004-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "llviewerprecompiledheaders.h" | 32 | #include "llviewerprecompiledheaders.h" |
@@ -43,6 +46,7 @@ | |||
43 | #endif | 46 | #endif |
44 | 47 | ||
45 | #include "audiosettings.h" | 48 | #include "audiosettings.h" |
49 | #include "llares.h" | ||
46 | #include "llcachename.h" | 50 | #include "llcachename.h" |
47 | #include "llviewercontrol.h" | 51 | #include "llviewercontrol.h" |
48 | #include "lldir.h" | 52 | #include "lldir.h" |
@@ -73,7 +77,6 @@ | |||
73 | 77 | ||
74 | #include "llagent.h" | 78 | #include "llagent.h" |
75 | #include "llagentpilot.h" | 79 | #include "llagentpilot.h" |
76 | #include "llasynchostbyname.h" | ||
77 | #include "llfloateravatarpicker.h" | 80 | #include "llfloateravatarpicker.h" |
78 | #include "llcallbacklist.h" | 81 | #include "llcallbacklist.h" |
79 | #include "llcallingcard.h" | 82 | #include "llcallingcard.h" |
@@ -127,6 +130,8 @@ | |||
127 | #include "lltexturefetch.h" | 130 | #include "lltexturefetch.h" |
128 | #include "lltoolmgr.h" | 131 | #include "lltoolmgr.h" |
129 | #include "llui.h" | 132 | #include "llui.h" |
133 | #include "llurldispatcher.h" | ||
134 | #include "llurlsimstring.h" | ||
130 | #include "llurlwhitelist.h" | 135 | #include "llurlwhitelist.h" |
131 | #include "lluserauth.h" | 136 | #include "lluserauth.h" |
132 | #include "llviewerassetstorage.h" | 137 | #include "llviewerassetstorage.h" |
@@ -289,6 +294,9 @@ void update_texture_fetch() | |||
289 | gImageList.updateImages(0.10f); | 294 | gImageList.updateImages(0.10f); |
290 | } | 295 | } |
291 | 296 | ||
297 | static std::vector<std::string> sAuthUris; | ||
298 | static int sAuthUriNum = -1; | ||
299 | |||
292 | // Returns FALSE to skip other idle processing. Should only return | 300 | // Returns FALSE to skip other idle processing. Should only return |
293 | // TRUE when all initialization done. | 301 | // TRUE when all initialization done. |
294 | BOOL idle_startup() | 302 | BOOL idle_startup() |
@@ -307,8 +315,6 @@ BOOL idle_startup() | |||
307 | // auth/transform loop will do. | 315 | // auth/transform loop will do. |
308 | static F32 progress = 0.10f; | 316 | static F32 progress = 0.10f; |
309 | 317 | ||
310 | static std::vector<std::string> auth_uris; | ||
311 | static int auth_uri_num = -1; | ||
312 | static std::string auth_method; | 318 | static std::string auth_method; |
313 | static std::string auth_desc; | 319 | static std::string auth_desc; |
314 | static std::string auth_message; | 320 | static std::string auth_message; |
@@ -403,7 +409,7 @@ BOOL idle_startup() | |||
403 | } | 409 | } |
404 | if (!xml_ok) | 410 | if (!xml_ok) |
405 | { | 411 | { |
406 | // XUI:translate (maybe - very unlikely error message) | 412 | // *TODO:translate (maybe - very unlikely error message) |
407 | // Note: alerts.xml may be invalid - if this gets translated it will need to be in the code | 413 | // Note: alerts.xml may be invalid - if this gets translated it will need to be in the code |
408 | LLString bad_xui_msg = "An error occured while updating Second Life. Please download the latest version from www.secondlife.com."; | 414 | LLString bad_xui_msg = "An error occured while updating Second Life. Please download the latest version from www.secondlife.com."; |
409 | app_early_exit(bad_xui_msg); | 415 | app_early_exit(bad_xui_msg); |
@@ -422,6 +428,11 @@ BOOL idle_startup() | |||
422 | // Load the throttle settings | 428 | // Load the throttle settings |
423 | gViewerThrottle.load(); | 429 | gViewerThrottle.load(); |
424 | 430 | ||
431 | if (ll_init_ares() == NULL) | ||
432 | { | ||
433 | llerrs << "Could not start address resolution system" << llendl; | ||
434 | } | ||
435 | |||
425 | // | 436 | // |
426 | // Initialize messaging system | 437 | // Initialize messaging system |
427 | // | 438 | // |
@@ -526,7 +537,7 @@ BOOL idle_startup() | |||
526 | // LibXUL (Mozilla) initialization | 537 | // LibXUL (Mozilla) initialization |
527 | //--------------------------------------------------------------------- | 538 | //--------------------------------------------------------------------- |
528 | #if LL_LIBXUL_ENABLED | 539 | #if LL_LIBXUL_ENABLED |
529 | set_startup_status(0.48f, "Initializing embedded web browser...", gAgent.mMOTD.c_str()); | 540 | set_startup_status(0.58f, "Initializing embedded web browser...", gAgent.mMOTD.c_str()); |
530 | display_startup(); | 541 | display_startup(); |
531 | llinfos << "Initializing embedded web browser..." << llendl; | 542 | llinfos << "Initializing embedded web browser..." << llendl; |
532 | 543 | ||
@@ -781,7 +792,7 @@ BOOL idle_startup() | |||
781 | 792 | ||
782 | if ( user_picked_server ) | 793 | if ( user_picked_server ) |
783 | { // User picked a grid from the popup, so clear the stored urls and they will be re-generated from gUserServerChoice | 794 | { // User picked a grid from the popup, so clear the stored urls and they will be re-generated from gUserServerChoice |
784 | auth_uris.clear(); | 795 | sAuthUris.clear(); |
785 | resetURIs(); | 796 | resetURIs(); |
786 | } | 797 | } |
787 | 798 | ||
@@ -793,7 +804,7 @@ BOOL idle_startup() | |||
793 | 804 | ||
794 | //For HTML parsing in text boxes. | 805 | //For HTML parsing in text boxes. |
795 | LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") ); | 806 | LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") ); |
796 | LLTextEditor::setURLCallbacks ( &LLWeb::loadURL, &process_secondlife_url ); | 807 | LLTextEditor::setURLCallbacks ( &LLWeb::loadURL, &LLURLDispatcher::dispatch, &LLURLDispatcher::dispatch ); |
797 | 808 | ||
798 | //------------------------------------------------- | 809 | //------------------------------------------------- |
799 | // Handle startup progress screen | 810 | // Handle startup progress screen |
@@ -895,11 +906,11 @@ BOOL idle_startup() | |||
895 | gSavedSettings.setBOOL("UseDebugMenus", TRUE); | 906 | gSavedSettings.setBOOL("UseDebugMenus", TRUE); |
896 | requested_options.push_back("god-connect"); | 907 | requested_options.push_back("god-connect"); |
897 | } | 908 | } |
898 | if (auth_uris.empty()) | 909 | if (sAuthUris.empty()) |
899 | { | 910 | { |
900 | auth_uris = getLoginURIs(); | 911 | sAuthUris = getLoginURIs(); |
901 | } | 912 | } |
902 | auth_uri_num = 0; | 913 | sAuthUriNum = 0; |
903 | auth_method = "login_to_simulator"; | 914 | auth_method = "login_to_simulator"; |
904 | auth_desc = "Logging in. "; | 915 | auth_desc = "Logging in. "; |
905 | auth_desc += gSecondLife; | 916 | auth_desc += gSecondLife; |
@@ -942,7 +953,7 @@ BOOL idle_startup() | |||
942 | hashed_mac.hex_digest(hashed_mac_string); | 953 | hashed_mac.hex_digest(hashed_mac_string); |
943 | 954 | ||
944 | gUserAuthp->authenticate( | 955 | gUserAuthp->authenticate( |
945 | auth_uris[auth_uri_num].c_str(), | 956 | sAuthUris[sAuthUriNum].c_str(), |
946 | auth_method.c_str(), | 957 | auth_method.c_str(), |
947 | firstname.c_str(), | 958 | firstname.c_str(), |
948 | lastname.c_str(), | 959 | lastname.c_str(), |
@@ -1038,8 +1049,8 @@ BOOL idle_startup() | |||
1038 | else if(login_response && (0 == strcmp(login_response, "indeterminate"))) | 1049 | else if(login_response && (0 == strcmp(login_response, "indeterminate"))) |
1039 | { | 1050 | { |
1040 | llinfos << "Indeterminate login..." << llendl; | 1051 | llinfos << "Indeterminate login..." << llendl; |
1041 | auth_uris = LLSRV::rewriteURI(gUserAuthp->getResponse("next_url")); | 1052 | sAuthUris = LLSRV::rewriteURI(gUserAuthp->getResponse("next_url")); |
1042 | auth_uri_num = 0; | 1053 | sAuthUriNum = 0; |
1043 | auth_method = gUserAuthp->getResponse("next_method"); | 1054 | auth_method = gUserAuthp->getResponse("next_method"); |
1044 | auth_message = gUserAuthp->getResponse("message"); | 1055 | auth_message = gUserAuthp->getResponse("message"); |
1045 | if(auth_method.substr(0, 5) == "login") | 1056 | if(auth_method.substr(0, 5) == "login") |
@@ -1067,7 +1078,17 @@ BOOL idle_startup() | |||
1067 | } | 1078 | } |
1068 | else if (message_response) | 1079 | else if (message_response) |
1069 | { | 1080 | { |
1070 | emsg << message_response; | 1081 | // XUI: fix translation for strings returned during login |
1082 | // We need a generic table for translations | ||
1083 | LLString big_reason = LLAgent::sTeleportErrorMessages[ message_response ]; | ||
1084 | if ( big_reason.size() == 0 ) | ||
1085 | { | ||
1086 | emsg << message_response; | ||
1087 | } | ||
1088 | else | ||
1089 | { | ||
1090 | emsg << big_reason; | ||
1091 | } | ||
1071 | } | 1092 | } |
1072 | 1093 | ||
1073 | if(reason_response && (0 == strcmp(reason_response, "tos"))) | 1094 | if(reason_response && (0 == strcmp(reason_response, "tos"))) |
@@ -1144,18 +1165,18 @@ BOOL idle_startup() | |||
1144 | case LLUserAuth::E_SSL_CACERT: | 1165 | case LLUserAuth::E_SSL_CACERT: |
1145 | case LLUserAuth::E_SSL_CONNECT_ERROR: | 1166 | case LLUserAuth::E_SSL_CONNECT_ERROR: |
1146 | default: | 1167 | default: |
1147 | if (auth_uri_num >= (int) auth_uris.size() - 1) | 1168 | if (sAuthUriNum >= (int) sAuthUris.size() - 1) |
1148 | { | 1169 | { |
1149 | emsg << "Unable to connect to " << gSecondLife << ".\n"; | 1170 | emsg << "Unable to connect to " << gSecondLife << ".\n"; |
1150 | emsg << gUserAuthp->errorMessage(); | 1171 | emsg << gUserAuthp->errorMessage(); |
1151 | } else { | 1172 | } else { |
1152 | auth_uri_num++; | 1173 | sAuthUriNum++; |
1153 | std::ostringstream s; | 1174 | std::ostringstream s; |
1154 | s << "Previous login attempt failed. Logging in, attempt " | 1175 | s << "Previous login attempt failed. Logging in, attempt " |
1155 | << (auth_uri_num + 1) << ". "; | 1176 | << (sAuthUriNum + 1) << ". "; |
1156 | auth_desc = s.str(); | 1177 | auth_desc = s.str(); |
1157 | LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE ); | 1178 | LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE ); |
1158 | auth_uri_num++; | 1179 | sAuthUriNum++; |
1159 | return do_normal_idle; | 1180 | return do_normal_idle; |
1160 | } | 1181 | } |
1161 | break; | 1182 | break; |
@@ -1638,12 +1659,17 @@ BOOL idle_startup() | |||
1638 | gSky.init(initial_sun_direction); | 1659 | gSky.init(initial_sun_direction); |
1639 | } | 1660 | } |
1640 | 1661 | ||
1641 | set_startup_status(0.45f, "Decoding UI images...", gAgent.mMOTD.c_str()); | ||
1642 | display_startup(); | ||
1643 | llinfos << "Decoding images..." << llendl; | 1662 | llinfos << "Decoding images..." << llendl; |
1644 | // For all images pre-loaded into viewer cache, decode them. | 1663 | // For all images pre-loaded into viewer cache, decode them. |
1645 | // Need to do this AFTER we init the sky | 1664 | // Need to do this AFTER we init the sky |
1646 | gImageList.decodeAllImages(2.f); | 1665 | const S32 DECODE_TIME_SEC = 2; |
1666 | for (int i = 0; i < DECODE_TIME_SEC; i++) | ||
1667 | { | ||
1668 | F32 frac = (F32)i / (F32)DECODE_TIME_SEC; | ||
1669 | set_startup_status(0.45f + frac*0.1f, "Decoding images...", gAgent.mMOTD.c_str()); | ||
1670 | display_startup(); | ||
1671 | gImageList.decodeAllImages(1.f); | ||
1672 | } | ||
1647 | LLStartUp::setStartupState( STATE_QUICKTIME_INIT ); | 1673 | LLStartUp::setStartupState( STATE_QUICKTIME_INIT ); |
1648 | 1674 | ||
1649 | // JC - Do this as late as possible to increase likelihood Purify | 1675 | // JC - Do this as late as possible to increase likelihood Purify |
@@ -1693,7 +1719,7 @@ BOOL idle_startup() | |||
1693 | { | 1719 | { |
1694 | // initialize quicktime libraries (fails gracefully if quicktime not installed ($QUICKTIME) | 1720 | // initialize quicktime libraries (fails gracefully if quicktime not installed ($QUICKTIME) |
1695 | llinfos << "Initializing QuickTime...." << llendl; | 1721 | llinfos << "Initializing QuickTime...." << llendl; |
1696 | set_startup_status(0.47f, "Initializing QuickTime...", gAgent.mMOTD.c_str()); | 1722 | set_startup_status(0.57f, "Initializing QuickTime...", gAgent.mMOTD.c_str()); |
1697 | display_startup(); | 1723 | display_startup(); |
1698 | #if LL_WINDOWS | 1724 | #if LL_WINDOWS |
1699 | // Only necessary/available on Windows. | 1725 | // Only necessary/available on Windows. |
@@ -1702,12 +1728,12 @@ BOOL idle_startup() | |||
1702 | // quicktime init failed - turn off media engine support | 1728 | // quicktime init failed - turn off media engine support |
1703 | LLMediaEngine::getInstance ()->setAvailable ( FALSE ); | 1729 | LLMediaEngine::getInstance ()->setAvailable ( FALSE ); |
1704 | llinfos << "...not found - unable to initialize." << llendl; | 1730 | llinfos << "...not found - unable to initialize." << llendl; |
1705 | set_startup_status(0.47f, "QuickTime not found - unable to initialize.", gAgent.mMOTD.c_str()); | 1731 | set_startup_status(0.57f, "QuickTime not found - unable to initialize.", gAgent.mMOTD.c_str()); |
1706 | } | 1732 | } |
1707 | else | 1733 | else |
1708 | { | 1734 | { |
1709 | llinfos << ".. initialized successfully." << llendl; | 1735 | llinfos << ".. initialized successfully." << llendl; |
1710 | set_startup_status(0.47f, "QuickTime initialized successfully.", gAgent.mMOTD.c_str()); | 1736 | set_startup_status(0.57f, "QuickTime initialized successfully.", gAgent.mMOTD.c_str()); |
1711 | }; | 1737 | }; |
1712 | #endif | 1738 | #endif |
1713 | EnterMovies (); | 1739 | EnterMovies (); |
@@ -1725,7 +1751,7 @@ BOOL idle_startup() | |||
1725 | if(STATE_WORLD_WAIT == LLStartUp::getStartupState()) | 1751 | if(STATE_WORLD_WAIT == LLStartUp::getStartupState()) |
1726 | { | 1752 | { |
1727 | //llinfos << "Waiting for simulator ack...." << llendl; | 1753 | //llinfos << "Waiting for simulator ack...." << llendl; |
1728 | set_startup_status(0.49f, "Waiting for region handshake...", gAgent.mMOTD.c_str()); | 1754 | set_startup_status(0.59f, "Waiting for region handshake...", gAgent.mMOTD.c_str()); |
1729 | if(gGotUseCircuitCodeAck) | 1755 | if(gGotUseCircuitCodeAck) |
1730 | { | 1756 | { |
1731 | LLStartUp::setStartupState( STATE_AGENT_SEND ); | 1757 | LLStartUp::setStartupState( STATE_AGENT_SEND ); |
@@ -1744,7 +1770,7 @@ BOOL idle_startup() | |||
1744 | if (STATE_AGENT_SEND == LLStartUp::getStartupState()) | 1770 | if (STATE_AGENT_SEND == LLStartUp::getStartupState()) |
1745 | { | 1771 | { |
1746 | llinfos << "Connecting to region..." << llendl; | 1772 | llinfos << "Connecting to region..." << llendl; |
1747 | set_startup_status(0.50f, "Connecting to region...", gAgent.mMOTD.c_str()); | 1773 | set_startup_status(0.60f, "Connecting to region...", gAgent.mMOTD.c_str()); |
1748 | // register with the message system so it knows we're | 1774 | // register with the message system so it knows we're |
1749 | // expecting this message | 1775 | // expecting this message |
1750 | LLMessageSystem* msg = gMessageSystem; | 1776 | LLMessageSystem* msg = gMessageSystem; |
@@ -2107,6 +2133,7 @@ BOOL idle_startup() | |||
2107 | gInitializationComplete = TRUE; | 2133 | gInitializationComplete = TRUE; |
2108 | 2134 | ||
2109 | gRenderStartTime.reset(); | 2135 | gRenderStartTime.reset(); |
2136 | gForegroundTime.reset(); | ||
2110 | 2137 | ||
2111 | // HACK: Inform simulator of window size. | 2138 | // HACK: Inform simulator of window size. |
2112 | // Do this here so it's less likely to race with RegisterNewAgent. | 2139 | // Do this here so it's less likely to race with RegisterNewAgent. |
@@ -2187,7 +2214,7 @@ BOOL idle_startup() | |||
2187 | else | 2214 | else |
2188 | { | 2215 | { |
2189 | update_texture_fetch(); | 2216 | update_texture_fetch(); |
2190 | set_startup_status(0.50f + 0.50f * timeout_frac, "Precaching...", | 2217 | set_startup_status(0.60f + 0.40f * timeout_frac, "Precaching...", |
2191 | gAgent.mMOTD.c_str()); | 2218 | gAgent.mMOTD.c_str()); |
2192 | } | 2219 | } |
2193 | 2220 | ||
@@ -2268,25 +2295,8 @@ BOOL idle_startup() | |||
2268 | gAgentPilot.startPlayback(); | 2295 | gAgentPilot.startPlayback(); |
2269 | } | 2296 | } |
2270 | 2297 | ||
2271 | // ok, if we've gotten this far and have a startup URL | 2298 | // If we've got a startup URL, dispatch it |
2272 | if (LLURLSimString::sInstance.parse()) | 2299 | LLStartUp::dispatchURL(); |
2273 | { | ||
2274 | // kick off request for landmark to startup URL | ||
2275 | if(gFloaterWorldMap) | ||
2276 | { | ||
2277 | LLVector3 pos = gAgent.getPositionAgent(); | ||
2278 | if( LLURLSimString::sInstance.mSimName != gAgent.getRegion()->getName() | ||
2279 | || LLURLSimString::sInstance.mX != llfloor(pos[VX]) | ||
2280 | || LLURLSimString::sInstance.mY != llfloor(pos[VY]) ) | ||
2281 | { | ||
2282 | LLFloaterWorldMap::show(NULL, TRUE); | ||
2283 | gFloaterWorldMap->trackURL(LLURLSimString::sInstance.mSimName, | ||
2284 | LLURLSimString::sInstance.mX, | ||
2285 | LLURLSimString::sInstance.mY, | ||
2286 | LLURLSimString::sInstance.mZ); | ||
2287 | } | ||
2288 | } | ||
2289 | } | ||
2290 | 2300 | ||
2291 | // Clean up the userauth stuff. | 2301 | // Clean up the userauth stuff. |
2292 | if (gUserAuthp) | 2302 | if (gUserAuthp) |
@@ -2331,11 +2341,8 @@ void login_show() | |||
2331 | bUseDebugLogin, | 2341 | bUseDebugLogin, |
2332 | login_callback, NULL ); | 2342 | login_callback, NULL ); |
2333 | 2343 | ||
2334 | llinfos << "Decoding Images" << llendl; | 2344 | // UI textures have been previously loaded in doPreloadImages() |
2335 | 2345 | ||
2336 | // Make sure all the UI textures are present and decoded. | ||
2337 | gImageList.decodeAllImages(2.f); | ||
2338 | |||
2339 | llinfos << "Setting Servers" << llendl; | 2346 | llinfos << "Setting Servers" << llendl; |
2340 | 2347 | ||
2341 | if( USERSERVER_OTHER == gUserServerChoice ) | 2348 | if( USERSERVER_OTHER == gUserServerChoice ) |
@@ -2573,7 +2580,7 @@ void update_app(BOOL mandatory, const std::string& auth_msg) | |||
2573 | 2580 | ||
2574 | std::ostringstream message; | 2581 | std::ostringstream message; |
2575 | 2582 | ||
2576 | //XUI:translate | 2583 | //*TODO:translate |
2577 | std::string msg; | 2584 | std::string msg; |
2578 | if (!auth_msg.empty()) | 2585 | if (!auth_msg.empty()) |
2579 | { | 2586 | { |
@@ -2915,11 +2922,11 @@ void register_viewer_callbacks(LLMessageSystem* msg) | |||
2915 | msg->setHandlerFuncFast(_PREHASH_GrantGodlikePowers, process_grant_godlike_powers); | 2922 | msg->setHandlerFuncFast(_PREHASH_GrantGodlikePowers, process_grant_godlike_powers); |
2916 | 2923 | ||
2917 | msg->setHandlerFuncFast(_PREHASH_GroupAccountSummaryReply, | 2924 | msg->setHandlerFuncFast(_PREHASH_GroupAccountSummaryReply, |
2918 | LLGroupMoneyPlanningTabEventHandler::processGroupAccountSummaryReply); | 2925 | LLPanelGroupLandMoney::processGroupAccountSummaryReply); |
2919 | msg->setHandlerFuncFast(_PREHASH_GroupAccountDetailsReply, | 2926 | msg->setHandlerFuncFast(_PREHASH_GroupAccountDetailsReply, |
2920 | LLGroupMoneyDetailsTabEventHandler::processGroupAccountDetailsReply); | 2927 | LLPanelGroupLandMoney::processGroupAccountDetailsReply); |
2921 | msg->setHandlerFuncFast(_PREHASH_GroupAccountTransactionsReply, | 2928 | msg->setHandlerFuncFast(_PREHASH_GroupAccountTransactionsReply, |
2922 | LLGroupMoneySalesTabEventHandler::processGroupAccountTransactionsReply); | 2929 | LLPanelGroupLandMoney::processGroupAccountTransactionsReply); |
2923 | 2930 | ||
2924 | msg->setHandlerFuncFast(_PREHASH_UserInfoReply, | 2931 | msg->setHandlerFuncFast(_PREHASH_UserInfoReply, |
2925 | process_user_info_reply); | 2932 | process_user_info_reply); |
@@ -3102,67 +3109,6 @@ void init_stat_view() | |||
3102 | stat_barp->mDisplayBar = FALSE; | 3109 | stat_barp->mDisplayBar = FALSE; |
3103 | 3110 | ||
3104 | 3111 | ||
3105 | // Pipeline statistics | ||
3106 | LLStatView *pipeline_statviewp; | ||
3107 | pipeline_statviewp = new LLStatView("pipeline stat view", "Pipeline", "", rect); | ||
3108 | render_statviewp->addChildAtEnd(pipeline_statviewp); | ||
3109 | |||
3110 | stat_barp = pipeline_statviewp->addStat("Visible Drawables", &(gPipeline.mNumVisibleDrawablesStat)); | ||
3111 | stat_barp->setUnitLabel(""); | ||
3112 | stat_barp->mMinBar = 0.f; | ||
3113 | stat_barp->mMaxBar = 10000.f; | ||
3114 | stat_barp->mTickSpacing = 1000.f; | ||
3115 | stat_barp->mLabelSpacing = 5000.f; | ||
3116 | stat_barp->mPerSec = FALSE; | ||
3117 | |||
3118 | stat_barp = pipeline_statviewp->addStat("Visible Faces", &(gPipeline.mNumVisibleFacesStat)); | ||
3119 | stat_barp->setUnitLabel(""); | ||
3120 | stat_barp->mMinBar = 0.f; | ||
3121 | stat_barp->mMaxBar = 40000.f; | ||
3122 | stat_barp->mTickSpacing = 5000.f; | ||
3123 | stat_barp->mLabelSpacing = 10000.f; | ||
3124 | stat_barp->mPerSec = FALSE; | ||
3125 | |||
3126 | stat_barp = pipeline_statviewp->addStat("DirtyGeom", &(gPipeline.mGeometryChangesStat)); | ||
3127 | stat_barp->setUnitLabel("/fr"); | ||
3128 | stat_barp->mMinBar = 0.f; | ||
3129 | stat_barp->mMaxBar = 1000.f; | ||
3130 | stat_barp->mTickSpacing = 100.f; | ||
3131 | stat_barp->mLabelSpacing = 500.f; | ||
3132 | stat_barp->mPerSec = FALSE; | ||
3133 | |||
3134 | stat_barp = pipeline_statviewp->addStat("DirtyLight", &(gPipeline.mLightingChangesStat)); | ||
3135 | stat_barp->setUnitLabel("/fr"); | ||
3136 | stat_barp->mMinBar = 0.f; | ||
3137 | stat_barp->mMaxBar = 1000.f; | ||
3138 | stat_barp->mTickSpacing = 100.f; | ||
3139 | stat_barp->mLabelSpacing = 500.f; | ||
3140 | stat_barp->mPerSec = FALSE; | ||
3141 | |||
3142 | stat_barp = pipeline_statviewp->addStat("MoveList", &(gPipeline.mMoveChangesStat)); | ||
3143 | stat_barp->setUnitLabel("dr"); | ||
3144 | stat_barp->mMinBar = 0.f; | ||
3145 | stat_barp->mMaxBar = 1000.f; | ||
3146 | stat_barp->mTickSpacing = 100.f; | ||
3147 | stat_barp->mLabelSpacing = 500.f; | ||
3148 | stat_barp->mPerSec = FALSE; | ||
3149 | |||
3150 | stat_barp = pipeline_statviewp->addStat("Compiles", &(gPipeline.mCompilesStat)); | ||
3151 | stat_barp->setUnitLabel("/fr"); | ||
3152 | stat_barp->mMinBar = 0.f; | ||
3153 | stat_barp->mMaxBar = 1000.f; | ||
3154 | stat_barp->mTickSpacing = 100.f; | ||
3155 | stat_barp->mLabelSpacing = 500.f; | ||
3156 | stat_barp->mPerSec = FALSE; | ||
3157 | |||
3158 | stat_barp = pipeline_statviewp->addStat("Verts Relit", &(gPipeline.mVerticesRelitStat)); | ||
3159 | stat_barp->setUnitLabel("/fr"); | ||
3160 | stat_barp->mMinBar = 0.f; | ||
3161 | stat_barp->mMaxBar = 40000.f; | ||
3162 | stat_barp->mTickSpacing = 10000.f; | ||
3163 | stat_barp->mLabelSpacing = 20000.f; | ||
3164 | stat_barp->mPerSec = FALSE; | ||
3165 | |||
3166 | // Texture statistics | 3112 | // Texture statistics |
3167 | LLStatView *texture_statviewp; | 3113 | LLStatView *texture_statviewp; |
3168 | texture_statviewp = new LLStatView("texture stat view", "Texture", "", rect); | 3114 | texture_statviewp = new LLStatView("texture stat view", "Texture", "", rect); |
@@ -3604,7 +3550,6 @@ void callback_choose_gender(S32 option, void* userdata) | |||
3604 | gAgent.setGenderChosen(TRUE); | 3550 | gAgent.setGenderChosen(TRUE); |
3605 | } | 3551 | } |
3606 | 3552 | ||
3607 | // XUI:translate | ||
3608 | void dialog_choose_gender_first_start() | 3553 | void dialog_choose_gender_first_start() |
3609 | { | 3554 | { |
3610 | if (!gNoRender | 3555 | if (!gNoRender |
@@ -3679,13 +3624,6 @@ void release_start_screen() | |||
3679 | } | 3624 | } |
3680 | 3625 | ||
3681 | // static | 3626 | // static |
3682 | bool LLStartUp::canGoFullscreen() | ||
3683 | { | ||
3684 | return LLStartUp::getStartupState() >= STATE_WORLD_INIT; | ||
3685 | } | ||
3686 | |||
3687 | |||
3688 | // static | ||
3689 | void LLStartUp::setStartupState( S32 state ) | 3627 | void LLStartUp::setStartupState( S32 state ) |
3690 | { | 3628 | { |
3691 | llinfos << "Startup state changing from " << gStartupState << " to " << state << llendl; | 3629 | llinfos << "Startup state changing from " << gStartupState << " to " << state << llendl; |
@@ -3706,3 +3644,40 @@ void reset_login() | |||
3706 | if ( gFloaterMap ) | 3644 | if ( gFloaterMap ) |
3707 | gFloaterMap->setVisible( FALSE ); | 3645 | gFloaterMap->setVisible( FALSE ); |
3708 | } | 3646 | } |
3647 | |||
3648 | //--------------------------------------------------------------------------- | ||
3649 | |||
3650 | std::string LLStartUp::sSLURLCommand; | ||
3651 | |||
3652 | bool LLStartUp::canGoFullscreen() | ||
3653 | { | ||
3654 | return gStartupState >= STATE_WORLD_INIT; | ||
3655 | } | ||
3656 | |||
3657 | bool LLStartUp::dispatchURL() | ||
3658 | { | ||
3659 | // ok, if we've gotten this far and have a startup URL | ||
3660 | if (!sSLURLCommand.empty()) | ||
3661 | { | ||
3662 | LLURLDispatcher::dispatch(sSLURLCommand); | ||
3663 | } | ||
3664 | else if (LLURLSimString::parse()) | ||
3665 | { | ||
3666 | // If we started with a location, but we're already | ||
3667 | // at that location, don't pop dialogs open. | ||
3668 | LLVector3 pos = gAgent.getPositionAgent(); | ||
3669 | F32 dx = pos.mV[VX] - (F32)LLURLSimString::sInstance.mX; | ||
3670 | F32 dy = pos.mV[VY] - (F32)LLURLSimString::sInstance.mY; | ||
3671 | const F32 SLOP = 2.f; // meters | ||
3672 | |||
3673 | if( LLURLSimString::sInstance.mSimName != gAgent.getRegion()->getName() | ||
3674 | || (dx*dx > SLOP*SLOP) | ||
3675 | || (dy*dy > SLOP*SLOP) ) | ||
3676 | { | ||
3677 | std::string url = LLURLSimString::getURL(); | ||
3678 | LLURLDispatcher::dispatch(url); | ||
3679 | } | ||
3680 | return true; | ||
3681 | } | ||
3682 | return false; | ||
3683 | } | ||