Remove traces of our link replace feature now that it's part of the LL viewer
parent
9d38c229fa
commit
86315d2db2
|
|
@ -151,7 +151,6 @@ set(viewer_SOURCE_FILES
|
|||
fsfloaterimport.cpp
|
||||
fsfloaterim.cpp
|
||||
fsfloaterimcontainer.cpp
|
||||
fsfloaterlinkreplace.cpp
|
||||
fsfloaternearbychat.cpp
|
||||
fsfloaterplacedetails.cpp
|
||||
fsfloaterposestand.cpp
|
||||
|
|
@ -897,7 +896,6 @@ set(viewer_HEADER_FILES
|
|||
fsfloaterexport.h
|
||||
fsfloatergroup.h
|
||||
fsfloatergrouptitles.h
|
||||
fsfloaterlinkreplace.h
|
||||
fsfloaterimport.h
|
||||
fsfloaterim.h
|
||||
fsfloaterimcontainer.h
|
||||
|
|
|
|||
|
|
@ -23784,28 +23784,6 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<real>0.8</real>
|
||||
</map>
|
||||
<key>FSLinkReplaceBatchSize</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>The maximum size of a batch in a link replace operation</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>25</integer>
|
||||
</map>
|
||||
<key>FSLinkReplaceBatchPauseTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>The time in seconds between two batches in a link replace operation</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
<key>FSDisableWMIProbing</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -34,9 +34,8 @@
|
|||
#include "llviewerinventory.h"
|
||||
|
||||
static LLDefaultChildRegistry::Register<FSCopyTransInventoryDropTarget> r1("fs_copytrans_inventory_drop_target");
|
||||
static LLDefaultChildRegistry::Register<FSInventoryLinkReplaceDropTarget> r2("fs_inventory_link_replace_drop_target");
|
||||
static LLDefaultChildRegistry::Register<FSDropTarget> r3("profile_drop_target");
|
||||
static LLDefaultChildRegistry::Register<FSEmbeddedItemDropTarget> r4("fs_embedded_item_drop_target");
|
||||
static LLDefaultChildRegistry::Register<FSDropTarget> r2("profile_drop_target");
|
||||
static LLDefaultChildRegistry::Register<FSEmbeddedItemDropTarget> r3("fs_embedded_item_drop_target");
|
||||
|
||||
|
||||
BOOL FSCopyTransInventoryDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
|
|
@ -72,57 +71,6 @@ BOOL FSCopyTransInventoryDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
|||
}
|
||||
|
||||
|
||||
BOOL FSInventoryLinkReplaceDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg)
|
||||
{
|
||||
LLInventoryItem* item = (LLInventoryItem*)cargo_data;
|
||||
|
||||
if (cargo_type >= DAD_TEXTURE && cargo_type <= DAD_LINK &&
|
||||
item && item->getActualType() != LLAssetType::AT_LINK_FOLDER && item->getType() != LLAssetType::AT_CATEGORY &&
|
||||
(
|
||||
LLAssetType::lookupCanLink(item->getType()) ||
|
||||
(item->getType() == LLAssetType::AT_LINK && !gInventory.getObject(item->getLinkedUUID())) // Broken Link!
|
||||
))
|
||||
{
|
||||
if (drop)
|
||||
{
|
||||
setItem(item);
|
||||
if (!mDADSignal.empty())
|
||||
{
|
||||
mDADSignal(mItemID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*accept = ACCEPT_YES_SINGLE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*accept = ACCEPT_NO;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void FSInventoryLinkReplaceDropTarget::setItem(LLInventoryItem* item)
|
||||
{
|
||||
if (item)
|
||||
{
|
||||
mItemID = item->getLinkedUUID();
|
||||
setText(item->getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
mItemID.setNull();
|
||||
setText(LLStringExplicit(""));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FSDropTarget::FSDropTarget(const FSDropTarget::Params& p)
|
||||
: LLView(p),
|
||||
mAgentID(p.agent_id)
|
||||
|
|
|
|||
|
|
@ -70,47 +70,6 @@ private:
|
|||
};
|
||||
|
||||
|
||||
class FSInventoryLinkReplaceDropTarget : public LLLineEditor
|
||||
{
|
||||
public:
|
||||
struct Params : public LLInitParam::Block<Params, LLLineEditor::Params>
|
||||
{
|
||||
Params()
|
||||
{}
|
||||
};
|
||||
|
||||
FSInventoryLinkReplaceDropTarget(const Params& p)
|
||||
: LLLineEditor(p) {}
|
||||
~FSInventoryLinkReplaceDropTarget() {}
|
||||
|
||||
typedef boost::signals2::signal<void(const LLUUID& id)> item_dad_callback_t;
|
||||
boost::signals2::connection setDADCallback(const item_dad_callback_t::slot_type& cb)
|
||||
{
|
||||
return mDADSignal.connect(cb);
|
||||
}
|
||||
|
||||
virtual BOOL postBuild()
|
||||
{
|
||||
setEnabled(FALSE);
|
||||
return LLLineEditor::postBuild();
|
||||
}
|
||||
|
||||
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg);
|
||||
|
||||
LLUUID getItemID() const { return mItemID; }
|
||||
void setItem(LLInventoryItem* item);
|
||||
|
||||
private:
|
||||
LLUUID mItemID;
|
||||
|
||||
item_dad_callback_t mDADSignal;
|
||||
};
|
||||
|
||||
|
||||
class FSDropTarget : public LLView
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -1,329 +0,0 @@
|
|||
/**
|
||||
* @file fsfloaterlinkreplace.cpp
|
||||
* @brief Allows replacing link targets in inventory links
|
||||
*
|
||||
* $LicenseInfo:firstyear=2014&license=viewerlgpl$
|
||||
* Copyright (c) 2014 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 "fsfloaterlinkreplace.h"
|
||||
|
||||
#include "fsdroptarget.h"
|
||||
#include "llagent.h"
|
||||
#include "llappearancemgr.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
FSFloaterLinkReplace::FSFloaterLinkReplace(const LLSD& key)
|
||||
: LLFloater(key),
|
||||
LLEventTimer(gSavedSettings.getF32("FSLinkReplaceBatchPauseTime")),
|
||||
mRemainingItems(0),
|
||||
mSourceUUID(LLUUID::null),
|
||||
mTargetUUID(LLUUID::null),
|
||||
mInstance(NULL),
|
||||
mBatchSize(gSavedSettings.getU32("FSLinkReplaceBatchSize"))
|
||||
{
|
||||
mEventTimer.stop();
|
||||
mInstance = this;
|
||||
}
|
||||
|
||||
FSFloaterLinkReplace::~FSFloaterLinkReplace()
|
||||
{
|
||||
mInstance = NULL;
|
||||
}
|
||||
|
||||
BOOL FSFloaterLinkReplace::postBuild()
|
||||
{
|
||||
mStartBtn = getChild<LLButton>("btn_start");
|
||||
mStartBtn->setCommitCallback(boost::bind(&FSFloaterLinkReplace::onStartClicked, this));
|
||||
|
||||
mRefreshBtn = getChild<LLButton>("btn_refresh");
|
||||
mRefreshBtn->setCommitCallback(boost::bind(&FSFloaterLinkReplace::checkEnableStart, this));
|
||||
|
||||
mSourceEditor = getChild<FSInventoryLinkReplaceDropTarget>("source_uuid_editor");
|
||||
mTargetEditor = getChild<FSInventoryLinkReplaceDropTarget>("target_uuid_editor");
|
||||
|
||||
mSourceEditor->setDADCallback(boost::bind(&FSFloaterLinkReplace::onSourceItemDrop, this, _1));
|
||||
mTargetEditor->setDADCallback(boost::bind(&FSFloaterLinkReplace::onTargetItemDrop, this, _1));
|
||||
|
||||
mStatusText = getChild<LLTextBox>("status_text");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void FSFloaterLinkReplace::onOpen(const LLSD& key)
|
||||
{
|
||||
if (key.asUUID().notNull())
|
||||
{
|
||||
LLUUID item_id = key.asUUID();
|
||||
LLViewerInventoryItem* item = gInventory.getItem(item_id);
|
||||
mSourceEditor->setItem(item);
|
||||
onSourceItemDrop(item->getLinkedUUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
checkEnableStart();
|
||||
}
|
||||
}
|
||||
|
||||
void FSFloaterLinkReplace::onSourceItemDrop(const LLUUID& source_item_id)
|
||||
{
|
||||
mSourceUUID = source_item_id;
|
||||
checkEnableStart();
|
||||
}
|
||||
|
||||
void FSFloaterLinkReplace::onTargetItemDrop(const LLUUID& target_item_id)
|
||||
{
|
||||
mTargetUUID = target_item_id;
|
||||
checkEnableStart();
|
||||
}
|
||||
|
||||
void FSFloaterLinkReplace::updateFoundLinks()
|
||||
{
|
||||
LLInventoryModel::item_array_t items = gInventory.collectLinkedItems(mSourceUUID);
|
||||
mRemainingItems = (U32)items.size();
|
||||
|
||||
LLStringUtil::format_map_t args;
|
||||
args["NUM"] = llformat("%d", mRemainingItems);
|
||||
mStatusText->setText(getString("ItemsFound", args));
|
||||
}
|
||||
|
||||
void FSFloaterLinkReplace::checkEnableStart()
|
||||
{
|
||||
if (mSourceUUID.notNull() && mTargetUUID.notNull() && mSourceUUID == mTargetUUID)
|
||||
{
|
||||
mStatusText->setText(getString("ItemsIdentical"));
|
||||
}
|
||||
else if (mSourceUUID.notNull())
|
||||
{
|
||||
updateFoundLinks();
|
||||
}
|
||||
|
||||
mStartBtn->setEnabled(mRemainingItems > 0 && mSourceUUID.notNull() && mTargetUUID.notNull() && mSourceUUID != mTargetUUID);
|
||||
}
|
||||
|
||||
void FSFloaterLinkReplace::onStartClicked()
|
||||
{
|
||||
LL_INFOS() << "Starting inventory link replace" << LL_ENDL;
|
||||
|
||||
if (mSourceUUID.isNull() || mTargetUUID.isNull())
|
||||
{
|
||||
LL_WARNS() << "Cannot replace. Either source or target UUID is null." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mSourceUUID == mTargetUUID)
|
||||
{
|
||||
LL_WARNS() << "Cannot replace. Source and target are identical." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
mRemainingInventoryItems = gInventory.collectLinkedItems(mSourceUUID);
|
||||
LL_INFOS() << "Found " << mRemainingInventoryItems.size() << " inventory links that need to be replaced." << LL_ENDL;
|
||||
|
||||
if (mRemainingInventoryItems.size() > 0)
|
||||
{
|
||||
LLViewerInventoryItem* target_item = gInventory.getItem(mTargetUUID);
|
||||
if (target_item)
|
||||
{
|
||||
mRemainingItems = (U32)mRemainingInventoryItems.size();
|
||||
|
||||
LLStringUtil::format_map_t args;
|
||||
args["NUM"] = llformat("%d", mRemainingItems);
|
||||
mStatusText->setText(getString("ItemsRemaining", args));
|
||||
|
||||
mStartBtn->setEnabled(FALSE);
|
||||
mRefreshBtn->setEnabled(FALSE);
|
||||
|
||||
mEventTimer.start();
|
||||
tick();
|
||||
}
|
||||
else
|
||||
{
|
||||
mStatusText->setText(getString("TargetNotFound"));
|
||||
LL_WARNS() << "Link replace target not found." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void FSFloaterLinkReplace::linkCreatedCallback(const LLUUID& old_item_id,
|
||||
const LLUUID& target_item_id,
|
||||
bool needs_wearable_ordering_update,
|
||||
bool needs_description_update,
|
||||
const LLUUID& outfit_folder_id)
|
||||
{
|
||||
LL_DEBUGS() << "Inventory link replace:" << LL_NEWLINE
|
||||
<< " - old_item_id = " << old_item_id.asString() << LL_NEWLINE
|
||||
<< " - target_item_id = " << target_item_id.asString() << LL_NEWLINE
|
||||
<< " - order update = " << (needs_wearable_ordering_update ? "true" : "false") << LL_NEWLINE
|
||||
<< " - description update = " << (needs_description_update ? "true" : "false") << LL_NEWLINE
|
||||
<< " - outfit_folder_id = " << outfit_folder_id.asString() << LL_ENDL;
|
||||
|
||||
// If we are replacing an object, bodypart or gesture link within an outfit folder,
|
||||
// we need to change the actual description of the link itself. LLAppearanceMgr *should*
|
||||
// have created COF links that will be used to save the outfit with an empty description.
|
||||
// Since link_inventory_array() will set the description of the linked item for the link
|
||||
// itself, this will lead to a dirty outfit state when the outfit with the replaced
|
||||
// link is worn. So we have to correct this.
|
||||
if (needs_description_update && outfit_folder_id.notNull())
|
||||
{
|
||||
LLInventoryModel::item_array_t items;
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLLinkedItemIDMatches is_target_link(target_item_id);
|
||||
gInventory.collectDescendentsIf(outfit_folder_id,
|
||||
cats,
|
||||
items,
|
||||
LLInventoryModel::EXCLUDE_TRASH,
|
||||
is_target_link);
|
||||
|
||||
for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); ++it)
|
||||
{
|
||||
LLPointer<LLViewerInventoryItem> item = *it;
|
||||
|
||||
if ((item->getType() == LLAssetType::AT_BODYPART ||
|
||||
item->getType() == LLAssetType::AT_OBJECT ||
|
||||
item->getType() == LLAssetType::AT_GESTURE)
|
||||
&& !item->getActualDescription().empty())
|
||||
{
|
||||
LL_DEBUGS() << "Updating description for " << item->getName() << LL_ENDL;
|
||||
|
||||
LLSD updates;
|
||||
updates["desc"] = "";
|
||||
update_inventory_item(item->getUUID(), updates, LLPointer<LLInventoryCallback>(NULL));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLUUID outfit_update_folder = LLUUID::null;
|
||||
if (needs_wearable_ordering_update && outfit_folder_id.notNull())
|
||||
{
|
||||
// If a wearable item was involved in the link replace operation and replaced
|
||||
// a link in an outfit folder, we need to update the clothing ordering information
|
||||
// *after* the original link has been removed. LLAppearanceMgr abuses the actual link
|
||||
// description to store the clothing ordering information it. We will have to update
|
||||
// the clothing ordering information or the outfit will be in dirty state when worn.
|
||||
outfit_update_folder = outfit_folder_id;
|
||||
}
|
||||
|
||||
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&FSFloaterLinkReplace::itemRemovedCallback, this, outfit_update_folder));
|
||||
remove_inventory_object(old_item_id, cb);
|
||||
}
|
||||
|
||||
void FSFloaterLinkReplace::itemRemovedCallback(const LLUUID& outfit_folder_id)
|
||||
{
|
||||
if (outfit_folder_id.notNull())
|
||||
{
|
||||
LLAppearanceMgr::getInstance()->updateClothingOrderingInfo(outfit_folder_id);
|
||||
}
|
||||
|
||||
if (mInstance)
|
||||
{
|
||||
decreaseOpenItemCount();
|
||||
}
|
||||
}
|
||||
|
||||
void FSFloaterLinkReplace::decreaseOpenItemCount()
|
||||
{
|
||||
mRemainingItems--;
|
||||
|
||||
if (mRemainingItems == 0)
|
||||
{
|
||||
mStatusText->setText(getString("ReplaceFinished"));
|
||||
mStartBtn->setEnabled(TRUE);
|
||||
mRefreshBtn->setEnabled(TRUE);
|
||||
mEventTimer.stop();
|
||||
LL_INFOS() << "Inventory link replace finished." << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["NUM"] = llformat("%d", mRemainingItems);
|
||||
mStatusText->setText(getString("ItemsRemaining", args));
|
||||
LL_DEBUGS() << "Inventory link replace: " << mRemainingItems << " links remaining..." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL FSFloaterLinkReplace::tick()
|
||||
{
|
||||
LL_DEBUGS() << "Calling tick - remaining items = " << mRemainingInventoryItems.size() << LL_ENDL;
|
||||
|
||||
LLInventoryModel::item_array_t current_batch;
|
||||
|
||||
for (U32 i = 0; i < mBatchSize; ++i)
|
||||
{
|
||||
if (!mRemainingInventoryItems.size())
|
||||
{
|
||||
mEventTimer.stop();
|
||||
break;
|
||||
}
|
||||
|
||||
current_batch.push_back(mRemainingInventoryItems.back());
|
||||
mRemainingInventoryItems.pop_back();
|
||||
}
|
||||
processBatch(current_batch);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void FSFloaterLinkReplace::processBatch(LLInventoryModel::item_array_t items)
|
||||
{
|
||||
const LLViewerInventoryItem* target_item = gInventory.getItem(mTargetUUID);
|
||||
const LLUUID cof_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
|
||||
const LLUUID outfit_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS, false);
|
||||
|
||||
for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); ++it)
|
||||
{
|
||||
LLPointer<LLInventoryItem> source_item = *it;
|
||||
|
||||
if (source_item->getParentUUID() != cof_folder_id)
|
||||
{
|
||||
bool is_outfit_folder = gInventory.isObjectDescendentOf(source_item->getParentUUID(), outfit_folder_id);
|
||||
// If either the new or old item in the COF is a wearable, we need to update wearable ordering after the link has been replaced
|
||||
bool needs_wearable_ordering_update = is_outfit_folder && source_item->getType() == LLAssetType::AT_CLOTHING || target_item->getType() == LLAssetType::AT_CLOTHING;
|
||||
// Other items in the COF need a description update (description of the actual link item must be empty)
|
||||
bool needs_description_update = is_outfit_folder && target_item->getType() != LLAssetType::AT_CLOTHING;
|
||||
|
||||
LL_DEBUGS() << "is_outfit_folder = " << (is_outfit_folder ? "true" : "false") << LL_NEWLINE
|
||||
<< "needs_wearable_ordering_update = " << (needs_wearable_ordering_update ? "true" : "false") << LL_NEWLINE
|
||||
<< "needs_description_update = " << (needs_description_update ? "true" : "false") << LL_ENDL;
|
||||
|
||||
LLInventoryObject::const_object_list_t obj_array;
|
||||
obj_array.push_back(LLConstPointer<LLInventoryObject>(target_item));
|
||||
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&FSFloaterLinkReplace::linkCreatedCallback,
|
||||
this,
|
||||
source_item->getUUID(),
|
||||
target_item->getUUID(),
|
||||
needs_wearable_ordering_update,
|
||||
needs_description_update,
|
||||
(is_outfit_folder ? source_item->getParentUUID() : LLUUID::null) ));
|
||||
link_inventory_array(source_item->getParentUUID(), obj_array, cb);
|
||||
}
|
||||
else
|
||||
{
|
||||
decreaseOpenItemCount();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
/**
|
||||
* @file fsfloaterlinkreplace.h
|
||||
* @brief Allows replacing link targets in inventory links
|
||||
*
|
||||
* $LicenseInfo:firstyear=2014&license=viewerlgpl$
|
||||
* Copyright (c) 2014 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$
|
||||
*/
|
||||
|
||||
#ifndef FS_FLOATERLINKREPLACE_H
|
||||
#define FS_FLOATERLINKREPLACE_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "lleventtimer.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llviewerinventory.h"
|
||||
|
||||
class FSInventoryLinkReplaceDropTarget;
|
||||
class LLButton;
|
||||
class LLTextBox;
|
||||
|
||||
class FSFloaterLinkReplace : public LLFloater, LLEventTimer
|
||||
{
|
||||
LOG_CLASS(FSFloaterLinkReplace);
|
||||
|
||||
public:
|
||||
FSFloaterLinkReplace(const LLSD& key);
|
||||
virtual ~FSFloaterLinkReplace();
|
||||
|
||||
BOOL postBuild();
|
||||
virtual void onOpen(const LLSD& key);
|
||||
|
||||
virtual BOOL tick();
|
||||
|
||||
private:
|
||||
void checkEnableStart();
|
||||
void onStartClicked();
|
||||
void decreaseOpenItemCount();
|
||||
void updateFoundLinks();
|
||||
void processBatch(LLInventoryModel::item_array_t items);
|
||||
|
||||
void linkCreatedCallback(const LLUUID& old_item_id,
|
||||
const LLUUID& target_item_id,
|
||||
bool needs_wearable_ordering_update,
|
||||
bool needs_description_update,
|
||||
const LLUUID& outfit_folder_id);
|
||||
void itemRemovedCallback(const LLUUID& outfit_folder_id);
|
||||
|
||||
void onSourceItemDrop(const LLUUID& source_item_id);
|
||||
void onTargetItemDrop(const LLUUID& target_item_id);
|
||||
|
||||
FSInventoryLinkReplaceDropTarget* mSourceEditor;
|
||||
FSInventoryLinkReplaceDropTarget* mTargetEditor;
|
||||
LLButton* mStartBtn;
|
||||
LLButton* mRefreshBtn;
|
||||
LLTextBox* mStatusText;
|
||||
|
||||
LLUUID mSourceUUID;
|
||||
LLUUID mTargetUUID;
|
||||
U32 mRemainingItems;
|
||||
U32 mBatchSize;
|
||||
|
||||
LLInventoryModel::item_array_t mRemainingInventoryItems;
|
||||
|
||||
FSFloaterLinkReplace* mInstance;
|
||||
};
|
||||
|
||||
#endif // FS_FLOATERLINKREPLACE_H
|
||||
|
|
@ -185,7 +185,6 @@
|
|||
#include "fsfloaterimport.h"
|
||||
#include "fsfloaterim.h"
|
||||
#include "fsfloaterimcontainer.h"
|
||||
#include "fsfloaterlinkreplace.h"
|
||||
#include "fsfloaterplacedetails.h"
|
||||
#include "fsfloaterposestand.h"
|
||||
#include "fsfloaterprofile.h"
|
||||
|
|
@ -461,7 +460,6 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLFloaterReg::add("fs_group_titles", "floater_fs_group_titles.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterGroupTitles>);
|
||||
LLFloaterReg::add("fs_export", "floater_fs_export.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterObjectExport>);
|
||||
LLFloaterReg::add("fs_import", "floater_fs_import.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterImport>);
|
||||
LLFloaterReg::add("fs_linkreplace", "floater_fs_linkreplace.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterLinkReplace>);
|
||||
LLFloaterReg::add("fs_posestand", "floater_fs_posestand.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterPoseStand>);
|
||||
LLFloaterReg::add("fs_placedetails", "floater_fs_placedetails.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterPlaceDetails>);
|
||||
LLFloaterReg::add("fs_radar", "floater_fs_radar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterRadar>);
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@
|
|||
Ersetzen von Inventar-Links beendet.
|
||||
</string>
|
||||
<text name="source_label">
|
||||
Quelle:
|
||||
Alt:
|
||||
</text>
|
||||
<fs_inventory_link_replace_drop_target name="source_uuid_editor" tool_tip="Quell-Objekt aus dem Inventar hier per Drag&Drop hineinziehen."/>
|
||||
<inventory_link_replace_drop_target name="source_uuid_editor" tool_tip="Quell-Objekt aus dem Inventar hier per Drag&Drop hineinziehen."/>
|
||||
<text name="target_label">
|
||||
Ziel:
|
||||
Neu:
|
||||
</text>
|
||||
<fs_inventory_link_replace_drop_target name="target_uuid_editor" tool_tip="Ziel-Objekt aus dem Inventar hier per Drag&Drop hineinziehen."/>
|
||||
<inventory_link_replace_drop_target name="target_uuid_editor" tool_tip="Ziel-Objekt aus dem Inventar hier per Drag&Drop hineinziehen."/>
|
||||
<text name="status_text">
|
||||
Bereit...
|
||||
</text>
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
name="fs_linkreplace"
|
||||
help_topic="fs_linkreplace"
|
||||
positioning="centered"
|
||||
title="Replace Inventory Links"
|
||||
width="333"
|
||||
height="130"
|
||||
save_rect="true"
|
||||
can_minimize="true"
|
||||
can_close="true">
|
||||
<string name="Ready">
|
||||
Ready...
|
||||
</string>
|
||||
<string name="TargetNotFound">
|
||||
Target item not found.
|
||||
</string>
|
||||
<string name="ItemsIdentical">
|
||||
Source and target are identical.
|
||||
</string>
|
||||
<string name="ItemsFound">
|
||||
Found [NUM] inventory links.
|
||||
</string>
|
||||
<string name="ItemsRemaining">
|
||||
Links remaining: [NUM]
|
||||
</string>
|
||||
<string name="ReplaceFinished">
|
||||
Finished replacing inventory links.
|
||||
</string>
|
||||
<text
|
||||
type="string"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
width="45"
|
||||
name="source_label"
|
||||
top="10">
|
||||
Source:
|
||||
</text>
|
||||
<fs_inventory_link_replace_drop_target
|
||||
name="source_uuid_editor"
|
||||
follows="left|top|right"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
left_pad="10"
|
||||
max_length_bytes="255"
|
||||
top_delta="-3"
|
||||
right="-10"
|
||||
tool_tip="Drag and drop source inventory item here."/>
|
||||
<text
|
||||
type="string"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
width="45"
|
||||
name="target_label"
|
||||
top_pad="10">
|
||||
Target:
|
||||
</text>
|
||||
<fs_inventory_link_replace_drop_target
|
||||
name="target_uuid_editor"
|
||||
follows="left|top|right"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
left_pad="10"
|
||||
max_length_bytes="255"
|
||||
top_delta="-3"
|
||||
right="-10"
|
||||
tool_tip="Drag and drop target inventory item here."/>
|
||||
<text
|
||||
type="string"
|
||||
follows="left|top|right"
|
||||
font="SansSerif"
|
||||
height="20"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
right="-10"
|
||||
name="status_text"
|
||||
top_pad="10">
|
||||
Ready...
|
||||
</text>
|
||||
<button
|
||||
top_pad="5"
|
||||
left="10"
|
||||
height="22"
|
||||
width="90"
|
||||
follows="left|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
name="btn_refresh"
|
||||
label="Refresh"/>
|
||||
<button
|
||||
top_delta="0"
|
||||
right="-10"
|
||||
height="22"
|
||||
width="90"
|
||||
follows="right|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
name="btn_start"
|
||||
label="Start"/>
|
||||
</floater>
|
||||
|
|
@ -7,9 +7,9 @@
|
|||
<string name="ItemsRemaining">Liens restants : [NUM]</string>
|
||||
<string name="ReplaceFinished">Modification des liens de l'inventaire terminée.</string>
|
||||
<text name="source_label">Original :</text>
|
||||
<fs_inventory_link_replace_drop_target name="source_uuid_editor" tool_tip="Faites glisser l'objet original ici."/>
|
||||
<inventory_link_replace_drop_target name="source_uuid_editor" tool_tip="Faites glisser l'objet original ici."/>
|
||||
<text name="target_label">Remplaçant :</text>
|
||||
<fs_inventory_link_replace_drop_target name="target_uuid_editor" tool_tip="Faites glisser l'objet remplaçant ici."/>
|
||||
<inventory_link_replace_drop_target name="target_uuid_editor" tool_tip="Faites glisser l'objet remplaçant ici."/>
|
||||
<text name="status_text">Prêt...</text>
|
||||
<button name="btn_refresh" label="Actualiser"/>
|
||||
<button name="btn_start" label="Démarrer"/>
|
||||
|
|
@ -21,11 +21,11 @@
|
|||
<text name="source_label">
|
||||
Źródło:
|
||||
</text>
|
||||
<fs_inventory_link_replace_drop_target name="source_uuid_editor" tool_tip="Przeciągnij i upuść tutaj przedmiot, którego linki chcesz zastąpić." />
|
||||
<inventory_link_replace_drop_target name="source_uuid_editor" tool_tip="Przeciągnij i upuść tutaj przedmiot, którego linki chcesz zastąpić." />
|
||||
<text name="target_label">
|
||||
Cel:
|
||||
</text>
|
||||
<fs_inventory_link_replace_drop_target name="target_uuid_editor" tool_tip="Przeciągnij i upuść tutaj przedmiot, którego linki zastąpią linki do przedmiotu pierwotnego." />
|
||||
<inventory_link_replace_drop_target name="target_uuid_editor" tool_tip="Przeciągnij i upuść tutaj przedmiot, którego linki zastąpią linki do przedmiotu pierwotnego." />
|
||||
<text name="status_text">
|
||||
Gotowy...
|
||||
</text>
|
||||
Loading…
Reference in New Issue