Major overhaul of the asset blacklist floater:
* Use sorting persistance already available in LLScrollListCtrl and remove specific asset blacklist debug settings * Add right-click context menu * Draw stripes for alternating lines for easier reading * Add missing "Close" button * Add filter editor for searching for particular assets * Properly format date based on localizable format string and show time as local time instead of UTC * Renamed classes to better fit the Firestorm naming system * Removed unused methodsmaster
parent
6bb36ef7eb
commit
12df60d4e1
|
|
@ -127,6 +127,7 @@ set(viewer_SOURCE_FILES
|
|||
floatermedialists.cpp
|
||||
fsareasearch.cpp
|
||||
fsareasearchmenu.cpp
|
||||
fsassetblacklist.cpp
|
||||
fsavatarrenderpersistence.cpp
|
||||
fsavatarsearchmenu.cpp
|
||||
fsblocklistmenu.cpp
|
||||
|
|
@ -139,6 +140,7 @@ set(viewer_SOURCE_FILES
|
|||
fsdroptarget.cpp
|
||||
fsexportperms.cpp
|
||||
fsfloateraddtocontactset.cpp
|
||||
fsfloaterassetblacklist.cpp
|
||||
fsfloateravatarrendersettings.cpp
|
||||
fsfloaterblocklist.cpp
|
||||
fsfloatercontacts.cpp
|
||||
|
|
@ -160,7 +162,6 @@ set(viewer_SOURCE_FILES
|
|||
fsfloatervoicecontrols.cpp
|
||||
fsfloatervolumecontrols.cpp
|
||||
fsfloatervramusage.cpp
|
||||
fsfloaterwsassetblacklist.cpp
|
||||
fskeywords.cpp
|
||||
fslightshare.cpp
|
||||
fslslbridge.cpp
|
||||
|
|
@ -191,7 +192,6 @@ set(viewer_SOURCE_FILES
|
|||
fsscrolllistctrl.cpp
|
||||
fssearchableui.cpp
|
||||
fsslurlcommand.cpp
|
||||
fswsassetblacklist.cpp
|
||||
groupchatlistener.cpp
|
||||
kcwlinterface.cpp
|
||||
lggbeamcolormapfloater.cpp
|
||||
|
|
@ -866,6 +866,7 @@ set(viewer_HEADER_FILES
|
|||
floatermedialists.h
|
||||
fsareasearch.h
|
||||
fsareasearchmenu.h
|
||||
fsassetblacklist.h
|
||||
fsavatarrenderpersistence.h
|
||||
fsavatarsearchmenu.h
|
||||
fsblocklistmenu.h
|
||||
|
|
@ -879,6 +880,7 @@ set(viewer_HEADER_FILES
|
|||
fsdroptarget.h
|
||||
fsexportperms.h
|
||||
fsfloateraddtocontactset.h
|
||||
fsfloaterassetblacklist.h
|
||||
fsfloateravatarrendersettings.h
|
||||
fsfloaterblocklist.h
|
||||
fsfloatercontacts.h
|
||||
|
|
@ -900,7 +902,6 @@ set(viewer_HEADER_FILES
|
|||
fsfloatervoicecontrols.h
|
||||
fsfloatervolumecontrols.h
|
||||
fsfloatervramusage.h
|
||||
fsfloaterwsassetblacklist.h
|
||||
fsgridhandler.h
|
||||
fskeywords.h
|
||||
fslightshare.h
|
||||
|
|
@ -933,7 +934,6 @@ set(viewer_HEADER_FILES
|
|||
fssearchableui.h
|
||||
fsslurl.h
|
||||
fsslurlcommand.h
|
||||
fswsassetblacklist.h
|
||||
groupchatlistener.h
|
||||
llaccountingcost.h
|
||||
kcwlinterface.h
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include "llavatarnamecache.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "fswsassetblacklist.h"
|
||||
#include "fsassetblacklist.h"
|
||||
#include "fscommon.h"
|
||||
|
||||
static const size_t num_collision_sounds = 28;
|
||||
|
|
@ -431,6 +431,6 @@ void NACLFloaterExploreSounds::onBlacklistAvatarNameCacheCallback(const LLUUID&
|
|||
}
|
||||
mBlacklistAvatarNameCacheConnections.erase(it);
|
||||
}
|
||||
FSWSAssetBlacklist::getInstance()->addNewItemToBlacklist(asset_id, av_name.getCompleteName(), region_name, LLAssetType::AT_SOUND);
|
||||
FSAssetBlacklist::getInstance()->addNewItemToBlacklist(asset_id, av_name.getCompleteName(), region_name, LLAssetType::AT_SOUND);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -420,9 +420,9 @@
|
|||
label_ref="Command_Asset_Blacklist_Label"
|
||||
tooltip_ref="Command_Asset_Blacklist_Tooltip"
|
||||
execute_function="Floater.Toggle"
|
||||
execute_parameters="ws_asset_blacklist"
|
||||
execute_parameters="fs_asset_blacklist"
|
||||
is_running_function="Floater.IsOpen"
|
||||
is_running_parameters="ws_asset_blacklist"
|
||||
is_running_parameters="fs_asset_blacklist"
|
||||
/>
|
||||
|
||||
<command name="phototools"
|
||||
|
|
|
|||
|
|
@ -2,28 +2,6 @@
|
|||
<llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="llsd.xsd">
|
||||
<map>
|
||||
<key>FSFloaterBlacklistSortColumn</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>SortColumn for the Blacklist.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>date</string>
|
||||
</map>
|
||||
<key>FSFloaterBlacklistSortAscending</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>SortOrder for the Blacklist.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSLandmarkCreatedNotification</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
#include "fslslbridge.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "fswsassetblacklist.h"
|
||||
#include "fsassetblacklist.h"
|
||||
#include "llworld.h"
|
||||
#include "lltrans.h" // getString()
|
||||
#include "llagentcamera.h" // gAgentCamera
|
||||
|
|
@ -1623,7 +1623,7 @@ bool FSPanelAreaSearchList::onContextMenuItemClick(const LLSD& userdata)
|
|||
{
|
||||
region_name = objectp->getRegion()->getName();
|
||||
}
|
||||
FSWSAssetBlacklist::getInstance()->addNewItemToBlacklist(object_id, mFSAreaSearch->mObjectDetails[object_id].name, region_name, LLAssetType::AT_OBJECT);
|
||||
FSAssetBlacklist::getInstance()->addNewItemToBlacklist(object_id, mFSAreaSearch->mObjectDetails[object_id].name, region_name, LLAssetType::AT_OBJECT);
|
||||
gObjectList.killObject(objectp);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @file fswsassetblacklist.cpp
|
||||
* @file fsassetblacklist.cpp
|
||||
* @brief Asset Blacklist and Derender
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=fsviewerlgpl$
|
||||
|
|
@ -27,9 +27,9 @@
|
|||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "fswsassetblacklist.h"
|
||||
#include "fsassetblacklist.h"
|
||||
|
||||
#include "fsfloaterwsassetblacklist.h"
|
||||
#include "fsfloaterassetblacklist.h"
|
||||
#include "llaudioengine.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llsdserialize.h"
|
||||
|
|
@ -62,13 +62,13 @@ LLAssetType::EType S32toAssetType(S32 assetindex)
|
|||
return type;
|
||||
}
|
||||
|
||||
void FSWSAssetBlacklist::init()
|
||||
void FSAssetBlacklist::init()
|
||||
{
|
||||
mBlacklistFileName = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "asset_blacklist.xml");
|
||||
loadBlacklist();
|
||||
}
|
||||
|
||||
bool FSWSAssetBlacklist::isBlacklisted(const LLUUID& id, LLAssetType::EType type)
|
||||
bool FSAssetBlacklist::isBlacklisted(const LLUUID& id, LLAssetType::EType type)
|
||||
{
|
||||
if (mBlacklistData.empty())
|
||||
{
|
||||
|
|
@ -87,7 +87,7 @@ bool FSWSAssetBlacklist::isBlacklisted(const LLUUID& id, LLAssetType::EType type
|
|||
return (uuids.find(id) != uuids.end());
|
||||
}
|
||||
|
||||
void FSWSAssetBlacklist::addNewItemToBlacklist(const LLUUID& id, const std::string& name, const std::string& region, LLAssetType::EType type, bool permanent /*= true*/, bool save /*= true*/)
|
||||
void FSAssetBlacklist::addNewItemToBlacklist(const LLUUID& id, const std::string& name, const std::string& region, LLAssetType::EType type, bool permanent /*= true*/, bool save /*= true*/)
|
||||
{
|
||||
if (isBlacklisted(id, type))
|
||||
{
|
||||
|
|
@ -109,7 +109,7 @@ void FSWSAssetBlacklist::addNewItemToBlacklist(const LLUUID& id, const std::stri
|
|||
addNewItemToBlacklistData(id, data, save);
|
||||
}
|
||||
|
||||
void FSWSAssetBlacklist::removeItemFromBlacklist(const LLUUID& id)
|
||||
void FSAssetBlacklist::removeItemFromBlacklist(const LLUUID& id)
|
||||
{
|
||||
gObjectList.removeDerenderedItem(id);
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ void FSWSAssetBlacklist::removeItemFromBlacklist(const LLUUID& id)
|
|||
saveBlacklist();
|
||||
}
|
||||
|
||||
void FSWSAssetBlacklist::addNewItemToBlacklistData(const LLUUID& id, const LLSD& data, bool save)
|
||||
void FSAssetBlacklist::addNewItemToBlacklistData(const LLUUID& id, const LLSD& data, bool save)
|
||||
{
|
||||
LLAssetType::EType type = S32toAssetType(data["asset_type"].asInteger());
|
||||
|
||||
|
|
@ -157,14 +157,14 @@ void FSWSAssetBlacklist::addNewItemToBlacklistData(const LLUUID& id, const LLSD&
|
|||
saveBlacklist();
|
||||
}
|
||||
|
||||
FSFloaterWSAssetBlacklist* floater = LLFloaterReg::findTypedInstance<FSFloaterWSAssetBlacklist>("ws_asset_blacklist");
|
||||
FSFloaterAssetBlacklist* floater = LLFloaterReg::findTypedInstance<FSFloaterAssetBlacklist>("fs_asset_blacklist");
|
||||
if (floater)
|
||||
{
|
||||
floater->addElementToList(id, data);
|
||||
}
|
||||
}
|
||||
|
||||
bool FSWSAssetBlacklist::addEntryToBlacklistMap(const LLUUID& id, LLAssetType::EType type)
|
||||
bool FSAssetBlacklist::addEntryToBlacklistMap(const LLUUID& id, LLAssetType::EType type)
|
||||
{
|
||||
if (id.isNull())
|
||||
{
|
||||
|
|
@ -187,7 +187,7 @@ bool FSWSAssetBlacklist::addEntryToBlacklistMap(const LLUUID& id, LLAssetType::E
|
|||
return true;
|
||||
}
|
||||
|
||||
void FSWSAssetBlacklist::loadBlacklist()
|
||||
void FSAssetBlacklist::loadBlacklist()
|
||||
{
|
||||
if (gDirUtilp->fileExists(mBlacklistFileName))
|
||||
{
|
||||
|
|
@ -263,7 +263,7 @@ void FSWSAssetBlacklist::loadBlacklist()
|
|||
}
|
||||
}
|
||||
|
||||
void FSWSAssetBlacklist::saveBlacklist()
|
||||
void FSAssetBlacklist::saveBlacklist()
|
||||
{
|
||||
llofstream save_file(mBlacklistFileName.c_str());
|
||||
LLSD savedata;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @file fswsassetblacklist.h
|
||||
* @file fsassetblacklist.h
|
||||
* @brief Asset Blacklist and Derender
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=fsviewerlgpl$
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef FS_WSASSETBLACKLIST_H
|
||||
#define FS_WSASSETBLACKLIST_H
|
||||
#ifndef FS_ASSETBLACKLIST_H
|
||||
#define FS_ASSETBLACKLIST_H
|
||||
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <boost/unordered_set.hpp>
|
||||
|
|
@ -38,7 +38,7 @@ typedef boost::unordered_set<LLUUID, FSUUIDHash> blacklisted_uuid_container_t;
|
|||
typedef std::map<LLAssetType::EType, blacklisted_uuid_container_t> blacklist_type_map_t;
|
||||
typedef boost::unordered_map<LLUUID, LLSD, FSUUIDHash> blacklist_data_t;
|
||||
|
||||
class FSWSAssetBlacklist : public LLSingleton<FSWSAssetBlacklist>
|
||||
class FSAssetBlacklist : public LLSingleton<FSAssetBlacklist>
|
||||
{
|
||||
public:
|
||||
void init();
|
||||
|
|
@ -59,4 +59,4 @@ private:
|
|||
blacklist_data_t mBlacklistData;
|
||||
};
|
||||
|
||||
#endif // FS_WSASSETBLACKLIST_H
|
||||
#endif // FS_ASSETBLACKLIST_H
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
#include "fsdata.h"
|
||||
#include "fscommon.h"
|
||||
#include "fscorehttputil.h"
|
||||
#include "fswsassetblacklist.h"
|
||||
#include "fsassetblacklist.h"
|
||||
|
||||
/* boost: will not compile unless equivalent is undef'd, beware. */
|
||||
#include "fix_macros.h"
|
||||
|
|
@ -476,7 +476,7 @@ void FSData::processAssets(const LLSD& assets)
|
|||
{
|
||||
continue;
|
||||
}
|
||||
FSWSAssetBlacklist::instance().addNewItemToBlacklistData(uid, data, false);
|
||||
FSAssetBlacklist::instance().addNewItemToBlacklistData(uid, data, false);
|
||||
LL_DEBUGS("fsdata") << "Added " << uid << " to assets list." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,215 @@
|
|||
/**
|
||||
* @file fsfloaterassetblacklist.cpp
|
||||
* @brief Floater for Asset Blacklist and Derender
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=fsviewerlgpl$
|
||||
* Phoenix Firestorm Viewer Source Code
|
||||
* Copyright (C) 2012, Wolfspirit Magic
|
||||
* Copyright (C) 2016, Ansariel Hiller
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA
|
||||
* http://www.firestormviewer.org
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "fsfloaterassetblacklist.h"
|
||||
|
||||
#include "fsscrolllistctrl.h"
|
||||
#include "fsassetblacklist.h"
|
||||
#include "llfiltereditor.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
|
||||
FSFloaterAssetBlacklist::FSFloaterAssetBlacklist(const LLSD& key)
|
||||
: LLFloater(key),
|
||||
mResultList(NULL),
|
||||
mFilterSubString(LLStringUtil::null),
|
||||
mFilterSubStringOrig(LLStringUtil::null)
|
||||
{
|
||||
}
|
||||
|
||||
FSFloaterAssetBlacklist::~FSFloaterAssetBlacklist()
|
||||
{
|
||||
}
|
||||
|
||||
BOOL FSFloaterAssetBlacklist::postBuild()
|
||||
{
|
||||
mResultList = getChild<FSScrollListCtrl>("result_list");
|
||||
mResultList->setContextMenu(&FSFloaterAssetBlacklistMenu::gFSAssetBlacklistMenu);
|
||||
mResultList->setFilterColumn(0);
|
||||
|
||||
childSetAction("remove_btn", boost::bind(&FSFloaterAssetBlacklist::onRemoveBtn, this));
|
||||
childSetAction("close_btn", boost::bind(&FSFloaterAssetBlacklist::onCloseBtn, this));
|
||||
|
||||
getChild<LLFilterEditor>("filter_input")->setCommitCallback(boost::bind(&FSFloaterAssetBlacklist::onFilterEdit, this, _2));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void FSFloaterAssetBlacklist::onOpen(const LLSD& key)
|
||||
{
|
||||
mResultList->clearRows();
|
||||
buildBlacklist();
|
||||
}
|
||||
|
||||
std::string FSFloaterAssetBlacklist::getTypeString(S32 type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case 0:
|
||||
return getString("asset_texture");
|
||||
case 1:
|
||||
return getString("asset_sound");
|
||||
case 6:
|
||||
return getString("asset_object");
|
||||
case 45:
|
||||
return getString("asset_resident");
|
||||
default:
|
||||
return getString("asset_unknown");
|
||||
}
|
||||
}
|
||||
|
||||
void FSFloaterAssetBlacklist::buildBlacklist()
|
||||
{
|
||||
bool needs_sort = mResultList->isSorted();
|
||||
mResultList->setNeedsSort(false);
|
||||
|
||||
blacklist_data_t data = FSAssetBlacklist::instance().getBlacklistData();
|
||||
|
||||
for (blacklist_data_t::const_iterator iterator = data.begin(); iterator != data.end(); ++iterator)
|
||||
{
|
||||
addElementToList(iterator->first, iterator->second);
|
||||
}
|
||||
|
||||
mResultList->setNeedsSort(needs_sort);
|
||||
mResultList->updateSort();
|
||||
}
|
||||
|
||||
void FSFloaterAssetBlacklist::addElementToList(const LLUUID& id, const LLSD& data)
|
||||
{
|
||||
// Undo the persisted date in legacy format...
|
||||
std::string asset_date = data["asset_date"].asString() + "Z";
|
||||
asset_date.replace(asset_date.find(" "), 1, "T");
|
||||
LLDate date(asset_date);
|
||||
|
||||
std::string date_str = getString("DateFormatString");
|
||||
LLSD substitution;
|
||||
substitution["datetime"] = date.secondsSinceEpoch();
|
||||
LLStringUtil::format(date_str, substitution);
|
||||
|
||||
LLSD element;
|
||||
element["id"] = id;
|
||||
element["columns"][0]["column"] = "name";
|
||||
element["columns"][0]["type"] = "text";
|
||||
element["columns"][0]["value"] = !data["asset_name"].asString().empty() ? data["asset_name"].asString() : getString("unknown_object");
|
||||
element["columns"][1]["column"] = "region";
|
||||
element["columns"][1]["type"] = "text";
|
||||
element["columns"][1]["value"] = !data["asset_region"].asString().empty() ? data["asset_region"].asString() : getString("unknown_region");
|
||||
element["columns"][2]["column"] = "type";
|
||||
element["columns"][2]["type"] = "text";
|
||||
element["columns"][2]["value"] = getTypeString(data["asset_type"].asInteger());
|
||||
element["columns"][3]["column"] = "date";
|
||||
element["columns"][3]["type"] = "text";
|
||||
element["columns"][3]["value"] = date_str;
|
||||
element["columns"][4]["column"] = "permanent";
|
||||
element["columns"][4]["type"] = "text";
|
||||
element["columns"][4]["halign"] = "center";
|
||||
element["columns"][4]["value"] = data["asset_permanent"].asBoolean() ? getString("asset_permanent") : LLStringUtil::null;
|
||||
element["columns"][5]["column"] = "date_sort";
|
||||
element["columns"][5]["type"] = "text";
|
||||
element["columns"][5]["value"] = llformat("%u", (U64)date.secondsSinceEpoch());
|
||||
|
||||
mResultList->addElement(element, ADD_BOTTOM);
|
||||
}
|
||||
|
||||
void FSFloaterAssetBlacklist::removeElements()
|
||||
{
|
||||
std::vector<LLScrollListItem*> list = mResultList->getAllSelected();
|
||||
|
||||
FSAssetBlacklist& instance = FSAssetBlacklist::instance();
|
||||
for (std::vector<LLScrollListItem*>::const_iterator it = list.begin(); it != list.end(); ++it)
|
||||
{
|
||||
instance.removeItemFromBlacklist((*it)->getUUID());
|
||||
}
|
||||
|
||||
mResultList->deleteSelectedItems();
|
||||
}
|
||||
|
||||
void FSFloaterAssetBlacklist::onRemoveBtn()
|
||||
{
|
||||
removeElements();
|
||||
}
|
||||
|
||||
void FSFloaterAssetBlacklist::onCloseBtn()
|
||||
{
|
||||
closeFloater();
|
||||
}
|
||||
|
||||
void FSFloaterAssetBlacklist::onFilterEdit(const std::string& search_string)
|
||||
{
|
||||
mFilterSubStringOrig = search_string;
|
||||
LLStringUtil::trimHead(mFilterSubStringOrig);
|
||||
// Searches are case-insensitive
|
||||
std::string search_upper = mFilterSubStringOrig;
|
||||
LLStringUtil::toUpper(search_upper);
|
||||
|
||||
if (mFilterSubString == search_upper)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mFilterSubString = search_upper;
|
||||
|
||||
// Apply new filter.
|
||||
mResultList->setFilterString(mFilterSubStringOrig);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Context menu
|
||||
//---------------------------------------------------------------------------
|
||||
namespace FSFloaterAssetBlacklistMenu
|
||||
{
|
||||
LLContextMenu* FSAssetBlacklistMenu::createMenu()
|
||||
{
|
||||
// set up the callbacks for all of the avatar menu items
|
||||
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
|
||||
|
||||
registrar.add("Blacklist.Remove", boost::bind(&FSAssetBlacklistMenu::onContextMenuItemClick, this, _2));
|
||||
|
||||
// create the context menu from the XUI
|
||||
return createFromFile("menu_fs_asset_blacklist.xml");
|
||||
}
|
||||
|
||||
void FSAssetBlacklistMenu::onContextMenuItemClick(const LLSD& param)
|
||||
{
|
||||
std::string command = param.asString();
|
||||
|
||||
if (command == "remove")
|
||||
{
|
||||
FSFloaterAssetBlacklist* floater = LLFloaterReg::findTypedInstance<FSFloaterAssetBlacklist>("fs_asset_blacklist");
|
||||
if (floater)
|
||||
{
|
||||
floater->removeElements();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FSAssetBlacklistMenu gFSAssetBlacklistMenu;
|
||||
}
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
/**
|
||||
* @file fsfloaterwsassetblacklist.h
|
||||
* @file fsfloaterassetblacklist.h
|
||||
* @brief Floater for Asset Blacklist and Derender
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=fsviewerlgpl$
|
||||
* Phoenix Firestorm Viewer Source Code
|
||||
* Copyright (C) 2012, Wolfspirit Magic
|
||||
* Copyright (C) 2016, Ansariel Hiller
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
|
@ -25,34 +26,56 @@
|
|||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef FS_FLOATERWSASSETBLACKLIST_H
|
||||
#define FS_FLOATERWSASSETBLACKLIST_H
|
||||
#ifndef FS_FLOATERASSETBLACKLIST_H
|
||||
#define FS_FLOATERASSETBLACKLIST_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "lllistcontextmenu.h"
|
||||
|
||||
class LLScrollListCtrl;
|
||||
class FSScrollListCtrl;
|
||||
|
||||
class FSFloaterWSAssetBlacklist : public LLFloater
|
||||
class FSFloaterAssetBlacklist : public LLFloater
|
||||
{
|
||||
LOG_CLASS(FSFloaterWSAssetBlacklist);
|
||||
LOG_CLASS(FSFloaterAssetBlacklist);
|
||||
|
||||
public:
|
||||
FSFloaterWSAssetBlacklist(const LLSD& key);
|
||||
virtual ~FSFloaterWSAssetBlacklist();
|
||||
FSFloaterAssetBlacklist(const LLSD& key);
|
||||
virtual ~FSFloaterAssetBlacklist();
|
||||
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ BOOL postBuild();
|
||||
|
||||
std::string getTypeString(S32 type);
|
||||
void buildBlacklist();
|
||||
void addElementToList(const LLUUID& id, const LLSD& data);
|
||||
void removeElementFromList(const LLUUID& id);
|
||||
void removeElements();
|
||||
|
||||
protected:
|
||||
void onRemoveBtn();
|
||||
void onCancelBtn();
|
||||
void onCloseBtn();
|
||||
void onFilterEdit(const std::string& search_string);
|
||||
|
||||
void buildBlacklist();
|
||||
std::string getTypeString(S32 type);
|
||||
|
||||
private:
|
||||
LLScrollListCtrl* mResultList;
|
||||
FSScrollListCtrl* mResultList;
|
||||
|
||||
std::string mFilterSubString;
|
||||
std::string mFilterSubStringOrig;
|
||||
};
|
||||
|
||||
namespace FSFloaterAssetBlacklistMenu
|
||||
{
|
||||
|
||||
class FSAssetBlacklistMenu : public LLListContextMenu
|
||||
{
|
||||
public:
|
||||
/*virtual*/ LLContextMenu* createMenu();
|
||||
private:
|
||||
void onContextMenuItemClick(const LLSD& param);
|
||||
};
|
||||
|
||||
extern FSAssetBlacklistMenu gFSAssetBlacklistMenu;
|
||||
|
||||
} // namespace FSFloaterAssetBlacklistMenu
|
||||
|
||||
#endif // FS_FLOATERWSASSETBLACKLIST_H
|
||||
|
|
@ -1,143 +0,0 @@
|
|||
/**
|
||||
* @file fsfloaterwsassetblacklist.cpp
|
||||
* @brief Floater for Asset Blacklist and Derender
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=fsviewerlgpl$
|
||||
* Phoenix Firestorm Viewer Source Code
|
||||
* Copyright (C) 2012, Wolfspirit Magic
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA
|
||||
* http://www.firestormviewer.org
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "fsfloaterwsassetblacklist.h"
|
||||
|
||||
#include "fswsassetblacklist.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
|
||||
FSFloaterWSAssetBlacklist::FSFloaterWSAssetBlacklist(const LLSD& key)
|
||||
: LLFloater(key)
|
||||
{
|
||||
}
|
||||
|
||||
FSFloaterWSAssetBlacklist::~FSFloaterWSAssetBlacklist()
|
||||
{
|
||||
if (mResultList)
|
||||
{
|
||||
gSavedSettings.setString("FSFloaterBlacklistSortColumn", mResultList->getSortColumnName());
|
||||
gSavedSettings.setBOOL("FSFloaterBlacklistSortAscending", mResultList->getSortAscending());
|
||||
}
|
||||
}
|
||||
|
||||
std::string FSFloaterWSAssetBlacklist::getTypeString(S32 type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case 0:
|
||||
return getString("asset_texture");
|
||||
case 1:
|
||||
return getString("asset_sound");
|
||||
case 6:
|
||||
return getString("asset_object");
|
||||
case 45:
|
||||
return getString("asset_resident");
|
||||
default:
|
||||
return getString("asset_unknown");
|
||||
}
|
||||
}
|
||||
|
||||
void FSFloaterWSAssetBlacklist::buildBlacklist()
|
||||
{
|
||||
blacklist_data_t data = FSWSAssetBlacklist::instance().getBlacklistData();
|
||||
|
||||
for (blacklist_data_t::const_iterator iterator = data.begin(); iterator != data.end(); ++iterator)
|
||||
{
|
||||
addElementToList(iterator->first, iterator->second);
|
||||
}
|
||||
}
|
||||
|
||||
void FSFloaterWSAssetBlacklist::addElementToList(const LLUUID& id, const LLSD& data)
|
||||
{
|
||||
LLSD element;
|
||||
element["id"] = id;
|
||||
element["columns"][0]["column"] = "name";
|
||||
element["columns"][0]["type"] = "text";
|
||||
element["columns"][0]["value"] = !data["asset_name"].asString().empty() ? data["asset_name"].asString() : getString("unknown_object");
|
||||
element["columns"][1]["column"] = "region";
|
||||
element["columns"][1]["type"] = "text";
|
||||
element["columns"][1]["value"] = !data["asset_region"].asString().empty() ? data["asset_region"].asString() : getString("unknown_region");
|
||||
element["columns"][2]["column"] = "type";
|
||||
element["columns"][2]["type"] = "text";
|
||||
element["columns"][2]["value"] = getTypeString(data["asset_type"].asInteger());
|
||||
element["columns"][3]["column"] = "date";
|
||||
element["columns"][3]["type"] = "text";
|
||||
element["columns"][3]["value"] = data["asset_date"].asString();
|
||||
element["columns"][4]["column"] = "permanent";
|
||||
element["columns"][4]["type"] = "text";
|
||||
element["columns"][4]["halign"] = "center";
|
||||
element["columns"][4]["value"] = data["asset_permanent"].asBoolean() ? getString("asset_permanent") : LLStringUtil::null;
|
||||
|
||||
mResultList->addElement(element, ADD_BOTTOM);
|
||||
}
|
||||
|
||||
void FSFloaterWSAssetBlacklist::removeElementFromList(const LLUUID& id)
|
||||
{
|
||||
mResultList->deleteSingleItem(mResultList->getItemIndex(id));
|
||||
}
|
||||
|
||||
void FSFloaterWSAssetBlacklist::onOpen(const LLSD& key)
|
||||
{
|
||||
mResultList->clearRows();
|
||||
buildBlacklist();
|
||||
}
|
||||
|
||||
BOOL FSFloaterWSAssetBlacklist::postBuild()
|
||||
{
|
||||
mResultList = getChild<LLScrollListCtrl>("result_list");
|
||||
childSetAction("remove_btn", boost::bind(&FSFloaterWSAssetBlacklist::onRemoveBtn, this));
|
||||
std::string order_by = gSavedSettings.getString("FSFloaterBlacklistSortColumn");
|
||||
BOOL ascending = gSavedSettings.getBOOL("FSFloaterBlacklistSortAscending");
|
||||
|
||||
if (!order_by.empty())
|
||||
{
|
||||
mResultList->sortByColumn(order_by, ascending);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void FSFloaterWSAssetBlacklist::onRemoveBtn()
|
||||
{
|
||||
std::vector<LLScrollListItem*> list = mResultList->getAllSelected();
|
||||
|
||||
for (std::vector<LLScrollListItem*>::const_iterator it = list.begin(); it != list.end(); ++it)
|
||||
{
|
||||
FSWSAssetBlacklist::instance().removeItemFromBlacklist((*it)->getUUID());
|
||||
}
|
||||
|
||||
mResultList->deleteSelectedItems();
|
||||
}
|
||||
|
||||
void FSFloaterWSAssetBlacklist::onCancelBtn()
|
||||
{
|
||||
closeFloater();
|
||||
}
|
||||
|
|
@ -36,11 +36,11 @@
|
|||
#include "lleventtimer.h"
|
||||
|
||||
// newview
|
||||
#include "fsassetblacklist.h"
|
||||
#include "fscommon.h"
|
||||
#include "fskeywords.h"
|
||||
#include "fslslbridge.h"
|
||||
#include "fslslbridgerequest.h"
|
||||
#include "fswsassetblacklist.h"
|
||||
#include "lggcontactsets.h"
|
||||
#include "lfsimfeaturehandler.h"
|
||||
#include "llagent.h"
|
||||
|
|
@ -176,7 +176,7 @@ void FSRadar::updateRadarList()
|
|||
//Configuration
|
||||
LLWorld* world = LLWorld::getInstance();
|
||||
LLMuteList* mutelist = LLMuteList::getInstance();
|
||||
FSWSAssetBlacklist* blacklist = FSWSAssetBlacklist::getInstance();
|
||||
FSAssetBlacklist* blacklist = FSAssetBlacklist::getInstance();
|
||||
|
||||
const F32 chat_range_say = LFSimFeatureHandler::getInstance()->sayRange();
|
||||
const F32 chat_range_shout = LFSimFeatureHandler::getInstance()->shoutRange();
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
#include "fsfloaterprofile.h"
|
||||
#include "fslslbridge.h"
|
||||
#include "fsradar.h"
|
||||
#include "fswsassetblacklist.h"
|
||||
#include "fsassetblacklist.h"
|
||||
#include "llfloaterregioninfo.h"
|
||||
#include "llfloaterreporter.h"
|
||||
#include "llparcel.h"
|
||||
|
|
@ -2324,7 +2324,7 @@ void LLAvatarActions::derenderMultiple(const uuid_vec_t& agent_ids, bool permane
|
|||
//static
|
||||
void LLAvatarActions::onDerenderAvatarNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, bool permanent)
|
||||
{
|
||||
FSWSAssetBlacklist::getInstance()->addNewItemToBlacklist(agent_id, av_name.getUserName(), "", LLAssetType::AT_PERSON, permanent, permanent);
|
||||
FSAssetBlacklist::getInstance()->addNewItemToBlacklist(agent_id, av_name.getUserName(), "", LLAssetType::AT_PERSON, permanent, permanent);
|
||||
|
||||
LLViewerObject* av_obj = gObjectList.findObject(agent_id);
|
||||
if (av_obj)
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@
|
|||
#include "growlmanager.h"
|
||||
#endif
|
||||
|
||||
#include "fsassetblacklist.h"
|
||||
#include "fsavatarrenderpersistence.h"
|
||||
#include "fscommon.h"
|
||||
#include "fscorehttputil.h"
|
||||
|
|
@ -227,7 +228,6 @@
|
|||
#include "fsradar.h"
|
||||
#include "fsregistrarutils.h"
|
||||
#include "fsscriptlibrary.h"
|
||||
#include "fswsassetblacklist.h"
|
||||
#include "lfsimfeaturehandler.h"
|
||||
#include "lggcontactsets.h"
|
||||
#include "llfloatersearch.h"
|
||||
|
|
@ -1341,7 +1341,7 @@ bool idle_startup()
|
|||
LLFile::mkdir(user_windlight_days_path_name.c_str());
|
||||
|
||||
// <FS:WS> Initalize Account based asset_blacklist
|
||||
FSWSAssetBlacklist::getInstance()->init();
|
||||
FSAssetBlacklist::getInstance()->init();
|
||||
|
||||
// <FS:Techwolf Lupindo> load per grid data
|
||||
FSData::instance().downloadAgents();
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
#include "llcorehttputil.h"
|
||||
|
||||
#include "llhttpretrypolicy.h"
|
||||
#include "fswsassetblacklist.h" //For Asset blacklist
|
||||
#include "fsassetblacklist.h" //For Asset blacklist
|
||||
#include "llviewermenu.h"
|
||||
|
||||
bool LLTextureFetchDebugger::sDebuggerEnabled = false ;
|
||||
|
|
@ -1177,14 +1177,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
|||
|
||||
if (mState == INIT)
|
||||
{
|
||||
//asset blacklist
|
||||
if(FSWSAssetBlacklist::getInstance()->isBlacklisted(mID,LLAssetType::AT_TEXTURE))
|
||||
// <FS> Asset Blacklist
|
||||
if (FSAssetBlacklist::getInstance()->isBlacklisted(mID, LLAssetType::AT_TEXTURE))
|
||||
{
|
||||
LL_INFOS() << "Blacklisted texture asset blocked." << LL_ENDL;
|
||||
LL_INFOS() << "Blacklisted texture asset blocked." << LL_ENDL;
|
||||
mState = DONE;
|
||||
return true;
|
||||
}
|
||||
//end asset blacklist
|
||||
// </FS> Asset Blacklist
|
||||
|
||||
mRawImage = NULL ;
|
||||
mRequestedDiscard = -1;
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@
|
|||
#include "floatermedialists.h"
|
||||
#include "fsareasearch.h"
|
||||
#include "fsfloateraddtocontactset.h"
|
||||
#include "fsfloaterassetblacklist.h"
|
||||
#include "fsfloateravatarrendersettings.h"
|
||||
#include "fsfloatercontacts.h"
|
||||
#include "fsfloatercontactsetconfiguration.h"
|
||||
|
|
@ -189,7 +190,6 @@
|
|||
#include "fsfloatervoicecontrols.h"
|
||||
#include "fsfloatervolumecontrols.h"
|
||||
#include "fsfloatervramusage.h"
|
||||
#include "fsfloaterwsassetblacklist.h"
|
||||
#include "fsmoneytracker.h"
|
||||
#include "fspanelclassified.h"
|
||||
#include "lggbeamcolormapfloater.h"
|
||||
|
|
@ -440,6 +440,7 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLFloaterReg::add("export_collada", "floater_export_collada.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<ColladaExportFloater>);
|
||||
LLFloaterReg::add("delete_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDeleteQueue>);
|
||||
LLFloaterReg::add("floater_profile", "floater_profile_view.xml",&LLFloaterReg::build<FSFloaterProfile>);
|
||||
LLFloaterReg::add("fs_asset_blacklist", "floater_fs_asset_blacklist.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterAssetBlacklist>);
|
||||
LLFloaterReg::add("fs_avatar_render_settings", "floater_fs_avatar_render_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterAvatarRenderSettings>);
|
||||
LLFloaterReg::add("fs_blocklist", "floater_fs_blocklist.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterBlocklist>);
|
||||
LLFloaterReg::add("fs_add_contact", "floater_fs_contact_add.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterAddToContactSet>);
|
||||
|
|
@ -471,7 +472,6 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLFloaterReg::add("script_recover", "floater_script_recover.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptRecover>);
|
||||
LLFloaterReg::add("sound_explorer", "floater_NACL_explore_sounds.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<NACLFloaterExploreSounds>);
|
||||
LLFloaterReg::add("vram_usage", "floater_fs_vram_usage.xml", static_cast<LLFloaterBuildFunc>( &LLFloaterReg::build< FSFloaterVRAMUsage >) );
|
||||
LLFloaterReg::add("ws_asset_blacklist", "floater_asset_blacklist.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterWSAssetBlacklist>);
|
||||
|
||||
LLFloaterReg::registerControlVariables(); // Make sure visibility and rect controls get preserved when saving
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,13 +141,13 @@
|
|||
// [/RLVa:KB]
|
||||
|
||||
// Firestorm includes
|
||||
#include "fsassetblacklist.h"
|
||||
#include "fsdata.h"
|
||||
#include "fslslbridge.h"
|
||||
#include "fscommon.h"
|
||||
#include "fsfloaterexport.h"
|
||||
#include "fsfloatercontacts.h" // <FS:Zi> Display group list in contacts floater
|
||||
#include "fspose.h" // <FS:CR> FIRE-4345: Undeform
|
||||
#include "fswsassetblacklist.h"
|
||||
#include "lfsimfeaturehandler.h"
|
||||
#include "llavatarpropertiesprocessor.h" // ## Zi: Texture Refresh
|
||||
#include "llsdserialize.h"
|
||||
|
|
@ -2899,7 +2899,7 @@ void derenderObject(bool permanent)
|
|||
asset_type = LLAssetType::AT_OBJECT;
|
||||
}
|
||||
|
||||
FSWSAssetBlacklist::getInstance()->addNewItemToBlacklist(objp->getID(), entry_name, region_name, asset_type, permanent, permanent);
|
||||
FSAssetBlacklist::getInstance()->addNewItemToBlacklist(objp->getID(), entry_name, region_name, asset_type, permanent, permanent);
|
||||
|
||||
select_mgr->deselectObjectOnly(objp);
|
||||
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@
|
|||
// Firestorm inclues
|
||||
#include "animationexplorer.h" // <FS:Zi> Animation Explorer
|
||||
#include "fsareasearch.h"
|
||||
#include "fsassetblacklist.h"
|
||||
#include "fscommon.h"
|
||||
#include "fsdata.h"
|
||||
#include "fsfloaterplacedetails.h"
|
||||
|
|
@ -146,7 +147,6 @@
|
|||
#include "fslightshare.h" // <FS:CR> FIRE-5118 - Lightshare support
|
||||
#include "fslslbridge.h"
|
||||
#include "fsmoneytracker.h"
|
||||
#include "fswsassetblacklist.h"
|
||||
#include "llfloaterbump.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llfriendcard.h"
|
||||
|
|
@ -6088,7 +6088,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
|
|||
// </FS:ND>
|
||||
|
||||
// <FS> Asset blacklist
|
||||
if (FSWSAssetBlacklist::getInstance()->isBlacklisted(sound_id, LLAssetType::AT_SOUND))
|
||||
if (FSAssetBlacklist::getInstance()->isBlacklisted(sound_id, LLAssetType::AT_SOUND))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -6188,7 +6188,7 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data)
|
|||
msg->getUUIDFast(_PREHASH_DataBlock, _PREHASH_OwnerID, owner_id);
|
||||
|
||||
// <FS> Asset blacklist
|
||||
if (FSWSAssetBlacklist::getInstance()->isBlacklisted(sound_id, LLAssetType::AT_SOUND))
|
||||
if (FSAssetBlacklist::getInstance()->isBlacklisted(sound_id, LLAssetType::AT_SOUND))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -6245,7 +6245,7 @@ void process_attached_sound(LLMessageSystem *msg, void **user_data)
|
|||
msg->getUUIDFast(_PREHASH_DataBlock, _PREHASH_OwnerID, owner_id);
|
||||
|
||||
// <FS> Asset blacklist
|
||||
if (FSWSAssetBlacklist::getInstance()->isBlacklisted(sound_id, LLAssetType::AT_SOUND))
|
||||
if (FSAssetBlacklist::getInstance()->isBlacklisted(sound_id, LLAssetType::AT_SOUND))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@
|
|||
#include "rlvhandler.h"
|
||||
#include "rlvlocks.h"
|
||||
// [/RLVa:KB]
|
||||
#include "fswsassetblacklist.h"
|
||||
#include "fsassetblacklist.h"
|
||||
|
||||
// <FS:Ansariel> [Legacy Bake]
|
||||
#ifdef OPENSIM
|
||||
|
|
@ -5395,7 +5395,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
|
|||
}
|
||||
|
||||
// <FS:Ansariel> Asset blacklist
|
||||
if (FSWSAssetBlacklist::getInstance()->isBlacklisted(audio_uuid, LLAssetType::AT_SOUND))
|
||||
if (FSAssetBlacklist::getInstance()->isBlacklisted(audio_uuid, LLAssetType::AT_SOUND))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include "fswsassetblacklist.h"
|
||||
#include "fsassetblacklist.h"
|
||||
#include "fsfloaterimport.h"
|
||||
#include "fscommon.h"
|
||||
#include "llfloaterreg.h"
|
||||
|
|
@ -638,9 +638,9 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
|
|||
|
||||
|
||||
|
||||
if(FSWSAssetBlacklist::getInstance()->isBlacklisted(fullid,LLAssetType::AT_OBJECT))
|
||||
if (FSAssetBlacklist::getInstance()->isBlacklisted(fullid, LLAssetType::AT_OBJECT))
|
||||
{
|
||||
LL_INFOS() << "Blacklisted object blocked." << LL_ENDL;
|
||||
LL_INFOS() << "Blacklisted object blocked." << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="ws_asset_blacklist" title="Asset-Blacklist">
|
||||
<floater name="fs_asset_blacklist" title="Asset-Blacklist">
|
||||
<floater.string name="asset_object">
|
||||
Objekt
|
||||
</floater.string>
|
||||
|
|
@ -21,12 +21,17 @@
|
|||
<floater.string name="unknown_region">
|
||||
Unbekannte Region
|
||||
</floater.string>
|
||||
<scroll_list name="result_list">
|
||||
<scroll_list.columns name="name" label="Name"/>
|
||||
<scroll_list.columns name="region" label="Region"/>
|
||||
<scroll_list.columns name="type" label="Typ"/>
|
||||
<scroll_list.columns name="date" label="Datum"/>
|
||||
<scroll_list.columns name="permanent" label="Permanent"/>
|
||||
</scroll_list>
|
||||
<floater.string name="DateFormatString">
|
||||
[day,datetime,local].[mthnum,datetime,local].[year,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local]
|
||||
</floater.string>
|
||||
<filter_editor label="Asset-Blacklist filtern" name="filter_input"/>
|
||||
<fs_scroll_list name="result_list">
|
||||
<columns name="name" label="Name"/>
|
||||
<columns name="region" label="Region"/>
|
||||
<columns name="type" label="Typ"/>
|
||||
<columns name="date" label="Datum"/>
|
||||
<columns name="permanent" label="Permanent"/>
|
||||
</fs_scroll_list>
|
||||
<button name="remove_btn" label="Ausgewählte Objekte von Blacklist entfernen" width="290"/>
|
||||
<button name="close_btn" label="Schließen"/>
|
||||
</floater>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<context_menu name="Asset Blacklist Menu">
|
||||
<menu_item_call label="Entfernen" name="remove"/>
|
||||
</context_menu>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater
|
||||
name="ws_asset_blacklist"
|
||||
name="fs_asset_blacklist"
|
||||
help_topic="fs_asset_blacklist"
|
||||
title="Asset Blacklist"
|
||||
min_width="650"
|
||||
|
|
@ -36,43 +36,64 @@
|
|||
<floater.string name="asset_permanent">
|
||||
✔
|
||||
</floater.string>
|
||||
<scroll_list
|
||||
<floater.string name="DateFormatString">
|
||||
[year,datetime,local]/[mthnum,datetime,local]/[day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local]
|
||||
</floater.string>
|
||||
<filter_editor
|
||||
follows="left|top|right"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
left="4"
|
||||
label="Filter Asset Blacklist"
|
||||
max_length_chars="300"
|
||||
name="filter_input"
|
||||
top="4"
|
||||
right="-4" />
|
||||
<fs_scroll_list
|
||||
name="result_list"
|
||||
left="10"
|
||||
right="-10"
|
||||
top="10"
|
||||
bottom="-32"
|
||||
follows="left|top|bottom|right"
|
||||
left="4"
|
||||
right="-4"
|
||||
top="30"
|
||||
bottom="-36"
|
||||
follows="all"
|
||||
column_padding="10"
|
||||
draw_heading="true"
|
||||
draw_stripes="true"
|
||||
multi_select="true"
|
||||
persist_sort_order="true"
|
||||
primary_sort_only="true"
|
||||
search_column="0"
|
||||
sort_column="2">
|
||||
<scroll_list.columns
|
||||
sort_column="0">
|
||||
<columns
|
||||
name="name"
|
||||
label="Name"
|
||||
dynamicwidth="true"
|
||||
/>
|
||||
<scroll_list.columns
|
||||
<columns
|
||||
name="region"
|
||||
label="Region"
|
||||
width="100"
|
||||
/>
|
||||
<scroll_list.columns
|
||||
<columns
|
||||
name="type"
|
||||
label="Type"
|
||||
width="60"
|
||||
/>
|
||||
<scroll_list.columns
|
||||
<columns
|
||||
name="date"
|
||||
label="Date"
|
||||
sort_column="date_sort"
|
||||
width="120"
|
||||
/>
|
||||
<scroll_list.columns
|
||||
<columns
|
||||
name="permanent"
|
||||
label="Permanent"
|
||||
width="80"
|
||||
/>
|
||||
<columns
|
||||
name="date_sort"
|
||||
width="-1"
|
||||
/>
|
||||
<row>
|
||||
<column column="name">[UNKNOWN] Template item</column>
|
||||
<column column="region">[UNKNOWN] Template item</column>
|
||||
|
|
@ -80,15 +101,23 @@
|
|||
<column column="date">2012-12-11 13:37:00</column>
|
||||
<column column="permanent">✔</column>
|
||||
</row>
|
||||
</scroll_list>
|
||||
</fs_scroll_list>
|
||||
<button
|
||||
name="remove_btn"
|
||||
label="Remove selected items from blacklist"
|
||||
font="SansSerif"
|
||||
mouse_opaque="true"
|
||||
height="20"
|
||||
height="24"
|
||||
width="280"
|
||||
left="10"
|
||||
left="4"
|
||||
bottom="-6"
|
||||
follows="left|bottom"/>
|
||||
<button
|
||||
name="close_btn"
|
||||
label="Close"
|
||||
font="SansSerif"
|
||||
height="24"
|
||||
width="100"
|
||||
right="-4"
|
||||
bottom="-6"
|
||||
follows="right|bottom"/>
|
||||
</floater>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<context_menu
|
||||
name="Asset Blacklist Menu">
|
||||
<menu_item_call
|
||||
label="Remove"
|
||||
name="remove">
|
||||
<menu_item_call.on_click
|
||||
function="Blacklist.Remove"
|
||||
parameter="remove" />
|
||||
</menu_item_call>
|
||||
</context_menu>
|
||||
|
|
@ -1195,7 +1195,7 @@
|
|||
name="asset_blacklist">
|
||||
<menu_item_call.on_click
|
||||
function="Floater.Toggle"
|
||||
parameter="ws_asset_blacklist" />
|
||||
parameter="fs_asset_blacklist" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Avatar Render Settings"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="ws_asset_blacklist" title="LISTA NEGRA">
|
||||
<floater name="fs_asset_blacklist" title="Lista Negra">
|
||||
<floater.string name="asset_object">
|
||||
Objeto
|
||||
</floater.string>
|
||||
|
|
@ -18,11 +18,11 @@
|
|||
<floater.string name="unknown_region">
|
||||
Región desconocida
|
||||
</floater.string>
|
||||
<scroll_list name="result_list">
|
||||
<scroll_list.columns name="name" label="Nombre"/>
|
||||
<scroll_list.columns name="region" label="Region"/>
|
||||
<scroll_list.columns name="type" label="Tipo"/>
|
||||
<scroll_list.columns name="date" label="Fecha"/>
|
||||
</scroll_list>
|
||||
<fs_scroll_list name="result_list">
|
||||
<columns name="name" label="Nombre"/>
|
||||
<columns name="region" label="Region"/>
|
||||
<columns name="type" label="Tipo"/>
|
||||
<columns name="date" label="Fecha"/>
|
||||
</fs_scroll_list>
|
||||
<button name="remove_btn" label="Eliminar los seleccionados de la lista negra"/>
|
||||
</floater>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="ws_asset_blacklist" title="Éléments Blacklistés">
|
||||
<floater name="fs_asset_blacklist" title="Éléments Blacklistés">
|
||||
<floater.string name="asset_object">Objet</floater.string>
|
||||
<floater.string name="asset_texture">Texture</floater.string>
|
||||
<floater.string name="asset_sound">Son</floater.string>
|
||||
|
|
@ -7,17 +7,11 @@
|
|||
<floater.string name="asset_unknown">Inconnu</floater.string>
|
||||
<floater.string name="unknown_object">Objet inconnu</floater.string>
|
||||
<floater.string name="unknown_region">Région inconnue</floater.string>
|
||||
<scroll_list name="result_list">
|
||||
<scroll_list.columns name="name" label="Nom"/>
|
||||
<scroll_list.columns name="region" label="Région"/>
|
||||
<scroll_list.columns name="type" label="Type"/>
|
||||
<scroll_list.columns name="date" label="Date"/>
|
||||
<row>
|
||||
<column>[INCONNU] Template item</column>
|
||||
<column>[INCONNU] Template item</column>
|
||||
<column>INCONNU</column>
|
||||
<column>2012-12-11 13:37:00</column>
|
||||
</row>
|
||||
</scroll_list>
|
||||
<fs_scroll_list name="result_list">
|
||||
<columns name="name" label="Nom"/>
|
||||
<columns name="region" label="Région"/>
|
||||
<columns name="type" label="Type"/>
|
||||
<columns name="date" label="Date"/>
|
||||
</fs_scroll_list>
|
||||
<button name="remove_btn" label="Supprimer la sélection des éléments blacklistés" height="23" width="320"/>
|
||||
</floater>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="ws_asset_blacklist" title="Asset Blacklist">
|
||||
<floater name="fs_asset_blacklist" title="Asset Blacklist">
|
||||
<floater.string name="asset_object">
|
||||
Oggetti
|
||||
</floater.string>
|
||||
|
|
@ -12,10 +12,10 @@
|
|||
<floater.string name="asset_unknown">
|
||||
Sconosciuto
|
||||
</floater.string>
|
||||
<scroll_list name="result_list">
|
||||
<scroll_list.columns name="name" label="Nome"/>
|
||||
<scroll_list.columns name="type" label="Tipo"/>
|
||||
<scroll_list.columns name="date" label="Data"/>
|
||||
</scroll_list>
|
||||
<fs_scroll_list name="result_list">
|
||||
<columns name="name" label="Nome"/>
|
||||
<columns name="type" label="Tipo"/>
|
||||
<columns name="date" label="Data"/>
|
||||
</fs_scroll_list>
|
||||
<button name="remove_btn" label="Rimuovi l'oggetto selezionato dalla Blacklist" />
|
||||
</floater>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="ws_asset_blacklist" title="非表示アイテムリスト">
|
||||
<floater name="fs_asset_blacklist" title="非表示アイテムリスト">
|
||||
<floater.string name="asset_object">
|
||||
オブジェクト
|
||||
</floater.string>
|
||||
|
|
@ -21,20 +21,11 @@
|
|||
<floater.string name="unknown_region">
|
||||
不明の地域
|
||||
</floater.string>
|
||||
<scroll_list name="result_list">
|
||||
<scroll_list.columns name="name" label="名前" />
|
||||
<scroll_list.columns name="region" label="地域" />
|
||||
<scroll_list.columns name="type" label="種類" />
|
||||
<scroll_list.columns name="date" label="日時" />
|
||||
|
||||
<row>
|
||||
<column column="name">[UNKNOWN] 項目</column>
|
||||
<column column="region">[UNKNOWN] 地域</column>
|
||||
<column column="type">不明</column>
|
||||
<column column="date">2012-12-11 13:37:00</column>
|
||||
</row>
|
||||
|
||||
</scroll_list>
|
||||
|
||||
<fs_scroll_list name="result_list">
|
||||
<columns name="name" label="名前" />
|
||||
<columns name="region" label="地域" />
|
||||
<columns name="type" label="種類" />
|
||||
<columns name="date" label="日時" />
|
||||
</fs_scroll_list>
|
||||
<button name="remove_btn" label="選択した項目をリストから除外" />
|
||||
</floater>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="ws_asset_blacklist" title="Czarna lista zasobów danych">
|
||||
<floater name="fs_asset_blacklist" title="Czarna lista zasobów danych">
|
||||
<floater.string name="asset_object">
|
||||
Obiekt
|
||||
</floater.string>
|
||||
|
|
@ -21,10 +21,11 @@
|
|||
<floater.string name="unknown_region">
|
||||
Nieznany region
|
||||
</floater.string>
|
||||
<scroll_list name="result_list">
|
||||
<scroll_list.columns name="name" label="Nazwa" />
|
||||
<scroll_list.columns name="type" label="Typ" />
|
||||
<scroll_list.columns name="date" label="Data" />
|
||||
</scroll_list>
|
||||
<fs_scroll_list name="result_list">
|
||||
<columns name="name" label="Nazwa" />
|
||||
<columns name="type" label="Typ" />
|
||||
<columns name="date" label="Data" />
|
||||
<columns name="permanent" label="Permanentne" />
|
||||
</fs_scroll_list>
|
||||
<button name="remove_btn" label="Usuń zaznaczone z czarnej listy" />
|
||||
</floater>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="ws_asset_blacklist" title="Черный список">
|
||||
<floater name="fs_asset_blacklist" title="Черный список">
|
||||
<floater.string name="asset_object">
|
||||
Объект
|
||||
</floater.string>
|
||||
|
|
@ -21,10 +21,10 @@
|
|||
<floater.string name="unknown_region">
|
||||
Неизвестный регион
|
||||
</floater.string>
|
||||
<scroll_list name="result_list">
|
||||
<scroll_list.columns name="name" label="Имя" />
|
||||
<scroll_list.columns name="type" label="Тип" />
|
||||
<scroll_list.columns name="date" label="Дата" />
|
||||
</scroll_list>
|
||||
<fs_scroll_list name="result_list">
|
||||
<columns name="name" label="Имя" />
|
||||
<columns name="type" label="Тип" />
|
||||
<columns name="date" label="Дата" />
|
||||
</fs_scroll_list>
|
||||
<button name="remove_btn" label="Удалить из черного списка" />
|
||||
</floater>
|
||||
Loading…
Reference in New Issue