diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp
index fd9997b885..d3b5734616 100644
--- a/indra/llinventory/llpermissions.cpp
+++ b/indra/llinventory/llpermissions.cpp
@@ -947,7 +947,7 @@ std::ostream& operator<<(std::ostream &s, const LLAggregatePermissions &perm)
}
// This converts a permissions mask into a string for debugging use.
-void mask_to_string(U32 mask, char* str)
+void mask_to_string(U32 mask, char* str, bool isOpenSim /*=false*/) // remove misleading X for export when not in OpenSim
{
if (mask & PERM_MOVE)
{
@@ -990,23 +990,29 @@ void mask_to_string(U32 mask, char* str)
str++;
// OpenSim export permission
- if (mask & PERM_EXPORT)
+#ifdef OPENSIM
+ // The export permission is only available in OpenSim.
+ if (isOpenSim)
{
- *str = 'X';
- }
- else
- {
- *str = ' ';
+ if (mask & PERM_EXPORT)
+ {
+ *str = 'X';
+ }
+ else
+ {
+ *str = ' ';
+ }
+ str++;
}
- str++;
+#endif
//
*str = '\0';
}
-std::string mask_to_string(U32 mask)
+std::string mask_to_string(U32 mask, bool isOpenSim /*=false*/) // remove misleading X for export when not in OpenSim
{
char str[16];
- mask_to_string(mask, str);
+ mask_to_string(mask, str, isOpenSim); // remove misleading X for export when not in OpenSim
return std::string(str);
}
diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h
index 8646224b7e..bcf03b8e41 100644
--- a/indra/llinventory/llpermissions.h
+++ b/indra/llinventory/llpermissions.h
@@ -35,8 +35,8 @@
// prototypes
class LLMessageSystem;
-extern void mask_to_string(U32 mask, char* str);
-extern std::string mask_to_string(U32 mask);
+extern void mask_to_string(U32 mask, char* str, bool isOpenSim=false);
+extern std::string mask_to_string(U32 mask, bool isOpenSim=false);
template class LLMetaClassT;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index 1c6d370478..116139a576 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -453,32 +453,40 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
}
std::string perm_string;
-
+// remove misleading X for export when not in OpenSim
+ bool isOpenSim {false};
+#ifdef OPENSIM
+ if( LLGridManager::instance().isInOpenSim() )
+ {
+ isOpenSim = true;
+ }
+#endif
+//
perm_string = "B: ";
- perm_string += mask_to_string(base_mask);
+ perm_string += mask_to_string(base_mask, isOpenSim); // remove misleading X for export when not in OpenSim
getChild("BaseMaskDebug")->setValue(perm_string);
getChildView("BaseMaskDebug")->setVisible(TRUE);
perm_string = "O: ";
- perm_string += mask_to_string(owner_mask);
+ perm_string += mask_to_string(owner_mask, isOpenSim); // remove misleading X for export when not in OpenSim
getChild("OwnerMaskDebug")->setValue(perm_string);
getChildView("OwnerMaskDebug")->setVisible(TRUE);
perm_string = "G";
perm_string += overwrite_group ? "*: " : ": ";
- perm_string += mask_to_string(group_mask);
+ perm_string += mask_to_string(group_mask, isOpenSim); // remove misleading X for export when not in OpenSim
getChild("GroupMaskDebug")->setValue(perm_string);
getChildView("GroupMaskDebug")->setVisible(TRUE);
perm_string = "E";
perm_string += overwrite_everyone ? "*: " : ": ";
- perm_string += mask_to_string(everyone_mask);
+ perm_string += mask_to_string(everyone_mask, isOpenSim); // remove misleading X for export when not in OpenSim
getChild("EveryoneMaskDebug")->setValue(perm_string);
getChildView("EveryoneMaskDebug")->setVisible(TRUE);
perm_string = "N";
perm_string += slam_perm ? "*: " : ": ";
- perm_string += mask_to_string(next_owner_mask);
+ perm_string += mask_to_string(next_owner_mask, isOpenSim); // remove misleading X for export when not in OpenSim
getChild("NextMaskDebug")->setValue(perm_string);
getChildView("NextMaskDebug")->setVisible(TRUE);
}
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 55c6de7696..315ffa203a 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -74,6 +74,7 @@
#include "rlvcommon.h"
// [/RLVa:KB]
// For OpenSim export permisson
+#include "llviewernetwork.h" // for gridmanager
#include "lfsimfeaturehandler.h"
#include "llinventoryfunctions.h"
@@ -630,7 +631,7 @@ void LLPanelPermissions::refresh()
}
else
{
-// FIRE-777: allow batch edit for name and description
+// FIRE-777:�allow batch edit for name and description
// getChild("Object Name")->setValue(LLStringUtil::null);
// LineEditorObjectDesc->setText(LLStringUtil::null);
if (keyboard_focus_view != LineEditorObjectName)
@@ -650,7 +651,7 @@ void LLPanelPermissions::refresh()
// figure out the contents of the name, description, & category
BOOL edit_name_desc = FALSE;
-// FIRE-777: allow batch edit for name and description
+// FIRE-777:�allow batch edit for name and description
// if (is_one_object && objectp->permModify() && !objectp->isPermanentEnforced())
if (objectp->permModify())
// /FIRE-777
@@ -811,20 +812,28 @@ void LLPanelPermissions::refresh()
&next_owner_mask_on,
&next_owner_mask_off);
-
if (gSavedSettings.getBOOL("DebugPermissions") )
{
+// remove misleading X for export when not in OpenSim
+ bool isOpenSim {false};
+#ifdef OPENSIM
+ if( LLGridManager::instance().isInOpenSim() )
+ {
+ isOpenSim = true;
+ }
+#endif
+//
if (valid_base_perms)
{
- getChild("B:")->setValue("B: " + mask_to_string(base_mask_on));
+ getChild("B:")->setValue("B: " + mask_to_string(base_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("B:")->setVisible(TRUE);
- getChild("O:")->setValue("O: " + mask_to_string(owner_mask_on));
+ getChild("O:")->setValue("O: " + mask_to_string(owner_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("O:")->setVisible(TRUE);
- getChild("G:")->setValue("G: " + mask_to_string(group_mask_on));
+ getChild("G:")->setValue("G: " + mask_to_string(group_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("G:")->setVisible(TRUE);
- getChild("E:")->setValue("E: " + mask_to_string(everyone_mask_on));
+ getChild("E:")->setValue("E: " + mask_to_string(everyone_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("E:")->setVisible(TRUE);
- getChild("N:")->setValue("N: " + mask_to_string(next_owner_mask_on));
+ getChild("N:")->setValue("N: " + mask_to_string(next_owner_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("N:")->setVisible(TRUE);
}
else if(!root_selected)
@@ -834,15 +843,15 @@ void LLPanelPermissions::refresh()
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode();
if (node && node->mValid)
{
- getChild("B:")->setValue("B: " + mask_to_string( node->mPermissions->getMaskBase()));
+ getChild("B:")->setValue("B: " + mask_to_string( node->mPermissions->getMaskBase(), isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("B:")->setVisible(TRUE);
- getChild("O:")->setValue("O: " + mask_to_string(node->mPermissions->getMaskOwner()));
+ getChild("O:")->setValue("O: " + mask_to_string(node->mPermissions->getMaskOwner(), isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("O:")->setVisible(TRUE);
- getChild("G:")->setValue("G: " + mask_to_string(node->mPermissions->getMaskGroup()));
+ getChild("G:")->setValue("G: " + mask_to_string(node->mPermissions->getMaskGroup(), isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("G:")->setVisible(TRUE);
- getChild("E:")->setValue("E: " + mask_to_string(node->mPermissions->getMaskEveryone()));
+ getChild("E:")->setValue("E: " + mask_to_string(node->mPermissions->getMaskEveryone(), isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("E:")->setVisible(TRUE);
- getChild("N:")->setValue("N: " + mask_to_string(node->mPermissions->getMaskNextOwner()));
+ getChild("N:")->setValue("N: " + mask_to_string(node->mPermissions->getMaskNextOwner(), isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("N:")->setVisible(TRUE);
}
}
@@ -864,7 +873,7 @@ void LLPanelPermissions::refresh()
//if (objectp->permExport()) flag_mask |= PERM_EXPORT; // OpenSim export permissions
- getChild("F:")->setValue("F:" + mask_to_string(flag_mask));
+ getChild("F:")->setValue("F:" + mask_to_string(flag_mask, isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("F:")->setVisible( TRUE);
}
else
@@ -910,7 +919,7 @@ void LLPanelPermissions::refresh()
getChildView("checkbox allow everyone copy")->setEnabled(FALSE);
}
- // Opensim export permissions - Codeblock courtesy of Liru Færs.
+ // Opensim export permissions - Codeblock courtesy of Liru F�rs.
// Is this user allowed to toggle export on this object?
if (LFSimFeatureHandler::instance().simSupportsExport()
&& self_owned && mCreatorID == mOwnerID
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 72309bd7e3..9f0d43fefa 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -47,6 +47,7 @@
#include "llexperiencecache.h"
#include "lltrans.h"
#include "llviewerregion.h"
+#include "llviewernetwork.h" // for gridmanager
// [RLVa:KB] - Checked: RLVa-2.0.1
#include "rlvactions.h"
#include "rlvcommon.h"
@@ -586,31 +587,41 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
std::string perm_string;
+// remove misleading X for export when not in OpenSim
+ bool isOpenSim {false};
+#ifdef OPENSIM
+ if( LLGridManager::instance().isInOpenSim() )
+ {
+ isOpenSim = true;
+ }
+#endif
+//
+
perm_string = "B: ";
- perm_string += mask_to_string(base_mask);
+ perm_string += mask_to_string(base_mask, isOpenSim); // remove misleading X for export when not in OpenSim
getChild("BaseMaskDebug")->setValue(perm_string);
getChildView("BaseMaskDebug")->setVisible(TRUE);
perm_string = "O: ";
- perm_string += mask_to_string(owner_mask);
+ perm_string += mask_to_string(owner_mask, isOpenSim); // remove misleading X for export when not in OpenSim
getChild("OwnerMaskDebug")->setValue(perm_string);
getChildView("OwnerMaskDebug")->setVisible(TRUE);
perm_string = "G";
perm_string += overwrite_group ? "*: " : ": ";
- perm_string += mask_to_string(group_mask);
+ perm_string += mask_to_string(group_mask, isOpenSim); // remove misleading X for export when not in OpenSim
getChild("GroupMaskDebug")->setValue(perm_string);
getChildView("GroupMaskDebug")->setVisible(TRUE);
perm_string = "E";
perm_string += overwrite_everyone ? "*: " : ": ";
- perm_string += mask_to_string(everyone_mask);
+ perm_string += mask_to_string(everyone_mask, isOpenSim); // remove misleading X for export when not in OpenSim
getChild("EveryoneMaskDebug")->setValue(perm_string);
getChildView("EveryoneMaskDebug")->setVisible(TRUE);
perm_string = "N";
perm_string += slam_perm ? "*: " : ": ";
- perm_string += mask_to_string(next_owner_mask);
+ perm_string += mask_to_string(next_owner_mask, isOpenSim); // remove misleading X for export when not in OpenSim
getChild("NextMaskDebug")->setValue(perm_string);
getChildView("NextMaskDebug")->setVisible(TRUE);
}
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 5bcc7865f0..4fa9c54b44 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -64,6 +64,7 @@
#include "lltextbase.h"
#include "llstring.h"
#include "lltrans.h"
+#include "llviewernetwork.h" // for gridmanager
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a)
#include "llslurl.h"
#include "rlvhandler.h"
@@ -635,21 +636,30 @@ void LLSidepanelTaskInfo::refresh()
if (gSavedSettings.getBOOL("DebugPermissions") )
{
+// remove misleading X for export when not in OpenSim
+ bool isOpenSim {false};
+#ifdef OPENSIM
+ if( LLGridManager::instance().isInOpenSim() )
+ {
+ isOpenSim = true;
+ }
+#endif
+//
if (valid_base_perms)
{
- getChild("B:")->setValue("B: " + mask_to_string(base_mask_on));
+ getChild("B:")->setValue("B: " + mask_to_string(base_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("B:")->setVisible( TRUE);
- getChild("O:")->setValue("O: " + mask_to_string(owner_mask_on));
+ getChild("O:")->setValue("O: " + mask_to_string(owner_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("O:")->setVisible( TRUE);
- getChild("G:")->setValue("G: " + mask_to_string(group_mask_on));
+ getChild("G:")->setValue("G: " + mask_to_string(group_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("G:")->setVisible( TRUE);
- getChild("E:")->setValue("E: " + mask_to_string(everyone_mask_on));
+ getChild("E:")->setValue("E: " + mask_to_string(everyone_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("E:")->setVisible( TRUE);
- getChild("N:")->setValue("N: " + mask_to_string(next_owner_mask_on));
+ getChild("N:")->setValue("N: " + mask_to_string(next_owner_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("N:")->setVisible( TRUE);
}
@@ -659,7 +669,7 @@ void LLSidepanelTaskInfo::refresh()
if (objectp->permCopy()) flag_mask |= PERM_COPY;
if (objectp->permTransfer()) flag_mask |= PERM_TRANSFER;
- getChild("F:")->setValue("F:" + mask_to_string(flag_mask));
+ getChild("F:")->setValue("F:" + mask_to_string(flag_mask, isOpenSim)); // remove misleading X for export when not in OpenSim
getChildView("F:")->setVisible( TRUE);
}
else