aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewermenu.cpp54
1 files changed, 15 insertions, 39 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 0146f9e..ba24c16 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -2307,56 +2307,32 @@ class LLObjectEnableExport : public view_listener_t
2307{ 2307{
2308 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 2308 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
2309 { 2309 {
2310 LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); 2310 LLControlVariable* control =
2311 bool new_value = (object != NULL); 2311 gMenuHolder->findControl(userdata["control"].asString());
2312 if (new_value) 2312
2313 { 2313 LLViewerObject* object =
2314 LLVOAvatar* avatar = find_avatar_from_object(object); 2314 LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
2315 new_value = (avatar == NULL); 2315
2316 } 2316 if((object != NULL) &&
2317 if(new_value) 2317 (find_avatar_from_object(object) == NULL))
2318 { 2318 {
2319
2320 struct ff : public LLSelectedNodeFunctor 2319 struct ff : public LLSelectedNodeFunctor
2321 { 2320 {
2322 ff(const LLSD& data) : LLSelectedNodeFunctor()
2323 ,userdata(data)
2324 {
2325
2326 }
2327 const LLSD& userdata;
2328 virtual bool apply(LLSelectNode* node) 2321 virtual bool apply(LLSelectNode* node)
2329 { 2322 {
2330 if(gAgent.getID()!=node->mPermissions->getCreator()) 2323 return primbackup::check_perms( node );
2331 {
2332 return false;
2333 }
2334 return true;
2335 } 2324 }
2336 }; 2325 } func;
2337 2326
2338#ifdef LL_GRID_PERMISSIONS 2327 if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(&func,false))
2339
2340 ff * the_ff=new ff(userdata);
2341 if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(the_ff,false))
2342 {
2343 gMenuHolder->findControl(userdata["control"].asString())->setValue(true);
2344 }
2345 else
2346 { 2328 {
2347 gMenuHolder->findControl(userdata["control"].asString())->setValue(false); 2329 control->setValue(true);
2330 return true;
2348 } 2331 }
2349 return true;
2350 } 2332 }
2351 2333
2352 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 2334 control->setValue(false);
2353 return true;
2354#else
2355 }
2356 gMenuHolder->findControl(userdata["control"].asString())->setValue(true);
2357 return true; 2335 return true;
2358#endif
2359
2360 } 2336 }
2361}; 2337};
2362 2338