From c804c6b69e9de586225b9cc84c6e6adafba83f8f Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Thu, 12 Dec 2013 14:11:28 -0500 Subject: STORM-68 Remove Apply button Add menu entry to Build->Options->Set Default Permissions... Disable Preferences->Advanced->Default Creation Permissions button when on login screen Add code for a one-time conversion from the old upload settings XML cleanup --- indra/newview/app_settings/settings.xml | 67 ++++++++++++++++++++++ indra/newview/llfloaterperms.cpp | 20 ++++--- indra/newview/llfloaterperms.h | 3 +- indra/newview/llfloaterpreference.cpp | 3 + .../skins/default/xui/en/floater_perms_default.xml | 40 +++++-------- indra/newview/skins/default/xui/en/menu_viewer.xml | 7 +++ .../default/xui/en/panel_preferences_advanced.xml | 2 +- 7 files changed, 105 insertions(+), 37 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9cb63c6518..7e9971bc7d 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14814,6 +14814,17 @@ Boolean Value 0 + + DefaultUploadPermissionsConverted + + Comment + Default upload permissions have been converted to default creation permissions + Persist + 1 + Type + Boolean + Value + 0 PathfindingRetrieveNeighboringRegion @@ -15213,6 +15224,62 @@ Value + EveryoneCopy + + Comment + (obsolete) Everyone can copy the newly created objects + Persist + 1 + Type + Boolean + Value + 0 + + NextOwnerCopy + + Comment + (obsolete) Newly created objects can be copied by next owner + Persist + 1 + Type + Boolean + Value + 0 + + NextOwnerModify + + Comment + (obsolete) Newly created objects can be modified by next owner + Persist + 1 + Type + Boolean + Value + 0 + + NextOwnerTransfer + + Comment + (obsolete) Newly created objects can be resold or given away by next owner + Persist + 1 + Type + Boolean + Value + 1 + + ShareWithGroup + + Comment + (obsolete) Newly created objects are shared with the currently active group + Persist + 1 + Type + Boolean + Value + 0 + + diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 0178c0b4f1..cc1ff54cb4 100755 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -103,7 +103,6 @@ LLFloaterPermsDefault::LLFloaterPermsDefault(const LLSD& seed) : LLFloater(seed) { mCommitCallbackRegistrar.add("PermsDefault.Copy", boost::bind(&LLFloaterPermsDefault::onCommitCopy, this, _2)); - mCommitCallbackRegistrar.add("PermsDefault.Apply", boost::bind(&LLFloaterPermsDefault::onClickApply, this)); mCommitCallbackRegistrar.add("PermsDefault.OK", boost::bind(&LLFloaterPermsDefault::onClickOK, this)); mCommitCallbackRegistrar.add("PermsDefault.Cancel", boost::bind(&LLFloaterPermsDefault::onClickCancel, this)); } @@ -123,6 +122,16 @@ const std::string LLFloaterPermsDefault::sCategoryNames[CAT_LAST] = BOOL LLFloaterPermsDefault::postBuild() { + if(!gSavedSettings.getBOOL("DefaultUploadPermissionsConverted")) + { + gSavedSettings.setBOOL("UploadsEveryoneCopy", gSavedSettings.getBOOL("EveryoneCopy")); + gSavedSettings.setBOOL("UploadsNextOwnerCopy", gSavedSettings.getBOOL("NextOwnerCopy")); + gSavedSettings.setBOOL("UploadsNextOwnerModify", gSavedSettings.getBOOL("NextOwnerModify")); + gSavedSettings.setBOOL("UploadsNextOwnerTransfer", gSavedSettings.getBOOL("NextOwnerTransfer")); + gSavedSettings.setBOOL("UploadsShareWithGroup", gSavedSettings.getBOOL("ShareWithGroup")); + gSavedSettings.setBOOL("DefaultUploadPermissionsConverted", true); + } + mCloseSignal.connect(boost::bind(&LLFloaterPermsDefault::cancel, this)); refresh(); @@ -130,14 +139,9 @@ BOOL LLFloaterPermsDefault::postBuild() return true; } -void LLFloaterPermsDefault::onClickApply() -{ - apply(); -} - void LLFloaterPermsDefault::onClickOK() { - apply(); + ok(); closeFloater(); } @@ -222,7 +226,7 @@ void LLFloaterPermsDefault::setCapSent(bool cap_sent) mCapSent = cap_sent; } -void LLFloaterPermsDefault::apply() +void LLFloaterPermsDefault::ok() { // Changes were already applied automatically to saved settings. // Refreshing internal values makes it official. diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index 12f297960a..2bb0a19dc1 100755 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -54,9 +54,8 @@ class LLFloaterPermsDefault : public LLFloater public: /*virtual*/ BOOL postBuild(); - void apply(); + void ok(); void cancel(); - void onClickApply(); void onClickOK(); void onClickCancel(); void onCommitCopy(const LLSD& user_data); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index b5976cbc99..0f6f4a0192 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1188,6 +1188,9 @@ void LLFloaterPreference::refreshEnabledState() disableUnavailableSettings(); getChildView("block_list")->setEnabled(LLLoginInstance::getInstance()->authSuccess()); + + // Cannot have floater active until caps have been received + getChild("default_creation_permissions")->setEnabled(LLStartUp::getStartupState() < STATE_STARTED ? false : true); } void LLFloaterPreference::disableUnavailableSettings() diff --git a/indra/newview/skins/default/xui/en/floater_perms_default.xml b/indra/newview/skins/default/xui/en/floater_perms_default.xml index 4e44c9ebb3..ceb260fffb 100644 --- a/indra/newview/skins/default/xui/en/floater_perms_default.xml +++ b/indra/newview/skins/default/xui/en/floater_perms_default.xml @@ -141,7 +141,7 @@ control_name="ObjectsNextOwnerTransfer" height="16" layout="topleft" - name="Objects_transfer" + name="objects_t" left_pad="0" top_delta="0" width="100" /> @@ -157,7 +157,7 @@ control_name="ObjectsEveryoneCopy" height="16" layout="topleft" - name="objects_a" + name="objects_e" left_pad="0" top_delta="0" width="100" /> @@ -204,7 +204,7 @@ control_name="UploadsNextOwnerTransfer" height="16" layout="topleft" - name="Uploads_transfer" + name="uploads_t" left_pad="0" top_delta="0" width="100" /> @@ -220,7 +220,7 @@ control_name="UploadsEveryoneCopy" height="16" layout="topleft" - name="uploads_a" + name="uploads_e" left_pad="0" top_delta="0" width="100" /> @@ -267,7 +267,7 @@ control_name="ScriptsNextOwnerTransfer" height="16" layout="topleft" - name="Scripts_transfer" + name="scripts_t" left_pad="0" top_delta="0" width="100" /> @@ -283,7 +283,7 @@ control_name="ScriptsEveryoneCopy" height="16" layout="topleft" - name="scripts_a" + name="scripts_e" left_pad="0" top_delta="0" width="100" /> @@ -330,7 +330,7 @@ control_name="NotecardsNextOwnerTransfer" height="16" layout="topleft" - name="Notecards_transfer" + name="notecards_t" left_pad="0" top_delta="0" width="100" /> @@ -346,7 +346,7 @@ control_name="NotecardsEveryoneCopy" height="16" layout="topleft" - name="notecards_a" + name="notecards_e" left_pad="0" top_delta="0" width="100" /> @@ -393,7 +393,7 @@ control_name="GesturesNextOwnerTransfer" height="16" layout="topleft" - name="Gestures_transfer" + name="gestures_t" left_pad="0" top_delta="0" width="100" /> @@ -456,7 +456,7 @@ control_name="WearablesNextOwnerTransfer" height="16" layout="topleft" - name="Wearables_transfer" + name="wearables_t" left_pad="0" top_delta="0" width="100" /> @@ -472,33 +472,21 @@ control_name="WearablesEveryoneCopy" height="16" layout="topleft" - name="wearables_a" + name="wearables_e" left_pad="0" top_delta="0" width="100" /> -