From 52ab75d1e59241d00a99618d8ce8f447b09de29d Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 16 Dec 2009 10:05:25 -0800 Subject: Undo previous change to this file. --- indra/newview/skins/default/xui/en/panel_prim_media_controls.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index bffb28d16e..03528c578c 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -9,7 +9,7 @@ width="800"> Inspector_Background 0.2 - 300 + 400 120 1.0 1.25 -- cgit v1.2.3 From aee5dc617242a1cb9d800b6d546798efdca7cd87 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 16 Dec 2009 11:16:41 -0800 Subject: Enable OK button in media settings panel even if nothing is changed, but have it be a no-op Review #63 This change addresses an issue where the OK button was greyed out even if nothing was different (changed) in the medias settings floater. This originally was implemented so that no "empty media" data would accidentally get added to the object. But that was confusing (the OK button should never be greyed out). This changes it so that apply() will simply be a no-op if the data has not changed, and now the OK button is always enabled. --- indra/newview/llfloatermediasettings.cpp | 59 ++++++++++++++++---------------- indra/newview/llfloatermediasettings.h | 2 +- 2 files changed, 30 insertions(+), 31 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index 16a76723eb..5cfd56193e 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -145,18 +145,21 @@ LLFloaterMediaSettings* LLFloaterMediaSettings::getInstance() //static void LLFloaterMediaSettings::apply() { - LLSD settings; - sInstance->mPanelMediaSettingsGeneral->preApply(); - sInstance->mPanelMediaSettingsGeneral->getValues( settings ); - sInstance->mPanelMediaSettingsSecurity->preApply(); - sInstance->mPanelMediaSettingsSecurity->getValues( settings ); - sInstance->mPanelMediaSettingsPermissions->preApply(); - sInstance->mPanelMediaSettingsPermissions->getValues( settings ); - LLSelectMgr::getInstance()->selectionSetMedia( LLTextureEntry::MF_HAS_MEDIA ); - LLSelectMgr::getInstance()->selectionSetMediaData(settings); - sInstance->mPanelMediaSettingsGeneral->postApply(); - sInstance->mPanelMediaSettingsSecurity->postApply(); - sInstance->mPanelMediaSettingsPermissions->postApply(); + if (sInstance->haveValuesChanged()) + { + LLSD settings; + sInstance->mPanelMediaSettingsGeneral->preApply(); + sInstance->mPanelMediaSettingsGeneral->getValues( settings ); + sInstance->mPanelMediaSettingsSecurity->preApply(); + sInstance->mPanelMediaSettingsSecurity->getValues( settings ); + sInstance->mPanelMediaSettingsPermissions->preApply(); + sInstance->mPanelMediaSettingsPermissions->getValues( settings ); + LLSelectMgr::getInstance()->selectionSetMedia( LLTextureEntry::MF_HAS_MEDIA ); + LLSelectMgr::getInstance()->selectionSetMediaData(settings); + sInstance->mPanelMediaSettingsGeneral->postApply(); + sInstance->mPanelMediaSettingsSecurity->postApply(); + sInstance->mPanelMediaSettingsPermissions->postApply(); + } } //////////////////////////////////////////////////////////////////////////////// @@ -249,15 +252,6 @@ void LLFloaterMediaSettings::onTabChanged(void* user_data, bool from_click) LLTabContainer* self = (LLTabContainer*)user_data; gSavedSettings.setS32("LastMediaSettingsTab", self->getCurrentPanelIndex()); } - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterMediaSettings::enableOkApplyBtns( bool enable ) -{ - childSetEnabled( "OK", enable ); - childSetEnabled( "Apply", enable ); -} - //////////////////////////////////////////////////////////////////////////////// // const std::string LLFloaterMediaSettings::getHomeUrl() @@ -272,17 +266,25 @@ const std::string LLFloaterMediaSettings::getHomeUrl() // virtual void LLFloaterMediaSettings::draw() { + // Set the enabled state of the "Apply" button if values changed + childSetEnabled( "Apply", haveValuesChanged() ); + + LLFloater::draw(); +} + + +//private +bool LLFloaterMediaSettings::haveValuesChanged() const +{ + bool values_changed = false; // *NOTE: The code below is very inefficient. Better to do this // only when data change. // Every frame, check to see what the values are. If they are not - // the same as the default media data, enable the OK/Apply buttons + // the same as the initial media data, enable the OK/Apply buttons LLSD settings; sInstance->mPanelMediaSettingsGeneral->getValues( settings ); sInstance->mPanelMediaSettingsSecurity->getValues( settings ); - sInstance->mPanelMediaSettingsPermissions->getValues( settings ); - - bool values_changed = false; - + sInstance->mPanelMediaSettingsPermissions->getValues( settings ); LLSD::map_const_iterator iter = settings.beginMap(); LLSD::map_const_iterator end = settings.endMap(); for ( ; iter != end; ++iter ) @@ -295,9 +297,6 @@ void LLFloaterMediaSettings::draw() break; } } - - enableOkApplyBtns(values_changed); - - LLFloater::draw(); + return values_changed; } diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h index b72e3d855d..cdfd5aa8ae 100644 --- a/indra/newview/llfloatermediasettings.h +++ b/indra/newview/llfloatermediasettings.h @@ -85,7 +85,7 @@ protected: private: - void enableOkApplyBtns( bool enable ); + bool haveValuesChanged() const; LLSD mInitialValues; bool mWaitingToClose; -- cgit v1.2.3 From 4027788dfcbc7414d3d3cae5ef274906ad30f83d Mon Sep 17 00:00:00 2001 From: callum Date: Wed, 16 Dec 2009 11:47:57 -0800 Subject: Tweaks to XUI to make sure long urls are clipped in various dialogs. --- indra/newview/skins/default/xui/en/floater_tools.xml | 1 + indra/newview/skins/default/xui/en/inspect_object.xml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 5e68850e30..f2a5d902e7 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2676,6 +2676,7 @@ even though the user gets a free copy. height="18" layout="topleft" left="10" + use_ellipsis="true" read_only="true" name="media_info" width="180" /> diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml index cedf83f8b1..00e00b9694 100644 --- a/indra/newview/skins/default/xui/en/inspect_object.xml +++ b/indra/newview/skins/default/xui/en/inspect_object.xml @@ -92,8 +92,8 @@ This is a really long description for an object being as how it is at least 80 c height="13" left_delta="0" name="object_media_url" - top_pad="-1" - width="291" + bottom_pad="2" + width="200" max_length = "50" use_ellipses="true"> http://www.superdupertest.com -- cgit v1.2.3 From 0d0e0852445444b9a129baf20f68d81488a1fa5e Mon Sep 17 00:00:00 2001 From: Samuel Kolb Date: Wed, 16 Dec 2009 13:55:14 -0800 Subject: fixed indenting issue with viewer_manifest.py --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 59b674b1b8..db2100b6bb 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -363,7 +363,7 @@ class WindowsManifest(ViewerManifest): self.path("qtnetwork4.dll") self.path("qtopengl4.dll") self.path("qtwebkit4.dll") - self.path("qtxmlpatterns4.dll") + self.path("qtxmlpatterns4.dll") self.path("ssleay32.dll") # For WebKit/Qt plugin runtimes (image format plugins) -- cgit v1.2.3 From 828694987cce58b88143e3a2c5bd55a10e6afc24 Mon Sep 17 00:00:00 2001 From: callum Date: Wed, 16 Dec 2009 14:33:23 -0800 Subject: Simple fix for DEV-44111 ( whitelist appears disabled if first whitelist entry fails) --- indra/newview/llfloaterwhitelistentry.cpp | 1 + indra/newview/llpanelmediasettingssecurity.cpp | 5 +---- indra/newview/llpanelmediasettingssecurity.h | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterwhitelistentry.cpp b/indra/newview/llfloaterwhitelistentry.cpp index 04dbd38153..705c8afd00 100644 --- a/indra/newview/llfloaterwhitelistentry.cpp +++ b/indra/newview/llfloaterwhitelistentry.cpp @@ -82,6 +82,7 @@ void LLFloaterWhiteListEntry::onBtnOK( void* userdata ) std::string white_list_item = self->mWhiteListEdit->getText(); panel->addWhiteListEntry( white_list_item ); + panel->updateWhitelistEnableStatus(); }; self->closeFloater(); diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp index aea6b0aa3b..81842e3851 100644 --- a/indra/newview/llpanelmediasettingssecurity.cpp +++ b/indra/newview/llpanelmediasettingssecurity.cpp @@ -323,7 +323,7 @@ void LLPanelMediaSettingsSecurity::addWhiteListEntry( const std::string& entry ) else { row[ "columns" ][ ICON_COLUMN ][ "type" ] = "icon"; - row[ "columns" ][ ICON_COLUMN ][ "value" ] = "parcel_color_EXP"; + row[ "columns" ][ ICON_COLUMN ][ "value" ] = "Parcel_Exp_Color"; row[ "columns" ][ ICON_COLUMN ][ "width" ] = 20; }; @@ -333,9 +333,6 @@ void LLPanelMediaSettingsSecurity::addWhiteListEntry( const std::string& entry ) // add to the white list scroll box mWhiteListList->addElement( row ); - - // update whitelist enable checkbox based on whether the home url passes the whitelist - updateWhitelistEnableStatus(); }; /////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelmediasettingssecurity.h b/indra/newview/llpanelmediasettingssecurity.h index 937bfb1bf9..66ccb23f46 100644 --- a/indra/newview/llpanelmediasettingssecurity.h +++ b/indra/newview/llpanelmediasettingssecurity.h @@ -63,7 +63,9 @@ public: void setParent( LLFloaterMediaSettings* parent ); bool urlPassesWhiteList( const std::string& test_url ); const std::string makeValidUrl( const std::string& src_url ); - + + void updateWhitelistEnableStatus(); + protected: LLFloaterMediaSettings* mParent; @@ -78,8 +80,6 @@ private: LLScrollListCtrl* mWhiteListList; LLTextBox* mHomeUrlFailsWhiteListText; - void updateWhitelistEnableStatus(); - static void onBtnAdd(void*); static void onBtnDel(void*); }; -- cgit v1.2.3 From a9948da80ade03523eaab1c46340313b57ee7eb6 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 16 Dec 2009 14:39:06 -0800 Subject: DEV-41904: Have F1 key bring up context-sensitive help for media controls Review #65 Adds help topic to media controls panel, and add handling F1 key to media focus --- indra/newview/llviewermediafocus.cpp | 12 +++++++++++- .../skins/default/xui/en/panel_prim_media_controls.xml | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index e04a54fbd6..a0ac9c2091 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -51,6 +51,7 @@ #include "llkeyboard.h" #include "lltoolmgr.h" #include "llvovolume.h" +#include "llhelp.h" // // LLViewerMediaFocus @@ -302,7 +303,7 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent) { media_impl->handleKeyHere(key, mask); - if (key == KEY_ESCAPE) + if (KEY_ESCAPE == key) { // Reset camera zoom in this case. if(mFocusedImplID.notNull()) @@ -315,6 +316,15 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent) clearFocus(); } + + if ( KEY_F1 == key && LLUI::sHelpImpl && mMediaControls.get()) + { + std::string help_topic; + if (mMediaControls.get()->findHelpTopic(help_topic)) + { + LLUI::sHelpImpl->showTopic(help_topic); + } + } } return true; diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index 03528c578c..3fdfc5f672 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -5,6 +5,7 @@ background_visible="false" height="200" layout="topleft" + help_topic="prim_media_controls" mouse_opaque="false" width="800"> Inspector_Background -- cgit v1.2.3 From e1b712a3a63e9103992b7a999a2bc94111f0401f Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 16 Dec 2009 15:03:21 -0800 Subject: DEV-42827: auto-hide media controls volume slider if neither it nor mute button has the mouse over it Review #66 fade-out was going to be harder, but just making it visible/invisible turned out to be pretty easy --- indra/newview/llpanelprimmediacontrols.cpp | 17 ++++++++++++----- indra/newview/llpanelprimmediacontrols.h | 3 ++- .../skins/default/xui/en/panel_prim_media_controls.xml | 6 ++++++ 3 files changed, 20 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 7b2ac38568..5cc9c1951b 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -96,7 +96,7 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() : mTargetObjectNormal(LLVector3::zero), mZoomObjectID(LLUUID::null), mZoomObjectFace(0), - mVolumeSliderVisible(false) + mVolumeSliderVisible(0) { mCommitCallbackRegistrar.add("MediaCtrl.Close", boost::bind(&LLPanelPrimMediaControls::onClickClose, this)); mCommitCallbackRegistrar.add("MediaCtrl.Back", boost::bind(&LLPanelPrimMediaControls::onClickBack, this)); @@ -116,6 +116,7 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() : mCommitCallbackRegistrar.add("MediaCtrl.Volume", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeSlider, this)); mCommitCallbackRegistrar.add("MediaCtrl.ToggleMute", boost::bind(&LLPanelPrimMediaControls::onToggleMute, this)); mCommitCallbackRegistrar.add("MediaCtrl.ShowVolumeSlider", boost::bind(&LLPanelPrimMediaControls::showVolumeSlider, this)); + mCommitCallbackRegistrar.add("MediaCtrl.HideVolumeSlider", boost::bind(&LLPanelPrimMediaControls::hideVolumeSlider, this)); mCommitCallbackRegistrar.add("MediaCtrl.SkipBack", boost::bind(&LLPanelPrimMediaControls::onClickSkipBack, this)); mCommitCallbackRegistrar.add("MediaCtrl.SkipForward", boost::bind(&LLPanelPrimMediaControls::onClickSkipForward, this)); @@ -372,8 +373,8 @@ void LLPanelPrimMediaControls::updateShape() mVolumeUpCtrl->setVisible(has_focus); mVolumeDownCtrl->setVisible(has_focus); mVolumeCtrl->setEnabled(has_focus); - mVolumeSliderCtrl->setEnabled(has_focus && mVolumeSliderVisible); - mVolumeSliderCtrl->setVisible(has_focus && mVolumeSliderVisible); + mVolumeSliderCtrl->setEnabled(has_focus && mVolumeSliderVisible > 0); + mVolumeSliderCtrl->setVisible(has_focus && mVolumeSliderVisible > 0); mWhitelistIcon->setVisible(false); mSecureLockIcon->setVisible(false); @@ -714,7 +715,7 @@ void LLPanelPrimMediaControls::draw() setVisible(FALSE); mClearFaceOnFade = false; - mVolumeSliderVisible = false; + mVolumeSliderVisible = 0; mTargetImplID = LLUUID::null; mTargetObjectID = LLUUID::null; mTargetObjectFace = 0; @@ -1267,5 +1268,11 @@ void LLPanelPrimMediaControls::onToggleMute() void LLPanelPrimMediaControls::showVolumeSlider() { - mVolumeSliderVisible = true; + mVolumeSliderVisible++; +} + + +void LLPanelPrimMediaControls::hideVolumeSlider() +{ + mVolumeSliderVisible--; } diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index 17e65b8b0c..d899ee4473 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -110,6 +110,7 @@ private: void onCommitVolumeSlider(); void onToggleMute(); void showVolumeSlider(); + void hideVolumeSlider(); static void onScrollUp(void* user_data); static void onScrollUpHeld(void* user_data); @@ -204,7 +205,7 @@ private: LLUUID mZoomObjectID; S32 mZoomObjectFace; - bool mVolumeSliderVisible; + S32 mVolumeSliderVisible; }; #endif // LL_PANELPRIMMEDIACONTROLS_H diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index 3fdfc5f672..b14089c3a2 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -399,6 +399,8 @@ function="MediaCtrl.ToggleMute" /> + + + Date: Wed, 16 Dec 2009 15:41:08 -0800 Subject: Dial down logging in mediadataclient --- indra/newview/llmediadataclient.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 91064eea6b..2bb2a3da6f 100755 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -224,7 +224,7 @@ bool LLMediaDataClient::processQueueTimer() if(!isEmpty()) { - LL_INFOS("LLMediaDataClient") << "QueueTimer::tick() started, SORTED queue size is: " << mSortedQueue.size() + LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, SORTED queue size is: " << mSortedQueue.size() << ", RR queue size is: " << mRoundRobinQueue.size() << LL_ENDL; LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, SORTED queue is: " << mSortedQueue << LL_ENDL; LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, RR queue is: " << mRoundRobinQueue << LL_ENDL; @@ -262,7 +262,7 @@ void LLMediaDataClient::sortQueue() if (size > mMaxSortedQueueSize) { U32 num_to_cull = (size - mMaxSortedQueueSize); - LL_INFOS("LLMediaDataClient") << "sorted queue MAXED OUT! Culling " + LL_INFOS_ONCE("LLMediaDataClient") << "sorted queue MAXED OUT! Culling " << num_to_cull << " items" << LL_ENDL; while (num_to_cull-- > 0) { @@ -309,7 +309,7 @@ void LLMediaDataClient::serviceQueue() { if (request.isNull()) { - LL_INFOS("LLMediaDataClient") << "Skipping NULL request" << LL_ENDL; + LL_WARNS("LLMediaDataClient") << "Skipping NULL request" << LL_ENDL; } else { LL_INFOS("LLMediaDataClient") << "Skipping : " << *request << " " @@ -636,8 +636,8 @@ void LLMediaDataClient::Responder::error(U32 status, const std::string& reason) new RetryTimer(F32(retry_timeout/*secs*/), this); } else { - LL_INFOS("LLMediaDataClient") << *mRequest << " got SERVICE_UNAVAILABLE...retry count " << - mRequest->getRetryCount() << " exceeds " << mRequest->getMaxNumRetries() << ", not retrying" << LL_ENDL; + LL_INFOS("LLMediaDataClient") << *mRequest << " got SERVICE_UNAVAILABLE...retry count " + << mRequest->getRetryCount() << " exceeds " << mRequest->getMaxNumRetries() << ", not retrying" << LL_ENDL; } } else { -- cgit v1.2.3