summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelcontents.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelcontents.cpp')
-rw-r--r--indra/newview/llpanelcontents.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index e9fb9d3a17..7fdd052af5 100644
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -52,6 +52,7 @@
#include "lltextbox.h"
#include "llbutton.h"
#include "llcombobox.h"
+#include "llfloaterbulkpermission.h"
#include "llagent.h"
#include "llviewerwindow.h"
@@ -82,6 +83,7 @@ BOOL LLPanelContents::postBuild()
setMouseOpaque(FALSE);
childSetAction("button new script",&LLPanelContents::onClickNewScript, this);
+ childSetAction("button permissions",&LLPanelContents::onClickPermissions, this);
return TRUE;
}
@@ -104,7 +106,6 @@ void LLPanelContents::getState(LLViewerObject *objectp )
if( !objectp )
{
childSetEnabled("button new script",FALSE);
- //mBtnNewScript->setEnabled( FALSE );
return;
}
@@ -117,21 +118,12 @@ void LLPanelContents::getState(LLViewerObject *objectp )
&& ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488
BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
- // Edit script button - ok if object is editable and there's an
- // unambiguous destination for the object.
- if( editable &&
+ // Edit script button - ok if object is editable and there's an unambiguous destination for the object.
+ childSetEnabled("button new script",
+ editable &&
all_volume &&
((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1)
- || (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)))
- {
- //mBtnNewScript->setEnabled(TRUE);
- childSetEnabled("button new script",TRUE);
- }
- else
- {
- //mBtnNewScript->setEnabled(FALSE);
- childSetEnabled("button new script",FALSE);
- }
+ || (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)));
}
@@ -210,3 +202,11 @@ void LLPanelContents::onClickNewScript(void *userdata)
#endif
}
}
+
+
+// static
+void LLPanelContents::onClickPermissions(void *userdata)
+{
+ LLPanelContents* self = (LLPanelContents*)userdata;
+ gFloaterView->getParentFloater(self)->addDependentFloater(LLFloaterBulkPermission::showInstance());
+}