diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llpanelcontents.cpp | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2 meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz |
Second Life viewer sources 1.23.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanelcontents.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/linden/indra/newview/llpanelcontents.cpp b/linden/indra/newview/llpanelcontents.cpp index d91790e..a2f3d9e 100644 --- a/linden/indra/newview/llpanelcontents.cpp +++ b/linden/indra/newview/llpanelcontents.cpp | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -52,6 +53,7 @@ | |||
52 | #include "lltextbox.h" | 53 | #include "lltextbox.h" |
53 | #include "llbutton.h" | 54 | #include "llbutton.h" |
54 | #include "llcombobox.h" | 55 | #include "llcombobox.h" |
56 | #include "llfloaterbulkpermission.h" | ||
55 | 57 | ||
56 | #include "llagent.h" | 58 | #include "llagent.h" |
57 | #include "llviewerwindow.h" | 59 | #include "llviewerwindow.h" |
@@ -82,6 +84,7 @@ BOOL LLPanelContents::postBuild() | |||
82 | setMouseOpaque(FALSE); | 84 | setMouseOpaque(FALSE); |
83 | 85 | ||
84 | childSetAction("button new script",&LLPanelContents::onClickNewScript, this); | 86 | childSetAction("button new script",&LLPanelContents::onClickNewScript, this); |
87 | childSetAction("button permissions",&LLPanelContents::onClickPermissions, this); | ||
85 | 88 | ||
86 | return TRUE; | 89 | return TRUE; |
87 | } | 90 | } |
@@ -104,7 +107,6 @@ void LLPanelContents::getState(LLViewerObject *objectp ) | |||
104 | if( !objectp ) | 107 | if( !objectp ) |
105 | { | 108 | { |
106 | childSetEnabled("button new script",FALSE); | 109 | childSetEnabled("button new script",FALSE); |
107 | //mBtnNewScript->setEnabled( FALSE ); | ||
108 | return; | 110 | return; |
109 | } | 111 | } |
110 | 112 | ||
@@ -117,21 +119,12 @@ void LLPanelContents::getState(LLViewerObject *objectp ) | |||
117 | && ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488 | 119 | && ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488 |
118 | BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); | 120 | BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); |
119 | 121 | ||
120 | // Edit script button - ok if object is editable and there's an | 122 | // Edit script button - ok if object is editable and there's an unambiguous destination for the object. |
121 | // unambiguous destination for the object. | 123 | childSetEnabled("button new script", |
122 | if( editable && | 124 | editable && |
123 | all_volume && | 125 | all_volume && |
124 | ((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1) | 126 | ((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1) |
125 | || (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1))) | 127 | || (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1))); |
126 | { | ||
127 | //mBtnNewScript->setEnabled(TRUE); | ||
128 | childSetEnabled("button new script",TRUE); | ||
129 | } | ||
130 | else | ||
131 | { | ||
132 | //mBtnNewScript->setEnabled(FALSE); | ||
133 | childSetEnabled("button new script",FALSE); | ||
134 | } | ||
135 | } | 128 | } |
136 | 129 | ||
137 | 130 | ||
@@ -210,3 +203,11 @@ void LLPanelContents::onClickNewScript(void *userdata) | |||
210 | #endif | 203 | #endif |
211 | } | 204 | } |
212 | } | 205 | } |
206 | |||
207 | |||
208 | // static | ||
209 | void LLPanelContents::onClickPermissions(void *userdata) | ||
210 | { | ||
211 | LLPanelContents* self = (LLPanelContents*)userdata; | ||
212 | gFloaterView->getParentFloater(self)->addDependentFloater(LLFloaterBulkPermission::showInstance()); | ||
213 | } | ||