summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmediasettingssecurity.cpp
diff options
context:
space:
mode:
authorJiao Li <angela@lindenlab.com>2009-10-07 08:18:51 +0000
committerJiao Li <angela@lindenlab.com>2009-10-07 08:18:51 +0000
commita99449bea167ba4710d7cc32a3961d0499bf6e09 (patch)
tree968440270dfe97d6113e57a8c5ccef308966493b /indra/newview/llpanelmediasettingssecurity.cpp
parent9f2f620cdfd722f9bc46dc378072f490001529e2 (diff)
DEV-40215, DEV-40829,DEV-40374 ,DEV-40197, DEV-40749, DEV-3877 -- reviewed by rick
Diffstat (limited to 'indra/newview/llpanelmediasettingssecurity.cpp')
-rw-r--r--indra/newview/llpanelmediasettingssecurity.cpp30
1 files changed, 26 insertions, 4 deletions
diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp
index a4eee82aa9..cea105d7de 100644
--- a/indra/newview/llpanelmediasettingssecurity.cpp
+++ b/indra/newview/llpanelmediasettingssecurity.cpp
@@ -44,7 +44,7 @@
#include "llselectmgr.h"
#include "llmediaentry.h"
#include "llfloaterwhitelistentry.h"
-
+#include "llfloatermediasettings.h"
////////////////////////////////////////////////////////////////////////////////
//
LLPanelMediaSettingsSecurity::LLPanelMediaSettingsSecurity()
@@ -110,10 +110,30 @@ void LLPanelMediaSettingsSecurity::draw()
////////////////////////////////////////////////////////////////////////////////
// static
-void LLPanelMediaSettingsSecurity::initValues( void* userdata, const LLSD& media_settings )
+void LLPanelMediaSettingsSecurity::initValues( void* userdata, const LLSD& media_settings , bool editable)
{
LLPanelMediaSettingsSecurity *self =(LLPanelMediaSettingsSecurity *)userdata;
+ if ( LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo )
+ {
+ if(LLFloaterMediaSettings::getInstance()->mMultipleMedia)
+ {
+ self->clearValues(self, editable);
+ // only show multiple
+ return;
+ }
+
+ }
+ else
+ {
+ if(LLFloaterMediaSettings::getInstance()->mMultipleValidMedia)
+ {
+ self->clearValues(self, editable);
+ // only show multiple
+ return;
+ }
+
+ }
std::string base_key( "" );
std::string tentative_key( "" );
@@ -163,7 +183,7 @@ void LLPanelMediaSettingsSecurity::initValues( void* userdata, const LLSD& media
++iter;
};
};
-
+ data_set[ i ].ctrl_ptr->setEnabled(editable);
data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() );
};
};
@@ -171,11 +191,13 @@ void LLPanelMediaSettingsSecurity::initValues( void* userdata, const LLSD& media
////////////////////////////////////////////////////////////////////////////////
// static
-void LLPanelMediaSettingsSecurity::clearValues( void* userdata )
+void LLPanelMediaSettingsSecurity::clearValues( void* userdata , bool editable)
{
LLPanelMediaSettingsSecurity *self =(LLPanelMediaSettingsSecurity *)userdata;
self->mEnableWhiteList->clear();
self->mWhiteListList->deleteAllItems();
+ self->mEnableWhiteList->setEnabled(editable);
+ self->mWhiteListList->setEnabled(editable);
}
////////////////////////////////////////////////////////////////////////////////
// static