From 22b861982f2efd5d16097a012627e73b9fb85834 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Tue, 9 Dec 2008 22:25:37 -0600 Subject: Second Life viewer sources 1.22.2-RC --- linden/indra/cmake/CopyWinLibs.cmake | 6 +- linden/indra/llcommon/llerror.cpp | 7 + linden/indra/llcommon/llerrorcontrol.h | 4 +- linden/indra/llcommon/llversionviewer.h | 2 +- linden/indra/llrender/llimagegl.cpp | 2 +- linden/indra/llrender/llrender.cpp | 4 + linden/indra/llui/llbutton.cpp | 1 + linden/indra/llui/llui.cpp | 36 +- linden/indra/llui/llui.h | 19 +- linden/indra/llui/lluictrlfactory.cpp | 10 +- linden/indra/llui/llview.cpp | 156 +-- linden/indra/newview/app_settings/settings.xml | 28 +- linden/indra/newview/gpu_table.txt | 1 + .../installers/windows/installer_template.nsi | 33 +- .../indra/newview/installers/windows/lang_de.nsi | Bin 8262 -> 8260 bytes .../indra/newview/installers/windows/lang_es.nsi | Bin 7612 -> 7846 bytes .../indra/newview/installers/windows/lang_fr.nsi | Bin 7858 -> 8118 bytes .../indra/newview/installers/windows/lang_it.nsi | Bin 7196 -> 7438 bytes .../indra/newview/installers/windows/lang_nl.nsi | Bin 7160 -> 7388 bytes .../newview/installers/windows/lang_pt-br.nsi | Bin 7590 -> 7832 bytes .../indra/newview/installers/windows/lang_zh.nsi | Bin 5354 -> 5552 bytes linden/indra/newview/llagentlanguage.cpp | 9 +- linden/indra/newview/llagentlanguage.h | 2 +- linden/indra/newview/llappviewer.cpp | 10 +- linden/indra/newview/llappviewer.h | 1 - linden/indra/newview/llappviewerwin32.cpp | 3 + linden/indra/newview/llfeaturemanager.cpp | 4 +- linden/indra/newview/llfloaterhud.cpp | 7 +- linden/indra/newview/llfloaterpostcard.cpp | 2 +- linden/indra/newview/llpaneldirfind.cpp | 11 +- linden/indra/newview/llpanellogin.cpp | 6 +- linden/indra/newview/llspatialpartition.cpp | 8 +- linden/indra/newview/llspatialpartition.h | 1 + linden/indra/newview/llurlhistory.cpp | 13 +- linden/indra/newview/llviewerassetstorage.cpp | 2 +- linden/indra/newview/llviewerdisplay.cpp | 68 +- linden/indra/newview/llviewermenu.cpp | 1 - linden/indra/newview/llviewermessage.cpp | 2 +- linden/indra/newview/llviewerstats.cpp | 11 +- linden/indra/newview/llviewerwindow.cpp | 8 +- linden/indra/newview/llvoavatar.cpp | 73 +- linden/indra/newview/llvoavatar.h | 6 +- linden/indra/newview/llvosurfacepatch.cpp | 70 +- linden/indra/newview/llvovolume.cpp | 2 +- linden/indra/newview/llwebbrowserctrl.cpp | 8 +- linden/indra/newview/pipeline.cpp | 42 +- linden/indra/newview/pipeline.h | 1 + .../indra/newview/skins/default/xui/de/alerts.xml | 718 ++++-------- .../skins/default/xui/de/floater_about_land.xml | 442 +++---- .../default/xui/de/floater_animation_preview.xml | 10 +- .../skins/default/xui/de/floater_beacons.xml | 15 + .../skins/default/xui/de/floater_buy_contents.xml | 4 +- .../skins/default/xui/de/floater_buy_land.xml | 6 +- .../skins/default/xui/de/floater_buy_object.xml | 2 +- .../skins/default/xui/de/floater_chat_history.xml | 5 +- .../skins/default/xui/de/floater_env_settings.xml | 2 +- .../skins/default/xui/de/floater_god_tools.xml | 50 +- .../newview/skins/default/xui/de/floater_html.xml | 2 +- .../xui/de/floater_inventory_item_properties.xml | 2 +- .../skins/default/xui/de/floater_land_holdings.xml | 8 +- .../default/xui/de/floater_name_description.xml | 4 +- .../skins/default/xui/de/floater_openobject.xml | 4 +- .../skins/default/xui/de/floater_pay_object.xml | 22 +- .../default/xui/de/floater_preview_animation.xml | 5 +- .../skins/default/xui/de/floater_report_abuse.xml | 61 +- .../skins/default/xui/de/floater_script_queue.xml | 2 +- .../default/xui/de/floater_settings_debug.xml | 2 +- .../skins/default/xui/de/floater_telehub.xml | 24 +- .../newview/skins/default/xui/de/floater_tools.xml | 2 +- .../skins/default/xui/de/floater_top_objects.xml | 8 +- .../skins/default/xui/de/floater_url_entry.xml | 3 +- .../newview/skins/default/xui/de/floater_water.xml | 7 +- .../newview/skins/default/xui/de/menu_viewer.xml | 409 +++---- .../newview/skins/default/xui/de/need_to_long.xml | 178 --- .../skins/default/xui/de/need_to_translate.xml | 1233 -------------------- .../skins/default/xui/de/need_to_update.xml | 625 ---------- .../indra/newview/skins/default/xui/de/notify.xml | 57 +- .../newview/skins/default/xui/de/panel_avatar.xml | 8 +- .../skins/default/xui/de/panel_chat_bar.xml | 9 +- .../skins/default/xui/de/panel_group_general.xml | 69 +- .../skins/default/xui/de/panel_group_roles.xml | 89 +- .../default/xui/de/panel_preferences_general.xml | 97 +- .../default/xui/de/panel_preferences_network.xml | 23 +- .../default/xui/de/panel_preferences_voice.xml | 26 +- .../skins/default/xui/de/panel_region_debug.xml | 65 +- .../skins/default/xui/de/panel_region_estate.xml | 3 +- .../skins/default/xui/de/panel_status_bar.xml | 43 +- .../newview/skins/default/xui/en-us/alerts.xml | 16 +- .../skins/default/xui/en-us/floater_about.xml | 2 +- .../skins/default/xui/en-us/floater_about_land.xml | 2 +- .../skins/default/xui/en-us/panel_chat_bar.xml | 6 +- .../xui/en-us/panel_preferences_general.xml | 3 + .../indra/newview/skins/default/xui/fr/alerts.xml | 133 ++- .../skins/default/xui/fr/floater_about_land.xml | 119 +- .../skins/default/xui/fr/floater_beacons.xml | 15 + .../skins/default/xui/fr/floater_buy_land.xml | 8 +- .../skins/default/xui/fr/floater_chat_history.xml | 3 + .../skins/default/xui/fr/floater_directory.xml | 8 +- .../skins/default/xui/fr/floater_group_info.xml | 14 +- .../default/xui/fr/floater_hardware_settings.xml | 5 +- .../newview/skins/default/xui/fr/floater_html.xml | 2 +- .../skins/default/xui/fr/floater_image_preview.xml | 2 +- .../skins/default/xui/fr/floater_joystick.xml | 4 +- .../skins/default/xui/fr/floater_media_browser.xml | 2 +- .../default/xui/fr/floater_preview_notecard.xml | 2 +- .../fr/floater_preview_notecard_keep_discard.xml | 2 +- .../skins/default/xui/fr/floater_report_abuse.xml | 42 +- .../default/xui/fr/floater_script_ed_panel.xml | 4 +- .../skins/default/xui/fr/floater_telehub.xml | 2 +- .../newview/skins/default/xui/fr/floater_tools.xml | 5 +- .../skins/default/xui/fr/floater_top_objects.xml | 4 +- .../skins/default/xui/fr/floater_url_entry.xml | 2 +- .../skins/default/xui/fr/menu_pie_avatar.xml | 2 +- .../newview/skins/default/xui/fr/menu_viewer.xml | 70 +- .../indra/newview/skins/default/xui/fr/notify.xml | 8 +- .../newview/skins/default/xui/fr/panel_avatar.xml | 14 +- .../default/xui/fr/panel_avatar_classified.xml | 4 +- .../skins/default/xui/fr/panel_chat_bar.xml | 7 +- .../newview/skins/default/xui/fr/panel_event.xml | 2 +- .../newview/skins/default/xui/fr/panel_group.xml | 4 +- .../skins/default/xui/fr/panel_group_finder.xml | 2 +- .../skins/default/xui/fr/panel_group_general.xml | 24 +- .../skins/default/xui/fr/panel_group_invite.xml | 12 +- .../default/xui/fr/panel_group_land_money.xml | 11 +- .../skins/default/xui/fr/panel_group_notices.xml | 37 +- .../skins/default/xui/fr/panel_group_roles.xml | 26 +- .../skins/default/xui/fr/panel_group_voting.xml | 16 +- .../newview/skins/default/xui/fr/panel_login.xml | 2 +- .../skins/default/xui/fr/panel_media_controls.xml | 20 +- .../default/xui/fr/panel_preferences_audio.xml | 4 +- .../default/xui/fr/panel_preferences_chat.xml | 6 +- .../default/xui/fr/panel_preferences_general.xml | 48 +- .../default/xui/fr/panel_preferences_graphics1.xml | 4 +- .../skins/default/xui/fr/panel_preferences_im.xml | 6 +- .../default/xui/fr/panel_preferences_input.xml | 8 +- .../default/xui/fr/panel_preferences_network.xml | 2 +- .../default/xui/fr/panel_preferences_popups.xml | 2 +- .../default/xui/fr/panel_preferences_voice.xml | 6 +- .../skins/default/xui/fr/panel_region_covenant.xml | 2 +- .../skins/default/xui/fr/panel_region_debug.xml | 11 +- .../skins/default/xui/fr/panel_region_estate.xml | 6 +- .../skins/default/xui/fr/panel_region_general.xml | 8 +- .../skins/default/xui/fr/panel_scrolling_param.xml | 4 +- .../skins/default/xui/fr/panel_status_bar.xml | 4 +- .../skins/default/xui/fr/panel_voice_controls.xml | 8 +- .../newview/skins/default/xui/fr/role_actions.xml | 174 +-- .../indra/newview/skins/default/xui/fr/strings.xml | 4 +- .../indra/newview/skins/default/xui/ja/alerts.xml | 77 +- .../skins/default/xui/ja/floater_about_land.xml | 435 +++---- .../skins/default/xui/ja/floater_beacons.xml | 15 + .../skins/default/xui/ja/floater_chat_history.xml | 5 +- .../default/xui/ja/floater_preview_gesture.xml | 4 +- .../skins/default/xui/ja/floater_report_abuse.xml | 60 +- .../skins/default/xui/ja/floater_snapshot.xml | 6 +- .../newview/skins/default/xui/ja/menu_viewer.xml | 418 +++---- .../indra/newview/skins/default/xui/ja/notify.xml | 6 +- .../skins/default/xui/ja/panel_chat_bar.xml | 15 +- .../newview/skins/default/xui/ja/panel_login.xml | 2 +- .../default/xui/ja/panel_preferences_general.xml | 106 +- .../default/xui/ja/panel_preferences_network.xml | 23 +- .../default/xui/ja/panel_preferences_voice.xml | 24 +- .../skins/default/xui/ja/panel_region_debug.xml | 67 +- .../skins/default/xui/ja/panel_status_bar.xml | 43 +- .../indra/newview/skins/default/xui/ko/alerts.xml | 3 + 164 files changed, 2236 insertions(+), 5072 deletions(-) create mode 100644 linden/indra/newview/skins/default/xui/de/floater_beacons.xml delete mode 100644 linden/indra/newview/skins/default/xui/de/need_to_long.xml delete mode 100644 linden/indra/newview/skins/default/xui/de/need_to_translate.xml delete mode 100644 linden/indra/newview/skins/default/xui/de/need_to_update.xml create mode 100644 linden/indra/newview/skins/default/xui/fr/floater_beacons.xml create mode 100644 linden/indra/newview/skins/default/xui/ja/floater_beacons.xml (limited to 'linden/indra') diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake index b74ce4f..d4ddb23 100644 --- a/linden/indra/cmake/CopyWinLibs.cmake +++ b/linden/indra/cmake/CopyWinLibs.cmake @@ -153,7 +153,8 @@ endif (EXISTS ${internal_llkdu_path}) if (MSVC80) FIND_PATH(debug_msvc8_redist_path msvcr80d.dll PATHS - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT + NO_DEFAULT_PATH ) if(EXISTS ${debug_msvc8_redist_path}) @@ -174,7 +175,8 @@ if (MSVC80) FIND_PATH(release_msvc8_redist_path msvcr80.dll PATHS - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT + NO_DEFAULT_PATH ) if(EXISTS ${release_msvc8_redist_path}) diff --git a/linden/indra/llcommon/llerror.cpp b/linden/indra/llcommon/llerror.cpp index 5c7c3cd..487907f 100644 --- a/linden/indra/llcommon/llerror.cpp +++ b/linden/indra/llcommon/llerror.cpp @@ -1170,6 +1170,10 @@ namespace LLError return s.shouldLogCallCounter; } +#if LL_WINDOWS + // VC80 was optimizing the error away. + #pragma optimize("", off) +#endif void crashAndLoop(const std::string& message) { // Now, we go kaboom! @@ -1182,6 +1186,9 @@ namespace LLError // Loop forever, in case the crash didn't work? } } +#if LL_WINDOWS + #pragma optimize("", on) +#endif std::string utcTime() { diff --git a/linden/indra/llcommon/llerrorcontrol.h b/linden/indra/llcommon/llerrorcontrol.h index 2c36871..a97abef 100644 --- a/linden/indra/llcommon/llerrorcontrol.h +++ b/linden/indra/llcommon/llerrorcontrol.h @@ -82,9 +82,9 @@ namespace LLError Control functions. */ - typedef void (*FatalFunction)(const std::string& message); + typedef void(*FatalFunction)(const std::string& message); void crashAndLoop(const std::string& message); - // Default fatal funtion: divides by zero and loops forever + // Default fatal funtion: access null pointer and loops forever void setFatalFunction(FatalFunction); // The fatal function will be called when an message of LEVEL_ERROR diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index 6ff2604..e027fad 100644 --- a/linden/indra/llcommon/llversionviewer.h +++ b/linden/indra/llcommon/llversionviewer.h @@ -34,7 +34,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 22; -const S32 LL_VERSION_PATCH = 1; +const S32 LL_VERSION_PATCH = 2; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Release"; diff --git a/linden/indra/llrender/llimagegl.cpp b/linden/indra/llrender/llimagegl.cpp index d9b22c5..a41b931 100644 --- a/linden/indra/llrender/llimagegl.cpp +++ b/linden/indra/llrender/llimagegl.cpp @@ -154,7 +154,7 @@ void LLImageGL::destroyGL(BOOL save_state) LLImageGL* glimage = *iter; if (glimage->mTexName && glimage->mComponents) { - if (save_state) + if (save_state && glimage->isInitialized()) { glimage->mSaveData = new LLImageRaw; glimage->readBackRaw(glimage->mCurrentDiscardLevel, glimage->mSaveData, false); diff --git a/linden/indra/llrender/llrender.cpp b/linden/indra/llrender/llrender.cpp index 80fed06..a15f44a 100644 --- a/linden/indra/llrender/llrender.cpp +++ b/linden/indra/llrender/llrender.cpp @@ -190,6 +190,10 @@ bool LLTexUnit::bind(const LLImageGL* texture) { return texture->bindDefaultImage(mIndex); } + if (!texture->getTexName()) //if texture does not exist + { + return texture->bindDefaultImage(mIndex); + } // Disabled caching of binding state. if (texture != NULL) diff --git a/linden/indra/llui/llbutton.cpp b/linden/indra/llui/llbutton.cpp index 508500a..6402985 100644 --- a/linden/indra/llui/llbutton.cpp +++ b/linden/indra/llui/llbutton.cpp @@ -38,6 +38,7 @@ #include "llstring.h" // Project includes +#include "llhtmlhelp.h" #include "llkeyboard.h" #include "llui.h" #include "lluiconstants.h" diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp index 5502246..4817d78 100644 --- a/linden/indra/llui/llui.cpp +++ b/linden/indra/llui/llui.cpp @@ -30,8 +30,6 @@ */ // Utilities functions the user interface needs - -//#include "llviewerprecompiledheaders.h" #include "linden_common.h" #include @@ -1647,6 +1645,34 @@ void LLUI::setCursorPositionLocal(const LLView* viewp, S32 x, S32 y) setCursorPositionScreen(screen_x, screen_y); } +// On Windows, the user typically sets the language when they install the +// app (by running it with a shortcut that sets InstallLanguage). On Mac, +// or on Windows if the SecondLife.exe executable is run directly, the +// language follows the OS language. In all cases the user can override +// the language manually in preferences. JC +// static +std::string LLUI::getLanguage() +{ + std::string language = "en-us"; + if (sConfigGroup) + { + language = sConfigGroup->getString("Language"); + if (language.empty() || language == "default") + { + language = sConfigGroup->getString("InstallLanguage"); + } + if (language.empty() || language == "default") + { + language = sConfigGroup->getString("SystemLanguage"); + } + if (language.empty() || language == "default") + { + language = "en-us"; + } + } + return language; +} + //static std::string LLUI::locateSkin(const std::string& filename) { @@ -1660,11 +1686,7 @@ std::string LLUI::locateSkin(const std::string& filename) { if (!gDirUtilp->fileExists(found_file)) { - std::string localization(sConfigGroup->getString("Language")); - if(localization == "default") - { - localization = sConfigGroup->getString("SystemLanguage"); - } + std::string localization = getLanguage(); std::string local_skin = "xui" + slash + localization + slash + filename; found_file = gDirUtilp->findSkinnedFilename(local_skin); } diff --git a/linden/indra/llui/llui.h b/linden/indra/llui/llui.h index 4c1bb22..0f498d3 100644 --- a/linden/indra/llui/llui.h +++ b/linden/indra/llui/llui.h @@ -38,15 +38,17 @@ #include "llcontrol.h" #include "llrect.h" #include "llcoord.h" -#include "llhtmlhelp.h" -#include "llgl.h" +//#include "llhtmlhelp.h" +#include "llgl.h" // *TODO: break this dependency #include -#include "llimagegl.h" +//#include "llimagegl.h" // LLUIFactory #include "llsd.h" class LLColor4; +class LLHtmlHelp; +class LLImageGL; class LLVector3; class LLVector2; class LLUUID; @@ -139,13 +141,6 @@ inline void gl_rect_2d_offset_local( const LLRect& rect, S32 pixel_offset, BOOL gl_rect_2d_offset_local( rect.mLeft, rect.mTop, rect.mRight, rect.mBottom, pixel_offset, filled ); } -// No longer used -// Initializes translation table -// void init_tr(); - -// Returns a string from the string table in the correct language -// std::string tr(const std::string& english_chars); - // Used to hide the flashing text cursor when window doesn't have focus. extern BOOL gShowTextEditCursor; @@ -172,6 +167,10 @@ public: static void loadIdentity(); static void translate(F32 x, F32 y, F32 z = 0.0f); + // Return the ISO639 language name ("en", "ko", etc.) for the viewer UI. + // http://www.loc.gov/standards/iso639-2/php/code_list.php + static std::string getLanguage(); + //helper functions (should probably move free standing rendering helper functions here) static std::string locateSkin(const std::string& filename); static void setCursorPositionScreen(S32 x, S32 y); diff --git a/linden/indra/llui/lluictrlfactory.cpp b/linden/indra/llui/lluictrlfactory.cpp index bcd4876..db52261 100644 --- a/linden/indra/llui/lluictrlfactory.cpp +++ b/linden/indra/llui/lluictrlfactory.cpp @@ -130,15 +130,7 @@ void LLUICtrlFactory::setupPaths() for (path = root->getFirstChild(); path.notNull(); path = path->getNextSibling()) { LLUIString path_val_ui(path->getValue()); - std::string language = "en-us"; - if (LLUI::sConfigGroup) - { - language = LLUI::sConfigGroup->getString("Language"); - if(language == "default") - { - language = LLUI::sConfigGroup->getString("SystemLanguage"); - } - } + std::string language = LLUI::getLanguage(); path_val_ui.setArg("[LANGUAGE]", language); if (std::find(sXUIPaths.begin(), sXUIPaths.end(), path_val_ui.getString()) == sXUIPaths.end()) diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp index bc6fe7e..910b4f5 100644 --- a/linden/indra/llui/llview.cpp +++ b/linden/indra/llui/llview.cpp @@ -43,7 +43,7 @@ #include "llfocusmgr.h" #include "llrect.h" #include "llstl.h" -#include "llui.h" // colors saved settings +#include "llui.h" #include "lluictrl.h" #include "llwindow.h" #include "v3color.h" @@ -710,25 +710,38 @@ BOOL LLView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_s && viewp->getEnabled() && viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen )) { + // child provided a tooltip, just return + if (!msg.empty()) return TRUE; + + // otherwise, one of our children ate the event so don't traverse + // siblings however, our child did not actually provide a tooltip + // so we might want to handled = TRUE; break; } } + // get our own tooltip tool_tip = mToolTipMsg.getString(); if ( - LLUI::sShowXUINames && - (tool_tip.find(".xml", 0) == std::string::npos) && - (mName.find("Drag", 0) == std::string::npos)) + LLUI::sShowXUINames + && (tool_tip.find(".xml", 0) == std::string::npos) + && (mName.find("Drag", 0) == std::string::npos)) { tool_tip = getShowNamesToolTip(); } BOOL show_names_text_box = LLUI::sShowXUINames && dynamic_cast(this) != NULL; - if( !handled && (blockMouseEvent(x, y) || show_names_text_box)) + // don't allow any siblings to handle this event + // even if we don't have a tooltip + if (getMouseOpaque() || show_names_text_box) { + handled = TRUE; + } + if(!tool_tip.empty()) + { msg = tool_tip; // Convert rect local to screen coordinates @@ -2060,139 +2073,6 @@ LLView* LLView::findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, new_rect.translate(delta_x, delta_y); return snap_view; - - //// If the view is near the edge of its parent, snap it to - //// the edge. - //LLRect test_rect = getSnapRect(); - //LLRect view_rect = getSnapRect(); - //test_rect.stretch(padding); - //view_rect.stretch(padding); - - //S32 x_threshold = threshold; - //S32 y_threshold = threshold; - - //LLRect parent_local_snap_rect = mParentView->getLocalSnapRect(); - - //if (snap_type == SNAP_PARENT || snap_type == SNAP_PARENT_AND_SIBLINGS) - //{ - // if (llabs(parent_local_snap_rect.mRight - test_rect.mRight) <= x_threshold && (parent_local_snap_rect.mRight - test_rect.mRight) * mouse_dir.mX >= 0) - // { - // view_rect.translate(parent_local_snap_rect.mRight - view_rect.mRight, 0); - // snap_view = mParentView; - // x_threshold = llabs(parent_local_snap_rect.mRight - test_rect.mRight); - // } - - // if (llabs(test_rect.mLeft - parent_local_snap_rect.mLeft) <= x_threshold && test_rect.mLeft * mouse_dir.mX <= 0) - // { - // view_rect.translate(parent_local_snap_rect.mLeft - view_rect.mLeft, 0); - // snap_view = mParentView; - // x_threshold = llabs(test_rect.mLeft - parent_local_snap_rect.mLeft); - // } - - // if (llabs(test_rect.mBottom - parent_local_snap_rect.mBottom) <= y_threshold && test_rect.mBottom * mouse_dir.mY <= 0) - // { - // view_rect.translate(0, parent_local_snap_rect.mBottom - view_rect.mBottom); - // snap_view = mParentView; - // y_threshold = llabs(test_rect.mBottom - parent_local_snap_rect.mBottom); - // } - - // if (llabs(parent_local_snap_rect.mTop - test_rect.mTop) <= y_threshold && (parent_local_snap_rect.mTop - test_rect.mTop) * mouse_dir.mY >= 0) - // { - // view_rect.translate(0, parent_local_snap_rect.mTop - view_rect.mTop); - // snap_view = mParentView; - // y_threshold = llabs(parent_local_snap_rect.mTop - test_rect.mTop); - // } - //} - //if (snap_type == SNAP_SIBLINGS || snap_type == SNAP_PARENT_AND_SIBLINGS) - //{ - // for ( child_list_const_iter_t child_it = mParentView->getChildList()->begin(); - // child_it != mParentView->getChildList()->end(); ++child_it) - // { - // LLView* siblingp = *child_it; - - // // skip non-snappable views (self, invisible views, etc) - // if (!canSnapTo(siblingp)) continue; - - // LLRect sibling_rect = siblingp->getSnapRect(); - - // if (llabs(test_rect.mRight - sibling_rect.mLeft) <= x_threshold - // && (test_rect.mRight - sibling_rect.mLeft) * mouse_dir.mX <= 0) - // { - // view_rect.translate(sibling_rect.mLeft - view_rect.mRight, 0); - // if (llabs(test_rect.mTop - sibling_rect.mTop) <= y_threshold && (test_rect.mTop - sibling_rect.mTop) * mouse_dir.mY <= 0) - // { - // view_rect.translate(0, sibling_rect.mTop - test_rect.mTop); - // y_threshold = llabs(test_rect.mTop - sibling_rect.mTop); - // } - // else if (llabs(test_rect.mBottom - sibling_rect.mBottom) <= y_threshold && (test_rect.mBottom - sibling_rect.mBottom) * mouse_dir.mY <= 0) - // { - // view_rect.translate(0, sibling_rect.mBottom - test_rect.mBottom); - // y_threshold = llabs(test_rect.mBottom - sibling_rect.mBottom); - // } - // snap_view = siblingp; - // x_threshold = llabs(test_rect.mRight - sibling_rect.mLeft); - // } - - // if (llabs(test_rect.mLeft - sibling_rect.mRight) <= x_threshold - // && (test_rect.mLeft - sibling_rect.mRight) * mouse_dir.mX <= 0) - // { - // view_rect.translate(sibling_rect.mRight - view_rect.mLeft, 0); - // if (llabs(test_rect.mTop - sibling_rect.mTop) <= y_threshold && (test_rect.mTop - sibling_rect.mTop) * mouse_dir.mY <= 0) - // { - // view_rect.translate(0, sibling_rect.mTop - test_rect.mTop); - // y_threshold = llabs(test_rect.mTop - sibling_rect.mTop); - // } - // else if (llabs(test_rect.mBottom - sibling_rect.mBottom) <= y_threshold && (test_rect.mBottom - sibling_rect.mBottom) * mouse_dir.mY <= 0) - // { - // view_rect.translate(0, sibling_rect.mBottom - test_rect.mBottom); - // y_threshold = llabs(test_rect.mBottom - sibling_rect.mBottom); - // } - // snap_view = siblingp; - // x_threshold = llabs(test_rect.mLeft - sibling_rect.mRight); - // } - - // if (llabs(test_rect.mBottom - sibling_rect.mTop) <= y_threshold - // && (test_rect.mBottom - sibling_rect.mTop) * mouse_dir.mY <= 0) - // { - // view_rect.translate(0, sibling_rect.mTop - view_rect.mBottom); - // if (llabs(test_rect.mLeft - sibling_rect.mLeft) <= x_threshold && (test_rect.mLeft - sibling_rect.mLeft) * mouse_dir.mX <= 0) - // { - // view_rect.translate(sibling_rect.mLeft - test_rect.mLeft, 0); - // x_threshold = llabs(test_rect.mLeft - sibling_rect.mLeft); - // } - // else if (llabs(test_rect.mRight - sibling_rect.mRight) <= x_threshold && (test_rect.mRight - sibling_rect.mRight) * mouse_dir.mX <= 0) - // { - // view_rect.translate(sibling_rect.mRight - test_rect.mRight, 0); - // x_threshold = llabs(test_rect.mRight - sibling_rect.mRight); - // } - // snap_view = siblingp; - // y_threshold = llabs(test_rect.mBottom - sibling_rect.mTop); - // } - - // if (llabs(test_rect.mTop - sibling_rect.mBottom) <= y_threshold - // && (test_rect.mTop - sibling_rect.mBottom) * mouse_dir.mY <= 0) - // { - // view_rect.translate(0, sibling_rect.mBottom - view_rect.mTop); - // if (llabs(test_rect.mLeft - sibling_rect.mLeft) <= x_threshold && (test_rect.mLeft - sibling_rect.mLeft) * mouse_dir.mX <= 0) - // { - // view_rect.translate(sibling_rect.mLeft - test_rect.mLeft, 0); - // x_threshold = llabs(test_rect.mLeft - sibling_rect.mLeft); - // } - // else if (llabs(test_rect.mRight - sibling_rect.mRight) <= x_threshold && (test_rect.mRight - sibling_rect.mRight) * mouse_dir.mX <= 0) - // { - // view_rect.translate(sibling_rect.mRight - test_rect.mRight, 0); - // x_threshold = llabs(test_rect.mRight - sibling_rect.mRight); - // } - // snap_view = siblingp; - // y_threshold = llabs(test_rect.mTop - sibling_rect.mBottom); - // } - // } - //} - - //// shrink actual view rect back down - //view_rect.stretch(-padding); - //new_rect = view_rect; - //return snap_view; } LLView* LLView::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding) diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 9dac926..1ebe77a 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -165,17 +165,6 @@ Value 0 - AsyncKeyboard - - Comment - Improves responsiveness to keyboard input when at low framerates - Persist - 1 - Type - Boolean - Value - 1 - AuctionShowFence Comment @@ -3971,7 +3960,18 @@ Value 0.0 - InventoryAutoOpenDelay + InstallLanguage + + Comment + Language passed from installer (for UI) + Persist + 1 + Type + String + Value + default + + InventoryAutoOpenDelay Comment Seconds before automatically opening inventory when mouse is over inventory button when performing inventory drag and drop @@ -4210,7 +4210,7 @@ Language Comment - Language specifier (for XUI) + Language specifier (for UI) Persist 1 Type @@ -7659,7 +7659,7 @@ SystemLanguage Comment - Language indicated by system settings (for XUI) + Language indicated by system settings (for UI) Persist 1 Type diff --git a/linden/indra/newview/gpu_table.txt b/linden/indra/newview/gpu_table.txt index eee1831..150e7f3 100644 --- a/linden/indra/newview/gpu_table.txt +++ b/linden/indra/newview/gpu_table.txt @@ -193,6 +193,7 @@ NVIDIA GeForce 8200 .*NVIDIA.*GeForce 82.* 1 1 NVIDIA GeForce 8300 .*NVIDIA.*GeForce 83.* 1 1 NVIDIA GeForce 8400 .*NVIDIA.*GeForce 84.* 1 1 NVIDIA GeForce 8500 .*GeForce 85.* 3 1 +NVIDIA GeForce 8600M .*NVIDIA.*GeForce.*8600M.* 1 1 NVIDIA GeForce 8600 .*NVIDIA.*GeForce 86.* 3 1 NVIDIA GeForce 8700 .*NVIDIA.*GeForce 87.* 3 1 NVIDIA GeForce 8800 .*NVIDIA.*GeForce 88.* 3 1 diff --git a/linden/indra/newview/installers/windows/installer_template.nsi b/linden/indra/newview/installers/windows/installer_template.nsi index 01bd98f..db9f565 100644 --- a/linden/indra/newview/installers/windows/installer_template.nsi +++ b/linden/indra/newview/installers/windows/installer_template.nsi @@ -31,15 +31,27 @@ RequestExecutionLevel admin ; on Vista we must be admin because we write to Prog ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; !include "%%SOURCE%%\installers\windows\lang_de.nsi" !include "%%SOURCE%%\installers\windows\lang_en-us.nsi" -!include "%%SOURCE%%\installers\windows\lang_ja.nsi" -!include "%%SOURCE%%\installers\windows\lang_ko.nsi" -!include "%%SOURCE%%\installers\windows\lang_pt-br.nsi" -!include "%%SOURCE%%\installers\windows\lang_fr.nsi" !include "%%SOURCE%%\installers\windows\lang_es.nsi" +!include "%%SOURCE%%\installers\windows\lang_fr.nsi" +!include "%%SOURCE%%\installers\windows\lang_ja.nsi" !include "%%SOURCE%%\installers\windows\lang_it.nsi" +!include "%%SOURCE%%\installers\windows\lang_ko.nsi" !include "%%SOURCE%%\installers\windows\lang_nl.nsi" +!include "%%SOURCE%%\installers\windows\lang_pt-br.nsi" !include "%%SOURCE%%\installers\windows\lang_zh.nsi" +# *TODO: Move these into the language files themselves +LangString LanguageCode ${LANG_GERMAN} "de" +LangString LanguageCode ${LANG_ENGLISH} "en" +LangString LanguageCode ${LANG_SPANISH} "es" +LangString LanguageCode ${LANG_FRENCH} "fr" +LangString LanguageCode ${LANG_JAPANESE} "ja" +LangString LanguageCode ${LANG_ITALIAN} "it" +LangString LanguageCode ${LANG_KOREAN} "ko" +LangString LanguageCode ${LANG_DUTCH} "nl" +LangString LanguageCode ${LANG_PORTUGUESEBR} "pt" +LangString LanguageCode ${LANG_SIMPCHINESE} "zh" + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Tweak for different servers/builds (this placeholder is replaced by viewer_manifest.py) ;; For example: @@ -79,6 +91,7 @@ Var INSTEXE Var INSTFLAGS Var INSTSHORTCUT Var COMMANDLINE ; command line passed to this installer, set in .onInit +Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer ;;; Function definitions should go before file includes, because calls to ;;; DLLs like LangDLL trigger an implicit file include, so if that call is at @@ -107,7 +120,7 @@ label_ask_launch: label_launch: # Assumes SetOutPath $INSTDIR - Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS' + Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS $SHORTCUT_LANG_PARAM' label_no_launch: Pop $R0 FunctionEnd @@ -725,13 +738,15 @@ Call RemoveOldReleaseNotes ;; This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py %%INSTALL_FILES%% +# Pass the installer's language to the client to use as a default +StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Shortcuts in start menu CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" SetOutPath "$INSTDIR" CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$INSTFLAGS" + "$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM" WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \ @@ -749,8 +764,10 @@ CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Other shortcuts SetOutPath "$INSTDIR" -CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" -CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" +CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \ + "$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM" +CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \ + "$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM" CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ '"$INSTDIR\uninst.exe"' '' diff --git a/linden/indra/newview/installers/windows/lang_de.nsi b/linden/indra/newview/installers/windows/lang_de.nsi index 911ed74..b717a4d 100644 Binary files a/linden/indra/newview/installers/windows/lang_de.nsi and b/linden/indra/newview/installers/windows/lang_de.nsi differ diff --git a/linden/indra/newview/installers/windows/lang_es.nsi b/linden/indra/newview/installers/windows/lang_es.nsi index 3340a12..c6a7f38 100644 Binary files a/linden/indra/newview/installers/windows/lang_es.nsi and b/linden/indra/newview/installers/windows/lang_es.nsi differ diff --git a/linden/indra/newview/installers/windows/lang_fr.nsi b/linden/indra/newview/installers/windows/lang_fr.nsi index 5c17ad0..d23615d 100644 Binary files a/linden/indra/newview/installers/windows/lang_fr.nsi and b/linden/indra/newview/installers/windows/lang_fr.nsi differ diff --git a/linden/indra/newview/installers/windows/lang_it.nsi b/linden/indra/newview/installers/windows/lang_it.nsi index 9f18013..1208ec4 100644 Binary files a/linden/indra/newview/installers/windows/lang_it.nsi and b/linden/indra/newview/installers/windows/lang_it.nsi differ diff --git a/linden/indra/newview/installers/windows/lang_nl.nsi b/linden/indra/newview/installers/windows/lang_nl.nsi index 42453ba..c8ffa8b 100644 Binary files a/linden/indra/newview/installers/windows/lang_nl.nsi and b/linden/indra/newview/installers/windows/lang_nl.nsi differ diff --git a/linden/indra/newview/installers/windows/lang_pt-br.nsi b/linden/indra/newview/installers/windows/lang_pt-br.nsi index 6524cc7..da56a3c 100644 Binary files a/linden/indra/newview/installers/windows/lang_pt-br.nsi and b/linden/indra/newview/installers/windows/lang_pt-br.nsi differ diff --git a/linden/indra/newview/installers/windows/lang_zh.nsi b/linden/indra/newview/installers/windows/lang_zh.nsi index e644e63..f4b7b5d 100644 Binary files a/linden/indra/newview/installers/windows/lang_zh.nsi and b/linden/indra/newview/installers/windows/lang_zh.nsi differ diff --git a/linden/indra/newview/llagentlanguage.cpp b/linden/indra/newview/llagentlanguage.cpp index 5656f76..04703ef 100644 --- a/linden/indra/newview/llagentlanguage.cpp +++ b/linden/indra/newview/llagentlanguage.cpp @@ -31,13 +31,17 @@ #include "llviewerprecompiledheaders.h" #include "llagentlanguage.h" +// viewer includes #include "llagent.h" #include "llviewercontrol.h" #include "llviewerregion.h" +// library includes +#include "llui.h" // getLanguage() LLAgentLanguage::LLAgentLanguage() { gSavedSettings.getControl("Language")->getSignal()->connect(boost::bind(&update)); + gSavedSettings.getControl("InstallLanguage")->getSignal()->connect(boost::bind(&update)); gSavedSettings.getControl("SystemLanguage")->getSignal()->connect(boost::bind(&update)); gSavedSettings.getControl("LanguageIsPublic")->getSignal()->connect(boost::bind(&update)); } @@ -51,9 +55,7 @@ bool LLAgentLanguage::update() std::string url = gAgent.getRegion()->getCapability("UpdateAgentLanguage"); if (!url.empty()) { - std::string language = gSavedSettings.getString("Language"); - if (language == "default") - language = gSavedSettings.getString("SystemLanguage"); + std::string language = LLUI::getLanguage(); body["language"] = language; body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic"); @@ -62,4 +64,3 @@ bool LLAgentLanguage::update() } return true; } - diff --git a/linden/indra/newview/llagentlanguage.h b/linden/indra/newview/llagentlanguage.h index d86a8f1..2189455 100644 --- a/linden/indra/newview/llagentlanguage.h +++ b/linden/indra/newview/llagentlanguage.h @@ -32,7 +32,7 @@ #ifndef LL_LLAGENTLANGUAGE_H #define LL_LLAGENTLANGUAGE_H -#include "llmemory.h" +#include "llmemory.h" // LLSingleton<> #include "llevent.h" class LLAgentLanguage: public LLSingleton, public LLSimpleListener diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 49991b4..35acafc 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -202,8 +202,6 @@ extern BOOL gDebugGL; //////////////////////////////////////////////////////////// // All from the last globals push... -BOOL gHandleKeysAsync = FALSE; - const F32 DEFAULT_AFK_TIMEOUT = 5.f * 60.f; // time with no input before user flagged as Away From Keyboard F32 gSimLastTime; // Used in LLAppViewer::init and send_stats() @@ -234,7 +232,7 @@ F32 gFPSClamped = 10.f; // Pretend we start at target rate. F32 gFrameDTClamped = 0.f; // Time between adjacent checks to network for packets U64 gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds U32 gFrameStalls = 0; -const F64 FRAME_STALL_THRESHOLD = 5.0; +const F64 FRAME_STALL_THRESHOLD = 1.0; LLTimer gRenderStartTime; LLFrameTimer gForegroundTime; @@ -404,7 +402,6 @@ static void settings_to_globals() gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates"); gMapScale = gSavedSettings.getF32("MapScale"); gMiniMapScale = gSavedSettings.getF32("MiniMapScale"); - gHandleKeysAsync = gSavedSettings.getBOOL("AsyncKeyboard"); LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips"); LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap"); @@ -1379,14 +1376,17 @@ bool LLAppViewer::cleanup() LLWatchdog::getInstance()->cleanup(); end_messaging_system(); + llinfos << "Message system deleted." << llendflush; // *NOTE:Mani - The following call is not thread safe. LLCurl::cleanupClass(); + llinfos << "LLCurl cleaned up." << llendflush; // If we're exiting to launch an URL, do that here so the screen // is at the right resolution before we launch IE. if (!gLaunchFileOnQuit.empty()) { + llinfos << "Launch file on quit." << llendflush; #if LL_WINDOWS // Indicate an application is starting. SetCursor(LoadCursor(NULL, IDC_WAIT)); @@ -1396,6 +1396,7 @@ bool LLAppViewer::cleanup() ms_sleep(1000); LLWeb::loadURLExternal( gLaunchFileOnQuit ); + llinfos << "File launched." << llendflush; } llinfos << "Goodbye" << llendflush; @@ -2149,7 +2150,6 @@ void LLAppViewer::cleanupSavedSettings() gSavedSettings.setF32("MapScale", gMapScale ); gSavedSettings.setF32("MiniMapScale", gMiniMapScale ); - gSavedSettings.setBOOL("AsyncKeyboard", gHandleKeysAsync); gSavedSettings.setBOOL("ShowHoverTips", LLHoverView::sShowHoverTips); // Some things are cached in LLAgent. diff --git a/linden/indra/newview/llappviewer.h b/linden/indra/newview/llappviewer.h index 6545a61..3b67f60 100644 --- a/linden/indra/newview/llappviewer.h +++ b/linden/indra/newview/llappviewer.h @@ -238,7 +238,6 @@ const S32 AGENT_UPDATES_PER_SECOND = 10; // // "// llstartup" indicates that llstartup is the only client for this global. -extern BOOL gHandleKeysAsync; // gSavedSettings used by llviewerdisplay.cpp & llviewermenu.cpp extern LLSD gDebugInfo; extern BOOL gAllowIdleAFK; diff --git a/linden/indra/newview/llappviewerwin32.cpp b/linden/indra/newview/llappviewerwin32.cpp index bf02087..2a6fd60 100644 --- a/linden/indra/newview/llappviewerwin32.cpp +++ b/linden/indra/newview/llappviewerwin32.cpp @@ -85,6 +85,7 @@ LONG WINAPI viewer_windows_exception_handler(struct _EXCEPTION_POINTERS *excepti // Translate the signals/exceptions into cross-platform stuff // Windows implementation + _tprintf( _T("Entering Windows Exception Handler...\n") ); llinfos << "Entering Windows Exception Handler..." << llendl; // Make sure the user sees something to indicate that the app crashed. @@ -92,6 +93,7 @@ LONG WINAPI viewer_windows_exception_handler(struct _EXCEPTION_POINTERS *excepti if (LLApp::isError()) { + _tprintf( _T("Got another fatal signal while in the error handler, die now!\n") ); llwarns << "Got another fatal signal while in the error handler, die now!" << llendl; retval = EXCEPTION_EXECUTE_HANDLER; @@ -122,6 +124,7 @@ LONG WINAPI viewer_windows_exception_handler(struct _EXCEPTION_POINTERS *excepti return retval; } +//#define DEBUGGING_SEH_FILTER 1 #if DEBUGGING_SEH_FILTER # define WINMAIN DebuggingWinMain #else diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp index 7883953..8a4669f 100644 --- a/linden/indra/newview/llfeaturemanager.cpp +++ b/linden/indra/newview/llfeaturemanager.cpp @@ -29,11 +29,11 @@ * $/LicenseInfo$ */ +#include "llviewerprecompiledheaders.h" + #include #include -#include "llviewerprecompiledheaders.h" - #include #include "llfeaturemanager.h" diff --git a/linden/indra/newview/llfloaterhud.cpp b/linden/indra/newview/llfloaterhud.cpp index cfdaba5..56a4a64 100644 --- a/linden/indra/newview/llfloaterhud.cpp +++ b/linden/indra/newview/llfloaterhud.cpp @@ -84,12 +84,7 @@ LLFloaterHUD::LLFloaterHUD() // arrow keys during tutorial). mWebBrowser->setTakeFocusOnClick(false); - std::string language(gSavedSettings.getString("Language")); - if(language == "default") - { - language = gSavedSettings.getString("SystemLanguage"); - } - + std::string language = LLUI::getLanguage(); std::string base_url = gSavedSettings.getString("TutorialURL"); std::string url = base_url + language + "/"; diff --git a/linden/indra/newview/llfloaterpostcard.cpp b/linden/indra/newview/llfloaterpostcard.cpp index 4be8145..a3a7527 100644 --- a/linden/indra/newview/llfloaterpostcard.cpp +++ b/linden/indra/newview/llfloaterpostcard.cpp @@ -245,7 +245,7 @@ void LLFloaterPostcard::onClickSend(void* data) std::string from(self->childGetValue("from_form").asString()); std::string to(self->childGetValue("to_form").asString()); - boost::regex emailFormat("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}"); + boost::regex emailFormat("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*"); if (to.empty() || !boost::regex_match(to, emailFormat)) { diff --git a/linden/indra/newview/llpaneldirfind.cpp b/linden/indra/newview/llpaneldirfind.cpp index cc0a700..1b610fb 100644 --- a/linden/indra/newview/llpaneldirfind.cpp +++ b/linden/indra/newview/llpaneldirfind.cpp @@ -321,15 +321,8 @@ std::string LLPanelDirFind::getSearchURLSuffix(bool mature_in) substring = "[SESSION]"; url.replace(url.find(substring), substring.length(), session_string); - // set the currently selected lanaguage by asking the pref setting - std::string language_string = LLUI::sConfigGroup->getString( "Language" ); - if ( language_string == "default" ) - { - // if "default system language" setting used, ask again - // (we can't do this directly since it can vary if you install - // under one language and select a different one using prefs) - language_string = gSavedSettings.getString( "SystemLanguage" ); - } + // set the currently selected language by asking the pref setting + std::string language_string = LLUI::getLanguage(); std::string language_tag = "[LANG]"; url.replace( url.find( language_tag ), language_tag.length(), language_string ); diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index c1c8949..af85c44 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -925,11 +925,7 @@ void LLPanelLogin::loadLoginPage() } // Language - std::string language(gSavedSettings.getString("Language")); - if(language == "default") - { - language = gSavedSettings.getString("SystemLanguage"); - } + std::string language = LLUI::getLanguage(); oStr << first_query_delimiter<<"lang=" << language; // First Login? diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp index 6247686..d7baa58 100644 --- a/linden/indra/newview/llspatialpartition.cpp +++ b/linden/indra/newview/llspatialpartition.cpp @@ -118,10 +118,14 @@ void validate_drawable(LLDrawable* drawablep) S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad) { + return AABBSphereIntersectR2(min, max, origin, rad*rad); +} + +S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &r) +{ F32 d = 0.f; F32 t; - F32 r = rad*rad; - + if ((min-origin).magVecSquared() < r && (max-origin).magVecSquared() < r) { diff --git a/linden/indra/newview/llspatialpartition.h b/linden/indra/newview/llspatialpartition.h index f42d55b..da842f9 100644 --- a/linden/indra/newview/llspatialpartition.h +++ b/linden/indra/newview/llspatialpartition.h @@ -52,6 +52,7 @@ class LLSpatialBridge; class LLSpatialGroup; S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad); +S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &radius_squared); class LLDrawInfo : public LLRefCount { diff --git a/linden/indra/newview/llurlhistory.cpp b/linden/indra/newview/llurlhistory.cpp index ac3fa93..0dadbd0 100644 --- a/linden/indra/newview/llurlhistory.cpp +++ b/linden/indra/newview/llurlhistory.cpp @@ -72,9 +72,16 @@ bool LLURLHistory::loadFile(const std::string& filename) // static bool LLURLHistory::saveFile(const std::string& filename) -{ - std::string temp_str = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter(); - llofstream out((temp_str + filename)); +{ + std::string temp_str = gDirUtilp->getLindenUserDir(); + if( temp_str.empty() ) + { + llwarns << "Can't save. No user directory set." << llendl; + return false; + } + + temp_str += gDirUtilp->getDirDelimiter() + filename; + llofstream out(temp_str); if (!out.good()) { llwarns << "Unable to open " << filename << " for output." << llendl; diff --git a/linden/indra/newview/llviewerassetstorage.cpp b/linden/indra/newview/llviewerassetstorage.cpp index 03e5b40..233e184 100644 --- a/linden/indra/newview/llviewerassetstorage.cpp +++ b/linden/indra/newview/llviewerassetstorage.cpp @@ -29,9 +29,9 @@ * $/LicenseInfo$ */ +#include "llviewerprecompiledheaders.h" #include "linden_common.h" -#include "llviewerprecompiledheaders.h" #include "llagent.h" #include "llviewerassetstorage.h" diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp index 4db26a0..40bb83c 100644 --- a/linden/indra/newview/llviewerdisplay.cpp +++ b/linden/indra/newview/llviewerdisplay.cpp @@ -113,7 +113,6 @@ void render_ui_3d(); void render_ui_2d(); void render_disconnected_background(); void render_hud_elements(); -void process_keystrokes_async(); void display_startup() { @@ -684,7 +683,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); } - LLAppViewer::instance()->pingMainloopTimeout("Display:Render"); + LLAppViewer::instance()->pingMainloopTimeout("Display:RenderStart"); //// render frontmost floater opaque for occlusion culling purposes //LLFloater* frontmost_floaterp = gFloaterView->getFrontmost(); @@ -730,10 +729,13 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); gGL.setColorMask(true, false); } - + + LLAppViewer::instance()->pingMainloopTimeout("Display:RenderGeom"); + if (!(LLAppViewer::instance()->logoutRequestSent() && LLAppViewer::instance()->hasSavedFinalSnapshot()) && !gRestoreGL) { + gGL.setColorMask(true, false); LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE; gPipeline.renderGeom(*LLViewerCamera::getInstance(), TRUE); @@ -748,9 +750,12 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) } stop_glerror(); } + + LLAppViewer::instance()->pingMainloopTimeout("Display:RenderFlush"); if (to_texture) { + gPipeline.mScreen.flush(); } @@ -759,23 +764,20 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) /// Using render to texture would be faster/better, but I don't have a /// grasp of their full display stack just yet. // gPostProcess->apply(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight()); - + + LLAppViewer::instance()->pingMainloopTimeout("Display:RenderUI"); + if (!for_snapshot) { + gFrameStats.start(LLFrameStats::RENDER_UI); render_ui(); } LLSpatialGroup::sNoDelete = FALSE; } - gFrameStats.start(LLFrameStats::RENDER_UI); - - if (gHandleKeysAsync) - { - LLAppViewer::instance()->pingMainloopTimeout("Display:Keystrokes"); - process_keystrokes_async(); - stop_glerror(); - } - + + LLAppViewer::instance()->pingMainloopTimeout("Display:FrameStats"); + gFrameStats.start(LLFrameStats::MISC_END); stop_glerror(); @@ -1231,43 +1233,3 @@ void display_cleanup() { gDisconnectedImagep = NULL; } - -void process_keystrokes_async() -{ -#if LL_WINDOWS - MSG msg; - // look through all input messages, leaving them in the event queue - while( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE | PM_NOYIELD)) - { - // on first mouse message, break out - if (msg.message >= WM_MOUSEFIRST && - msg.message <= WM_MOUSELAST || - msg.message == WM_QUIT) - { - break; - } - - // this is a message we want to handle now, so remove it from the event queue - PeekMessage(&msg, NULL, msg.message, msg.message, PM_REMOVE | PM_NOYIELD); - // if (msg.message == WM_KEYDOWN) - // { - // llinfos << "Process async key down " << (U32)msg.wParam << llendl; - // } - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - // Scan keyboard for movement keys. Command keys and typing - // are handled by windows callbacks. Don't do this until we're - // done initializing. JC - if (gViewerWindow->mWindow->getVisible() - && gViewerWindow->getActive() - && !gViewerWindow->mWindow->getMinimized() - && LLStartUp::getStartupState() == STATE_STARTED - && !gViewerWindow->getShowProgress() - && !gFocusMgr.focusLocked()) - { - gKeyboard->scanKeyboard(); - } -#endif -} diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 9782d4b..7c08c8a 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -1020,7 +1020,6 @@ void init_debug_ui_menu(LLMenuGL* menu) { menu->append(new LLMenuItemCallGL("SLURL Test", &handle_slurl_test)); menu->append(new LLMenuItemCallGL("Editable UI", &edit_ui)); - menu->append(new LLMenuItemToggleGL("Async Keystrokes", &gHandleKeysAsync)); menu->append(new LLMenuItemCallGL( "Dump SelectMgr", &dump_select_mgr)); menu->append(new LLMenuItemCallGL( "Dump Inventory", &dump_inventory)); menu->append(new LLMenuItemCallGL( "Dump Focus Holder", &handle_dump_focus, NULL, NULL, 'F', MASK_ALT | MASK_CONTROL)); diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 30e5e26..63bc9c7 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -203,7 +203,7 @@ struct LLFriendshipOffer void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_group, S32 trx_type, const std::string& desc) { - if(0 == amount) return; + if(0 == amount || !region) return; amount = abs(amount); LL_INFOS("Messaging") << "give_money(" << uuid << "," << amount << ")"<< LL_ENDL; if(can_afford_transaction(amount)) diff --git a/linden/indra/newview/llviewerstats.cpp b/linden/indra/newview/llviewerstats.cpp index 9034634..4010dc1 100644 --- a/linden/indra/newview/llviewerstats.cpp +++ b/linden/indra/newview/llviewerstats.cpp @@ -680,8 +680,7 @@ void send_stats() // send fps only for time app spends in foreground agent["fps"] = (F32)gForegroundFrameCount / gForegroundTime.getElapsedTimeF32(); agent["version"] = gCurrentVersion; - std::string language(gSavedSettings.getString("Language")); - if(language == "default") language = gSavedSettings.getString("SystemLanguage"); + std::string language = LLUI::getLanguage(); agent["language"] = language; agent["sim_fps"] = ((F32) gFrameCount - gSimFrames) / @@ -760,8 +759,12 @@ void send_stats() // misc["string_2"] = // misc["int_1"] = LLFloaterDirectory::sOldSearchCount; // Steve: 1.18.6 // misc["int_2"] = LLFloaterDirectory::sNewSearchCount; // Steve: 1.18.6 - misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21 - misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21 +// misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21 +// misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21 + F32 unbaked_time = LLVOAvatar::sUnbakedTime / gFrameTime; + misc["int_1"] = LLSD::Integer(unbaked_time * 1000.f); // Steve: 1.22 + F32 grey_time = LLVOAvatar::sGreyTime / gFrameTime; + misc["int_2"] = LLSD::Integer(grey_time * 1000.f); // Steve: 1.22 LLViewerStats::getInstance()->addToMessage(body); diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 106ad08..109b3c2 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp @@ -29,13 +29,13 @@ * $/LicenseInfo$ */ +#include "llviewerprecompiledheaders.h" + // system library includes #include #include #include -#include "llviewerprecompiledheaders.h" - #include "llpanellogin.h" #include "llviewerkeyboard.h" #include "llviewerwindow.h" @@ -3560,7 +3560,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de LLVector3 mouse_hud_end = mouse_point_hud + LLVector3(depth, 0, 0); // world coordinates of mouse - LLVector3 mouse_direction_global = mouseDirectionGlobal(x,y); + LLVector3 mouse_direction_global = mouseDirectionGlobal(x,y); LLVector3 mouse_point_global = LLViewerCamera::getInstance()->getOrigin(); LLVector3 mouse_world_start = mouse_point_global; LLVector3 mouse_world_end = mouse_point_global + mouse_direction_global * depth; @@ -5202,7 +5202,7 @@ void LLPickInfo::fetchResults() LLVector3 intersection, normal, binormal; LLVector2 uv; - LLViewerObject* hit_object = gViewerWindow->cursorIntersect(-1, -1, 512.f, + LLViewerObject* hit_object = gViewerWindow->cursorIntersect(mMousePt.mX, mMousePt.mY, 512.f, NULL, -1, mPickTransparent, &face_hit, &intersection, &uv, &normal, &binormal); diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index c3ad4f9..557a6d9 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -272,6 +272,7 @@ LLUUID LLVOAvatar::sStepSounds[LL_MCODE_END] = LLUUID(SND_RUBBER_RUBBER) }; +// static S32 LLVOAvatar::sRenderName = RENDER_NAME_ALWAYS; BOOL LLVOAvatar::sRenderGroupTitles = TRUE; S32 LLVOAvatar::sNumVisibleChatBubbles = 0; @@ -284,9 +285,10 @@ BOOL LLVOAvatar::sVisibleInFirstPerson = FALSE; F32 LLVOAvatar::sLODFactor = 1.f; BOOL LLVOAvatar::sUseImpostors = FALSE; BOOL LLVOAvatar::sJointDebug = FALSE; - S32 LLVOAvatar::sCurJoint = 0; S32 LLVOAvatar::sCurVolume = 0; +F32 LLVOAvatar::sUnbakedTime = 0.f; +F32 LLVOAvatar::sGreyTime = 0.f; struct LLAvatarTexData { @@ -1070,8 +1072,10 @@ void LLVOAvatar::deleteLayerSetCaches() } // static -BOOL LLVOAvatar::areAllNearbyInstancesBaked() +BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars) { + BOOL res = TRUE; + grey_avatars = 0; for (std::vector::iterator iter = LLCharacter::sInstances.begin(); iter != LLCharacter::sInstances.end(); ++iter) { @@ -1080,18 +1084,22 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked() { continue; } - else - if( inst->getPixelArea() < MIN_PIXEL_AREA_FOR_COMPOSITE ) - { - return TRUE; // Assumes sInstances is sorted by pixel area. - } +// else +// if( inst->getPixelArea() < MIN_PIXEL_AREA_FOR_COMPOSITE ) +// { +// return res; // Assumes sInstances is sorted by pixel area. +// } else if( !inst->isFullyBaked() ) { - return FALSE; + res = FALSE; + if (inst->mHasGrey) + { + ++grey_avatars; + } } } - return TRUE; + return res; } // static @@ -1602,7 +1610,7 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector3& start, const LLVector3& e ) { - if (mIsSelf && !gAgent.needsRenderAvatar()) + if (mIsSelf && !gAgent.needsRenderAvatar() || !LLPipeline::sPickAvatar) { return FALSE; } @@ -4523,6 +4531,7 @@ void LLVOAvatar::updateTextures(LLAgent &agent) mMaxPixelArea = 0.f; mMinPixelArea = 99999999.f; + mHasGrey = FALSE; // debug for (U32 i = 0; i < getNumTEs(); i++) { LLViewerImage *imagep = getTEImage(i); @@ -4681,22 +4690,35 @@ void LLVOAvatar::updateTextures(LLAgent &agent) void LLVOAvatar::addLocalTextureStats( LLVOAvatar::ELocTexIndex idx, LLViewerImage* imagep, F32 texel_area_ratio, BOOL render_avatar, BOOL covered_by_baked ) { - if (!covered_by_baked && - render_avatar && // always true if mIsSelf - mLocalTexture[ idx ].notNull() && mLocalTexture[idx]->getID() != IMG_DEFAULT_AVATAR) - { - F32 desired_pixels; - if( mIsSelf ) + if (!covered_by_baked && render_avatar) // render_avatar is always true if mIsSelf + { + if (mLocalTexture[ idx ].notNull() && mLocalTexture[idx]->getID() != IMG_DEFAULT_AVATAR) { - desired_pixels = llmin(mPixelArea, (F32)LOCTEX_IMAGE_AREA_SELF ); - imagep->setBoostLevel(LLViewerImage::BOOST_AVATAR_SELF); + F32 desired_pixels; + if( mIsSelf ) + { + desired_pixels = llmin(mPixelArea, (F32)LOCTEX_IMAGE_AREA_SELF ); + imagep->setBoostLevel(LLViewerImage::BOOST_AVATAR_SELF); + } + else + { + desired_pixels = llmin(mPixelArea, (F32)LOCTEX_IMAGE_AREA_OTHER ); + imagep->setBoostLevel(LLViewerImage::BOOST_AVATAR); + } + imagep->addTextureStats( desired_pixels, texel_area_ratio ); + if (imagep->getDiscardLevel() < 0) + { + mHasGrey = TRUE; // for statistics gathering + } } else { - desired_pixels = llmin(mPixelArea, (F32)LOCTEX_IMAGE_AREA_OTHER ); - imagep->setBoostLevel(LLViewerImage::BOOST_AVATAR); + if (mLocalTexture[idx]->getID() == IMG_DEFAULT_AVATAR) + { + // texture asset is missing + mHasGrey = TRUE; // for statistics gathering + } } - imagep->addTextureStats( desired_pixels, texel_area_ratio ); } } @@ -9126,10 +9148,17 @@ void LLVOAvatar::cullAvatarsByPixelArea() } } - if( LLVOAvatar::areAllNearbyInstancesBaked() ) + S32 grey_avatars = 0; + if( LLVOAvatar::areAllNearbyInstancesBaked(grey_avatars) ) { LLVOAvatar::deleteCachedImages(); } + else + { + sUnbakedTime += gFrameTimeSeconds; + if (grey_avatars > 0) + sGreyTime += gFrameTimeSeconds; + } } const LLUUID& LLVOAvatar::grabLocalTexture(ETextureIndex index) diff --git a/linden/indra/newview/llvoavatar.h b/linden/indra/newview/llvoavatar.h index 8265e8a..802d3a0 100644 --- a/linden/indra/newview/llvoavatar.h +++ b/linden/indra/newview/llvoavatar.h @@ -913,6 +913,9 @@ public: static BOOL sJointDebug; static ETextureIndex sBakedTextureIndices[BAKED_TEXTURE_COUNT]; + static F32 sUnbakedTime; // Total seconds with >=1 unbaked avatars + static F32 sGreyTime; // Total seconds with >=1 grey avatars + //-------------------------------------------------------------------- // Texture Layer Sets and Global Colors //-------------------------------------------------------------------- @@ -977,6 +980,7 @@ protected: F32 mLastFadeDistance; F32 mMinPixelArea; // debug F32 mMaxPixelArea; // debug + BOOL mHasGrey; // debug //-------------------------------------------------------------------- // Global Colors @@ -1012,7 +1016,7 @@ protected: BOOL isFullyBaked(); void deleteLayerSetCaches(); - static BOOL areAllNearbyInstancesBaked(); + static BOOL areAllNearbyInstancesBaked(S32& grey_avatars); static void onBakedTextureMasksLoaded(BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); diff --git a/linden/indra/newview/llvosurfacepatch.cpp b/linden/indra/newview/llvosurfacepatch.cpp index 7055b30..9bb801a 100644 --- a/linden/indra/newview/llvosurfacepatch.cpp +++ b/linden/indra/newview/llvosurfacepatch.cpp @@ -945,45 +945,55 @@ BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector3& start, const LLVect //step one meter at a time until intersection point found + const LLVector3* ext = mDrawable->getSpatialExtents(); + F32 rad = (delta*tdelta).magVecSquared(); + F32 t = 0.f; while ( t <= 1.f) { LLVector3 sample = origin + delta*t; - F32 height = mRegionp->getLandHeightRegion(sample); - if (height > sample.mV[2]) - { //ray went below ground, positive intersection - //quick and dirty binary search to get impact point - tdelta = -tdelta*0.5f; - F32 err_dist = 0.001f; - F32 dist = fabsf(sample.mV[2] - height); - - while (dist > err_dist && tdelta*tdelta > 0.0f) - { - t += tdelta; - sample = origin+delta*t; - height = mRegionp->getLandHeightRegion(sample); - if ((tdelta < 0 && height < sample.mV[2]) || - (height > sample.mV[2] && tdelta > 0)) - { //jumped over intersection point, go back - tdelta = -tdelta; + if (AABBSphereIntersectR2(ext[0], ext[1], sample+mRegionp->getOriginAgent(), rad)) + { + F32 height = mRegionp->getLandHeightRegion(sample); + if (height > sample.mV[2]) + { //ray went below ground, positive intersection + //quick and dirty binary search to get impact point + tdelta = -tdelta*0.5f; + F32 err_dist = 0.001f; + F32 dist = fabsf(sample.mV[2] - height); + + while (dist > err_dist && tdelta*tdelta > 0.0f) + { + t += tdelta; + sample = origin+delta*t; + height = mRegionp->getLandHeightRegion(sample); + if ((tdelta < 0 && height < sample.mV[2]) || + (height > sample.mV[2] && tdelta > 0)) + { //jumped over intersection point, go back + tdelta = -tdelta; + } + tdelta *= 0.5f; + dist = fabsf(sample.mV[2] - height); } - tdelta *= 0.5f; - dist = fabsf(sample.mV[2] - height); - } - if (intersection) - { - sample.mV[2] = mRegionp->getLandHeightRegion(sample); - *intersection = sample + mRegionp->getOriginAgent(); - } + if (intersection) + { + F32 height = mRegionp->getLandHeightRegion(sample); + if (fabsf(sample.mV[2]-height) < delta.length()*tdelta) + { + sample.mV[2] = mRegionp->getLandHeightRegion(sample); + } + *intersection = sample + mRegionp->getOriginAgent(); + } - if (normal) - { - *normal = mRegionp->getLand().resolveNormalGlobal(mRegionp->getPosGlobalFromRegion(sample)); - } + if (normal) + { + *normal = mRegionp->getLand().resolveNormalGlobal(mRegionp->getPosGlobalFromRegion(sample)); + } - return TRUE; + return TRUE; + } } t += tdelta; diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 47289ff..a1ca61f 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp @@ -1998,7 +1998,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e face_hit = volume->lineSegmentIntersect(v_start, v_end, i, &p, &tc, &n, &bn); - if (face_hit >= 0) + if (face_hit >= 0 && mDrawable->getNumFaces() > face_hit) { LLFace* face = mDrawable->getFace(face_hit); if (pick_transparent || !face->getTexture() || face->getTexture()->getMask(face->surfaceToTexture(tc, p, n))) diff --git a/linden/indra/newview/llwebbrowserctrl.cpp b/linden/indra/newview/llwebbrowserctrl.cpp index 8c56e5c..0598a63 100644 --- a/linden/indra/newview/llwebbrowserctrl.cpp +++ b/linden/indra/newview/llwebbrowserctrl.cpp @@ -483,13 +483,7 @@ void LLWebBrowserCtrl::navigateTo( std::string urlIn ) void LLWebBrowserCtrl::navigateToLocalPage( const std::string& subdir, const std::string& filename_in ) { - std::string language = gSavedSettings.getString("Language"); - - if(language == "default") - { - language = gSavedSettings.getString("SystemLanguage"); - } - + std::string language = LLUI::getLanguage(); std::string delim = gDirUtilp->getDirDelimiter(); std::string filename; diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index 81f1a90..51ea557 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp @@ -220,6 +220,7 @@ void display_update_camera(); S32 LLPipeline::sCompiles = 0; +BOOL LLPipeline::sPickAvatar = TRUE; BOOL LLPipeline::sDynamicLOD = TRUE; BOOL LLPipeline::sShowHUDAttachments = TRUE; BOOL LLPipeline::sRenderPhysicalBeacons = TRUE; @@ -2342,7 +2343,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) } } - + LLAppViewer::instance()->pingMainloopTimeout("Pipeline:ForceVBO"); //by bao //fake vertex buffer updating @@ -2389,12 +2390,16 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) U32 cur_type = 0; + LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDrawPools"); + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PICKING)) { + LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderForSelect"); gObjectList.renderObjectsForSelect(camera, gViewerWindow->getVirtualWindowRect()); } else if (gSavedSettings.getBOOL("RenderDeferred")) { + LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDeferred"); renderGeomDeferred(); } else @@ -2482,6 +2487,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) stop_glerror(); } } + + LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDrawPoolsEnd"); LLVertexBuffer::unbind(); LLGLState::checkStates(); @@ -2505,6 +2512,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) LLGLState::checkTextureChannels(); LLGLState::checkClientArrays(); + LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderHighlights"); + if (!sReflectionRender) { renderHighlights(); @@ -2514,6 +2523,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) // have touch-handlers. mHighlightFaces.clear(); + LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDebug"); + renderDebug(); LLVertexBuffer::unbind(); @@ -2526,6 +2537,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) gObjectList.resetObjectBeacons(); } + LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomEnd"); + //HACK: preserve/restore matrices around HUD render if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD)) { @@ -4022,6 +4035,8 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector3& start, LLVector3 position; + sPickAvatar = LLToolMgr::getInstance()->inBuildMode() ? FALSE : TRUE; + for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) { @@ -4048,6 +4063,31 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector3& start, } } } + + if (!sPickAvatar) + { + if (!drawable || !drawable->getVObj()->isAttachment()) + { //check against avatars + sPickAvatar = TRUE; + for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); + iter != LLWorld::getInstance()->getRegionList().end(); ++iter) + { + LLViewerRegion* region = *iter; + + LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_BRIDGE); + if (part && hasRenderType(part->mDrawableType)) + { + LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, bi_normal); + if (hit) + { + drawable = hit; + local_end = position; + } + } + } + } + } + //check all avatar nametags (silly, isn't it?) for (std::vector< LLCharacter* >::iterator iter = LLCharacter::sInstances.begin(); diff --git a/linden/indra/newview/pipeline.h b/linden/indra/newview/pipeline.h index c795283..560f21f 100644 --- a/linden/indra/newview/pipeline.h +++ b/linden/indra/newview/pipeline.h @@ -383,6 +383,7 @@ public: static BOOL sSkipUpdate; //skip lod updates static BOOL sWaterReflections; static BOOL sDynamicLOD; + static BOOL sPickAvatar; static BOOL sReflectionRender; static BOOL sImpostorRender; static BOOL sUnderWaterRender; diff --git a/linden/indra/newview/skins/default/xui/de/alerts.xml b/linden/indra/newview/skins/default/xui/de/alerts.xml index 57a5a4b..20e6113 100644 --- a/linden/indra/newview/skins/default/xui/de/alerts.xml +++ b/linden/indra/newview/skins/default/xui/de/alerts.xml @@ -1,4 +1,4 @@ - + Nicht mehr anzeigen @@ -58,8 +58,7 @@ Verbindung mit [SECOND_LIFE] nicht möglich. Möglicherweise handelt es sich um einen Systemausfall. -Bitte versuchen Sie es in einigen Minuten erneut oder klicken Sie -für Unterstützung und einen Link auf die Systemstatus-Webseite auf 'Hilfe'. +Bitte versuchen Sie es in einigen Minuten erneut oder klicken Sie für Unterstützung und einen Link auf die Systemstatus-Webseite auf 'Hilfe'.