This might just fix the double inventory thing
This commit is contained in:
@@ -79,4 +79,8 @@ if (DARWIN)
|
|||||||
)
|
)
|
||||||
endif (DARWIN)
|
endif (DARWIN)
|
||||||
|
|
||||||
|
if (LINUX)
|
||||||
|
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lrt")
|
||||||
|
endif (LINUX)
|
||||||
|
|
||||||
#ll_deploy_sharedlibs_command(SLPlugin)
|
#ll_deploy_sharedlibs_command(SLPlugin)
|
||||||
|
|||||||
@@ -161,10 +161,7 @@ LLView::~LLView()
|
|||||||
gFocusMgr.removeMouseCaptureWithoutCallback( this );
|
gFocusMgr.removeMouseCaptureWithoutCallback( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
// <edit> TESTZONE DERF
|
deleteAllChildren();
|
||||||
//deleteAllChildren();
|
|
||||||
deleteAllChildren(mDelayedDelete);
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
if (mParentView != NULL)
|
if (mParentView != NULL)
|
||||||
{
|
{
|
||||||
@@ -596,26 +593,8 @@ BOOL LLView::focusPrev(LLView::child_list_t & result)
|
|||||||
// delete all children. Override this function if you need to
|
// delete all children. Override this function if you need to
|
||||||
// perform any extra clean up such as cached pointers to selected
|
// perform any extra clean up such as cached pointers to selected
|
||||||
// children, etc.
|
// children, etc.
|
||||||
// <edit>
|
void LLView::deleteAllChildren()
|
||||||
//void LLView::deleteAllChildren()
|
|
||||||
void LLView::deleteAllChildren(BOOL delay_delete)
|
|
||||||
// </edit>
|
|
||||||
{
|
{
|
||||||
// <edit> TESTZONE DERF
|
|
||||||
if(delay_delete)
|
|
||||||
{
|
|
||||||
child_list_t::iterator end = mChildList.end();
|
|
||||||
for(child_list_t::iterator iter = mChildList.begin(); iter != end; ++iter)
|
|
||||||
{
|
|
||||||
if((*iter)->getParent() == this)
|
|
||||||
(*iter)->mParentView = NULL;
|
|
||||||
}
|
|
||||||
mCtrlOrder.clear();
|
|
||||||
std::list<LLView*> children(mChildList);
|
|
||||||
gDeleteScheduler->addViewDeleteJob(children);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
// clear out the control ordering
|
// clear out the control ordering
|
||||||
mCtrlOrder.clear();
|
mCtrlOrder.clear();
|
||||||
|
|
||||||
|
|||||||
@@ -328,13 +328,7 @@ public:
|
|||||||
BOOL focusNextRoot();
|
BOOL focusNextRoot();
|
||||||
BOOL focusPrevRoot();
|
BOOL focusPrevRoot();
|
||||||
|
|
||||||
// delete all children. Override this function if you need to
|
virtual void deleteAllChildren();
|
||||||
// perform any extra clean up such as cached pointers to selected
|
|
||||||
// children, etc.
|
|
||||||
// <edit>
|
|
||||||
//virtual void deleteAllChildren();
|
|
||||||
virtual void deleteAllChildren(BOOL delay_delete = FALSE);
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
virtual void setTentative(BOOL b);
|
virtual void setTentative(BOOL b);
|
||||||
virtual BOOL getTentative() const;
|
virtual BOOL getTentative() const;
|
||||||
|
|||||||
@@ -162,7 +162,6 @@ LLFolderViewItem::LLFolderViewItem( const std::string& name, LLUIImagePtr icon,
|
|||||||
mIcon(icon),
|
mIcon(icon),
|
||||||
mHasVisibleChildren(FALSE),
|
mHasVisibleChildren(FALSE),
|
||||||
mIndentation(0),
|
mIndentation(0),
|
||||||
mNumDescendantsSelected(0),
|
|
||||||
mFiltered(FALSE),
|
mFiltered(FALSE),
|
||||||
mLastFilterGeneration(-1),
|
mLastFilterGeneration(-1),
|
||||||
mStringMatchOffset(std::string::npos),
|
mStringMatchOffset(std::string::npos),
|
||||||
@@ -282,40 +281,7 @@ void LLFolderViewItem::refreshFromListener()
|
|||||||
{
|
{
|
||||||
if(mListener)
|
if(mListener)
|
||||||
{
|
{
|
||||||
//Super crazy hack to build the creator search label - RK
|
|
||||||
LLInventoryItem* item = gInventory.getItem(mListener->getUUID());
|
|
||||||
std::string creator_name;
|
|
||||||
if(item)
|
|
||||||
{
|
|
||||||
if(item->getCreatorUUID().notNull())
|
|
||||||
{
|
|
||||||
gCacheName->getFullName(item->getCreatorUUID(), creator_name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mLabelCreator = creator_name;
|
|
||||||
/*if(creator_name == "(Loading...)")
|
|
||||||
mLabelCreator = "";
|
|
||||||
else
|
|
||||||
mLabelCreator = creator_name;*/
|
|
||||||
|
|
||||||
//Label for desc search
|
|
||||||
std::string desc;
|
|
||||||
if (item)
|
|
||||||
{
|
|
||||||
if (!item->getDescription().empty())
|
|
||||||
{
|
|
||||||
desc = item->getDescription();
|
|
||||||
LLStringUtil::toUpper(desc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mLabelDesc = desc;
|
|
||||||
|
|
||||||
//Label for name search
|
|
||||||
mLabel = mListener->getDisplayName();
|
mLabel = mListener->getDisplayName();
|
||||||
|
|
||||||
//Build label for combined search - RK
|
|
||||||
mLabelAll = mLabel + " " + mLabelCreator + " " + mLabelDesc;
|
|
||||||
|
|
||||||
setIcon(mListener->getIcon());
|
setIcon(mListener->getIcon());
|
||||||
time_t creation_date = mListener->getCreationDate();
|
time_t creation_date = mListener->getCreationDate();
|
||||||
if (mCreationDate != creation_date)
|
if (mCreationDate != creation_date)
|
||||||
@@ -325,6 +291,30 @@ void LLFolderViewItem::refreshFromListener()
|
|||||||
}
|
}
|
||||||
mLabelStyle = mListener->getLabelStyle();
|
mLabelStyle = mListener->getLabelStyle();
|
||||||
mLabelSuffix = mListener->getLabelSuffix();
|
mLabelSuffix = mListener->getLabelSuffix();
|
||||||
|
|
||||||
|
LLInventoryItem* item = gInventory.getItem(mListener->getUUID());
|
||||||
|
|
||||||
|
std::string desc;
|
||||||
|
if (item)
|
||||||
|
{
|
||||||
|
if (!item->getDescription().empty())
|
||||||
|
{
|
||||||
|
desc = item->getDescription();
|
||||||
|
LLStringUtil::toUpper(desc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mSearchableLabelDesc = desc;
|
||||||
|
|
||||||
|
std::string creator_name;
|
||||||
|
if (item)
|
||||||
|
{
|
||||||
|
if (item->getCreatorUUID().notNull())
|
||||||
|
{
|
||||||
|
gCacheName->getFullName(item->getCreatorUUID(), creator_name);
|
||||||
|
LLStringUtil::toUpper(creator_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mSearchableLabelCreator = creator_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,32 +323,12 @@ void LLFolderViewItem::refresh()
|
|||||||
refreshFromListener();
|
refreshFromListener();
|
||||||
|
|
||||||
std::string searchable_label(mLabel);
|
std::string searchable_label(mLabel);
|
||||||
std::string searchable_label_creator(mLabelCreator);
|
|
||||||
std::string searchable_label_desc(mLabelDesc);
|
|
||||||
std::string searchable_label_all(mLabelAll);
|
|
||||||
|
|
||||||
//add the (no modify), (no transfer) etc stuff to each label.
|
|
||||||
searchable_label.append(mLabelSuffix);
|
searchable_label.append(mLabelSuffix);
|
||||||
searchable_label_creator.append(mLabelSuffix);
|
|
||||||
searchable_label_desc.append(mLabelSuffix);
|
|
||||||
searchable_label_all.append(mLabelSuffix);
|
|
||||||
|
|
||||||
//all labels need to be uppercase.
|
|
||||||
LLStringUtil::toUpper(searchable_label);
|
LLStringUtil::toUpper(searchable_label);
|
||||||
LLStringUtil::toUpper(searchable_label_creator);
|
|
||||||
LLStringUtil::toUpper(searchable_label_desc);
|
|
||||||
LLStringUtil::toUpper(searchable_label_all);
|
|
||||||
|
|
||||||
if (mSearchableLabel.compare(searchable_label) ||
|
if (mSearchableLabel.compare(searchable_label))
|
||||||
mSearchableLabelCreator.compare(searchable_label_creator) ||
|
|
||||||
mSearchableLabelDesc.compare(searchable_label_desc) ||
|
|
||||||
mSearchableLabelAll.compare(searchable_label_all))
|
|
||||||
{
|
{
|
||||||
mSearchableLabel.assign(searchable_label);
|
mSearchableLabel.assign(searchable_label);
|
||||||
mSearchableLabelCreator.assign(searchable_label_creator);
|
|
||||||
mSearchableLabelDesc.assign(searchable_label_desc);
|
|
||||||
mSearchableLabelAll.assign(searchable_label_all);
|
|
||||||
|
|
||||||
dirtyFilter();
|
dirtyFilter();
|
||||||
// some part of label has changed, so overall width has potentially changed
|
// some part of label has changed, so overall width has potentially changed
|
||||||
if (mParentFolder)
|
if (mParentFolder)
|
||||||
@@ -520,9 +490,16 @@ BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL openitem,
|
|||||||
|
|
||||||
BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selected)
|
BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selected)
|
||||||
{
|
{
|
||||||
if(selection == this && mIsSelected != selected)
|
if (selection == this && mIsSelected != selected)
|
||||||
{
|
{
|
||||||
mIsSelected = selected;
|
if (mIsSelected)
|
||||||
|
{
|
||||||
|
deselectItem();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
selectItem();
|
||||||
|
}
|
||||||
if(mListener)
|
if(mListener)
|
||||||
{
|
{
|
||||||
mListener->selectItem();
|
mListener->selectItem();
|
||||||
@@ -532,22 +509,6 @@ BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selecte
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFolderViewItem::recursiveDeselect(BOOL deselect_self)
|
|
||||||
{
|
|
||||||
if (mIsSelected && deselect_self)
|
|
||||||
{
|
|
||||||
mIsSelected = FALSE;
|
|
||||||
|
|
||||||
// update ancestors' count of selected descendents
|
|
||||||
LLFolderViewFolder* parent_folder = getParentFolder();
|
|
||||||
while(parent_folder)
|
|
||||||
{
|
|
||||||
parent_folder->mNumDescendantsSelected--;
|
|
||||||
parent_folder = parent_folder->getParentFolder();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLFolderViewItem::deselectItem(void)
|
void LLFolderViewItem::deselectItem(void)
|
||||||
{
|
{
|
||||||
llassert(mIsSelected);
|
llassert(mIsSelected);
|
||||||
@@ -650,16 +611,6 @@ void LLFolderViewItem::preview( void )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void LLFolderViewItem::rename(const std::string& new_name)
|
void LLFolderViewItem::rename(const std::string& new_name)
|
||||||
{
|
{
|
||||||
if( !new_name.empty() )
|
if( !new_name.empty() )
|
||||||
@@ -677,20 +628,31 @@ void LLFolderViewItem::rename(const std::string& new_name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& LLFolderViewItem::getSearchableLabel() const
|
std::string& LLFolderViewItem::getSearchableLabel()
|
||||||
{
|
{
|
||||||
U32 type = mRoot->getFilter()->getSearchType();
|
mSearchable = "";
|
||||||
switch(type)
|
U32 flags = mRoot->getSearchType();
|
||||||
|
if (flags == 0 || (flags & 1))
|
||||||
{
|
{
|
||||||
case 1:
|
mSearchable = mSearchableLabel;
|
||||||
return mSearchableLabelCreator;
|
|
||||||
case 2:
|
|
||||||
return mSearchableLabelDesc;
|
|
||||||
case 3:
|
|
||||||
return mSearchableLabelAll;
|
|
||||||
default:
|
|
||||||
return mSearchableLabel;
|
|
||||||
}
|
}
|
||||||
|
if (flags & 2)
|
||||||
|
{
|
||||||
|
if (mSearchable.length())
|
||||||
|
{
|
||||||
|
mSearchable += " ";
|
||||||
|
}
|
||||||
|
mSearchable += mSearchableLabelDesc;
|
||||||
|
}
|
||||||
|
if (flags & 4)
|
||||||
|
{
|
||||||
|
if (mSearchable.length())
|
||||||
|
{
|
||||||
|
mSearchable += " ";
|
||||||
|
}
|
||||||
|
mSearchable += mSearchableLabelCreator;
|
||||||
|
}
|
||||||
|
return mSearchable;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& LLFolderViewItem::getName( void ) const
|
const std::string& LLFolderViewItem::getName( void ) const
|
||||||
@@ -776,12 +738,6 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
|
|||||||
{
|
{
|
||||||
src = LLToolDragAndDrop::SOURCE_LIBRARY;
|
src = LLToolDragAndDrop::SOURCE_LIBRARY;
|
||||||
}
|
}
|
||||||
// <edit>
|
|
||||||
else if(mListener && gInventory.isObjectDescendentOf(mListener->getUUID(), gSystemFolderRoot))
|
|
||||||
{ // Note: this is only ok if all future pretend folders are subcategories of Pretend Inventory
|
|
||||||
src = LLToolDragAndDrop::SOURCE_LIBRARY;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
can_drag = root->startDrag(src);
|
can_drag = root->startDrag(src);
|
||||||
if (can_drag)
|
if (can_drag)
|
||||||
@@ -1054,16 +1010,13 @@ void LLFolderViewItem::draw()
|
|||||||
if (sBoxImage.notNull() && mStringMatchOffset != std::string::npos)
|
if (sBoxImage.notNull() && mStringMatchOffset != std::string::npos)
|
||||||
{
|
{
|
||||||
// don't draw backgrounds for zero-length strings
|
// don't draw backgrounds for zero-length strings
|
||||||
S32 filter_string_length = mRoot->getFilterSubString().size();
|
|
||||||
std::string combined_string = mLabel + mLabelSuffix;
|
std::string combined_string = mLabel + mLabelSuffix;
|
||||||
|
S32 filter_string_length = mRoot->getFilterSubString().size();
|
||||||
//fix so that highlighting works properly again - rkeast
|
std::string combined_string_upper = combined_string;
|
||||||
std::string check = combined_string;
|
LLStringUtil::toUpper(combined_string_upper);
|
||||||
LLStringUtil::toUpper(check);
|
if (filter_string_length > 0 && (mRoot->getSearchType() & 1) &&
|
||||||
|
combined_string_upper.find(mRoot->getFilterSubString()) == mStringMatchOffset)
|
||||||
if ((filter_string_length > 0) && (check.find(mRoot->getFilterSubString()) != -1))
|
|
||||||
{
|
{
|
||||||
// llinfos << "mLabel " << mLabel<< " mLabelSuffix " << mLabelSuffix << " mLabel " << mLabel << " mLabel " << mLabel << llendl;
|
|
||||||
S32 left = llround(text_left) + sFont->getWidth(combined_string, 0, mStringMatchOffset) - 1;
|
S32 left = llround(text_left) + sFont->getWidth(combined_string, 0, mStringMatchOffset) - 1;
|
||||||
S32 right = left + sFont->getWidth(combined_string, mStringMatchOffset, filter_string_length) + 2;
|
S32 right = left + sFont->getWidth(combined_string, mStringMatchOffset, filter_string_length) + 2;
|
||||||
S32 bottom = llfloor(getRect().getHeight() - sFont->getLineHeight() - 3);
|
S32 bottom = llfloor(getRect().getHeight() - sFont->getLineHeight() - 3);
|
||||||
@@ -1486,7 +1439,10 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem
|
|||||||
BOOL rv = FALSE;
|
BOOL rv = FALSE;
|
||||||
if( selection == this )
|
if( selection == this )
|
||||||
{
|
{
|
||||||
mIsSelected = TRUE;
|
if (!isSelected())
|
||||||
|
{
|
||||||
|
selectItem();
|
||||||
|
}
|
||||||
if(mListener)
|
if(mListener)
|
||||||
{
|
{
|
||||||
mListener->selectItem();
|
mListener->selectItem();
|
||||||
@@ -1495,7 +1451,10 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mIsSelected = FALSE;
|
if (isSelected())
|
||||||
|
{
|
||||||
|
deselectItem();
|
||||||
|
}
|
||||||
rv = FALSE;
|
rv = FALSE;
|
||||||
}
|
}
|
||||||
BOOL child_selected = FALSE;
|
BOOL child_selected = FALSE;
|
||||||
@@ -1508,7 +1467,6 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem
|
|||||||
{
|
{
|
||||||
rv = TRUE;
|
rv = TRUE;
|
||||||
child_selected = TRUE;
|
child_selected = TRUE;
|
||||||
mNumDescendantsSelected++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (items_t::iterator iter = mItems.begin();
|
for (items_t::iterator iter = mItems.begin();
|
||||||
@@ -1519,7 +1477,6 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem
|
|||||||
{
|
{
|
||||||
rv = TRUE;
|
rv = TRUE;
|
||||||
child_selected = TRUE;
|
child_selected = TRUE;
|
||||||
mNumDescendantsSelected++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(openitem && child_selected)
|
if(openitem && child_selected)
|
||||||
@@ -1538,28 +1495,30 @@ BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selec
|
|||||||
BOOL rv = FALSE;
|
BOOL rv = FALSE;
|
||||||
if(selection == this)
|
if(selection == this)
|
||||||
{
|
{
|
||||||
mIsSelected = selected;
|
if (isSelected() != selected)
|
||||||
|
{
|
||||||
|
rv = TRUE;
|
||||||
|
if (selected)
|
||||||
|
{
|
||||||
|
selectItem();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
deselectItem();
|
||||||
|
}
|
||||||
|
}
|
||||||
if(mListener && selected)
|
if(mListener && selected)
|
||||||
{
|
{
|
||||||
mListener->selectItem();
|
mListener->selectItem();
|
||||||
}
|
}
|
||||||
rv = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (folders_t::iterator iter = mFolders.begin();
|
for (folders_t::iterator iter = mFolders.begin();
|
||||||
iter != mFolders.end();)
|
iter != mFolders.end();)
|
||||||
{
|
{
|
||||||
folders_t::iterator fit = iter++;
|
folders_t::iterator fit = iter++;
|
||||||
if((*fit)->changeSelection(selection, selected))
|
if ((*fit)->changeSelection(selection, selected))
|
||||||
{
|
{
|
||||||
if (selected)
|
|
||||||
{
|
|
||||||
mNumDescendantsSelected++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mNumDescendantsSelected--;
|
|
||||||
}
|
|
||||||
rv = TRUE;
|
rv = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1567,33 +1526,22 @@ BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selec
|
|||||||
iter != mItems.end();)
|
iter != mItems.end();)
|
||||||
{
|
{
|
||||||
items_t::iterator iit = iter++;
|
items_t::iterator iit = iter++;
|
||||||
if((*iit)->changeSelection(selection, selected))
|
if ((*iit)->changeSelection(selection, selected))
|
||||||
{
|
{
|
||||||
if (selected)
|
|
||||||
{
|
|
||||||
mNumDescendantsSelected++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mNumDescendantsSelected--;
|
|
||||||
}
|
|
||||||
rv = TRUE;
|
rv = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
S32 LLFolderViewFolder::extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& selected_items)
|
void LLFolderViewFolder::extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& selected_items)
|
||||||
{
|
{
|
||||||
S32 num_selected = 0;
|
|
||||||
|
|
||||||
// pass on to child folders first
|
// pass on to child folders first
|
||||||
for (folders_t::iterator iter = mFolders.begin();
|
for (folders_t::iterator iter = mFolders.begin();
|
||||||
iter != mFolders.end();)
|
iter != mFolders.end();)
|
||||||
{
|
{
|
||||||
folders_t::iterator fit = iter++;
|
folders_t::iterator fit = iter++;
|
||||||
num_selected += (*fit)->extendSelection(selection, last_selected, selected_items);
|
(*fit)->extendSelection(selection, last_selected, selected_items);
|
||||||
mNumDescendantsSelected += num_selected;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle selection of our immediate children...
|
// handle selection of our immediate children...
|
||||||
@@ -1686,8 +1634,6 @@ S32 LLFolderViewFolder::extendSelection(LLFolderViewItem* selection, LLFolderVie
|
|||||||
if (item->changeSelection(item, TRUE))
|
if (item->changeSelection(item, TRUE))
|
||||||
{
|
{
|
||||||
selected_items.put(item);
|
selected_items.put(item);
|
||||||
mNumDescendantsSelected++;
|
|
||||||
num_selected++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1697,30 +1643,15 @@ S32 LLFolderViewFolder::extendSelection(LLFolderViewItem* selection, LLFolderVie
|
|||||||
if (selection->changeSelection(selection, TRUE))
|
if (selection->changeSelection(selection, TRUE))
|
||||||
{
|
{
|
||||||
selected_items.put(selection);
|
selected_items.put(selection);
|
||||||
mNumDescendantsSelected++;
|
|
||||||
num_selected++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return num_selected;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFolderViewFolder::recursiveDeselect(BOOL deselect_self)
|
void LLFolderViewFolder::recursiveDeselect(BOOL deselect_self)
|
||||||
{
|
{
|
||||||
// make sure we don't have negative values
|
if (isSelected() && deselect_self)
|
||||||
llassert(mNumDescendantsSelected >= 0);
|
|
||||||
|
|
||||||
if (mIsSelected && deselect_self)
|
|
||||||
{
|
{
|
||||||
mIsSelected = FALSE;
|
deselectItem();
|
||||||
|
|
||||||
// update ancestors' count of selected descendents
|
|
||||||
LLFolderViewFolder* parent_folder = getParentFolder();
|
|
||||||
while(parent_folder)
|
|
||||||
{
|
|
||||||
parent_folder->mNumDescendantsSelected--;
|
|
||||||
parent_folder = parent_folder->getParentFolder();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 == mNumDescendantsSelected)
|
if (0 == mNumDescendantsSelected)
|
||||||
@@ -1728,14 +1659,19 @@ void LLFolderViewFolder::recursiveDeselect(BOOL deselect_self)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deselect all items in this folder.
|
||||||
for (items_t::iterator iter = mItems.begin();
|
for (items_t::iterator iter = mItems.begin();
|
||||||
iter != mItems.end();)
|
iter != mItems.end();)
|
||||||
{
|
{
|
||||||
items_t::iterator iit = iter++;
|
items_t::iterator iit = iter++;
|
||||||
LLFolderViewItem* item = (*iit);
|
LLFolderViewItem* item = (*iit);
|
||||||
item->recursiveDeselect(TRUE);
|
if (item->isSelected())
|
||||||
|
{
|
||||||
|
item->deselectItem();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Recursively deselect all folders in this folder.
|
||||||
for (folders_t::iterator iter = mFolders.begin();
|
for (folders_t::iterator iter = mFolders.begin();
|
||||||
iter != mFolders.end();)
|
iter != mFolders.end();)
|
||||||
{
|
{
|
||||||
@@ -2795,6 +2731,59 @@ U32 LLFolderView::getSortOrder() const
|
|||||||
return mSortOrder;
|
return mSortOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
U32 LLFolderView::toggleSearchType(std::string toggle)
|
||||||
|
{
|
||||||
|
if (toggle == "name")
|
||||||
|
{
|
||||||
|
if (mSearchType & 1)
|
||||||
|
{
|
||||||
|
mSearchType &= 6;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mSearchType |= 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (toggle == "description")
|
||||||
|
{
|
||||||
|
if (mSearchType & 2)
|
||||||
|
{
|
||||||
|
mSearchType &= 5;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mSearchType |= 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (toggle == "creator")
|
||||||
|
{
|
||||||
|
if (mSearchType & 4)
|
||||||
|
{
|
||||||
|
mSearchType &= 3;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mSearchType |= 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mSearchType == 0)
|
||||||
|
{
|
||||||
|
mSearchType = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getFilterSubString().length())
|
||||||
|
{
|
||||||
|
mFilter.setModified(LLInventoryFilter::FILTER_RESTART);
|
||||||
|
}
|
||||||
|
|
||||||
|
return mSearchType;
|
||||||
|
}
|
||||||
|
|
||||||
|
U32 LLFolderView::getSearchType() const
|
||||||
|
{
|
||||||
|
return mSearchType;
|
||||||
|
}
|
||||||
|
|
||||||
BOOL LLFolderView::addFolder( LLFolderViewFolder* folder)
|
BOOL LLFolderView::addFolder( LLFolderViewFolder* folder)
|
||||||
{
|
{
|
||||||
// enforce sort order of My Inventory followed by Library
|
// enforce sort order of My Inventory followed by Library
|
||||||
@@ -2939,8 +2928,7 @@ const std::string LLFolderView::getFilterSubString(BOOL trim)
|
|||||||
void LLFolderView::filter( LLInventoryFilter& filter )
|
void LLFolderView::filter( LLInventoryFilter& filter )
|
||||||
{
|
{
|
||||||
LLFastTimer t2(LLFastTimer::FTM_FILTER);
|
LLFastTimer t2(LLFastTimer::FTM_FILTER);
|
||||||
static const LLCachedControl<S32> filter_items_per_frame("FilterItemsPerFrame",500);
|
filter.setFilterCount(llclamp(gSavedSettings.getS32("FilterItemsPerFrame"), 1, 5000));
|
||||||
filter.setFilterCount(llclamp((S32)filter_items_per_frame, 1, 5000));
|
|
||||||
|
|
||||||
if (getCompletedFilterGeneration() < filter.getCurrentGeneration())
|
if (getCompletedFilterGeneration() < filter.getCurrentGeneration())
|
||||||
{
|
{
|
||||||
@@ -3092,29 +3080,24 @@ BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected)
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
S32 LLFolderView::extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items)
|
void LLFolderView::extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items)
|
||||||
{
|
{
|
||||||
S32 rv = 0;
|
|
||||||
|
|
||||||
// now store resulting selection
|
// now store resulting selection
|
||||||
if (mAllowMultiSelect)
|
if (mAllowMultiSelect)
|
||||||
{
|
{
|
||||||
LLFolderViewItem *cur_selection = getCurSelectedItem();
|
LLFolderViewItem *cur_selection = getCurSelectedItem();
|
||||||
rv = LLFolderViewFolder::extendSelection(selection, cur_selection, items);
|
LLFolderViewFolder::extendSelection(selection, cur_selection, items);
|
||||||
for (S32 i = 0; i < items.count(); i++)
|
for (S32 i = 0; i < items.count(); i++)
|
||||||
{
|
{
|
||||||
addToSelectionList(items[i]);
|
addToSelectionList(items[i]);
|
||||||
rv++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setSelection(selection, FALSE, FALSE);
|
setSelection(selection, FALSE, FALSE);
|
||||||
rv++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mSignalSelectCallback = SIGNAL_KEYBOARD_FOCUS;
|
mSignalSelectCallback = SIGNAL_KEYBOARD_FOCUS;
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFolderView::sanitizeSelection()
|
void LLFolderView::sanitizeSelection()
|
||||||
@@ -3847,15 +3830,12 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_ESCAPE:
|
case KEY_ESCAPE:
|
||||||
if (mask == MASK_NONE)
|
if( mRenameItem && mRenamer->getVisible() )
|
||||||
{
|
{
|
||||||
if( mRenameItem && mRenamer->getVisible() )
|
closeRenamer();
|
||||||
{
|
handled = TRUE;
|
||||||
closeRenamer();
|
|
||||||
handled = TRUE;
|
|
||||||
}
|
|
||||||
mSearchString.clear();
|
|
||||||
}
|
}
|
||||||
|
mSearchString.clear();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_PAGE_UP:
|
case KEY_PAGE_UP:
|
||||||
@@ -4260,7 +4240,7 @@ BOOL LLFolderView::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFolderView::deleteAllChildren(BOOL delayed_delete)
|
void LLFolderView::deleteAllChildren()
|
||||||
{
|
{
|
||||||
if(mRenamer == gFocusMgr.getTopCtrl())
|
if(mRenamer == gFocusMgr.getTopCtrl())
|
||||||
{
|
{
|
||||||
@@ -4271,7 +4251,7 @@ void LLFolderView::deleteAllChildren(BOOL delayed_delete)
|
|||||||
mRenamer = NULL;
|
mRenamer = NULL;
|
||||||
mRenameItem = NULL;
|
mRenameItem = NULL;
|
||||||
clearSelection();
|
clearSelection();
|
||||||
LLView::deleteAllChildren(delayed_delete);
|
LLView::deleteAllChildren();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFolderView::scrollToShowSelection()
|
void LLFolderView::scrollToShowSelection()
|
||||||
@@ -4395,8 +4375,8 @@ void LLFolderView::doIdle()
|
|||||||
{
|
{
|
||||||
LLFastTimer t2(LLFastTimer::FTM_INVENTORY);
|
LLFastTimer t2(LLFastTimer::FTM_INVENTORY);
|
||||||
|
|
||||||
static const LLCachedControl<bool> debug_filters("DebugInventoryFilters",false);
|
BOOL debug_filters = gSavedSettings.getBOOL("DebugInventoryFilters");
|
||||||
if (debug_filters != (bool)getDebugFilters())
|
if (debug_filters != getDebugFilters())
|
||||||
{
|
{
|
||||||
mDebugFilters = debug_filters;
|
mDebugFilters = debug_filters;
|
||||||
arrangeAll();
|
arrangeAll();
|
||||||
@@ -4637,10 +4617,6 @@ LLInventoryFilter::LLInventoryFilter(const std::string& name) :
|
|||||||
mModified(FALSE),
|
mModified(FALSE),
|
||||||
mNeedTextRebuild(TRUE)
|
mNeedTextRebuild(TRUE)
|
||||||
{
|
{
|
||||||
//fix to get rid of gSavedSettings use - rkeast
|
|
||||||
mSearchType = 0;
|
|
||||||
mPartialSearch = false;
|
|
||||||
|
|
||||||
mFilterOps.mFilterTypes = 0xffffffff;
|
mFilterOps.mFilterTypes = 0xffffffff;
|
||||||
mFilterOps.mMinDate = time_min();
|
mFilterOps.mMinDate = time_min();
|
||||||
mFilterOps.mMaxDate = time_max();
|
mFilterOps.mMaxDate = time_max();
|
||||||
@@ -4692,50 +4668,13 @@ BOOL LLInventoryFilter::check(LLFolderViewItem* item)
|
|||||||
{
|
{
|
||||||
earliest = 0;
|
earliest = 0;
|
||||||
}
|
}
|
||||||
|
mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos;
|
||||||
//When searching for all labels, we need to explode the filter string
|
BOOL passed = (0x1 << listener->getInventoryType() & mFilterOps.mFilterTypes || listener->getInventoryType() == LLInventoryType::IT_NONE)
|
||||||
//Into an array, and then compare each string to the label seperately
|
&& (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)
|
||||||
//Otherwise the filter substring needs to be
|
|
||||||
//formatted in the same order as the label - rkeast
|
|
||||||
|
|
||||||
BOOL passed;
|
|
||||||
//Added ability to toggle this type of searching for all labels cause it's convienient - RKeast
|
|
||||||
if(mSearchType == 3 || mPartialSearch)
|
|
||||||
{
|
|
||||||
std::istringstream i(mFilterSubString);
|
|
||||||
std::string blah;
|
|
||||||
|
|
||||||
LLDynamicArray<std::string> search_array;
|
|
||||||
|
|
||||||
while(i >> blah)
|
|
||||||
{
|
|
||||||
search_array.put(blah);
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL subStringMatch = true;
|
|
||||||
for(int i = 0; i < search_array.getLength(); i++)
|
|
||||||
{
|
|
||||||
mSubStringMatchOffset = (search_array.get(i)).size() ? item->getSearchableLabel().find(search_array.get(i)) : std::string::npos;
|
|
||||||
subStringMatch = subStringMatch && ((search_array.get(i)).size() == 0 || mSubStringMatchOffset != std::string::npos);
|
|
||||||
}
|
|
||||||
|
|
||||||
passed = (0x1 << listener->getInventoryType() & mFilterOps.mFilterTypes || listener->getInventoryType() == LLInventoryType::IT_NONE)
|
|
||||||
&& (subStringMatch)
|
|
||||||
&& (mFilterWorn == false || gAgent.isWearingItem(item_id) ||
|
&& (mFilterWorn == false || gAgent.isWearingItem(item_id) ||
|
||||||
(gAgent.getAvatarObject() && gAgent.getAvatarObject()->isWearingAttachment(item_id)))
|
(gAgent.getAvatarObject() && gAgent.getAvatarObject()->isWearingAttachment(item_id)))
|
||||||
&& ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions)
|
&& ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions)
|
||||||
&& (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate);
|
&& (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos;
|
|
||||||
passed = (0x1 << listener->getInventoryType() & mFilterOps.mFilterTypes || listener->getInventoryType() == LLInventoryType::IT_NONE)
|
|
||||||
&& (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)
|
|
||||||
&& (mFilterWorn == false || gAgent.isWearingItem(item_id) ||
|
|
||||||
(gAgent.getAvatarObject() && gAgent.getAvatarObject()->isWearingAttachment(item_id)))
|
|
||||||
&& ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions)
|
|
||||||
&& (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate);
|
|
||||||
}
|
|
||||||
return passed;
|
return passed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4753,7 +4692,7 @@ std::string::size_type LLInventoryFilter::getStringMatchOffset() const
|
|||||||
BOOL LLInventoryFilter::isNotDefault()
|
BOOL LLInventoryFilter::isNotDefault()
|
||||||
{
|
{
|
||||||
return mFilterOps.mFilterTypes != mDefaultFilterOps.mFilterTypes
|
return mFilterOps.mFilterTypes != mDefaultFilterOps.mFilterTypes
|
||||||
|| mFilterSubString.size()
|
|| mFilterSubString.size()
|
||||||
|| mFilterWorn
|
|| mFilterWorn
|
||||||
|| mFilterOps.mPermissions != mDefaultFilterOps.mPermissions
|
|| mFilterOps.mPermissions != mDefaultFilterOps.mPermissions
|
||||||
|| mFilterOps.mMinDate != mDefaultFilterOps.mMinDate
|
|| mFilterOps.mMinDate != mDefaultFilterOps.mMinDate
|
||||||
@@ -4784,31 +4723,6 @@ BOOL LLInventoryFilter::isModifiedAndClear()
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
//fix to get rid of gSavedSettings use - rkeast
|
|
||||||
void LLInventoryFilter::setPartialSearch(bool toggle)
|
|
||||||
{
|
|
||||||
|
|
||||||
mPartialSearch = toggle;
|
|
||||||
}
|
|
||||||
|
|
||||||
//fix to get rid of gSavedSettings use - rkeast
|
|
||||||
bool LLInventoryFilter::getPartialSearch()
|
|
||||||
{
|
|
||||||
return mPartialSearch;
|
|
||||||
}
|
|
||||||
|
|
||||||
//fix to get rid of gSavedSettings use - rkeast
|
|
||||||
void LLInventoryFilter::setSearchType(U32 type)
|
|
||||||
{
|
|
||||||
mSearchType = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
//fix to get rid of gSavedSettings use - rkeast
|
|
||||||
U32 LLInventoryFilter::getSearchType()
|
|
||||||
{
|
|
||||||
return mSearchType;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLInventoryFilter::setFilterTypes(U32 types)
|
void LLInventoryFilter::setFilterTypes(U32 types)
|
||||||
{
|
{
|
||||||
if (mFilterOps.mFilterTypes != types)
|
if (mFilterOps.mFilterTypes != types)
|
||||||
|
|||||||
@@ -167,14 +167,7 @@ public:
|
|||||||
|
|
||||||
class LLInventoryFilter
|
class LLInventoryFilter
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//fix to get rid of gSavedSettings use - rkeast
|
|
||||||
void setPartialSearch(bool toggle);
|
|
||||||
bool getPartialSearch();
|
|
||||||
void setSearchType(U32 type);
|
|
||||||
U32 getSearchType();
|
|
||||||
|
|
||||||
typedef enum e_folder_show
|
typedef enum e_folder_show
|
||||||
{
|
{
|
||||||
SHOW_ALL_FOLDERS,
|
SHOW_ALL_FOLDERS,
|
||||||
@@ -254,10 +247,6 @@ public:
|
|||||||
void fromLLSD(LLSD& data);
|
void fromLLSD(LLSD& data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//fix to get rid of gSavedSettings use - rkeast
|
|
||||||
U32 mSearchType;
|
|
||||||
bool mPartialSearch;
|
|
||||||
|
|
||||||
struct filter_ops
|
struct filter_ops
|
||||||
{
|
{
|
||||||
U32 mFilterTypes;
|
U32 mFilterTypes;
|
||||||
@@ -332,10 +321,12 @@ class LLFolderView;
|
|||||||
|
|
||||||
class LLFolderViewItem : public LLUICtrl
|
class LLFolderViewItem : public LLUICtrl
|
||||||
{
|
{
|
||||||
protected:
|
|
||||||
friend class LLFolderViewEventListener;
|
friend class LLFolderViewEventListener;
|
||||||
|
|
||||||
|
private:
|
||||||
|
BOOL mIsSelected;
|
||||||
|
|
||||||
|
protected:
|
||||||
static const LLFontGL* sFont;
|
static const LLFontGL* sFont;
|
||||||
static const LLFontGL* sSmallFont;
|
static const LLFontGL* sSmallFont;
|
||||||
static LLColor4 sFgColor;
|
static LLColor4 sFgColor;
|
||||||
@@ -350,21 +341,14 @@ protected:
|
|||||||
|
|
||||||
std::string mLabel;
|
std::string mLabel;
|
||||||
std::string mSearchableLabel;
|
std::string mSearchableLabel;
|
||||||
std::string mLabelCreator;
|
|
||||||
std::string mSearchableLabelCreator;
|
|
||||||
|
|
||||||
std::string mLabelDesc;
|
|
||||||
std::string mSearchableLabelDesc;
|
std::string mSearchableLabelDesc;
|
||||||
|
std::string mSearchableLabelCreator;
|
||||||
std::string mLabelAll;
|
std::string mSearchable;
|
||||||
std::string mSearchableLabelAll;
|
|
||||||
|
|
||||||
std::string mType;
|
std::string mType;
|
||||||
S32 mLabelWidth;
|
S32 mLabelWidth;
|
||||||
U32 mCreationDate;
|
U32 mCreationDate;
|
||||||
LLFolderViewFolder* mParentFolder;
|
LLFolderViewFolder* mParentFolder;
|
||||||
LLFolderViewEventListener* mListener;
|
LLFolderViewEventListener* mListener;
|
||||||
BOOL mIsSelected;
|
|
||||||
BOOL mIsCurSelection;
|
BOOL mIsCurSelection;
|
||||||
BOOL mSelectPending;
|
BOOL mSelectPending;
|
||||||
LLFontGL::StyleFlags mLabelStyle;
|
LLFontGL::StyleFlags mLabelStyle;
|
||||||
@@ -373,7 +357,6 @@ protected:
|
|||||||
std::string mStatusText;
|
std::string mStatusText;
|
||||||
BOOL mHasVisibleChildren;
|
BOOL mHasVisibleChildren;
|
||||||
S32 mIndentation;
|
S32 mIndentation;
|
||||||
S32 mNumDescendantsSelected;
|
|
||||||
BOOL mFiltered;
|
BOOL mFiltered;
|
||||||
S32 mLastFilterGeneration;
|
S32 mLastFilterGeneration;
|
||||||
std::string::size_type mStringMatchOffset;
|
std::string::size_type mStringMatchOffset;
|
||||||
@@ -438,18 +421,13 @@ public:
|
|||||||
// Returns TRUE if this item ends up being selected.
|
// Returns TRUE if this item ends up being selected.
|
||||||
virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus);
|
virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// This method is used to set the selection state of an item.
|
// This method is used to set the selection state of an item.
|
||||||
// If 'selection' is 'this' then note selection.
|
// If 'selection' is 'this' then note selection.
|
||||||
// Returns TRUE if the selection state of this item was changed.
|
// Returns TRUE if the selection state of this item was changed.
|
||||||
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
|
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
|
||||||
|
|
||||||
// this method is used to group select items
|
// this method is used to group select items
|
||||||
virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items){ return FALSE; }
|
virtual void extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items) { }
|
||||||
|
|
||||||
// this method is used to group select items
|
|
||||||
virtual void recursiveDeselect(BOOL deselect_self);
|
|
||||||
|
|
||||||
// this method is used to deselect this element
|
// this method is used to deselect this element
|
||||||
void deselectItem();
|
void deselectItem();
|
||||||
@@ -469,8 +447,6 @@ public:
|
|||||||
// destroys this item recursively
|
// destroys this item recursively
|
||||||
virtual void destroyView();
|
virtual void destroyView();
|
||||||
|
|
||||||
S32 getNumSelectedDescendants() { return mNumDescendantsSelected; }
|
|
||||||
|
|
||||||
BOOL isSelected() const { return mIsSelected; }
|
BOOL isSelected() const { return mIsSelected; }
|
||||||
|
|
||||||
void setIsCurSelection(BOOL select) { mIsCurSelection = select; }
|
void setIsCurSelection(BOOL select) { mIsCurSelection = select; }
|
||||||
@@ -491,7 +467,7 @@ public:
|
|||||||
// viewed. This method will ask the viewed object itself.
|
// viewed. This method will ask the viewed object itself.
|
||||||
const std::string& getName( void ) const;
|
const std::string& getName( void ) const;
|
||||||
|
|
||||||
const std::string& getSearchableLabel() const;
|
std::string& getSearchableLabel( void );
|
||||||
|
|
||||||
// This method returns the label displayed on the view. This
|
// This method returns the label displayed on the view. This
|
||||||
// method was primarily added to allow sorting on the folder
|
// method was primarily added to allow sorting on the folder
|
||||||
@@ -579,7 +555,7 @@ public:
|
|||||||
UNKNOWN, TRASH, NOT_TRASH
|
UNKNOWN, TRASH, NOT_TRASH
|
||||||
} ETrash;
|
} ETrash;
|
||||||
|
|
||||||
|
private:
|
||||||
S32 mNumDescendantsSelected;
|
S32 mNumDescendantsSelected;
|
||||||
|
|
||||||
public: // Accessed needed by LLFolderViewItem
|
public: // Accessed needed by LLFolderViewItem
|
||||||
@@ -659,10 +635,10 @@ public:
|
|||||||
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
|
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
|
||||||
|
|
||||||
// this method is used to group select items
|
// this method is used to group select items
|
||||||
virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items);
|
virtual void extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items);
|
||||||
|
|
||||||
// Deselect this folder and all folder/items it contains recursively.
|
// Deselect this folder and all folder/items it contains recursively.
|
||||||
virtual void recursiveDeselect(BOOL deselect_self);
|
void recursiveDeselect(BOOL deselect_self);
|
||||||
|
|
||||||
// Returns true is this object and all of its children can be removed.
|
// Returns true is this object and all of its children can be removed.
|
||||||
virtual BOOL isRemovable();
|
virtual BOOL isRemovable();
|
||||||
@@ -826,7 +802,7 @@ public:
|
|||||||
// children, and keeps track of selected objects.
|
// children, and keeps track of selected objects.
|
||||||
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
|
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
|
||||||
|
|
||||||
virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items);
|
virtual void extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items);
|
||||||
|
|
||||||
virtual BOOL getSelectionList(std::set<LLUUID> &selection);
|
virtual BOOL getSelectionList(std::set<LLUUID> &selection);
|
||||||
|
|
||||||
@@ -894,7 +870,7 @@ public:
|
|||||||
/*virtual*/ void onFocusLost();
|
/*virtual*/ void onFocusLost();
|
||||||
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
|
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
virtual void deleteAllChildren(BOOL delayed_delete=FALSE);
|
virtual void deleteAllChildren();
|
||||||
|
|
||||||
void scrollToShowSelection();
|
void scrollToShowSelection();
|
||||||
void scrollToShowItem(LLFolderViewItem* item);
|
void scrollToShowItem(LLFolderViewItem* item);
|
||||||
|
|||||||
@@ -498,98 +498,6 @@ class LLDoCreateFloater : public inventory_listener_t
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//Handles the search type buttons - RKeast
|
|
||||||
class SetSearchType : public inventory_listener_t
|
|
||||||
{
|
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
|
||||||
{
|
|
||||||
std::string search_type = userdata.asString();
|
|
||||||
if(search_type == "name")
|
|
||||||
{
|
|
||||||
mPtr->getActivePanel()->setSearchType(0);
|
|
||||||
|
|
||||||
gSavedPerAccountSettings.setU32("rkeastInventorySearchType",0);
|
|
||||||
|
|
||||||
mPtr->getControl("Inventory.SearchByName")->setValue(TRUE);
|
|
||||||
mPtr->getControl("Inventory.SearchByCreator")->setValue(FALSE);
|
|
||||||
mPtr->getControl("Inventory.SearchByDesc")->setValue(FALSE);
|
|
||||||
mPtr->getControl("Inventory.SearchByAll")->setValue(FALSE);
|
|
||||||
}
|
|
||||||
else if(search_type == "creator")
|
|
||||||
{
|
|
||||||
mPtr->getActivePanel()->setSearchType(1);
|
|
||||||
|
|
||||||
gSavedPerAccountSettings.setU32("rkeastInventorySearchType",1);
|
|
||||||
|
|
||||||
mPtr->getControl("Inventory.SearchByName")->setValue(FALSE);
|
|
||||||
mPtr->getControl("Inventory.SearchByCreator")->setValue(TRUE);
|
|
||||||
mPtr->getControl("Inventory.SearchByDesc")->setValue(FALSE);
|
|
||||||
mPtr->getControl("Inventory.SearchByAll")->setValue(FALSE);
|
|
||||||
}
|
|
||||||
else if(search_type == "desc")
|
|
||||||
{
|
|
||||||
mPtr->getActivePanel()->setSearchType(2);
|
|
||||||
|
|
||||||
gSavedPerAccountSettings.setU32("rkeastInventorySearchType",2);
|
|
||||||
|
|
||||||
mPtr->getControl("Inventory.SearchByName")->setValue(FALSE);
|
|
||||||
mPtr->getControl("Inventory.SearchByCreator")->setValue(FALSE);
|
|
||||||
mPtr->getControl("Inventory.SearchByDesc")->setValue(TRUE);
|
|
||||||
mPtr->getControl("Inventory.SearchByAll")->setValue(FALSE);
|
|
||||||
}
|
|
||||||
else if(search_type == "all")
|
|
||||||
{
|
|
||||||
mPtr->getActivePanel()->setSearchType(3);
|
|
||||||
|
|
||||||
gSavedPerAccountSettings.setU32("rkeastInventorySearchType",3);
|
|
||||||
|
|
||||||
mPtr->getControl("Inventory.SearchByName")->setValue(FALSE);
|
|
||||||
mPtr->getControl("Inventory.SearchByCreator")->setValue(FALSE);
|
|
||||||
mPtr->getControl("Inventory.SearchByDesc")->setValue(FALSE);
|
|
||||||
mPtr->getControl("Inventory.SearchByAll")->setValue(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Clear search when switching modes.
|
|
||||||
mPtr->getActivePanel()->setFilterSubString(LLStringUtil::null);
|
|
||||||
mPtr->getActivePanel()->setFilterTypes(0xffffffff);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//Handles the partial search result button - RKeast
|
|
||||||
class SetPartialSearch : public inventory_listener_t
|
|
||||||
{
|
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
|
||||||
{
|
|
||||||
std::string data = userdata.asString();
|
|
||||||
if(data == "toggle")
|
|
||||||
{
|
|
||||||
BOOL current = mPtr->getActivePanel()->getPartialSearch();
|
|
||||||
mPtr->getActivePanel()->setPartialSearch(!current);
|
|
||||||
|
|
||||||
if(current == false)
|
|
||||||
{
|
|
||||||
mPtr->getActivePanel()->setPartialSearch(true);
|
|
||||||
mPtr->getControl("Inventory.PartialSearchToggle")->setValue(TRUE);
|
|
||||||
|
|
||||||
gSavedPerAccountSettings.setBOOL("rkeastInventoryPartialSearch",TRUE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mPtr->getActivePanel()->setPartialSearch(false);
|
|
||||||
mPtr->getControl("Inventory.PartialSearchToggle")->setValue(FALSE);
|
|
||||||
|
|
||||||
gSavedPerAccountSettings.setBOOL("rkeastInventoryPartialSearch",FALSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Clear search when switching modes.
|
|
||||||
mPtr->getActivePanel()->setFilterSubString(LLStringUtil::null);
|
|
||||||
mPtr->getActivePanel()->setFilterTypes(0xffffffff);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class LLSetSortBy : public inventory_listener_t
|
class LLSetSortBy : public inventory_listener_t
|
||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
@@ -679,6 +587,18 @@ class LLRefreshInvModel : public inventory_listener_t
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class LLSetSearchType : public inventory_listener_t
|
||||||
|
{
|
||||||
|
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
|
{
|
||||||
|
std::string toggle = userdata.asString();
|
||||||
|
U32 flags = mPtr->getActivePanel()->getRootFolder()->toggleSearchType(toggle);
|
||||||
|
mPtr->getControl("Inventory.SearchName")->setValue((BOOL)(flags & 1));
|
||||||
|
mPtr->getControl("Inventory.SearchDesc")->setValue((BOOL)(flags & 2));
|
||||||
|
mPtr->getControl("Inventory.SearchCreator")->setValue((BOOL)(flags & 4));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class LLBeginIMSession : public inventory_panel_listener_t
|
class LLBeginIMSession : public inventory_panel_listener_t
|
||||||
{
|
{
|
||||||
@@ -869,8 +789,8 @@ void init_inventory_actions(LLInventoryView *floater)
|
|||||||
(new LLResetFilter())->registerListener(floater, "Inventory.ResetFilter");
|
(new LLResetFilter())->registerListener(floater, "Inventory.ResetFilter");
|
||||||
(new LLSetSortBy())->registerListener(floater, "Inventory.SetSortBy");
|
(new LLSetSortBy())->registerListener(floater, "Inventory.SetSortBy");
|
||||||
|
|
||||||
(new SetSearchType())->registerListener(floater, "Inventory.SetSearchBy");
|
(new LLSetSearchType())->registerListener(floater, "Inventory.SetSearchType");
|
||||||
(new SetPartialSearch())->registerListener(floater, "Inventory.PartialSearch");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_inventory_panel_actions(LLInventoryPanel *panel)
|
void init_inventory_panel_actions(LLInventoryPanel *panel)
|
||||||
|
|||||||
@@ -240,13 +240,6 @@ time_t LLInvFVBridge::getCreationDate() const
|
|||||||
// Can be destroyed (or moved to trash)
|
// Can be destroyed (or moved to trash)
|
||||||
BOOL LLInvFVBridge::isItemRemovable()
|
BOOL LLInvFVBridge::isItemRemovable()
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if (!model)
|
if (!model)
|
||||||
{
|
{
|
||||||
@@ -278,13 +271,6 @@ void LLInvFVBridge::showProperties()
|
|||||||
|
|
||||||
void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch)
|
void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch)
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
// Deactivate gestures when moving them into Trash
|
// Deactivate gestures when moving them into Trash
|
||||||
LLInvFVBridge* bridge;
|
LLInvFVBridge* bridge;
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
@@ -329,13 +315,6 @@ void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batc
|
|||||||
|
|
||||||
void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*>& batch)
|
void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*>& batch)
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
// this method moves a bunch of items and folders to the trash. As
|
// this method moves a bunch of items and folders to the trash. As
|
||||||
// per design guidelines for the inventory model, the message is
|
// per design guidelines for the inventory model, the message is
|
||||||
// built and the accounting is performed first. After all of that,
|
// built and the accounting is performed first. After all of that,
|
||||||
@@ -505,13 +484,6 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
|
|||||||
|
|
||||||
BOOL LLInvFVBridge::isClipboardPasteable() const
|
BOOL LLInvFVBridge::isClipboardPasteable() const
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if (!model)
|
if (!model)
|
||||||
{
|
{
|
||||||
@@ -789,13 +761,6 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
|
|||||||
|
|
||||||
LLInventoryObject* LLInvFVBridge::getInventoryObject() const
|
LLInventoryObject* LLInvFVBridge::getInventoryObject() const
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryObject* obj = NULL;
|
LLInventoryObject* obj = NULL;
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(model)
|
if(model)
|
||||||
@@ -807,13 +772,6 @@ LLInventoryObject* LLInvFVBridge::getInventoryObject() const
|
|||||||
|
|
||||||
BOOL LLInvFVBridge::isInTrash() const
|
BOOL LLInvFVBridge::isInTrash() const
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return FALSE;
|
if(!model) return FALSE;
|
||||||
LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
|
LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
|
||||||
@@ -852,13 +810,6 @@ BOOL LLInvFVBridge::isLinkedObjectMissing() const
|
|||||||
|
|
||||||
BOOL LLInvFVBridge::isAgentInventory() const
|
BOOL LLInvFVBridge::isAgentInventory() const
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return FALSE;
|
if(!model) return FALSE;
|
||||||
if(gAgent.getInventoryRootID() == mUUID) return TRUE;
|
if(gAgent.getInventoryRootID() == mUUID) return TRUE;
|
||||||
@@ -1187,13 +1138,6 @@ void LLItemBridge::selectItem()
|
|||||||
|
|
||||||
void LLItemBridge::restoreItem()
|
void LLItemBridge::restoreItem()
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLViewerInventoryItem* item = (LLViewerInventoryItem*)getItem();
|
LLViewerInventoryItem* item = (LLViewerInventoryItem*)getItem();
|
||||||
if(item)
|
if(item)
|
||||||
{
|
{
|
||||||
@@ -1371,13 +1315,6 @@ BOOL LLItemBridge::renameItem(const std::string& new_name)
|
|||||||
{
|
{
|
||||||
if(!isItemRenameable()) return FALSE;
|
if(!isItemRenameable()) return FALSE;
|
||||||
LLPreview::rename(mUUID, getPrefix() + new_name);
|
LLPreview::rename(mUUID, getPrefix() + new_name);
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return FALSE;
|
if(!model) return FALSE;
|
||||||
LLViewerInventoryItem* item = getItem();
|
LLViewerInventoryItem* item = getItem();
|
||||||
@@ -1404,13 +1341,6 @@ BOOL LLItemBridge::removeItem()
|
|||||||
}
|
}
|
||||||
// move it to the trash
|
// move it to the trash
|
||||||
LLPreview::hide(mUUID, TRUE);
|
LLPreview::hide(mUUID, TRUE);
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return FALSE;
|
if(!model) return FALSE;
|
||||||
LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
|
LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
|
||||||
@@ -1467,13 +1397,6 @@ BOOL LLItemBridge::copyToClipboard() const
|
|||||||
|
|
||||||
LLViewerInventoryItem* LLItemBridge::getItem() const
|
LLViewerInventoryItem* LLItemBridge::getItem() const
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLViewerInventoryItem* item = NULL;
|
LLViewerInventoryItem* item = NULL;
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(model)
|
if(model)
|
||||||
@@ -1522,13 +1445,6 @@ void LLFolderBridge::selectItem()
|
|||||||
// Can be destroyed (or moved to trash)
|
// Can be destroyed (or moved to trash)
|
||||||
BOOL LLFolderBridge::isItemRemovable()
|
BOOL LLFolderBridge::isItemRemovable()
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model)
|
if(!model)
|
||||||
{
|
{
|
||||||
@@ -1602,13 +1518,6 @@ BOOL LLFolderBridge::isItemRemovable()
|
|||||||
|
|
||||||
BOOL LLFolderBridge::isUpToDate() const
|
BOOL LLFolderBridge::isUpToDate() const
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return FALSE;
|
if(!model) return FALSE;
|
||||||
LLViewerInventoryCategory* category = (LLViewerInventoryCategory*)model->getCategory(mUUID);
|
LLViewerInventoryCategory* category = (LLViewerInventoryCategory*)model->getCategory(mUUID);
|
||||||
@@ -1688,13 +1597,6 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
|||||||
// the UI will get confused and pass in a NULL.
|
// the UI will get confused and pass in a NULL.
|
||||||
if(!inv_cat) return FALSE;
|
if(!inv_cat) return FALSE;
|
||||||
|
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return FALSE;
|
if(!model) return FALSE;
|
||||||
|
|
||||||
@@ -2152,13 +2054,6 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model
|
|||||||
}
|
}
|
||||||
else if ("removefromoutfit" == action)
|
else if ("removefromoutfit" == action)
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return;
|
if(!model) return;
|
||||||
LLViewerInventoryCategory* cat = getCategory();
|
LLViewerInventoryCategory* cat = getCategory();
|
||||||
@@ -2190,13 +2085,6 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model
|
|||||||
void LLFolderBridge::openItem()
|
void LLFolderBridge::openItem()
|
||||||
{
|
{
|
||||||
lldebugs << "LLFolderBridge::openItem()" << llendl;
|
lldebugs << "LLFolderBridge::openItem()" << llendl;
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return;
|
if(!model) return;
|
||||||
model->fetchDescendentsOf(mUUID);
|
model->fetchDescendentsOf(mUUID);
|
||||||
@@ -2215,13 +2103,6 @@ BOOL LLFolderBridge::isItemRenameable() const
|
|||||||
|
|
||||||
void LLFolderBridge::restoreItem()
|
void LLFolderBridge::restoreItem()
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLViewerInventoryCategory* cat;
|
LLViewerInventoryCategory* cat;
|
||||||
cat = (LLViewerInventoryCategory*)getCategory();
|
cat = (LLViewerInventoryCategory*)getCategory();
|
||||||
if(cat)
|
if(cat)
|
||||||
@@ -2300,13 +2181,6 @@ LLUIImagePtr LLFolderBridge::getIcon() const
|
|||||||
|
|
||||||
BOOL LLFolderBridge::renameItem(const std::string& new_name)
|
BOOL LLFolderBridge::renameItem(const std::string& new_name)
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
if(!isItemRenameable()) return FALSE;
|
if(!isItemRenameable()) return FALSE;
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return FALSE;
|
if(!model) return FALSE;
|
||||||
@@ -2332,13 +2206,6 @@ BOOL LLFolderBridge::removeItem()
|
|||||||
}
|
}
|
||||||
// move it to the trash
|
// move it to the trash
|
||||||
LLPreview::hide(mUUID);
|
LLPreview::hide(mUUID);
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return FALSE;
|
if(!model) return FALSE;
|
||||||
|
|
||||||
@@ -2418,13 +2285,6 @@ BOOL LLFolderBridge::isClipboardPasteable() const
|
|||||||
|
|
||||||
void LLFolderBridge::pasteFromClipboard()
|
void LLFolderBridge::pasteFromClipboard()
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(model && isClipboardPasteable())
|
if(model && isClipboardPasteable())
|
||||||
{
|
{
|
||||||
@@ -2491,13 +2351,6 @@ void LLFolderBridge::folderOptionsMenu()
|
|||||||
|
|
||||||
// *TODO: Translate
|
// *TODO: Translate
|
||||||
|
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return;
|
if(!model) return;
|
||||||
|
|
||||||
@@ -2569,13 +2422,6 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||||||
// *TODO: Translate
|
// *TODO: Translate
|
||||||
lldebugs << "LLFolderBridge::buildContextMenu()" << llendl;
|
lldebugs << "LLFolderBridge::buildContextMenu()" << llendl;
|
||||||
// std::vector<std::string> disabled_items;
|
// std::vector<std::string> disabled_items;
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return;
|
if(!model) return;
|
||||||
LLUUID cof_id = LLCOFMgr::instance().getCOF();
|
LLUUID cof_id = LLCOFMgr::instance().getCOF();
|
||||||
@@ -2712,13 +2558,6 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||||||
|
|
||||||
BOOL LLFolderBridge::hasChildren() const
|
BOOL LLFolderBridge::hasChildren() const
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return FALSE;
|
if(!model) return FALSE;
|
||||||
LLInventoryModel::EHasChildren has_children;
|
LLInventoryModel::EHasChildren has_children;
|
||||||
@@ -2761,13 +2600,6 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
|
|||||||
|
|
||||||
LLViewerInventoryCategory* LLFolderBridge::getCategory() const
|
LLViewerInventoryCategory* LLFolderBridge::getCategory() const
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLViewerInventoryCategory* cat = NULL;
|
LLViewerInventoryCategory* cat = NULL;
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(model)
|
if(model)
|
||||||
@@ -2789,13 +2621,6 @@ void LLFolderBridge::createNewCategory(void* user_data)
|
|||||||
{
|
{
|
||||||
LLFolderBridge* bridge = (LLFolderBridge*)user_data;
|
LLFolderBridge* bridge = (LLFolderBridge*)user_data;
|
||||||
if(!bridge) return;
|
if(!bridge) return;
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), bridge->mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// <edit>
|
|
||||||
LLInventoryPanel* panel = bridge->mInventoryPanel;
|
LLInventoryPanel* panel = bridge->mInventoryPanel;
|
||||||
LLInventoryModel* model = panel->getModel();
|
LLInventoryModel* model = panel->getModel();
|
||||||
if(!model) return;
|
if(!model) return;
|
||||||
@@ -2910,13 +2735,6 @@ void LLFolderBridge::createWearable(LLUUID parent_id, EWearableType type)
|
|||||||
|
|
||||||
void LLFolderBridge::modifyOutfit(BOOL append, BOOL replace)
|
void LLFolderBridge::modifyOutfit(BOOL append, BOOL replace)
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return;
|
if(!model) return;
|
||||||
LLViewerInventoryCategory* cat = getCategory();
|
LLViewerInventoryCategory* cat = getCategory();
|
||||||
@@ -2968,13 +2786,6 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
|
|||||||
BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
||||||
BOOL drop)
|
BOOL drop)
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return FALSE;
|
if(!model) return FALSE;
|
||||||
|
|
||||||
@@ -3513,13 +3324,6 @@ LLCallingCardBridge::~LLCallingCardBridge()
|
|||||||
|
|
||||||
void LLCallingCardBridge::refreshFolderViewItem()
|
void LLCallingCardBridge::refreshFolderViewItem()
|
||||||
{
|
{
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLFolderViewItem* itemp = mInventoryPanel->getRootFolder()->getItemByID(mUUID);
|
LLFolderViewItem* itemp = mInventoryPanel->getRootFolder()->getItemByID(mUUID);
|
||||||
if (itemp)
|
if (itemp)
|
||||||
{
|
{
|
||||||
@@ -4424,37 +4228,17 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
}
|
}
|
||||||
|
|
||||||
// <edit> derf
|
LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachObject");
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
|
if (callback)
|
||||||
{
|
{
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
new_item->addListener(callback, "on_click", LLSD(attachment->getName()));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// </edit>
|
|
||||||
LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachObject");
|
|
||||||
|
|
||||||
if (callback)
|
|
||||||
{
|
|
||||||
new_item->addListener(callback, "on_click", LLSD(attachment->getName()));
|
|
||||||
}
|
|
||||||
// <edit> derf
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
}
|
}
|
||||||
// <edit>
|
|
||||||
LLMenuItemCallGL *new_item = new LLMenuItemCallGL("Custom...", NULL, NULL);
|
LLMenuItemCallGL *new_item = new LLMenuItemCallGL("Custom...", NULL, NULL);
|
||||||
attach_menu->append(new_item);
|
attach_menu->append(new_item);
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachCustom");
|
||||||
{
|
new_item->addListener(callback, "on_click", LLSD());
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachCustom");
|
|
||||||
new_item->addListener(callback, "on_click", LLSD());
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4466,13 +4250,6 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name)
|
|||||||
{
|
{
|
||||||
if(!isItemRenameable()) return FALSE;
|
if(!isItemRenameable()) return FALSE;
|
||||||
LLPreview::rename(mUUID, getPrefix() + new_name);
|
LLPreview::rename(mUUID, getPrefix() + new_name);
|
||||||
// <edit> derf
|
|
||||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
|
||||||
{
|
|
||||||
llwarns << "scheduled for delayed delete" << llendl;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
LLInventoryModel* model = mInventoryPanel->getModel();
|
LLInventoryModel* model = mInventoryPanel->getModel();
|
||||||
if(!model) return FALSE;
|
if(!model) return FALSE;
|
||||||
LLViewerInventoryItem* item = getItem();
|
LLViewerInventoryItem* item = getItem();
|
||||||
|
|||||||
@@ -45,7 +45,6 @@
|
|||||||
#include "llradiogroup.h"
|
#include "llradiogroup.h"
|
||||||
#include "llspinctrl.h"
|
#include "llspinctrl.h"
|
||||||
#include "lltextbox.h"
|
#include "lltextbox.h"
|
||||||
|
|
||||||
#include "llui.h"
|
#include "llui.h"
|
||||||
|
|
||||||
#include "llfirstuse.h"
|
#include "llfirstuse.h"
|
||||||
@@ -86,10 +85,6 @@
|
|||||||
|
|
||||||
#include "llsdserialize.h"
|
#include "llsdserialize.h"
|
||||||
|
|
||||||
// <edit>
|
|
||||||
#include "llbuildnewviewsscheduler.h"
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
// [RLVa:KB]
|
// [RLVa:KB]
|
||||||
#include "rlvhandler.h"
|
#include "rlvhandler.h"
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
@@ -491,32 +486,16 @@ void LLInventoryView::init(LLInventoryModel* inventory)
|
|||||||
init_inventory_actions(this);
|
init_inventory_actions(this);
|
||||||
|
|
||||||
// Controls
|
// Controls
|
||||||
U32 sort_order = gSavedSettings.getU32("InventorySortOrder");
|
|
||||||
BOOL sort_by_name = ! ( sort_order & LLInventoryFilter::SO_DATE );
|
|
||||||
BOOL sort_folders_by_name = ( sort_order & LLInventoryFilter::SO_FOLDERS_BY_NAME );
|
|
||||||
BOOL sort_system_folders_to_top = ( sort_order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP );
|
|
||||||
|
|
||||||
addBoolControl("Inventory.ShowFilters", FALSE);
|
addBoolControl("Inventory.ShowFilters", FALSE);
|
||||||
addBoolControl("Inventory.SortByName", sort_by_name );
|
addBoolControl("Inventory.SortByName", FALSE);
|
||||||
addBoolControl("Inventory.SortByDate", ! sort_by_name );
|
addBoolControl("Inventory.SortByDate", TRUE);
|
||||||
addBoolControl("Inventory.FoldersAlwaysByName", sort_folders_by_name );
|
addBoolControl("Inventory.FoldersAlwaysByName", TRUE);
|
||||||
addBoolControl("Inventory.SystemFoldersToTop", sort_system_folders_to_top );
|
addBoolControl("Inventory.SystemFoldersToTop", TRUE);
|
||||||
|
updateSortControls();
|
||||||
//Search Controls - RKeast
|
|
||||||
U32 search_type = gSavedPerAccountSettings.getU32("rkeastInventorySearchType");
|
|
||||||
BOOL search_by_name = (search_type == 0);
|
|
||||||
|
|
||||||
addBoolControl("Inventory.SearchByName", search_by_name);
|
addBoolControl("Inventory.SearchName", TRUE);
|
||||||
addBoolControl("Inventory.SearchByCreator", !search_by_name);
|
addBoolControl("Inventory.SearchDesc", FALSE);
|
||||||
addBoolControl("Inventory.SearchByDesc", !search_by_name);
|
addBoolControl("Inventory.SearchCreator", FALSE);
|
||||||
addBoolControl("Inventory.SearchByUUID", !search_by_name);
|
|
||||||
|
|
||||||
addBoolControl("Inventory.SearchByAll", !search_by_name);
|
|
||||||
|
|
||||||
//Bool for toggling the partial search results - RKeast
|
|
||||||
BOOL partial_search = gSavedPerAccountSettings.getBOOL("rkeastInventoryPartialSearch");
|
|
||||||
|
|
||||||
addBoolControl("Inventory.PartialSearchToggle", partial_search);
|
|
||||||
|
|
||||||
mSavedFolderState = new LLSaveFolderState();
|
mSavedFolderState = new LLSaveFolderState();
|
||||||
mSavedFolderState->setApply(FALSE);
|
mSavedFolderState->setApply(FALSE);
|
||||||
@@ -530,12 +509,7 @@ void LLInventoryView::init(LLInventoryModel* inventory)
|
|||||||
if (mActivePanel)
|
if (mActivePanel)
|
||||||
{
|
{
|
||||||
// "All Items" is the previous only view, so it gets the InventorySortOrder
|
// "All Items" is the previous only view, so it gets the InventorySortOrder
|
||||||
|
mActivePanel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER));
|
||||||
//Fix for gSavedSettings use - rkeast
|
|
||||||
mActivePanel->getFilter()->setSearchType(search_type);
|
|
||||||
mActivePanel->getFilter()->setPartialSearch(partial_search);
|
|
||||||
|
|
||||||
mActivePanel->setSortOrder(gSavedSettings.getU32("InventorySortOrder"));
|
|
||||||
mActivePanel->getFilter()->markDefault();
|
mActivePanel->getFilter()->markDefault();
|
||||||
mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
|
mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
|
||||||
mActivePanel->setSelectCallback(onSelectionChange, mActivePanel);
|
mActivePanel->setSelectCallback(onSelectionChange, mActivePanel);
|
||||||
@@ -544,16 +518,15 @@ void LLInventoryView::init(LLInventoryModel* inventory)
|
|||||||
if (recent_items_panel)
|
if (recent_items_panel)
|
||||||
{
|
{
|
||||||
recent_items_panel->setSinceLogoff(TRUE);
|
recent_items_panel->setSinceLogoff(TRUE);
|
||||||
recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE);
|
recent_items_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::RECENTITEMS_SORT_ORDER));
|
||||||
recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
|
recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
|
||||||
recent_items_panel->getFilter()->markDefault();
|
recent_items_panel->getFilter()->markDefault();
|
||||||
recent_items_panel->setSelectCallback(onSelectionChange, recent_items_panel);
|
recent_items_panel->setSelectCallback(onSelectionChange, recent_items_panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLInventoryPanel* worn_items_panel = getChild<LLInventoryPanel>("Worn Items");
|
LLInventoryPanel* worn_items_panel = getChild<LLInventoryPanel>("Worn Items");
|
||||||
if (worn_items_panel)
|
if (worn_items_panel)
|
||||||
{
|
{
|
||||||
worn_items_panel->setSortOrder(gSavedSettings.getU32("InventorySortOrder"));
|
worn_items_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::WORNITEMS_SORT_ORDER));
|
||||||
worn_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
|
worn_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
|
||||||
worn_items_panel->getFilter()->markDefault();
|
worn_items_panel->getFilter()->markDefault();
|
||||||
worn_items_panel->setFilterWorn(true);
|
worn_items_panel->setFilterWorn(true);
|
||||||
@@ -585,16 +558,12 @@ void LLInventoryView::init(LLInventoryModel* inventory)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Initialize item count - rkeast
|
|
||||||
mItemCount = gSavedPerAccountSettings.getS32("rkeastInventoryPreviousCount");
|
|
||||||
|
|
||||||
|
|
||||||
mSearchEditor = getChild<LLSearchEditor>("inventory search editor");
|
mSearchEditor = getChild<LLSearchEditor>("inventory search editor");
|
||||||
if (mSearchEditor)
|
if (mSearchEditor)
|
||||||
{
|
{
|
||||||
mSearchEditor->setSearchCallback(onSearchEdit, this);
|
mSearchEditor->setSearchCallback(onSearchEdit, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
mQuickFilterCombo = getChild<LLComboBox>("Quick Filter");
|
mQuickFilterCombo = getChild<LLComboBox>("Quick Filter");
|
||||||
|
|
||||||
if (mQuickFilterCombo)
|
if (mQuickFilterCombo)
|
||||||
@@ -602,6 +571,7 @@ void LLInventoryView::init(LLInventoryModel* inventory)
|
|||||||
mQuickFilterCombo->setCommitCallback(onQuickFilterCommit);
|
mQuickFilterCombo->setCommitCallback(onQuickFilterCommit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sActiveViews.put(this);
|
sActiveViews.put(this);
|
||||||
|
|
||||||
gInventory.addObserver(this);
|
gInventory.addObserver(this);
|
||||||
@@ -671,34 +641,24 @@ void LLInventoryView::draw()
|
|||||||
{
|
{
|
||||||
if (LLInventoryModel::isEverythingFetched())
|
if (LLInventoryModel::isEverythingFetched())
|
||||||
{
|
{
|
||||||
S32 item_count = gInventory.getItemCount();
|
LLLocale locale(LLLocale::USER_LOCALE);
|
||||||
|
std::ostringstream title;
|
||||||
//don't let llfloater work more than necessary
|
title << "Inventory";
|
||||||
if (item_count != mOldItemCount || mOldFilterText != mFilterText)
|
std::string item_count_string;
|
||||||
{
|
LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
|
||||||
LLLocale locale(LLLocale::USER_LOCALE);
|
title << " (" << item_count_string << " items)";
|
||||||
std::ostringstream title;
|
title << mFilterText;
|
||||||
title << "Inventory"; //*TODO: make translatable
|
setTitle(title.str());
|
||||||
std::string item_count_string;
|
|
||||||
LLResMgr::getInstance()->getIntegerString(item_count_string, item_count);
|
|
||||||
title << " (" << item_count_string << " items)";
|
|
||||||
title << mFilterText;
|
|
||||||
setTitle(title.str());
|
|
||||||
}
|
|
||||||
|
|
||||||
mOldFilterText = mFilterText;
|
|
||||||
mOldItemCount = item_count;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (mActivePanel && mSearchEditor)
|
if (mActivePanel && mSearchEditor)
|
||||||
{
|
{
|
||||||
mSearchEditor->setText(mActivePanel->getFilterSubString());
|
mSearchEditor->setText(mActivePanel->getFilterSubString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mActivePanel && mQuickFilterCombo)
|
if (mActivePanel && mQuickFilterCombo)
|
||||||
{
|
{
|
||||||
refreshQuickFilter( mQuickFilterCombo );
|
refreshQuickFilter( mQuickFilterCombo );
|
||||||
}
|
}
|
||||||
|
|
||||||
LLFloater::draw();
|
LLFloater::draw();
|
||||||
}
|
}
|
||||||
@@ -859,26 +819,7 @@ void LLInventoryView::changed(U32 mask)
|
|||||||
LLLocale locale(LLLocale::USER_LOCALE);
|
LLLocale locale(LLLocale::USER_LOCALE);
|
||||||
std::string item_count_string;
|
std::string item_count_string;
|
||||||
LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
|
LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
|
||||||
|
title << " (Fetched " << item_count_string << " items...)";
|
||||||
//Displays a progress indication for loading the inventory, but not if it hasn't been loaded before on this PC, or we load more than expected - rkeast
|
|
||||||
if(mItemCount == -1)
|
|
||||||
{
|
|
||||||
title << " (Fetched " << item_count_string << " items...)";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
S32 remaining = mItemCount - gInventory.getItemCount();
|
|
||||||
std::string total_items;
|
|
||||||
std::string items_remaining;
|
|
||||||
LLResMgr::getInstance()->getIntegerString(total_items, mItemCount);
|
|
||||||
LLResMgr::getInstance()->getIntegerString(items_remaining, remaining);
|
|
||||||
if(remaining < 0) title << " (Fetched " << item_count_string << " items...)";
|
|
||||||
else title << " (Fetched " << item_count_string << " items of ~" << total_items << " - ~" << items_remaining << " remaining...)";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gSavedPerAccountSettings.setS32("rkeastInventoryPreviousCount", gInventory.getItemCount());
|
|
||||||
}
|
}
|
||||||
title << mFilterText;
|
title << mFilterText;
|
||||||
setTitle(title.str());
|
setTitle(title.str());
|
||||||
@@ -1343,6 +1284,7 @@ void LLInventoryView::refreshQuickFilter(LLUICtrl* ctrl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
// BOOL LLInventoryView::incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward)
|
// BOOL LLInventoryView::incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward)
|
||||||
// {
|
// {
|
||||||
@@ -1378,8 +1320,6 @@ void LLInventoryView::refreshQuickFilter(LLUICtrl* ctrl)
|
|||||||
// return FALSE;
|
// return FALSE;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
//static
|
|
||||||
void LLInventoryView::onResetAll(void* userdata)
|
void LLInventoryView::onResetAll(void* userdata)
|
||||||
{
|
{
|
||||||
LLInventoryView* self = (LLInventoryView*) userdata;
|
LLInventoryView* self = (LLInventoryView*) userdata;
|
||||||
@@ -1410,6 +1350,7 @@ void LLInventoryView::onExpandAll(void* userdata)
|
|||||||
self->mActivePanel->openAllFolders();
|
self->mActivePanel->openAllFolders();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//static
|
//static
|
||||||
void LLInventoryView::onFilterSelected(void* userdata, bool from_click)
|
void LLInventoryView::onFilterSelected(void* userdata, bool from_click)
|
||||||
{
|
{
|
||||||
@@ -1615,10 +1556,6 @@ const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("Recent
|
|||||||
const std::string LLInventoryPanel::WORNITEMS_SORT_ORDER = std::string("WornItemsSortOrder");
|
const std::string LLInventoryPanel::WORNITEMS_SORT_ORDER = std::string("WornItemsSortOrder");
|
||||||
const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string("");
|
const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string("");
|
||||||
|
|
||||||
// <edit>
|
|
||||||
std::list<LLInventoryPanel*> LLInventoryPanel::sInstances;
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
LLInventoryPanel::LLInventoryPanel(const std::string& name,
|
LLInventoryPanel::LLInventoryPanel(const std::string& name,
|
||||||
const std::string& sort_order_setting,
|
const std::string& sort_order_setting,
|
||||||
const LLRect& rect,
|
const LLRect& rect,
|
||||||
@@ -1633,9 +1570,6 @@ LLInventoryPanel::LLInventoryPanel(const std::string& name,
|
|||||||
mAllowMultiSelect(allow_multi_select),
|
mAllowMultiSelect(allow_multi_select),
|
||||||
mSortOrderSetting(sort_order_setting)
|
mSortOrderSetting(sort_order_setting)
|
||||||
{
|
{
|
||||||
// <edit>
|
|
||||||
sInstances.push_back(this);
|
|
||||||
// </edit>
|
|
||||||
setBackgroundColor(gColors.getColor("InventoryBackgroundColor"));
|
setBackgroundColor(gColors.getColor("InventoryBackgroundColor"));
|
||||||
setBackgroundVisible(TRUE);
|
setBackgroundVisible(TRUE);
|
||||||
setBackgroundOpaque(TRUE);
|
setBackgroundOpaque(TRUE);
|
||||||
@@ -1688,10 +1622,6 @@ BOOL LLInventoryPanel::postBuild()
|
|||||||
|
|
||||||
LLInventoryPanel::~LLInventoryPanel()
|
LLInventoryPanel::~LLInventoryPanel()
|
||||||
{
|
{
|
||||||
// <edit>
|
|
||||||
sInstances.remove(this);
|
|
||||||
gBuildNewViewsScheduler->cancel(this);
|
|
||||||
// </edit>
|
|
||||||
// should this be a global setting?
|
// should this be a global setting?
|
||||||
U32 sort_order = mFolders->getSortOrder();
|
U32 sort_order = mFolders->getSortOrder();
|
||||||
if (mSortOrderSetting != INHERIT_SORT_ORDER)
|
if (mSortOrderSetting != INHERIT_SORT_ORDER)
|
||||||
@@ -1754,30 +1684,6 @@ void LLInventoryPanel::draw()
|
|||||||
LLPanel::draw();
|
LLPanel::draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
//fix to get rid of gSavedSettings use - rkeast
|
|
||||||
void LLInventoryPanel::setPartialSearch(bool toggle)
|
|
||||||
{
|
|
||||||
mFolders->getFilter()->setPartialSearch(toggle);
|
|
||||||
}
|
|
||||||
|
|
||||||
//fix to get rid of gSavedSettings use - rkeast
|
|
||||||
bool LLInventoryPanel::getPartialSearch()
|
|
||||||
{
|
|
||||||
return mFolders->getFilter()->getPartialSearch();
|
|
||||||
}
|
|
||||||
|
|
||||||
//fix to get rid of gSavedSettings use - rkeast
|
|
||||||
void LLInventoryPanel::setSearchType(U32 type)
|
|
||||||
{
|
|
||||||
mFolders->getFilter()->setSearchType(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
//fix to get rid of gSavedSettings use - rkeast
|
|
||||||
U32 LLInventoryPanel::getSearchType()
|
|
||||||
{
|
|
||||||
return mFolders->getFilter()->getSearchType();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLInventoryPanel::setFilterTypes(U32 filter_types)
|
void LLInventoryPanel::setFilterTypes(U32 filter_types)
|
||||||
{
|
{
|
||||||
mFolders->getFilter()->setFilterTypes(filter_types);
|
mFolders->getFilter()->setFilterTypes(filter_types);
|
||||||
@@ -1968,7 +1874,6 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
|
|||||||
{
|
{
|
||||||
llwarns << "LLInventoryPanel::buildNewViews called with objectp->mType == "
|
llwarns << "LLInventoryPanel::buildNewViews called with objectp->mType == "
|
||||||
<< ((S32) objectp->getType())
|
<< ((S32) objectp->getType())
|
||||||
<< " for object " << objectp->getName()
|
|
||||||
<< " (shouldn't happen)" << llendl;
|
<< " (shouldn't happen)" << llendl;
|
||||||
}
|
}
|
||||||
else if ((objectp->getType() == LLAssetType::AT_CATEGORY) &&
|
else if ((objectp->getType() == LLAssetType::AT_CATEGORY) &&
|
||||||
@@ -2015,9 +1920,6 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
|
|||||||
|
|
||||||
if (itemp)
|
if (itemp)
|
||||||
{
|
{
|
||||||
// <edit>
|
|
||||||
itemp->mDelayedDelete = TRUE;
|
|
||||||
// </edit>
|
|
||||||
if (parent_folder)
|
if (parent_folder)
|
||||||
{
|
{
|
||||||
itemp->addToFolder(parent_folder, mFolders);
|
itemp->addToFolder(parent_folder, mFolders);
|
||||||
@@ -2043,9 +1945,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
|
|||||||
for(S32 i = 0; i < count; ++i)
|
for(S32 i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
LLInventoryCategory* cat = categories->get(i);
|
LLInventoryCategory* cat = categories->get(i);
|
||||||
// <edit>
|
buildNewViews(cat->getUUID());
|
||||||
gBuildNewViewsScheduler->addJob(this, cat);
|
|
||||||
// </edit>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(items)
|
if(items)
|
||||||
@@ -2054,117 +1954,13 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
|
|||||||
for(S32 i = 0; i < count; ++i)
|
for(S32 i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
LLInventoryItem* item = items->get(i);
|
LLInventoryItem* item = items->get(i);
|
||||||
// <edit>
|
buildNewViews(item->getUUID());
|
||||||
gBuildNewViewsScheduler->addJob(this, item);
|
|
||||||
// </edit>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mInventory->unlockDirectDescendentArrays(id);
|
mInventory->unlockDirectDescendentArrays(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// <edit>
|
|
||||||
void LLInventoryPanel::buildNewViews(const LLInventoryObject* objectp)
|
|
||||||
{
|
|
||||||
LLFolderViewItem* itemp = NULL;
|
|
||||||
|
|
||||||
if (objectp)
|
|
||||||
{
|
|
||||||
if (objectp->getType() <= LLAssetType::AT_NONE ||
|
|
||||||
objectp->getType() >= LLAssetType::AT_COUNT)
|
|
||||||
{
|
|
||||||
llwarns << "LLInventoryPanel::buildNewViews called with objectp->mType == "
|
|
||||||
<< ((S32) objectp->getType())
|
|
||||||
<< "Named " << objectp->getName()
|
|
||||||
<< " (shouldn't happen)" << llendl;
|
|
||||||
}
|
|
||||||
else if (objectp->getType() == LLAssetType::AT_CATEGORY) // build new view for category
|
|
||||||
{
|
|
||||||
LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(objectp->getType(),
|
|
||||||
objectp->getType(),
|
|
||||||
LLInventoryType::IT_CATEGORY,
|
|
||||||
this,
|
|
||||||
objectp->getUUID());
|
|
||||||
|
|
||||||
if (new_listener)
|
|
||||||
{
|
|
||||||
LLFolderViewFolder* folderp = new LLFolderViewFolder(new_listener->getDisplayName(),
|
|
||||||
new_listener->getIcon(),
|
|
||||||
mFolders,
|
|
||||||
new_listener);
|
|
||||||
|
|
||||||
folderp->setItemSortOrder(mFolders->getSortOrder());
|
|
||||||
itemp = folderp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // build new view for item
|
|
||||||
{
|
|
||||||
LLInventoryItem* item = (LLInventoryItem*)objectp;
|
|
||||||
LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(
|
|
||||||
item->getType(),
|
|
||||||
item->getActualType(),
|
|
||||||
item->getInventoryType(),
|
|
||||||
this,
|
|
||||||
item->getUUID(),
|
|
||||||
item->getFlags());
|
|
||||||
if (new_listener)
|
|
||||||
{
|
|
||||||
itemp = new LLFolderViewItem(new_listener->getDisplayName(),
|
|
||||||
new_listener->getIcon(),
|
|
||||||
new_listener->getCreationDate(),
|
|
||||||
mFolders,
|
|
||||||
new_listener);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)mFolders->getItemByID(objectp->getParentUUID());
|
|
||||||
|
|
||||||
if (itemp)
|
|
||||||
{
|
|
||||||
// <edit>
|
|
||||||
itemp->mDelayedDelete = TRUE;
|
|
||||||
// </edit>
|
|
||||||
if (parent_folder)
|
|
||||||
{
|
|
||||||
itemp->addToFolder(parent_folder, mFolders);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
llwarns << "Couldn't find parent folder for child " << itemp->getLabel() << llendl;
|
|
||||||
delete itemp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!objectp || (objectp && (objectp->getType() == LLAssetType::AT_CATEGORY)))
|
|
||||||
{
|
|
||||||
LLViewerInventoryCategory::cat_array_t* categories;
|
|
||||||
LLViewerInventoryItem::item_array_t* items;
|
|
||||||
|
|
||||||
mInventory->lockDirectDescendentArrays((objectp != NULL) ? objectp->getUUID() : LLUUID::null, categories, items);
|
|
||||||
if(categories)
|
|
||||||
{
|
|
||||||
S32 count = categories->count();
|
|
||||||
for(S32 i = 0; i < count; ++i)
|
|
||||||
{
|
|
||||||
LLInventoryCategory* cat = categories->get(i);
|
|
||||||
buildNewViews(cat);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(items)
|
|
||||||
{
|
|
||||||
S32 count = items->count();
|
|
||||||
for(S32 i = 0; i < count; ++i)
|
|
||||||
{
|
|
||||||
LLInventoryItem* item = items->get(i);
|
|
||||||
buildNewViews(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mInventory->unlockDirectDescendentArrays(objectp->getUUID());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
struct LLConfirmPurgeData
|
struct LLConfirmPurgeData
|
||||||
{
|
{
|
||||||
LLUUID mID;
|
LLUUID mID;
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
#include "llfolderview.h"
|
#include "llfolderview.h"
|
||||||
#include "llinventorymodel.h"
|
#include "llinventorymodel.h"
|
||||||
#include "llmemberlistener.h"
|
#include "llmemberlistener.h"
|
||||||
|
#include "llcombobox.h"
|
||||||
#include "lluictrlfactory.h"
|
#include "lluictrlfactory.h"
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
@@ -59,7 +60,6 @@ class LLCheckBoxCtrl;
|
|||||||
class LLSpinCtrl;
|
class LLSpinCtrl;
|
||||||
class LLScrollableContainerView;
|
class LLScrollableContainerView;
|
||||||
class LLTextBox;
|
class LLTextBox;
|
||||||
class LLComboBox;
|
|
||||||
class LLIconCtrl;
|
class LLIconCtrl;
|
||||||
class LLSaveFolderState;
|
class LLSaveFolderState;
|
||||||
class LLSearchEditor;
|
class LLSearchEditor;
|
||||||
@@ -81,10 +81,6 @@ public:
|
|||||||
LLView *parent_view = NULL);
|
LLView *parent_view = NULL);
|
||||||
~LLInventoryPanel();
|
~LLInventoryPanel();
|
||||||
|
|
||||||
// <edit>
|
|
||||||
static std::list<LLInventoryPanel*> sInstances;
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
LLInventoryModel* getModel() { return mInventory; }
|
LLInventoryModel* getModel() { return mInventory; }
|
||||||
|
|
||||||
BOOL postBuild();
|
BOOL postBuild();
|
||||||
@@ -101,12 +97,6 @@ public:
|
|||||||
EAcceptance* accept,
|
EAcceptance* accept,
|
||||||
std::string& tooltip_msg);
|
std::string& tooltip_msg);
|
||||||
|
|
||||||
//fix to get rid of gSavedSettings use - rkeast
|
|
||||||
void setPartialSearch(bool toggle);
|
|
||||||
bool getPartialSearch();
|
|
||||||
void setSearchType(U32 type);
|
|
||||||
U32 getSearchType();
|
|
||||||
|
|
||||||
// Call this method to set the selection.
|
// Call this method to set the selection.
|
||||||
void openAllFolders();
|
void openAllFolders();
|
||||||
void closeAllFolders();
|
void closeAllFolders();
|
||||||
@@ -149,9 +139,6 @@ protected:
|
|||||||
// Given the id and the parent, build all of the folder views.
|
// Given the id and the parent, build all of the folder views.
|
||||||
void rebuildViewsFor(const LLUUID& id, U32 mask);
|
void rebuildViewsFor(const LLUUID& id, U32 mask);
|
||||||
void buildNewViews(const LLUUID& id);
|
void buildNewViews(const LLUUID& id);
|
||||||
// <edit>
|
|
||||||
void buildNewViews(const LLInventoryObject* objectp);
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// TomY TODO: Move this elsewhere?
|
// TomY TODO: Move this elsewhere?
|
||||||
@@ -264,7 +251,7 @@ public:
|
|||||||
}
|
}
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
|
|
||||||
// Final cleanup, destroy all open inventory views.
|
// Final cleanup, destroy all open inventory views.
|
||||||
static void cleanup();
|
static void cleanup();
|
||||||
|
|
||||||
// LLView & LLFloater functionality
|
// LLView & LLFloater functionality
|
||||||
@@ -289,9 +276,9 @@ public:
|
|||||||
static BOOL checkFoldersByName(void *user_data);
|
static BOOL checkFoldersByName(void *user_data);
|
||||||
static void onSearchEdit(const std::string& search_string, void* user_data );
|
static void onSearchEdit(const std::string& search_string, void* user_data );
|
||||||
|
|
||||||
static void onQuickFilterCommit(LLUICtrl* ctrl, void* user_data);
|
static void onQuickFilterCommit(LLUICtrl* ctrl, void* user_data);
|
||||||
static void refreshQuickFilter(LLUICtrl* ctrl);
|
static void refreshQuickFilter(LLUICtrl* ctrl);
|
||||||
|
|
||||||
static void onFilterSelected(void* userdata, bool from_click);
|
static void onFilterSelected(void* userdata, bool from_click);
|
||||||
static void onResetAll(void* userdata);
|
static void onResetAll(void* userdata);
|
||||||
static void onExpandAll(void* userdata);
|
static void onExpandAll(void* userdata);
|
||||||
@@ -315,17 +302,14 @@ protected:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
LLSearchEditor* mSearchEditor;
|
LLSearchEditor* mSearchEditor;
|
||||||
LLComboBox* mQuickFilterCombo;
|
LLComboBox* mQuickFilterCombo;
|
||||||
LLTabContainer* mFilterTabs;
|
LLTabContainer* mFilterTabs;
|
||||||
LLHandle<LLFloater> mFinderHandle;
|
LLHandle<LLFloater> mFinderHandle;
|
||||||
LLInventoryPanel* mActivePanel;
|
LLInventoryPanel* mActivePanel;
|
||||||
LLSaveFolderState* mSavedFolderState;
|
LLSaveFolderState* mSavedFolderState;
|
||||||
|
|
||||||
std::string mFilterText;
|
std::string mFilterText;
|
||||||
std::string mOldFilterText;
|
|
||||||
|
|
||||||
S32 mItemCount;
|
|
||||||
S32 mOldItemCount;
|
|
||||||
|
|
||||||
// This container is used to hold all active inventory views. This
|
// This container is used to hold all active inventory views. This
|
||||||
// is here to support the inventory toggle show button.
|
// is here to support the inventory toggle show button.
|
||||||
|
|||||||
@@ -2078,11 +2078,11 @@ void LLPanelInventory::draw()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelInventory::deleteAllChildren(BOOL delayed_delete)
|
void LLPanelInventory::deleteAllChildren()
|
||||||
{
|
{
|
||||||
mScroller = NULL;
|
mScroller = NULL;
|
||||||
mFolders = NULL;
|
mFolders = NULL;
|
||||||
LLView::deleteAllChildren(delayed_delete);
|
LLView::deleteAllChildren();
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL LLPanelInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
|
BOOL LLPanelInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public:
|
|||||||
LLFolderView* getRootFolder() const { return mFolders; }
|
LLFolderView* getRootFolder() const { return mFolders; }
|
||||||
|
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
virtual void deleteAllChildren(BOOL delayed_delete=FALSE);
|
virtual void deleteAllChildren();
|
||||||
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg);
|
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg);
|
||||||
|
|
||||||
static void idle(void* user_data);
|
static void idle(void* user_data);
|
||||||
|
|||||||
BIN
indra/newview/skins/default/textures/inv_link_Item.tga
Normal file
BIN
indra/newview/skins/default/textures/inv_link_Item.tga
Normal file
Binary file not shown.
BIN
indra/newview/skins/default/textures/inv_link_Item_broken.tga
Normal file
BIN
indra/newview/skins/default/textures/inv_link_Item_broken.tga
Normal file
Binary file not shown.
BIN
indra/newview/skins/default/textures/inv_link_folder.tga
Normal file
BIN
indra/newview/skins/default/textures/inv_link_folder.tga
Normal file
Binary file not shown.
@@ -208,30 +208,19 @@
|
|||||||
<menu bottom_delta="64" drop_shadow="true" height="49"
|
<menu bottom_delta="64" drop_shadow="true" height="49"
|
||||||
label="Search" left="0" mouse_opaque="false" name="Search" opaque="true"
|
label="Search" left="0" mouse_opaque="false" name="Search" opaque="true"
|
||||||
tear_off="true" width="118">
|
tear_off="true" width="118">
|
||||||
<menu_item_check bottom_delta="-18" control_name="Inventory.SearchByName" height="18"
|
<menu_item_check bottom_delta="-18" control_name="Inventory.SearchName" height="18"
|
||||||
label="By Name" left="0" mouse_opaque="true" name="By Name" width="118">
|
label="Item name" left="0" mouse_opaque="true" name="Item name" width="118">
|
||||||
<on_click filter="" function="Inventory.SetSearchBy" userdata="name" />
|
<on_click filter="" function="Inventory.SetSearchType" userdata="name" />
|
||||||
</menu_item_check>
|
</menu_item_check>
|
||||||
<menu_item_check bottom_delta="-18" control_name="Inventory.SearchByCreator" height="18"
|
<menu_item_check bottom_delta="-18" control_name="Inventory.SearchDesc" height="18"
|
||||||
label="By Creator" left="0" mouse_opaque="true" name="By Creator" width="118">
|
label="Item description" left="0" mouse_opaque="true" name="Item description" width="118">
|
||||||
<on_click filter="" function="Inventory.SetSearchBy" userdata="creator" />
|
<on_click filter="" function="Inventory.SetSearchType" userdata="description" />
|
||||||
</menu_item_check>
|
</menu_item_check>
|
||||||
<menu_item_check bottom_delta="-18" control_name="Inventory.SearchByDesc" height="18"
|
<menu_item_check bottom_delta="-18" control_name="Inventory.SearchCreator" height="18"
|
||||||
label="By Description" left="0" mouse_opaque="true" name="By Description" width="118">
|
label="Item creator" left="0" mouse_opaque="true" name="Item creatorr" width="118">
|
||||||
<on_click filter="" function="Inventory.SetSearchBy" userdata="desc" />
|
<on_click filter="" function="Inventory.SetSearchType" userdata="creator" />
|
||||||
</menu_item_check>
|
</menu_item_check>
|
||||||
<menu_item_separator bottom_delta="-8" height="8" left="0" mouse_opaque="true" name="separator"
|
</menu>
|
||||||
width="118" />
|
|
||||||
<menu_item_check bottom_delta="-18" control_name="Inventory.SearchByAll" height="18"
|
|
||||||
label="By All" left="0" mouse_opaque="true" name="By All" width="118">
|
|
||||||
<on_click filter="" function="Inventory.SetSearchBy" userdata="all" />
|
|
||||||
</menu_item_check>
|
|
||||||
<menu_item_separator bottom_delta="-8" height="8" left="0" mouse_opaque="true" name="separator"
|
|
||||||
width="118" />
|
|
||||||
<menu_item_check bottom_delta="-18" control_name="Inventory.PartialSearchToggle" height="18"
|
|
||||||
label="Show Partial Search Results" left="0" mouse_opaque="true" name="Show Partial Search Results" width="118">
|
|
||||||
<on_click filter="" function="Inventory.PartialSearch" userdata="toggle" />
|
|
||||||
</menu_item_check>
|
|
||||||
</menu>
|
</menu>
|
||||||
</menu_bar>
|
</menu_bar>
|
||||||
</floater>
|
</floater>
|
||||||
|
|||||||
Reference in New Issue
Block a user