From 6156baad67c744ed03ea47798bfeb8a77698efc6 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 11 Jan 2009 16:10:10 -0600 Subject: Second Life viewer sources 1.22.4-RC --- linden/indra/llaudio/audioengine.cpp | 15 +- linden/indra/llcommon/llversionviewer.h | 2 +- linden/indra/llcrashlogger/llcrashlogger.cpp | 31 + linden/indra/llimage/llimagejpeg.cpp | 3 +- linden/indra/llmath/llvolume.cpp | 3 + linden/indra/llui/llfloater.cpp | 31 +- linden/indra/llui/llfloater.h | 5 + linden/indra/llui/lltexteditor.cpp | 4 +- linden/indra/newview/app_settings/settings.xml | 10 +- linden/indra/newview/llappviewer.cpp | 29 +- linden/indra/newview/llfloatersnapshot.cpp | 23 +- linden/indra/newview/llstartup.h | 1 + linden/indra/newview/llviewermenu.cpp | 5 + linden/indra/newview/llviewermenufile.cpp | 3 +- linden/indra/newview/llviewertexteditor.cpp | 5 +- linden/indra/newview/llwatchdog.cpp | 24 +- linden/indra/newview/llwatchdog.h | 8 +- linden/indra/newview/llwindebug.cpp | 3 +- .../indra/newview/skins/default/xui/de/alerts.xml | 181 +- .../skins/default/xui/de/floater_about_land.xml | 4 +- .../default/xui/de/floater_animation_preview.xml | 81 +- .../skins/default/xui/de/floater_avatar_picker.xml | 2 +- .../skins/default/xui/de/floater_god_tools.xml | 2 +- .../skins/default/xui/de/floater_group_info.xml | 8 +- .../default/xui/de/floater_instant_message.xml | 2 +- .../xui/de/floater_instant_message_group.xml | 2 +- .../skins/default/xui/de/floater_lagmeter.xml | 2 +- .../default/xui/de/floater_new_outfit_dialog.xml | 2 +- .../default/xui/de/floater_preview_gesture.xml | 4 +- .../skins/default/xui/de/floater_report_abuse.xml | 2 +- .../skins/default/xui/de/floater_report_bug.xml | 2 +- .../skins/default/xui/de/floater_telehub.xml | 6 +- .../newview/skins/default/xui/de/floater_tools.xml | 2 +- .../skins/default/xui/de/floater_top_objects.xml | 80 +- .../skins/default/xui/de/floater_world_map.xml | 67 +- .../newview/skins/default/xui/de/menu_viewer.xml | 16 +- .../newview/skins/default/xui/de/mime_types.xml | 5 +- .../indra/newview/skins/default/xui/de/notify.xml | 52 +- .../newview/skins/default/xui/de/panel_friends.xml | 2 +- .../skins/default/xui/de/panel_group_general.xml | 4 +- .../skins/default/xui/de/panel_group_invite.xml | 2 +- .../default/xui/de/panel_group_land_money.xml | 2 +- .../skins/default/xui/de/panel_group_notices.xml | 6 +- .../skins/default/xui/de/panel_group_roles.xml | 8 +- .../skins/default/xui/de/panel_group_voting.xml | 12 +- .../default/xui/de/panel_media_remote_expanded.xml | 4 +- .../skins/default/xui/de/panel_overlaybar.xml | 4 +- .../default/xui/de/panel_preferences_general.xml | 28 +- .../default/xui/de/panel_preferences_popups.xml | 4 +- .../default/xui/de/panel_preferences_voice.xml | 6 +- .../skins/default/xui/de/panel_voice_enable.xml | 4 +- .../skins/default/xui/de/panel_voice_options.xml | 6 +- .../skins/default/xui/en-us/menu_viewer.xml | 25 +- .../indra/newview/skins/default/xui/fr/alerts.xml | 122 +- .../skins/default/xui/fr/floater_top_objects.xml | 32 +- .../newview/skins/default/xui/fr/menu_viewer.xml | 12 +- .../skins/default/xui/fr/panel_group_notices.xml | 2 +- .../skins/default/xui/fr/panel_group_voting.xml | 6 +- .../default/xui/fr/panel_preferences_general.xml | 30 +- .../newview/skins/default/xui/fr/role_actions.xml | 18 +- .../indra/newview/skins/default/xui/ja/alerts.xml | 25 +- .../newview/skins/default/xui/ja/floater_about.xml | 2 +- .../skins/default/xui/ja/floater_about_land.xml | 10 +- .../skins/default/xui/ja/floater_chat_history.xml | 2 +- .../skins/default/xui/ja/floater_directory.xml | 4 +- .../newview/skins/default/xui/ja/floater_im.xml | 2 +- .../default/xui/ja/floater_instant_message.xml | 2 +- .../skins/default/xui/ja/floater_media_browser.xml | 2 +- .../skins/default/xui/ja/floater_snapshot.xml | 8 +- .../newview/skins/default/xui/ja/floater_tools.xml | 2 +- .../skins/default/xui/ja/floater_url_entry.xml | 6 +- .../newview/skins/default/xui/ja/menu_viewer.xml | 12 +- .../indra/newview/skins/default/xui/ja/notify.xml | 131 +- .../newview/skins/default/xui/ja/panel_avatar.xml | 2 +- .../skins/default/xui/ja/panel_classified.xml | 2 +- .../newview/skins/default/xui/ja/panel_login.xml | 16 +- .../newview/skins/default/xui/ja/panel_place.xml | 2 +- .../skins/default/xui/ja/panel_place_small.xml | 2 +- .../default/xui/ja/panel_preferences_general.xml | 8 +- .../skins/default/xui/ja/panel_region_debug.xml | 2 +- .../skins/default/xui/ja/panel_region_estate.xml | 3 +- .../skins/default/xui/ja/panel_region_general.xml | 8 +- .../skins/default/xui/ja/panel_status_bar.xml | 2 +- .../newview/skins/default/xui/ko/menu_viewer.xml | 8 +- .../indra/newview/skins/default/xui/pt/alerts.xml | 1859 ++++++++++++-------- .../newview/skins/default/xui/pt/floater_about.xml | 6 +- .../skins/default/xui/pt/floater_about_land.xml | 427 +++-- .../default/xui/pt/floater_active_speakers.xml | 8 + .../default/xui/pt/floater_animation_preview.xml | 83 +- .../skins/default/xui/pt/floater_avatar_picker.xml | 16 +- .../default/xui/pt/floater_avatar_textures.xml | 52 +- .../skins/default/xui/pt/floater_beacons.xml | 15 + .../skins/default/xui/pt/floater_build_options.xml | 11 +- .../skins/default/xui/pt/floater_buy_contents.xml | 17 +- .../skins/default/xui/pt/floater_buy_currency.xml | 70 +- .../skins/default/xui/pt/floater_buy_land.xml | 177 +- .../skins/default/xui/pt/floater_buy_object.xml | 21 +- .../skins/default/xui/pt/floater_camera.xml | 12 + .../skins/default/xui/pt/floater_chat_history.xml | 56 +- .../skins/default/xui/pt/floater_customize.xml | 428 +++-- .../default/xui/pt/floater_day_cycle_options.xml | 67 + .../skins/default/xui/pt/floater_directory.xml | 266 +-- .../skins/default/xui/pt/floater_env_settings.xml | 23 + .../skins/default/xui/pt/floater_gesture.xml | 15 +- .../default/xui/pt/floater_hardware_settings.xml | 38 + .../newview/skins/default/xui/pt/floater_html.xml | 17 +- .../newview/skins/default/xui/pt/floater_hud.xml | 2 + .../newview/skins/default/xui/pt/floater_im.xml | 52 +- .../skins/default/xui/pt/floater_image_preview.xml | 7 +- .../default/xui/pt/floater_instant_message.xml | 40 +- .../xui/pt/floater_instant_message_ad_hoc.xml | 24 +- .../xui/pt/floater_instant_message_group.xml | 30 + .../skins/default/xui/pt/floater_inventory.xml | 64 +- .../xui/pt/floater_inventory_item_properties.xml | 36 +- .../skins/default/xui/pt/floater_joystick.xml | 85 +- .../skins/default/xui/pt/floater_lagmeter.xml | 152 ++ .../skins/default/xui/pt/floater_land_holdings.xml | 29 +- .../skins/default/xui/pt/floater_landmark_ctrl.xml | 10 + .../default/xui/pt/floater_live_lsleditor.xml | 13 +- .../skins/default/xui/pt/floater_media_browser.xml | 19 + .../skins/default/xui/pt/floater_mem_leaking.xml | 12 + .../skins/default/xui/pt/floater_mute_object.xml | 11 + .../default/xui/pt/floater_new_outfit_dialog.xml | 130 +- .../skins/default/xui/pt/floater_postcard.xml | 28 +- .../default/xui/pt/floater_preview_classified.xml | 2 + .../skins/default/xui/pt/floater_preview_event.xml | 2 + .../default/xui/pt/floater_preview_gesture.xml | 40 +- .../default/xui/pt/floater_preview_notecard.xml | 14 +- .../pt/floater_preview_notecard_keep_discard.xml | 16 +- .../skins/default/xui/pt/floater_preview_url.xml | 2 + .../skins/default/xui/pt/floater_region_info.xml | 2 + .../skins/default/xui/pt/floater_report_abuse.xml | 160 +- .../skins/default/xui/pt/floater_report_bug.xml | 97 +- .../skins/default/xui/pt/floater_script_debug.xml | 8 +- .../default/xui/pt/floater_script_ed_panel.xml | 49 +- .../default/xui/pt/floater_sim_release_message.xml | 10 + .../skins/default/xui/pt/floater_snapshot.xml | 78 +- .../skins/default/xui/pt/floater_texture_ctrl.xml | 31 +- .../newview/skins/default/xui/pt/floater_tools.xml | 403 +++-- .../skins/default/xui/pt/floater_top_objects.xml | 55 +- .../newview/skins/default/xui/pt/floater_tos.xml | 21 +- .../skins/default/xui/pt/floater_url_entry.xml | 12 + .../newview/skins/default/xui/pt/floater_water.xml | 85 + .../default/xui/pt/floater_windlight_options.xml | 186 ++ .../skins/default/xui/pt/floater_world_map.xml | 9 +- .../skins/default/xui/pt/menu_inventory.xml | 4 +- .../newview/skins/default/xui/pt/menu_login.xml | 13 + .../skins/default/xui/pt/menu_pie_avatar.xml | 26 +- .../newview/skins/default/xui/pt/menu_slurl.xml | 6 + .../newview/skins/default/xui/pt/menu_viewer.xml | 356 ++-- .../newview/skins/default/xui/pt/mime_types.xml | 230 +++ .../indra/newview/skins/default/xui/pt/notify.xml | 266 ++- .../skins/default/xui/pt/panel_audio_device.xml | 15 + .../newview/skins/default/xui/pt/panel_avatar.xml | 183 +- .../default/xui/pt/panel_avatar_classified.xml | 48 +- .../skins/default/xui/pt/panel_chat_bar.xml | 28 +- .../skins/default/xui/pt/panel_classified.xml | 40 +- .../newview/skins/default/xui/pt/panel_event.xml | 26 +- .../newview/skins/default/xui/pt/panel_friends.xml | 14 + .../skins/default/xui/pt/panel_group_general.xml | 88 +- .../skins/default/xui/pt/panel_group_invite.xml | 27 +- .../default/xui/pt/panel_group_land_money.xml | 60 +- .../skins/default/xui/pt/panel_group_notices.xml | 4 +- .../skins/default/xui/pt/panel_group_roles.xml | 94 +- .../skins/default/xui/pt/panel_group_voting.xml | 103 +- .../newview/skins/default/xui/pt/panel_login.xml | 20 +- .../skins/default/xui/pt/panel_media_controls.xml | 38 + .../default/xui/pt/panel_media_remote_expanded.xml | 28 + .../skins/default/xui/pt/panel_overlaybar.xml | 17 +- .../newview/skins/default/xui/pt/panel_place.xml | 41 +- .../skins/default/xui/pt/panel_place_small.xml | 41 +- .../default/xui/pt/panel_preferences_audio.xml | 67 +- .../default/xui/pt/panel_preferences_chat.xml | 69 +- .../default/xui/pt/panel_preferences_general.xml | 118 +- .../default/xui/pt/panel_preferences_graphics1.xml | 184 +- .../skins/default/xui/pt/panel_preferences_im.xml | 39 +- .../default/xui/pt/panel_preferences_input.xml | 42 +- .../default/xui/pt/panel_preferences_network.xml | 25 +- .../default/xui/pt/panel_preferences_popups.xml | 26 +- .../default/xui/pt/panel_preferences_skins.xml | 14 + .../default/xui/pt/panel_preferences_voice.xml | 7 + .../skins/default/xui/pt/panel_preferences_web.xml | 28 +- .../skins/default/xui/pt/panel_region_covenant.xml | 14 +- .../skins/default/xui/pt/panel_region_debug.xml | 58 +- .../skins/default/xui/pt/panel_region_estate.xml | 80 +- .../skins/default/xui/pt/panel_region_general.xml | 55 +- .../default/xui/pt/panel_speaker_controls.xml | 38 + .../skins/default/xui/pt/panel_status_bar.xml | 46 +- .../newview/skins/default/xui/pt/panel_toolbar.xml | 32 +- .../skins/default/xui/pt/panel_voice_controls.xml | 7 + .../skins/default/xui/pt/panel_voice_enable.xml | 17 + .../skins/default/xui/pt/panel_voice_options.xml | 4 + .../default/xui/pt/panel_voice_remote_expanded.xml | 4 + .../indra/newview/skins/default/xui/pt/strings.xml | 421 +++++ .../skins/default/xui/pt/teleport_strings.xml | 43 +- .../skins/default/xui/zh/panel_voice_controls.xml | 2 +- 196 files changed, 6814 insertions(+), 3481 deletions(-) create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_active_speakers.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_beacons.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_camera.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_env_settings.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_hud.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_instant_message_group.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_lagmeter.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_landmark_ctrl.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_media_browser.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_mem_leaking.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_mute_object.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_preview_classified.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_preview_event.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_preview_url.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_region_info.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_sim_release_message.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_url_entry.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_water.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/floater_windlight_options.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/menu_login.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/menu_slurl.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/mime_types.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/panel_audio_device.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/panel_friends.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/panel_media_controls.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/panel_media_remote_expanded.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/panel_preferences_skins.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/panel_preferences_voice.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/panel_speaker_controls.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/panel_voice_controls.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/panel_voice_enable.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/panel_voice_options.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/panel_voice_remote_expanded.xml create mode 100644 linden/indra/newview/skins/default/xui/pt/strings.xml (limited to 'linden/indra') diff --git a/linden/indra/llaudio/audioengine.cpp b/linden/indra/llaudio/audioengine.cpp index 298ab1d..baea815 100644 --- a/linden/indra/llaudio/audioengine.cpp +++ b/linden/indra/llaudio/audioengine.cpp @@ -170,13 +170,6 @@ void LLAudioEngine::updateChannels() { if (mChannels[i]) { - // set secondary gain if type is available - LLAudioSource* source = mChannels[i]->getSource(); - if (source) - { - mChannels[i]->setSecondaryGain(mSecondaryGain[source->getType()]); - } - mChannels[i]->updateBuffer(); mChannels[i]->update3DPosition(); mChannels[i]->updateLoop(); @@ -1578,6 +1571,8 @@ void LLAudioChannel::setSource(LLAudioSource *sourcep) } mCurrentSourcep = sourcep; + + updateBuffer(); update3DPosition(); } @@ -1592,6 +1587,12 @@ BOOL LLAudioChannel::updateBuffer() return FALSE; } + // Initialize the channel's gain setting for this sound. + if(gAudiop) + { + setSecondaryGain(gAudiop->getSecondaryGain(mCurrentSourcep->getType())); + } + LLAudioBuffer *bufferp = mCurrentSourcep->getCurrentBuffer(); if (bufferp == mCurrentBufferp) { diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index 3fc4e72..1750068 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 = 3; +const S32 LL_VERSION_PATCH = 4; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Release"; diff --git a/linden/indra/llcrashlogger/llcrashlogger.cpp b/linden/indra/llcrashlogger/llcrashlogger.cpp index 3abbb2d..9672af3 100755 --- a/linden/indra/llcrashlogger/llcrashlogger.cpp +++ b/linden/indra/llcrashlogger/llcrashlogger.cpp @@ -123,6 +123,33 @@ void trimSLLog(std::string& sllog) } } +std::string getStartupStateFromLog(std::string& sllog) +{ + std::string startup_state = "STATE_FIRST"; + std::string startup_token = "Startup state changing from "; + + int index = sllog.rfind(startup_token); + if (index < 0 || index + startup_token.length() > sllog.length()) { + return startup_state; + } + + // find new line + char cur_char = sllog[index + startup_token.length()]; + std::string::size_type newline_loc = index + startup_token.length(); + while(cur_char != '\n' && newline_loc < sllog.length()) + { + newline_loc++; + cur_char = sllog[newline_loc]; + } + + // get substring and find location of " to " + std::string state_line = sllog.substr(index, newline_loc - index); + std::string::size_type state_index = state_line.find(" to "); + startup_state = state_line.substr(state_index + 4, state_line.length() - state_index - 4); + + return startup_state; +} + void LLCrashLogger::gatherFiles() { @@ -232,6 +259,10 @@ void LLCrashLogger::gatherFiles() std::string crash_info = s.str(); if(itr->first == "SecondLifeLog") { + if(!mCrashInfo["DebugLog"].has("StartupState")) + { + mCrashInfo["DebugLog"]["StartupState"] = getStartupStateFromLog(crash_info); + } trimSLLog(crash_info); } diff --git a/linden/indra/llimage/llimagejpeg.cpp b/linden/indra/llimage/llimagejpeg.cpp index 68529b6..13dea38 100644 --- a/linden/indra/llimage/llimagejpeg.cpp +++ b/linden/indra/llimage/llimagejpeg.cpp @@ -465,7 +465,8 @@ void LLImageJPEG::errorOutputMessage( j_common_ptr cinfo ) char buffer[JMSG_LENGTH_MAX]; /* Flawfinder: ignore */ (*cinfo->err->format_message) (cinfo, buffer); - ((LLImageJPEG*) cinfo->client_data)->setLastError( buffer ); + std::string error = buffer ; + LLImage::setLastError(error); BOOL is_decode = (cinfo->is_decompressor != 0); llwarns << "LLImageJPEG " << (is_decode ? "decode " : "encode ") << " failed: " << buffer << llendl; diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index be03090..d87bae3 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp @@ -1765,9 +1765,12 @@ BOOL LLVolume::generate() //debug info if((U32)(sizeS * sizeT) > (1u << 20)) { + llinfos << "regenPath: " << (S32)regenPath << " regenProf: " << (S32)regenProf << llendl ; llinfos << "sizeS: " << sizeS << " sizeT: " << sizeT << llendl ; llinfos << "path_detail : " << path_detail << " split: " << split << " profile_detail: " << profile_detail << llendl ; llinfos << mParams << llendl ; + + llerrs << "LLVolume corrupted!" << llendl ; } sNumMeshPoints -= mMesh.size(); diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp index 047342f..de4f6ce 100644 --- a/linden/indra/llui/llfloater.cpp +++ b/linden/indra/llui/llfloater.cpp @@ -544,6 +544,7 @@ void LLFloater::close(bool app_quitting) if (getHost()) { ((LLMultiFloater*)getHost())->removeFloater(this); + gFloaterView->addChild(this); } if (getSoundFlags() != SILENT @@ -1318,8 +1319,8 @@ void LLFloater::onClickEdit(void *userdata) self->mEditing = self->mEditing ? FALSE : TRUE; } -// static -void LLFloater::closeFocusedFloater() +// static +LLFloater* LLFloater::getClosableFloaterFromFocus() { LLFloater* focused_floater = NULL; @@ -1336,10 +1337,32 @@ void LLFloater::closeFocusedFloater() if (iter == sFloaterMap.end()) { // nothing found, return - return; + return NULL; + } + + // The focused floater may not be closable, + // Find and close a parental floater that is closeable, if any. + for(LLFloater* floater_to_close = focused_floater; + NULL != floater_to_close; + floater_to_close = gFloaterView->getParentFloater(floater_to_close)) + { + if(floater_to_close->isCloseable()) + { + return floater_to_close; + } } - focused_floater->close(); + return NULL; +} + +// static +void LLFloater::closeFocusedFloater() +{ + LLFloater* floater_to_close = LLFloater::getClosableFloaterFromFocus(); + if(floater_to_close) + { + floater_to_close->close(); + } // if nothing took focus after closing focused floater // give it to next floater (to allow closing multiple windows via keyboard in rapid succession) diff --git a/linden/indra/llui/llfloater.h b/linden/indra/llui/llfloater.h index 0be5d44..267707f 100644 --- a/linden/indra/llui/llfloater.h +++ b/linden/indra/llui/llfloater.h @@ -206,6 +206,11 @@ public: LLHandle getHandle() const { return mHandle; } + // Return a closeable floater, if any, given the current focus. + static LLFloater* getClosableFloaterFromFocus(); + + // Close the floater returned by getClosableFloaterFromFocus() and + // handle refocusing. static void closeFocusedFloater(); static void onClickClose(void *userdata); diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 4b0acf8..2205005 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -471,9 +471,9 @@ void LLTextEditor::updateLineStartList(S32 startpos) } // if scrolled to bottom, stay at bottom - // unless user is editing text + // unless user is selecting text // do this after updating page size - if (mScrolledToBottom && mTrackBottom && !hasFocus()) + if (mScrolledToBottom && mTrackBottom && !hasMouseCapture()) { endOfDoc(); } diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 1ebe77a..688dcab 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -33,10 +33,10 @@ Color4 Value - 0.0196078431372 - 0.6862745098039 - 0.9803921568627 - 1 + 1.0 + 1.0 + 1.0 + 1.0 AgentChatColor @@ -10100,7 +10100,7 @@ Type Boolean Value - 1 + 0 WaterEditPresets diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 35acafc..53685e4 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -1405,6 +1405,25 @@ bool LLAppViewer::cleanup() return true; } +// A callback for llerrs to call during the watchdog error. +void watchdog_llerrs_callback(const std::string &error_string) +{ + gLLErrorActivated = true; + +#ifdef LL_WINDOWS + RaiseException(0,0,0,0); +#else + raise(SIGQUIT); +#endif +} + +// A callback for the watchdog to call. +void watchdog_killer_callback() +{ + LLError::setFatalFunction(watchdog_llerrs_callback); + llerrs << "Watchdog killer event" << llendl; +} + bool LLAppViewer::initThreads() { #if MEM_TRACK_MEM @@ -1414,10 +1433,11 @@ bool LLAppViewer::initThreads() #endif const S32 NEVER_SUBMIT_REPORT = 2; - if(TRUE == gSavedSettings.getBOOL("WatchdogEnabled") - && (gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT)) + bool use_watchdog = gSavedSettings.getBOOL("WatchdogEnabled"); + bool send_reports = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT; + if(use_watchdog && send_reports) { - LLWatchdog::getInstance()->init(); + LLWatchdog::getInstance()->init(watchdog_killer_callback); } LLVFSThread::initClass(enable_threads && true); @@ -2280,7 +2300,8 @@ void LLAppViewer::handleViewerCrash() gDebugInfo["ViewerExePath"] = gDirUtilp->getExecutablePathAndName(); gDebugInfo["CurrentPath"] = gDirUtilp->getCurPath(); gDebugInfo["SessionLength"] = F32(LLFrameTimer::getElapsedSeconds()); - + gDebugInfo["StartupState"] = LLStartUp::getStartupStateString(); + if(gLogoutInProgress) { gDebugInfo["LastExecEvent"] = LAST_EXEC_LOGOUT_CRASH; diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp index 61ae4c2..6cf6ae1 100644 --- a/linden/indra/newview/llfloatersnapshot.cpp +++ b/linden/indra/newview/llfloatersnapshot.cpp @@ -921,9 +921,10 @@ LLFloaterPostcard* LLSnapshotLivePreview::savePostcard() return NULL; } LLFloaterPostcard* floater = LLFloaterPostcard::showFromSnapshot(jpg, mViewerImage[mCurImageIndex], image_scale, mPosTakenGlobal); - // relinquish lifetime of viewerimage and jpeg image to postcard floater - mViewerImage[mCurImageIndex] = NULL; + // relinquish lifetime of jpeg image to postcard floater mFormattedImage = NULL; + mDataSize = 0; + updateSnapshot(FALSE, FALSE); return floater; } @@ -968,11 +969,19 @@ void LLSnapshotLivePreview::saveTexture() } LLViewerStats::getInstance()->incStat(LLViewerStats::ST_SNAPSHOT_COUNT ); + + mDataSize = 0; } BOOL LLSnapshotLivePreview::saveLocal() { BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage); + + // Relinquish image memory. Save button will be disabled as a side-effect. + mFormattedImage = NULL; + mDataSize = 0; + updateSnapshot(FALSE, FALSE); + if(success) { gViewerWindow->playSnapshotAnimAndSound(); @@ -1252,14 +1261,14 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) BOOL got_bytes = previewp && previewp->getDataSize() > 0; BOOL got_snap = previewp->getSnapshotUpToDate(); - floater->childSetEnabled("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_bytes && got_snap && previewp->getDataSize() <= MAX_POSTCARD_DATASIZE); - floater->childSetEnabled("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE && got_bytes && got_snap); - floater->childSetEnabled("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL && got_bytes && got_snap); + floater->childSetEnabled("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_snap && previewp->getDataSize() <= MAX_POSTCARD_DATASIZE); + floater->childSetEnabled("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE && got_snap); + floater->childSetEnabled("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL && got_snap); LLLocale locale(LLLocale::USER_LOCALE); std::string bytes_string; LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 ); - floater->childSetTextArg("file_size_label", "[SIZE]", got_snap ? bytes_string : got_bytes ? floater->getString("unknown") : std::string("???")); + floater->childSetTextArg("file_size_label", "[SIZE]", got_snap ? bytes_string : floater->getString("unknown")); floater->childSetColor("file_size_label", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_bytes @@ -1389,6 +1398,8 @@ void LLFloaterSnapshot::Impl::onClickKeep(void* data) { checkAutoSnapshot(previewp); } + + updateControls(view); } } diff --git a/linden/indra/newview/llstartup.h b/linden/indra/newview/llstartup.h index 1a9f659..64de9cd 100644 --- a/linden/indra/newview/llstartup.h +++ b/linden/indra/newview/llstartup.h @@ -87,6 +87,7 @@ public: // Always use this to set gStartupState so changes are logged static void setStartupState( EStartupState state ); static EStartupState getStartupState() { return gStartupState; }; + static std::string getStartupStateString() { return startupStateToString(gStartupState); }; static void multimediaInit(); // Initialize LLViewerMedia multimedia engine. diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index dff31e1..ea38545 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -5330,6 +5330,11 @@ class LLFloaterVisible : public view_listener_t { new_value = LLFloaterBeacons::instanceVisible(LLSD()); } + else if (floater_name == "inventory") + { + LLInventoryView* iv = LLInventoryView::getActiveInventory(); + new_value = (NULL != iv && TRUE == iv->getVisible()); + } gMenuHolder->findControl(control_name)->setValue(new_value); return true; } diff --git a/linden/indra/newview/llviewermenufile.cpp b/linden/indra/newview/llviewermenufile.cpp index bb84f43..33effdc 100644 --- a/linden/indra/newview/llviewermenufile.cpp +++ b/linden/indra/newview/llviewermenufile.cpp @@ -349,7 +349,8 @@ class LLFileEnableCloseWindow : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - bool new_value = gFloaterView->getFocusedFloater() != NULL || gSnapshotFloaterView->getFocusedFloater() != NULL; + bool new_value = NULL != LLFloater::getClosableFloaterFromFocus(); + // horrendously opaque, this code gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); return true; diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp index 1dda1ca..7975b5d 100644 --- a/linden/indra/newview/llviewertexteditor.cpp +++ b/linden/indra/newview/llviewertexteditor.cpp @@ -616,7 +616,10 @@ BOOL LLViewerTextEditor::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* s LLView *viewp = *child_iter; S32 local_x = x - viewp->getRect().mLeft; S32 local_y = y - viewp->getRect().mBottom; - if( viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen ) ) + if( viewp->pointInView(local_x, local_y) + && viewp->getVisible() + && viewp->getEnabled() + && viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen ) ) { return TRUE; } diff --git a/linden/indra/newview/llwatchdog.cpp b/linden/indra/newview/llwatchdog.cpp index e37bbd8..bb987c9 100644 --- a/linden/indra/newview/llwatchdog.cpp +++ b/linden/indra/newview/llwatchdog.cpp @@ -35,6 +35,15 @@ const U32 WATCHDOG_SLEEP_TIME_USEC = 1000000; +void default_killer_callback() +{ +#ifdef LL_WINDOWS + RaiseException(0,0,0,0); +#else + raise(SIGQUIT); +#endif +} + // This class runs the watchdog timing thread. class LLWatchdogTimerThread : public LLThread { @@ -52,7 +61,7 @@ public: void stop() { mStopping = true; - ms_sleep(1); + mSleepMsecs = 1; } /* virtual */ void run() @@ -146,7 +155,8 @@ void LLWatchdogTimeout::ping(const std::string& state) LLWatchdog::LLWatchdog() : mSuspectsAccessMutex(NULL), mTimer(NULL), - mLastClockCount(0) + mLastClockCount(0), + mKillerCallback(&default_killer_callback) { } @@ -168,8 +178,9 @@ void LLWatchdog::remove(LLWatchdogEntry* e) unlockThread(); } -void LLWatchdog::init() +void LLWatchdog::init(killer_event_callback func) { + mKillerCallback = func; if(!mSuspectsAccessMutex && !mTimer) { mSuspectsAccessMutex = new LLMutex(NULL); @@ -238,12 +249,7 @@ void LLWatchdog::run() } llinfos << "Watchdog detected error:" << llendl; -#ifdef LL_WINDOWS - llerrs << "Windows Watchdog killer event" << llendl; - // RaiseException(0,0,0,0); -#else - raise(SIGQUIT); -#endif + mKillerCallback(); } } diff --git a/linden/indra/newview/llwatchdog.h b/linden/indra/newview/llwatchdog.h index d196486..25bb603 100644 --- a/linden/indra/newview/llwatchdog.h +++ b/linden/indra/newview/llwatchdog.h @@ -32,6 +32,8 @@ #ifndef LL_LLTHREADWATCHDOG_H #define LL_LLTHREADWATCHDOG_H +#include + #ifndef LL_TIMER_H #include "lltimer.h" #endif @@ -85,7 +87,9 @@ public: void add(LLWatchdogEntry* e); void remove(LLWatchdogEntry* e); - void init(); + typedef boost::function killer_event_callback; + + void init(killer_event_callback func = NULL); void run(); void cleanup(); @@ -98,6 +102,8 @@ private: LLMutex* mSuspectsAccessMutex; LLWatchdogTimerThread* mTimer; U64 mLastClockCount; + + killer_event_callback mKillerCallback; }; #endif // LL_LLTHREADWATCHDOG_H diff --git a/linden/indra/newview/llwindebug.cpp b/linden/indra/newview/llwindebug.cpp index 04457eb..b433901 100644 --- a/linden/indra/newview/llwindebug.cpp +++ b/linden/indra/newview/llwindebug.cpp @@ -430,7 +430,7 @@ LLSD WINAPI Get_Exception_Info(PEXCEPTION_POINTERS pException) FILETIME Last_Write_Time; FILETIME Local_File_Time; SYSTEMTIME T; - + Str = new WCHAR[DUMP_SIZE_MAX]; Str_Len = 0; if (!Str) @@ -440,6 +440,7 @@ LLSD WINAPI Get_Exception_Info(PEXCEPTION_POINTERS pException) GetModuleFileName(NULL, Str, MAX_PATH); info["Process"] = ll_convert_wide_to_string(Str); + info["ThreadID"] = (S32)GetCurrentThreadId(); // If exception occurred. if (pException) diff --git a/linden/indra/newview/skins/default/xui/de/alerts.xml b/linden/indra/newview/skins/default/xui/de/alerts.xml index 9e59021..fe984ae 100644 --- a/linden/indra/newview/skins/default/xui/de/alerts.xml +++ b/linden/indra/newview/skins/default/xui/de/alerts.xml @@ -58,7 +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“.