From f60314f22758daa22d096f2166367258d761d8b4 Mon Sep 17 00:00:00 2001 From: angela Date: Sat, 24 Oct 2009 07:58:31 +0800 Subject: EXT-1305 Hook up Script Error preferences -- reviewed by james --- indra/newview/app_settings/settings.xml | 33 ++++++++++++++-------- indra/newview/llfloaterchat.cpp | 18 ++++++------ indra/newview/llnearbychat.cpp | 12 ++++---- indra/newview/llnearbychathandler.cpp | 12 ++++++++ .../default/xui/en/panel_preferences_advanced.xml | 4 +-- indra/newview/skins/default/xui/en/strings.xml | 2 +- 6 files changed, 54 insertions(+), 27 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index eb045349c2..3682d48577 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7340,17 +7340,6 @@ Value 0 - ScriptErrorsAsChat - - Comment - Display script errors and warning in chat history - Persist - 1 - Type - Boolean - Value - 0 - ScriptHelpFollowsCursor Comment @@ -7664,6 +7653,28 @@ Boolean Value 1 + + ShowScriptErrors + + Comment + Show script errors + Persist + 1 + Type + Boolean + Value + 1 + + ShowScriptErrorsLocation + + Comment + Show script error in chat or window + Persist + 1 + Type + S32 + Value + 0 ShowSnapshotButton diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 6d2e959352..86abebe7ce 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -204,12 +204,14 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) { - LLFloaterScriptDebug::addScriptLine(chat.mText, - chat.mFromName, - color, - chat.mFromID); - if (!gSavedSettings.getBOOL("ScriptErrorsAsChat")) + if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + return; + if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1) { + LLFloaterScriptDebug::addScriptLine(chat.mText, + chat.mFromName, + color, + chat.mFromID); return; } } @@ -315,9 +317,9 @@ void LLFloaterChat::addChat(const LLChat& chat, { LLColor4 text_color = get_text_color(chat); - BOOL invisible_script_debug_chat = - chat.mChatType == CHAT_TYPE_DEBUG_MSG - && !gSavedSettings.getBOOL("ScriptErrorsAsChat"); + BOOL invisible_script_debug_chat = ((gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) || + (chat.mChatType == CHAT_TYPE_DEBUG_MSG + && (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1))); if (!invisible_script_debug_chat && !chat.mMuted diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index bbab9944f3..148f72703c 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -222,12 +222,14 @@ void LLNearbyChat::addMessage(const LLChat& chat) if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) { - LLFloaterScriptDebug::addScriptLine(chat.mText, - chat.mFromName, - color, - chat.mFromID); - if (!gSavedSettings.getBOOL("ScriptErrorsAsChat")) + if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + return; + if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat")) { + LLFloaterScriptDebug::addScriptLine(chat.mText, + chat.mFromName, + color, + chat.mFromID); return; } } diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 4aefbd1a33..6b0d6d61e0 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -188,6 +188,17 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) return; } + int chat_type = notification["chat_type"].asInteger(); + + if( ((EChatType)chat_type == CHAT_TYPE_DEBUG_MSG)) + { + if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + return; + if(gSavedSettings.getS32("ShowScriptErrorsLocation")== 1) + return; + } + + //take 1st element from pool, (re)initialize it, put it in active toasts LLToast* toast = m_toast_pool.back(); @@ -330,6 +341,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg) notification["from_id"] = chat_msg.mFromID; notification["time"] = chat_msg.mTime; notification["source"] = (S32)chat_msg.mSourceType; + notification["chat_type"] = (S32)chat_msg.mChatType; channel->addNotification(notification); } diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 16fdbd7045..f42bab14de 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -235,7 +235,7 @@ Avatars: width="237" top_pad="0" /> Loading contents... No contents - (worn on [ATTACHMENT_POINT]) + -- cgit v1.2.3 From fe0bf81a6d515fa29bd5575c60bcad8e952e3119 Mon Sep 17 00:00:00 2001 From: Erica Firment Date: Mon, 26 Oct 2009 17:06:04 -0700 Subject: EXT-1901 Add color inventory icons, remove old art, add references to new art --- .../default/textures/icons/Generic_Object.png | Bin 0 -> 366 bytes .../skins/default/textures/icons/Info_Over.png | Bin 0 -> 376 bytes .../skins/default/textures/icons/Inv_Animation.png | Bin 486 -> 496 bytes .../skins/default/textures/icons/Inv_BodyShape.png | Bin 571 -> 641 bytes .../skins/default/textures/icons/Inv_Clothing.png | Bin 255 -> 253 bytes .../skins/default/textures/icons/Inv_Eye.png | Bin 439 -> 491 bytes .../default/textures/icons/Inv_FolderClosed.png | Bin 215 -> 219 bytes .../default/textures/icons/Inv_FolderOpen.png | Bin 351 -> 361 bytes .../skins/default/textures/icons/Inv_Gesture.png | Bin 413 -> 408 bytes .../skins/default/textures/icons/Inv_Gloves.png | Bin 385 -> 366 bytes .../skins/default/textures/icons/Inv_Hair.png | Bin 366 -> 377 bytes .../skins/default/textures/icons/Inv_Jacket.png | Bin 573 -> 591 bytes .../skins/default/textures/icons/Inv_Landmark.png | Bin 494 -> 532 bytes .../skins/default/textures/icons/Inv_Notecard.png | Bin 238 -> 222 bytes .../skins/default/textures/icons/Inv_Object.png | Bin 327 -> 333 bytes .../skins/default/textures/icons/Inv_Pants.png | Bin 375 -> 377 bytes .../skins/default/textures/icons/Inv_Script.png | Bin 463 -> 469 bytes .../skins/default/textures/icons/Inv_Shirt.png | Bin 397 -> 402 bytes .../skins/default/textures/icons/Inv_Shoe.png | Bin 284 -> 276 bytes .../skins/default/textures/icons/Inv_Skin.png | Bin 382 -> 393 bytes .../skins/default/textures/icons/Inv_Skirt.png | Bin 449 -> 494 bytes .../skins/default/textures/icons/Inv_Snapshot.png | Bin 416 -> 535 bytes .../skins/default/textures/icons/Inv_Socks.png | Bin 347 -> 358 bytes .../skins/default/textures/icons/Inv_Sound.png | Bin 359 -> 404 bytes .../skins/default/textures/icons/Inv_Texture.png | Bin 157 -> 157 bytes .../default/textures/icons/Inv_Underpants.png | Bin 397 -> 418 bytes .../default/textures/icons/Inv_Undershirt.png | Bin 208 -> 208 bytes indra/newview/skins/default/textures/textures.xml | 135 +++++++-------------- 28 files changed, 45 insertions(+), 90 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/Generic_Object.png create mode 100644 indra/newview/skins/default/textures/icons/Info_Over.png diff --git a/indra/newview/skins/default/textures/icons/Generic_Object.png b/indra/newview/skins/default/textures/icons/Generic_Object.png new file mode 100644 index 0000000000..e3a80b2aef Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Generic_Object.png differ diff --git a/indra/newview/skins/default/textures/icons/Info_Over.png b/indra/newview/skins/default/textures/icons/Info_Over.png new file mode 100644 index 0000000000..be1cd0706f Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Info_Over.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Animation.png b/indra/newview/skins/default/textures/icons/Inv_Animation.png index 8b69434066..ab42c61a92 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Animation.png and b/indra/newview/skins/default/textures/icons/Inv_Animation.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_BodyShape.png b/indra/newview/skins/default/textures/icons/Inv_BodyShape.png index 9d98bfaa7d..97e874d70d 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_BodyShape.png and b/indra/newview/skins/default/textures/icons/Inv_BodyShape.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Clothing.png b/indra/newview/skins/default/textures/icons/Inv_Clothing.png index 49a54b82e1..e8d246c6fa 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Clothing.png and b/indra/newview/skins/default/textures/icons/Inv_Clothing.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Eye.png b/indra/newview/skins/default/textures/icons/Inv_Eye.png index 6d0321dde9..e619f56c2b 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Eye.png and b/indra/newview/skins/default/textures/icons/Inv_Eye.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png b/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png index 30aa6e04ac..342a973d00 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png and b/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png b/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png index 792ef446e8..0507c2cbaf 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png and b/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Gesture.png b/indra/newview/skins/default/textures/icons/Inv_Gesture.png index c49ae523c8..52695ec19b 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Gesture.png and b/indra/newview/skins/default/textures/icons/Inv_Gesture.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Gloves.png b/indra/newview/skins/default/textures/icons/Inv_Gloves.png index d81bc961d4..d6a2113aaf 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Gloves.png and b/indra/newview/skins/default/textures/icons/Inv_Gloves.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Hair.png b/indra/newview/skins/default/textures/icons/Inv_Hair.png index 5e68f1ffea..ae941b0dd5 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Hair.png and b/indra/newview/skins/default/textures/icons/Inv_Hair.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Jacket.png b/indra/newview/skins/default/textures/icons/Inv_Jacket.png index 0e28f45f19..3859666f7c 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Jacket.png and b/indra/newview/skins/default/textures/icons/Inv_Jacket.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Landmark.png b/indra/newview/skins/default/textures/icons/Inv_Landmark.png index 6648a23393..f8ce765c50 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Landmark.png and b/indra/newview/skins/default/textures/icons/Inv_Landmark.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Notecard.png b/indra/newview/skins/default/textures/icons/Inv_Notecard.png index 830a71311f..4645ab8e91 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Notecard.png and b/indra/newview/skins/default/textures/icons/Inv_Notecard.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Object.png b/indra/newview/skins/default/textures/icons/Inv_Object.png index a88d0dc4b3..f883696a82 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Object.png and b/indra/newview/skins/default/textures/icons/Inv_Object.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Pants.png b/indra/newview/skins/default/textures/icons/Inv_Pants.png index 2527f7f9c3..fe2389f074 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Pants.png and b/indra/newview/skins/default/textures/icons/Inv_Pants.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Script.png b/indra/newview/skins/default/textures/icons/Inv_Script.png index e9c9b163fd..0fba27a7aa 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Script.png and b/indra/newview/skins/default/textures/icons/Inv_Script.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Shirt.png b/indra/newview/skins/default/textures/icons/Inv_Shirt.png index 7cc880a124..81c1538dd2 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Shirt.png and b/indra/newview/skins/default/textures/icons/Inv_Shirt.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Shoe.png b/indra/newview/skins/default/textures/icons/Inv_Shoe.png index 0b148647eb..51e1c7bbb7 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Shoe.png and b/indra/newview/skins/default/textures/icons/Inv_Shoe.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Skin.png b/indra/newview/skins/default/textures/icons/Inv_Skin.png index 8e20638bba..b7da922046 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Skin.png and b/indra/newview/skins/default/textures/icons/Inv_Skin.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Skirt.png b/indra/newview/skins/default/textures/icons/Inv_Skirt.png index 40860a3599..246e9a87aa 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Skirt.png and b/indra/newview/skins/default/textures/icons/Inv_Skirt.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Snapshot.png b/indra/newview/skins/default/textures/icons/Inv_Snapshot.png index 17e710a843..39efd2be1b 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Snapshot.png and b/indra/newview/skins/default/textures/icons/Inv_Snapshot.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Socks.png b/indra/newview/skins/default/textures/icons/Inv_Socks.png index b8169dcb36..30d7d7c239 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Socks.png and b/indra/newview/skins/default/textures/icons/Inv_Socks.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Sound.png b/indra/newview/skins/default/textures/icons/Inv_Sound.png index 1a50dd17da..44c271c868 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Sound.png and b/indra/newview/skins/default/textures/icons/Inv_Sound.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Texture.png b/indra/newview/skins/default/textures/icons/Inv_Texture.png index 2d6d1b54bb..dbc41c5e99 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Texture.png and b/indra/newview/skins/default/textures/icons/Inv_Texture.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Underpants.png b/indra/newview/skins/default/textures/icons/Inv_Underpants.png index 77f56c574f..b1e7c2a55f 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Underpants.png and b/indra/newview/skins/default/textures/icons/Inv_Underpants.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Undershirt.png b/indra/newview/skins/default/textures/icons/Inv_Undershirt.png index 954eab7660..9340dbb975 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Undershirt.png and b/indra/newview/skins/default/textures/icons/Inv_Undershirt.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 01976c9a5c..4d54838225 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -7,7 +7,7 @@ - + @@ -102,6 +102,7 @@ + @@ -123,8 +124,6 @@ - - @@ -151,7 +150,7 @@ - + @@ -229,6 +228,9 @@ + + + @@ -256,6 +258,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -442,6 +480,9 @@ + + + @@ -559,54 +600,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -625,45 +618,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -679,11 +639,6 @@ - - - - - -- cgit v1.2.3 From b7d446a3e9af768b62f321bfba36f36379d5acc0 Mon Sep 17 00:00:00 2001 From: callum Date: Mon, 26 Oct 2009 17:12:35 -0700 Subject: Potential fix for https://jira.lindenlab.com/jira/browse/DEV-41702 and https://jira.lindenlab.com/jira/browse/DEV-38579. Both relate to media not working properly and were likely caused by an uninitialized heartbeat timeout. --- indra/llplugin/llpluginprocessparent.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index f3b4c6bdc6..39f9438fb3 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -55,6 +55,11 @@ LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner) mBoundPort = 0; mState = STATE_UNINITIALIZED; mDisableTimeout = false; + + // initialize timer - heartbeat test (mHeartbeat.hasExpired()) + // can sometimes return true immediately otherwise and plugins + // fail immediately because it looks like + mHeartbeat.setTimerExpirySec(PLUGIN_LOCKED_UP_SECONDS); } LLPluginProcessParent::~LLPluginProcessParent() -- cgit v1.2.3 From 7f25433ccbdfb51e7e71722d4cc91ac0bef65871 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Mon, 26 Oct 2009 17:13:38 -0700 Subject: Volume controls in the media HUD should now work -- this fixes DEV-41746, DEV-41748, and DEV-40782. Added LLPluginClassMedia::getVolume(). Added setVolume/getVolumeupdateVolume methods to LLViewerMediaImpl. LLViewerMedia::setVolume() now no longer overrides the volume settings on all media instances -- it now sets a "global volume" value which is multiplied by all instances' volumes to modulate them. Cleaned up volume/mute handling in LLPanelMediaHUD (made it go through the LLViewerMediaImpl interface instead of directly through LLPluginClassMedia, and removed the mMediaVolume member variable, since the media impl now stores that state). --- indra/llplugin/llpluginclassmedia.cpp | 5 ++++ indra/llplugin/llpluginclassmedia.h | 1 + indra/newview/llviewermedia.cpp | 43 +++++++++++++++++++++++++++++------ indra/newview/llviewermedia.h | 4 ++++ 4 files changed, 46 insertions(+), 7 deletions(-) diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 6556aa33a4..26802bbd1c 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -1129,6 +1129,11 @@ void LLPluginClassMedia::setVolume(float volume) } } +float LLPluginClassMedia::getVolume() +{ + return mRequestedVolume; +} + void LLPluginClassMedia::initializeUrlHistory(const LLSD& url_history) { // Send URL history to plugin diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index 603817b7d0..4f9763474e 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -227,6 +227,7 @@ public: void seek(float time); void setLoop(bool loop); void setVolume(float volume); + float getVolume(); F64 getCurrentTime(void) const { return mCurrentTime; }; F64 getDuration(void) const { return mDuration; }; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 464ba4a5b1..b0f22166a0 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -171,6 +171,7 @@ typedef std::vector impl_list; static impl_list sViewerMediaImplList; static LLTimer sMediaCreateTimer; static const F32 LLVIEWERMEDIA_CREATE_DELAY = 1.0f; +static F32 sGlobalVolume = 1.0f; ////////////////////////////////////////////////////////////////////////////////////////// static void add_media_impl(LLViewerMediaImpl* media) @@ -388,16 +389,27 @@ bool LLViewerMedia::textureHasMedia(const LLUUID& texture_id) // static void LLViewerMedia::setVolume(F32 volume) { - impl_list::iterator iter = sViewerMediaImplList.begin(); - impl_list::iterator end = sViewerMediaImplList.end(); - - for(; iter != end; iter++) + if(volume != sGlobalVolume) { - LLViewerMediaImpl* pimpl = *iter; - pimpl->setVolume(volume); + sGlobalVolume = volume; + impl_list::iterator iter = sViewerMediaImplList.begin(); + impl_list::iterator end = sViewerMediaImplList.end(); + + for(; iter != end; iter++) + { + LLViewerMediaImpl* pimpl = *iter; + pimpl->updateVolume(); + } } } +////////////////////////////////////////////////////////////////////////////////////////// +// static +F32 LLViewerMedia::getVolume() +{ + return sGlobalVolume; +} + // This is the predicate function used to sort sViewerMediaImplList by priority. static inline bool compare_impl_interest(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2) { @@ -592,6 +604,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mDoNavigateOnLoadRediscoverType(false), mDoNavigateOnLoadServerRequest(false), mMediaSourceFailedInit(false), + mRequestedVolume(1.0f), mIsUpdated(false) { @@ -796,6 +809,9 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) media_source->focus(mHasFocus); mMediaSource = media_source; + + updateVolume(); + return true; } @@ -885,13 +901,26 @@ void LLViewerMediaImpl::seek(F32 time) ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::setVolume(F32 volume) +{ + mRequestedVolume = volume; + updateVolume(); +} + +////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::updateVolume() { if(mMediaSource) { - mMediaSource->setVolume(volume); + mMediaSource->setVolume(mRequestedVolume * LLViewerMedia::getVolume()); } } +////////////////////////////////////////////////////////////////////////////////////////// +F32 LLViewerMediaImpl::getVolume() +{ + return mRequestedVolume; +} + ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::focus(bool focus) { diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 01640de33a..79bf3199d4 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -95,6 +95,7 @@ class LLViewerMedia static void toggleMusicPlay(void*); static void toggleMediaPlay(void*); static void mediaStop(void*); + static F32 getVolume(); }; // Implementation functions not exported into header file @@ -130,6 +131,8 @@ public: void start(); void seek(F32 time); void setVolume(F32 volume); + void updateVolume(); + F32 getVolume(); void focus(bool focus); // True if the impl has user focus. bool hasFocus() const; @@ -286,6 +289,7 @@ public: bool mDoNavigateOnLoadRediscoverType; bool mDoNavigateOnLoadServerRequest; bool mMediaSourceFailedInit; + F32 mRequestedVolume; private: -- cgit v1.2.3 From 4767b546e6917ab4b2561553cf617d577fe998ff Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Mon, 26 Oct 2009 17:59:45 -0700 Subject: Fix for DEV-41638 (current URL is not propagated if media changes from website to media). Made the quicktime plugin send navigate_begin and navigate_complete events. This should allow the viewer's logic for sending prim media navigate events to work when loading quicktime media. --- indra/media_plugins/quicktime/media_plugin_quicktime.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp index 7100d03f05..c9ee1c8ac7 100644 --- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp +++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp @@ -79,6 +79,7 @@ private: const int mMinHeight; const int mMaxHeight; F64 mPlayRate; + std::string mNavigateURL; enum ECommand { COMMAND_NONE, @@ -179,6 +180,11 @@ private: setStatus(STATUS_ERROR); return; }; + + mNavigateURL = url; + LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_begin"); + message.setValue("uri", mNavigateURL); + sendMessage(message); // do pre-roll actions (typically fired for streaming movies but not always) PrePrerollMovie( mMovieHandle, 0, getPlayRate(), moviePrePrerollCompleteCallback, ( void * )this ); @@ -389,11 +395,18 @@ private: static void moviePrePrerollCompleteCallback( Movie movie, OSErr preroll_err, void *ref ) { - //MediaPluginQuickTime* self = ( MediaPluginQuickTime* )ref; + MediaPluginQuickTime* self = ( MediaPluginQuickTime* )ref; // TODO: //LLMediaEvent event( self ); //self->mEventEmitter.update( &LLMediaObserver::onMediaPreroll, event ); + + // Send a "navigate complete" event. + LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_complete"); + message.setValue("uri", self->mNavigateURL); + message.setValueS32("result_code", 200); + message.setValue("result_string", "OK"); + self->sendMessage(message); }; -- cgit v1.2.3 From 6c03d32e0d384ab452115151325133e2e35e0ea1 Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Mon, 26 Oct 2009 20:03:39 -0700 Subject: EXT-1548 - Fix for Crash on restart of a region --- indra/newview/llviewerparcelmgr.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 77b023f6dd..aa0987aa7d 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -843,8 +843,11 @@ void LLViewerParcelMgr::renderParcelCollision() if (mRenderCollision && gSavedSettings.getBOOL("ShowBanLines")) { LLViewerRegion* regionp = gAgent.getRegion(); - BOOL use_pass = mCollisionParcel->getParcelFlag(PF_USE_PASS_LIST); - renderCollisionSegments(mCollisionSegments, use_pass, regionp); + if (regionp) + { + BOOL use_pass = mCollisionParcel->getParcelFlag(PF_USE_PASS_LIST); + renderCollisionSegments(mCollisionSegments, use_pass, regionp); + } } } -- cgit v1.2.3 From 4272cc6956b21f77326b0c6bbbbc4be37e7f6fad Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Mon, 26 Oct 2009 22:08:26 -0700 Subject: EXT-5 - Fixed ESC and other shortcuts, again. Moved Shortcuts from Develop menu to Advanced. --- indra/newview/skins/default/xui/en/menu_viewer.xml | 454 +++++++++++---------- 1 file changed, 228 insertions(+), 226 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index e98492feda..a59a8b065f 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1618,6 +1618,234 @@ function="ToggleControl" parameter="MouseSmooth" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Date: Mon, 26 Oct 2009 23:41:18 -0700 Subject: Fixed a crash on exit in gInventory destructor. --- indra/newview/llappviewer.cpp | 4 +++- indra/newview/llinventorymodel.cpp | 11 +++++++++-- indra/newview/llinventorymodel.h | 4 +++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 923a66ee8e..840fa542bd 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1350,7 +1350,9 @@ bool LLAppViewer::cleanup() // Destroy the UI if( gViewerWindow) gViewerWindow->shutdownViews(); - + + gInventory.cleanupInventory(); + // Clean up selection managers after UI is destroyed, as UI may be observing them. // Clean up before GL is shut down because we might be holding on to objects with texture references LLSelectMgr::cleanupGlobals(); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index d5a527773c..e49be83fbc 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -175,13 +175,20 @@ LLInventoryModel::LLInventoryModel() // Destroys the object LLInventoryModel::~LLInventoryModel() +{ + cleanupInventory(); +} + +void LLInventoryModel::cleanupInventory() { empty(); for (observer_list_t::iterator iter = mObservers.begin(); - iter != mObservers.end(); ++iter) + iter != mObservers.end(); ) { - delete *iter; + LLInventoryObserver* observer = *iter++; + delete observer; } + mObservers.clear(); } // This is a convenience function to check if one object has a parent diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 7d4f3372e9..d51460b374 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -112,7 +112,9 @@ public: // construction & destruction LLInventoryModel(); ~LLInventoryModel(); - + + void cleanupInventory(); + class fetchInventoryResponder : public LLHTTPClient::Responder { public: -- cgit v1.2.3 From 830fa3ebccebea67758b299c5f490d57705bf8c3 Mon Sep 17 00:00:00 2001 From: angela Date: Tue, 27 Oct 2009 18:06:43 +0800 Subject: disable media title to make it read only at all time --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llfloatertools.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3682d48577..718efa9dcb 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -76,7 +76,7 @@ Type Boolean Value - 1 + 0 AnimateTextures diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 92980c22c7..3bec6f9e73 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -1141,7 +1141,7 @@ void LLFloaterTools::getMediaState() childSetEnabled( "edit_media", bool_has_media & editable ); childSetEnabled( "delete_media", bool_has_media & editable ); childSetEnabled( "add_media", ( ! bool_has_media ) & editable ); - media_info->setEnabled(bool_has_media & editable); + media_info->setEnabled(false); // TODO: display a list of all media on the face - use 'identical' flag } else // not all face has media but at least one does. @@ -1165,7 +1165,7 @@ void LLFloaterTools::getMediaState() } - media_info->setEnabled(TRUE); + media_info->setEnabled(false); media_info->setTentative(true); childSetEnabled("media_tex", TRUE); childSetEnabled( "edit_media", TRUE); -- cgit v1.2.3 From 13184abdc3b7ed1801dc7e0b82b2b618c080047f Mon Sep 17 00:00:00 2001 From: angela Date: Tue, 27 Oct 2009 18:32:55 +0800 Subject: EXT-760 Move Tap tap hold to run to Preferences > Advanced , and make the default to false --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llappviewer.cpp | 3 --- indra/newview/llappviewer.h | 2 -- indra/newview/llviewerkeyboard.cpp | 2 +- indra/newview/llviewermenu.cpp | 30 ------------------------------ 5 files changed, 2 insertions(+), 37 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 718efa9dcb..3682d48577 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -76,7 +76,7 @@ Type Boolean Value - 0 + 1 AnimateTextures diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 840fa542bd..4610437f08 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -227,7 +227,6 @@ const F32 DEFAULT_AFK_TIMEOUT = 5.f * 60.f; // time with no input before user fl F32 gSimLastTime; // Used in LLAppViewer::init and send_stats() F32 gSimFrames; -BOOL gAllowTapTapHoldRun = TRUE; BOOL gShowObjectUpdates = FALSE; BOOL gUseQuickTime = TRUE; @@ -421,7 +420,6 @@ static void settings_to_globals() gAgent.setHideGroupTitle(gSavedSettings.getBOOL("RenderHideGroupTitle")); gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc"); - gAllowTapTapHoldRun = gSavedSettings.getBOOL("AllowTapTapHoldRun"); gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates"); gMapScale = gSavedSettings.getF32("MapScale"); @@ -2402,7 +2400,6 @@ void LLAppViewer::cleanupSavedSettings() gSavedSettings.setBOOL("DebugWindowProc", gDebugWindowProc); - gSavedSettings.setBOOL("AllowTapTapHoldRun", gAllowTapTapHoldRun); gSavedSettings.setBOOL("ShowObjectUpdates", gShowObjectUpdates); if (!gNoRender) diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index f95d7cb412..d970aa6ae1 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -282,8 +282,6 @@ const S32 AGENT_UPDATES_PER_SECOND = 10; // "// llstartup" indicates that llstartup is the only client for this global. extern LLSD gDebugInfo; - -extern BOOL gAllowTapTapHoldRun; extern BOOL gShowObjectUpdates; typedef enum diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index 2dc317e067..8fd646ee93 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -99,7 +99,7 @@ static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode m gAgent.sendWalkRun(gAgent.getRunning()); } } - else if (gAllowTapTapHoldRun && + else if (gSavedSettings.getBOOL("AllowTapTapHoldRun") && KEYSTATE_DOWN == s && !gAgent.getRunning()) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a1c15d9d0f..058f44ef57 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1678,34 +1678,6 @@ class LLAdvancedTogglePG : public view_listener_t }; - -//////////////////////////// -// ALLOW TAP-TAP-HOLD RUN // -//////////////////////////// - - -class LLAdvancedToggleAllowTapTapHoldRun : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - gAllowTapTapHoldRun = !(gAllowTapTapHoldRun); - return true; - } -}; - -class LLAdvancedCheckAllowTapTapHoldRun : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - bool new_value = gAllowTapTapHoldRun; - return new_value; - } -}; - - - - - class LLAdvancedForceParamsToDefault : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -7966,8 +7938,6 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedTogglePG(), "Advanced.TogglePG"); // Advanced > Character (toplevel) - view_listener_t::addMenu(new LLAdvancedToggleAllowTapTapHoldRun(), "Advanced.ToggleAllowTapTapHoldRun"); - view_listener_t::addMenu(new LLAdvancedCheckAllowTapTapHoldRun(), "Advanced.CheckAllowTapTapHoldRun"); view_listener_t::addMenu(new LLAdvancedForceParamsToDefault(), "Advanced.ForceParamsToDefault"); view_listener_t::addMenu(new LLAdvancedReloadVertexShader(), "Advanced.ReloadVertexShader"); view_listener_t::addMenu(new LLAdvancedToggleAnimationInfo(), "Advanced.ToggleAnimationInfo"); -- cgit v1.2.3 From d4c3bf46ed6718ed1fa219d56436548edc6a2fa7 Mon Sep 17 00:00:00 2001 From: Lis Pardi Date: Tue, 27 Oct 2009 14:02:13 -0400 Subject: ext-1917 rename floater_preview_gestures_backup to floater_preview_gestures --- .../default/xui/en/floater_preview_gesture.xml | 340 ++++++++++++++++----- 1 file changed, 265 insertions(+), 75 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml index a523f40bb8..11c4e5d8fb 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml @@ -1,7 +1,7 @@ - Name (not working yet): + Description: - Description: + Trigger: + + Replace with: + + + + Shortcut Key: + + + + + Library: + + + + + + + +