From 65215a59afe7b5292944b1b37fb2157ae4ff1687 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 27 Sep 2009 15:54:39 -0500 Subject: Re-enabled "allow first life" userauth stuff. It was commented out when grid manager was added, but it makes certain Profile window pieces disappear. --- ChangeLog.txt | 9 +++++++++ linden/indra/newview/llstartup.cpp | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index df161e6..c9fc8a9 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,12 @@ +2009-09-27 Jacek Antonelli + + * Re-enabled "allow first life" userauth stuff. + It was commented out when grid manager was added, but it + makes certain Profile window pieces disappear. + + modified: linden/indra/newview/llstartup.cpp + + 2009-09-26 Jacek Antonelli * Renamed 'Restrained Life Active' to 'Restrained Life Support'. diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 9b46054..6839a4f 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -2130,7 +2130,6 @@ bool idle_startup() LLAvatarTracker::instance().addBuddyList(list); } - /* options.clear(); if(LLUserAuth::getInstance()->getOptions("ui-config", options)) { @@ -2149,7 +2148,7 @@ bool idle_startup() } } } - */ + options.clear(); bool show_hud = false; if(LLUserAuth::getInstance()->getOptions("tutorial_setting", options)) -- cgit v1.1 From 39131fb9b91feaa12fe0f76328d6e2f24fdf5365 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 27 Sep 2009 16:35:48 -0500 Subject: Updated Imprudence version to "1.2.0 beta". --- ChangeLog.txt | 5 +++++ linden/indra/llcommon/llversionviewer.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 518db1e..1f27515 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,10 @@ 2009-09-27 Jacek Antonelli + * Updated Imprudence version to "1.2.0 beta". + + linden/indra/llcommon/llversionviewer.h + + * Re-enabled "allow first life" userauth stuff. It was commented out when grid manager was added, but it makes certain Profile window pieces disappear. diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index 34fb615..b8f7ae8 100644 --- a/linden/indra/llcommon/llversionviewer.h +++ b/linden/indra/llcommon/llversionviewer.h @@ -43,8 +43,8 @@ const char * const LL_VIEWER_NAME = "Second Life"; const char * const IMP_VIEWER_NAME = "Imprudence"; const S32 IMP_VERSION_MAJOR = 1; -const S32 IMP_VERSION_MINOR = 1; +const S32 IMP_VERSION_MINOR = 2; const S32 IMP_VERSION_PATCH = 0; -const char * const IMP_VERSION_TEST = ""; +const char * const IMP_VERSION_TEST = "beta"; #endif -- cgit v1.1 From 123cc9f638fe3617a12f24a543639d4ca3f72264 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 27 Sep 2009 21:08:27 -0500 Subject: "Fixed and cleaned up the export permissions check." --- ChangeLog.txt | 7 +++ linden/indra/newview/llviewermenu.cpp | 54 +++++------------ linden/indra/newview/primbackup.cpp | 107 +++++++++++++++++----------------- linden/indra/newview/primbackup.h | 2 + 4 files changed, 78 insertions(+), 92 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 1f27515..555c5ba 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,12 @@ 2009-09-27 Jacek Antonelli + * Fixed and cleaned up the export permissions check. + + modified: linden/indra/newview/llviewermenu.cpp + modified: linden/indra/newview/primbackup.cpp + modified: linden/indra/newview/primbackup.h + + * Updated Imprudence version to "1.2.0 beta". linden/indra/llcommon/llversionviewer.h 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 { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - bool new_value = (object != NULL); - if (new_value) - { - LLVOAvatar* avatar = find_avatar_from_object(object); - new_value = (avatar == NULL); - } - if(new_value) + LLControlVariable* control = + gMenuHolder->findControl(userdata["control"].asString()); + + LLViewerObject* object = + LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); + + if((object != NULL) && + (find_avatar_from_object(object) == NULL)) { - struct ff : public LLSelectedNodeFunctor { - ff(const LLSD& data) : LLSelectedNodeFunctor() - ,userdata(data) - { - - } - const LLSD& userdata; virtual bool apply(LLSelectNode* node) { - if(gAgent.getID()!=node->mPermissions->getCreator()) - { - return false; - } - return true; + return primbackup::check_perms( node ); } - }; - -#ifdef LL_GRID_PERMISSIONS - - ff * the_ff=new ff(userdata); - if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(the_ff,false)) - { - gMenuHolder->findControl(userdata["control"].asString())->setValue(true); - } - else + } func; + + if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(&func,false)) { - gMenuHolder->findControl(userdata["control"].asString())->setValue(false); + control->setValue(true); + return true; } - return true; } - gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); - return true; -#else - } - gMenuHolder->findControl(userdata["control"].asString())->setValue(true); + control->setValue(false); return true; -#endif - } }; diff --git a/linden/indra/newview/primbackup.cpp b/linden/indra/newview/primbackup.cpp index 78fd482..8dbf1df 100644 --- a/linden/indra/newview/primbackup.cpp +++ b/linden/indra/newview/primbackup.cpp @@ -350,54 +350,52 @@ void primbackup::pre_export_object() gIdleCallbacks.addFunction(exportworker, NULL); } + +// static +bool primbackup::check_perms( LLSelectNode* node ) +{ + LLPermissions *perms = node->mPermissions; + return (gAgent.getID() == perms->getOwner() && + gAgent.getID() == perms->getCreator() && + (PERM_ITEM_UNRESTRICTED & + perms->getMaskOwner()) == PERM_ITEM_UNRESTRICTED); +} + + void primbackup::exportworker(void *userdata) { primbackup::getInstance()->updateexportnumbers(); switch(primbackup::getInstance()->export_state) { - case EXPORT_INIT: + case EXPORT_INIT: { + primbackup::getInstance()->show(); + LLSelectMgr::getInstance()->getSelection()->ref(); + + struct ff : public LLSelectedNodeFunctor { - primbackup::getInstance()->show(); - LLSelectMgr::getInstance()->getSelection()->ref(); - - struct ff : public LLSelectedNodeFunctor - { - virtual bool apply(LLSelectNode* node) - { - if(gAgent.getID()!=node->mPermissions->getOwner()) - { - #ifdef LL_GRID_PERMISSIONS - return false; - #else - return true; - #endif - } - else if(581632==node->mPermissions->getMaskOwner() || 2147483647==node->mPermissions->getMaskOwner()) - { - return true; - } - return false; - } - } func; - - if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(&func,false)) - primbackup::getInstance()->export_state=EXPORT_STRUCTURE; - else + virtual bool apply(LLSelectNode* node) { - llwarns<<"Incorrect permission to export"<export_state=EXPORT_DONE; - primbackup::getInstance()->close(); - gIdleCallbacks.deleteFunction(exportworker); - LLSelectMgr::getInstance()->getSelection()->unref(); - + return primbackup::check_perms( node ); } - break; - } + } func; + if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(&func,false)) + { + primbackup::getInstance()->export_state=EXPORT_STRUCTURE; + } + else + { + llwarns << "Incorrect permission to export" << llendl; + primbackup::getInstance()->export_state=EXPORT_DONE; + primbackup::getInstance()->close(); + gIdleCallbacks.deleteFunction(exportworker); + LLSelectMgr::getInstance()->getSelection()->unref(); + } break; - case EXPORT_STRUCTURE: - { + } + + case EXPORT_STRUCTURE: { struct ff : public LLSelectedObjectFunctor { virtual bool apply(LLViewerObject* object) @@ -405,7 +403,7 @@ void primbackup::exportworker(void *userdata) object->boostTexturePriority(TRUE); LLViewerObject::child_list_t children = object->getChildren(); children.push_front(object); //push root onto list - LLSD prim_llsd=primbackup::getInstance()->prims_to_llsd(children); + LLSD prim_llsd=primbackup::getInstance()->prims_to_llsd(children); LLSD stuff; stuff["root_position"] = object->getPosition().getValue(); stuff["root_rotation"] = ll_sd_from_quaternion(object->getRotation()); @@ -421,7 +419,8 @@ void primbackup::exportworker(void *userdata) break; } - case EXPORT_TEXTURES: + + case EXPORT_TEXTURES: { if(primbackup::getInstance()->m_nexttextureready==false) return; @@ -435,23 +434,25 @@ void primbackup::exportworker(void *userdata) } primbackup::getInstance()->export_next_texture(); - break; + break; + } - case EXPORT_LLSD: - { - // Create a file stream and write to it - llofstream export_file(primbackup::getInstance()->file_name); - LLSDSerialize::toPrettyXML(primbackup::getInstance()->llsd, export_file); - export_file.close(); - primbackup::getInstance()->m_nexttextureready=true; - primbackup::getInstance()->export_state=EXPORT_TEXTURES; - } + case EXPORT_LLSD: { + // Create a file stream and write to it + llofstream export_file(primbackup::getInstance()->file_name); + LLSDSerialize::toPrettyXML(primbackup::getInstance()->llsd, export_file); + export_file.close(); + primbackup::getInstance()->m_nexttextureready=true; + primbackup::getInstance()->export_state=EXPORT_TEXTURES; break; - case EXPORT_DONE: - llinfos<<"Backup complete"<close(); + } + + case EXPORT_DONE: { + llinfos << "Backup complete" << llendl; + gIdleCallbacks.deleteFunction(exportworker); + primbackup::getInstance()->close(); break; + } } } diff --git a/linden/indra/newview/primbackup.h b/linden/indra/newview/primbackup.h index fddc35f..cbd757a 100644 --- a/linden/indra/newview/primbackup.h +++ b/linden/indra/newview/primbackup.h @@ -18,6 +18,8 @@ class primbackup : public LLFloater //Static accessor static primbackup* getInstance(); + static bool check_perms( LLSelectNode* node ); + virtual ~primbackup(); //Floater stuff -- cgit v1.1 From e8b38f2336df3835bdc094bdbce17ba6f7ee01e2 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 27 Sep 2009 21:12:39 -0500 Subject: Changed "Backup" to "Export" in object pie menu. --- ChangeLog.txt | 5 +++++ linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 555c5ba..e6f69e8 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,10 @@ 2009-09-27 Jacek Antonelli + * Changed "Backup" to "Export" in object pie menu. + + modified: linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml + + * Fixed and cleaned up the export permissions check. modified: linden/indra/newview/llviewermenu.cpp diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml index 15cdc9e..2c7ca3c 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml @@ -44,7 +44,7 @@ -