automated merge avp->viewer2.0

meow-7.2.2
Loren Shih 2009-12-14 10:46:02 -05:00
commit b1d4502018
9 changed files with 265 additions and 217 deletions

View File

@ -411,7 +411,12 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
folderp->setVisible(show_folder_state == LLInventoryFilter::SHOW_ALL_FOLDERS || // always show folders?
(folderp->getFiltered(filter_generation) || folderp->hasFilteredDescendants(filter_generation))); // passed filter or has descendants that passed filter
}
if (folderp->getVisible())
// Need to call arrange regardless of visibility, since children's visibility
// might need to be changed too (e.g. even though a folder is invisible, its
// children also need to be set invisible for state-tracking purposes, e.g.
// llfolderviewitem::filter).
// if (folderp->getVisible())
{
S32 child_height = 0;
S32 child_width = 0;
@ -479,13 +484,13 @@ void LLFolderView::filter( LLInventoryFilter& filter )
if (getCompletedFilterGeneration() < filter.getCurrentGeneration())
{
mFiltered = FALSE;
mPassedFilter = FALSE;
mMinWidth = 0;
LLFolderViewFolder::filter(filter);
}
else
{
mFiltered = TRUE;
mPassedFilter = TRUE;
}
}

View File

@ -122,7 +122,7 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p)
mHasVisibleChildren(FALSE),
mIndentation(0),
mNumDescendantsSelected(0),
mFiltered(FALSE),
mPassedFilter(FALSE),
mLastFilterGeneration(-1),
mStringMatchOffset(std::string::npos),
mControlLabelRotation(0.f),
@ -224,17 +224,17 @@ BOOL LLFolderViewItem::potentiallyVisible()
BOOL LLFolderViewItem::getFiltered()
{
return mFiltered && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration();
return mPassedFilter && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration();
}
BOOL LLFolderViewItem::getFiltered(S32 filter_generation)
{
return mFiltered && mLastFilterGeneration >= filter_generation;
return mPassedFilter && mLastFilterGeneration >= filter_generation;
}
void LLFolderViewItem::setFiltered(BOOL filtered, S32 filter_generation)
{
mFiltered = filtered;
mPassedFilter = filtered;
mLastFilterGeneration = filter_generation;
}
@ -424,19 +424,20 @@ S32 LLFolderViewItem::getItemHeight()
void LLFolderViewItem::filter( LLInventoryFilter& filter)
{
BOOL filtered = mListener && filter.check(this);
const BOOL previous_passed_filter = mPassedFilter;
const BOOL passed_filter = mListener && filter.check(this);
// if our visibility will change as a result of this filter, then
// If our visibility will change as a result of this filter, then
// we need to be rearranged in our parent folder
if (getVisible() != filtered)
if (mParentFolder)
{
if (mParentFolder)
{
if (getVisible() != passed_filter)
mParentFolder->requestArrange();
if (passed_filter != previous_passed_filter)
mParentFolder->requestArrange();
}
}
setFiltered(filtered, filter.getCurrentGeneration());
setFiltered(passed_filter, filter.getCurrentGeneration());
mStringMatchOffset = filter.getStringMatchOffset();
filter.decrementFilterCount();
@ -1243,7 +1244,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
if (getLastFilterGeneration() < filter_generation)
{
if (getLastFilterGeneration() >= must_pass_generation && // folder has been compared to a valid precursor filter
!mFiltered) // and did not pass the filter
!mPassedFilter) // and did not pass the filter
{
// go ahead and flag this folder as done
mLastFilterGeneration = filter_generation;
@ -1381,7 +1382,7 @@ void LLFolderViewFolder::setFiltered(BOOL filtered, S32 filter_generation)
{
// if this folder is now filtered, but wasn't before
// (it just passed)
if (filtered && !mFiltered)
if (filtered && !mPassedFilter)
{
// reset current height, because last time we drew it
// it might have had more visible items than now

View File

@ -121,6 +121,9 @@ public:
static const F32 FOLDER_CLOSE_TIME_CONSTANT;
static const F32 FOLDER_OPEN_TIME_CONSTANT;
// Mostly for debugging printout purposes.
const std::string& getSearchableLabel() { return mSearchableLabel; }
protected:
friend class LLUICtrlFactory;
friend class LLFolderViewEventListener;
@ -149,7 +152,7 @@ protected:
BOOL mHasVisibleChildren;
S32 mIndentation;
S32 mNumDescendantsSelected;
BOOL mFiltered;
BOOL mPassedFilter;
S32 mLastFilterGeneration;
std::string::size_type mStringMatchOffset;
F32 mControlLabelRotation;
@ -157,8 +160,8 @@ protected:
BOOL mDragAndDropTarget;
LLUIImagePtr mArrowImage;
LLUIImagePtr mBoxImage;
BOOL mIsLoading;
LLTimer mTimeSinceRequestStart;
BOOL mIsLoading;
LLTimer mTimeSinceRequestStart;
bool mDontShowInHierarchy;
// helper function to change the selection from the root.
@ -203,7 +206,7 @@ public:
virtual S32 arrange( S32* width, S32* height, S32 filter_generation );
virtual S32 getItemHeight();
void setDontShowInHierarchy(bool dont_show) { mDontShowInHierarchy = dont_show; }
bool getDontShowInHierarchy() { return mDontShowInHierarchy; }
bool getDontShowInHierarchy() const { return mDontShowInHierarchy; }
// applies filters to control visibility of inventory items
virtual void filter( LLInventoryFilter& filter);
@ -332,7 +335,7 @@ public:
EAcceptance* accept,
std::string& tooltip_msg);
private:
private:
static std::map<U8, LLFontGL*> sFonts; // map of styles to fonts
};

View File

@ -1471,13 +1471,14 @@ BOOL LLFolderBridge::isItemRemovable()
{
return FALSE;
}
// Allow protected types to be removed, but issue a warning.
/*
if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
// Restrict to god mode so users don't inadvertently mess up their inventory.
if(LLFolderType::lookupIsProtectedType(category->getPreferredType()) &&
!gAgent.isGodlike())
{
return FALSE;
}
*/
LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
LLFolderViewFolder* folderp = dynamic_cast<LLFolderViewFolder*>(panel ? panel->getRootFolder()->getItemByID(mUUID) : NULL);
@ -2508,8 +2509,8 @@ void LLFolderBridge::folderOptionsMenu()
mItems.push_back(std::string("Wear As Ensemble"));
}
mItems.push_back(std::string("Remove From Outfit"));
if (is_sidepanel)
mItems.push_back(std::string("Outfit Separator"));
mItems.push_back(std::string("Outfit Separator"));
}
hide_context_entries(*mMenu, mItems, disabled_items);

View File

@ -40,6 +40,7 @@
#include "llinventorymodel.h" // gInventory.backgroundFetchActive()
#include "llviewercontrol.h"
#include "llviewerinventory.h"
#include "llfolderview.h"
// linden library includes
#include "lltrans.h"
@ -329,7 +330,6 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
mFilterSubString = string;
LLStringUtil::toUpper(mFilterSubString);
LLStringUtil::trimHead(mFilterSubString);
if (less_restrictive)
{
setModified(FILTER_LESS_RESTRICTIVE);
@ -512,21 +512,21 @@ void LLInventoryFilter::setModified(EFilterBehavior behavior)
// if not keeping current filter results, update last valid as well
switch(mFilterBehavior)
{
case FILTER_RESTART:
mMustPassGeneration = mFilterGeneration;
mMinRequiredGeneration = mFilterGeneration;
break;
case FILTER_LESS_RESTRICTIVE:
mMustPassGeneration = mFilterGeneration;
break;
case FILTER_MORE_RESTRICTIVE:
mMinRequiredGeneration = mFilterGeneration;
// must have passed either current filter generation (meaningless, as it hasn't been run yet)
// or some older generation, so keep the value
mMustPassGeneration = llmin(mMustPassGeneration, mFilterGeneration);
break;
default:
llerrs << "Bad filter behavior specified" << llendl;
case FILTER_RESTART:
mMustPassGeneration = mFilterGeneration;
mMinRequiredGeneration = mFilterGeneration;
break;
case FILTER_LESS_RESTRICTIVE:
mMustPassGeneration = mFilterGeneration;
break;
case FILTER_MORE_RESTRICTIVE:
mMinRequiredGeneration = mFilterGeneration;
// must have passed either current filter generation (meaningless, as it hasn't been run yet)
// or some older generation, so keep the value
mMustPassGeneration = llmin(mMustPassGeneration, mFilterGeneration);
break;
default:
llerrs << "Bad filter behavior specified" << llendl;
}
}
else

View File

@ -367,6 +367,7 @@ void LLLandmarksPanel::initFavoritesInventoryPanel()
initLandmarksPanel(mFavoritesInventoryPanel);
mFavoritesInventoryPanel->getFilter()->setEmptyLookupMessage("FavoritesNoMatchingItems");
initAccordion("tab_favorites", mFavoritesInventoryPanel);
}
@ -428,6 +429,7 @@ void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_lis
}
root_folder->setParentLandmarksPanel(this);
inventory_list->saveFolderState();
}
void LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLInventorySubTreePanel* inventory_list)
@ -1030,21 +1032,30 @@ void LLLandmarksPanel::doCreatePick(LLLandmark* landmark)
//////////////////////////////////////////////////////////////////////////
static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string)
{
// Open the immediate children of the root folder, since those
// are invisible in the UI and thus must always be open.
inventory_list->getRootFolder()->openTopLevelFolders();
// When search is cleared, restore the old folder state.
if (string == "")
{
inventory_list->setFilterSubString(LLStringUtil::null);
// Re-open folders that were open before
inventory_list->restoreFolderState();
}
// Open the immediate children of the root folder, since those
// are invisible in the UI and thus must always be open.
inventory_list->getRootFolder()->openTopLevelFolders();
if (inventory_list->getFilterSubString().empty() && string.empty())
{
// current filter and new filter empty, do nothing
return;
}
// save current folder open state if no filter currently applied
if (inventory_list->getRootFolder()->getFilterSubString().empty())
{
inventory_list->saveFolderState();
}
// Set new filter string
inventory_list->setFilterSubString(string);

View File

@ -109,19 +109,30 @@ BOOL LLSidepanelItemInfo::postBuild()
{
LLSidepanelInventorySubpanel::postBuild();
// build the UI
// item name & description
childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidateASCIIPrintableNoPipe);
//getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this));
getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this));
childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidateASCIIPrintableNoPipe);
//getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this));
getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this));
// Creator information
getChild<LLUICtrl>("BtnCreator")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onClickCreator,this));
// owner information
getChild<LLUICtrl>("BtnOwner")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onClickOwner,this));
// acquired date
// owner permissions
// Permissions debug text
// group permissions
getChild<LLUICtrl>("CheckShareWithGroup")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
// everyone permissions
getChild<LLUICtrl>("CheckEveryoneCopy")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
// next owner permissions
getChild<LLUICtrl>("CheckNextOwnerModify")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
getChild<LLUICtrl>("CheckNextOwnerCopy")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
getChild<LLUICtrl>("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
// Mark for sale or not, and sale info
getChild<LLUICtrl>("CheckPurchase")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this));
getChild<LLUICtrl>("RadioSaleType")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleType, this));
// "Price" label for edit
getChild<LLUICtrl>("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this));
refresh();
return TRUE;
}

View File

@ -339,6 +339,9 @@
function="Inventory.DoToSelected"
parameter="open" />
</menu_item_call>
<menu_item_separator
layout="topleft"
name="Folder Wearables Separator" />
<menu_item_call
label="Replace Current Outfit"
layout="topleft"
@ -423,7 +426,8 @@
parameter="copy_uuid" />
</menu_item_call>
<menu_item_separator
layout="topleft" />
layout="topleft"
name="Copy Separator" />
<menu_item_call
label="Copy"
layout="topleft"
@ -449,7 +453,8 @@
parameter="paste_link" />
</menu_item_call>
<menu_item_separator
layout="topleft" />
layout="topleft"
name="Paste Separator" />
<menu_item_call
label="Remove Link"
layout="topleft"
@ -500,7 +505,8 @@
parameter="about" />
</menu_item_call>
<menu_item_separator
layout="topleft" />
layout="topleft"
name="Animation Separator" />
<menu_item_call
label="Play in World"
layout="topleft"
@ -518,7 +524,8 @@
parameter="playlocal" />
</menu_item_call>
<menu_item_separator
layout="topleft" />
layout="topleft"
name="Send Instant Message Separator" />
<menu_item_call
label="Send Instant Message"
layout="topleft"
@ -544,7 +551,8 @@
parameter="selected" />
</menu_item_call>
<menu_item_separator
layout="topleft" />
layout="topleft"
name="Gesture Separator" />
<menu_item_call
label="Activate"
layout="topleft"
@ -562,7 +570,8 @@
parameter="deactivate" />
</menu_item_call>
<menu_item_separator
layout="topleft" />
layout="topleft"
name="Texture Separator" />
<menu_item_call
label="Save As"
layout="topleft"
@ -572,7 +581,8 @@
parameter="save_as" />
</menu_item_call>
<menu_item_separator
layout="topleft" />
layout="topleft"
name="Attach Separator"/>
<menu_item_call
label="Detach From Yourself"
layout="topleft"
@ -608,6 +618,9 @@
label="Attach To HUD"
layout="topleft"
name="Attach To HUD" />
<menu_item_separator
layout="topleft"
name="Wearable Separator"/>
<menu_item_call
label="Edit"
layout="topleft"

View File

@ -6,7 +6,7 @@
name="item properties"
help_topic="item_properties"
save_rect="true"
title="Inventory Item Properties"
title="Object Profile"
width="333">
<panel.string
name="unknown">
@ -39,27 +39,39 @@
top="4"
width="18" />
<button
follows="top|right"
height="25"
image_overlay="BackArrow_Off"
layout="topleft"
name="back_btn"
picture_style="true"
right="-5"
tab_stop="false"
top="0"
width="25" />
follows="top|right"
height="23"
image_overlay="BackArrow_Off"
layout="topleft"
left="10"
name="back_btn"
tab_stop="false"
top="0"
width="23" />
<text
follows="top|left|right"
font="SansSerifHuge"
height="26"
layout="topleft"
left_pad="10"
name="title"
text_color="LtGray"
top="0"
use_ellipses="true"
value="Object Profile"
width="275" />
<panel
follows="all"
height="500"
label=""
layout="topleft"
left="5"
left="10"
help_topic=""
top="30"
border="1"
width="313">
<text
width="313"
background_visible="true"
bg_alpha_color="DkGray2">
<text
type="string"
length="1"
follows="left|top"
@ -67,7 +79,7 @@
layout="topleft"
left="5"
name="LabelItemNameTitle"
top="5"
top="10"
width="78">
Name:
</text>
@ -75,7 +87,7 @@
border_style="line"
border_thickness="1"
follows="left|top|right"
height="16"
height="20"
layout="topleft"
left_delta="78"
max_length="63"
@ -90,7 +102,7 @@
layout="topleft"
left="5"
name="LabelItemDescTitle"
top_delta="20"
top_pad="10"
width="78">
Description:
</text>
@ -98,88 +110,106 @@
border_style="line"
border_thickness="1"
follows="left|top|right"
height="16"
height="23"
layout="topleft"
left_delta="78"
max_length="127"
name="LabelItemDesc"
top_delta="0"
top_delta="-5"
width="225" />
<text
type="string"
length="1"
follows="left|top"
height="16"
height="23"
layout="topleft"
left="10"
left="5"
name="LabelCreatorTitle"
top="65"
top_pad="10"
width="78">
Creator:
</text>
<avatar_icon
follows="top|left"
height="20"
default_icon_name="Generic_Person"
layout="topleft"
left_pad="0"
top_delta="-6"
mouse_opaque="true"
width="20" />
<text
type="string"
length="1"
follows="left|top"
height="16"
layout="topleft"
left_delta="78"
follows="left|right"
font="SansSerifSmall"
height="15"
layout="topleft"
left_pad="5"
name="LabelCreatorName"
top_delta="0"
top_delta="6"
width="140">
Nicole Linden
</text>
<button
follows="top|right"
height="16"
label="Profile..."
height="23"
label="Profile"
layout="topleft"
left_delta="144"
right="-1"
name="BtnCreator"
top_delta="0"
top_delta="-6"
width="78" />
<text
type="string"
length="1"
follows="left|top"
height="16"
height="23"
layout="topleft"
left="10"
left="5"
name="LabelOwnerTitle"
top="85"
top_pad="5"
width="78">
Owner:
</text>
<avatar_icon
follows="top|left"
height="20"
default_icon_name="Generic_Person"
layout="topleft"
left_pad="0"
top_delta="-6"
mouse_opaque="true"
width="20" />
<text
type="string"
length="1"
follows="left|top"
height="16"
layout="topleft"
left_delta="78"
follows="left|right"
font="SansSerifSmall"
height="15"
layout="topleft"
left_pad="5"
name="LabelOwnerName"
top_delta="0"
top_delta="6"
width="140">
Thrax Linden
</text>
<button
follows="top|right"
height="16"
label="Profile..."
height="23"
label="Profile"
layout="topleft"
left_delta="144"
right="-1"
name="BtnOwner"
top_delta="0"
top_delta="-3"
width="78" />
<text
type="string"
length="1"
follows="left|top"
height="16"
height="23"
layout="topleft"
left="10"
left="5"
name="LabelAcquiredTitle"
top="105"
top_pad="10"
width="78">
Acquired:
</text>
@ -187,7 +217,7 @@
type="string"
length="1"
follows="left|top"
height="16"
height="23"
layout="topleft"
left_delta="78"
name="LabelAcquiredDate"
@ -195,134 +225,146 @@
width="222">
Wed May 24 12:50:46 2006
</text>
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
left="10"
name="OwnerLabel"
top="125"
width="78">
You:
</text>
<panel
border="false"
follows="left|top"
layout="topleft"
mouse_opaque="false"
background_visible="true"
bg_alpha_color="DkGray"
name="perms_inv"
left="0"
top_pad="25"
height="155"
width="313">
<text
type="string"
length="1"
left="10"
top_pad="13"
text_color="EmphasisColor"
height="15"
follows="left|top|right"
layout="topleft"
name="perm_modify"
width="200">
You can:
</text>
<check_box
height="16"
label="Edit"
height="18"
label="Modify"
layout="topleft"
left_pad="5"
left="20"
name="CheckOwnerModify"
top_delta="0"
width="78" />
top_pad="0"
width="90" />
<check_box
height="16"
height="18"
label="Copy"
layout="topleft"
left_delta="0"
left_pad="0"
name="CheckOwnerCopy"
top_pad="5"
width="88" />
width="90" />
<check_box
height="16"
label="Resell"
height="18"
label="Transfer"
layout="topleft"
left_delta="0"
left_pad="0"
name="CheckOwnerTransfer"
top_pad="5"
width="106" />
<text
type="string"
length="1"
follows="left|top"
height="10"
height="16"
layout="topleft"
left="10"
name="AnyoneLabel"
top_pad="5"
width="78">
top_pad="8"
width="100">
Anyone:
</text>
<check_box
height="16"
height="18"
label="Copy"
layout="topleft"
left_pad="5"
left_pad="0"
name="CheckEveryoneCopy"
top_delta="0"
width="130" />
top_delta="-2"
width="150" />
<text
type="string"
length="1"
follows="left|top"
height="10"
height="16"
layout="topleft"
left="10"
name="GroupLabel"
top_pad="5"
width="78">
top_pad="8"
width="100">
Group:
</text>
<check_box
height="16"
height="18"
label="Share"
layout="topleft"
left_pad="5"
left_pad="0"
top_delta="-2"
name="CheckShareWithGroup"
top_delta="5"
width="106" />
tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."
width="150" />
<text
type="string"
length="1"
follows="left|top"
height="25"
height="16"
layout="topleft"
left="10"
name="NextOwnerLabel"
top_pad="5"
width="78"
top_pad="8"
width="200"
word_wrap="true">
Next owner:
</text>
<check_box
height="16"
label="Edit"
height="18"
label="Modify"
layout="topleft"
left_pad="5"
left="20"
top_pad="0"
name="CheckNextOwnerModify"
top_delta="0"
width="78" />
width="90" />
<check_box
height="16"
height="18"
label="Copy"
layout="topleft"
left_delta="0"
left_pad="0"
name="CheckNextOwnerCopy"
top_pad="5"
width="88" />
width="90" />
<check_box
height="16"
label="Resell"
height="18"
label="Transfer"
layout="topleft"
left_delta="0"
left_pad="0"
name="CheckNextOwnerTransfer"
top_pad="5"
tool_tip="Next owner can give away or resell this object"
width="106" />
</panel>
<check_box
height="16"
height="18"
label="For Sale"
layout="topleft"
left="10"
left="20"
name="CheckPurchase"
top_pad="5"
width="78" />
top_pad="20"
width="100" />
<combo_box
height="19"
left_pad="5"
height="23"
left_pad="0"
layout="topleft"
follows="left|top"
name="combobox sale copy"
width="110">
width="170">
<combo_box.item
label="Copy"
name="Copy"
@ -338,26 +380,14 @@
increment="1"
control_name="Edit Cost"
name="Edit Cost"
label="Price:"
label_width="100"
left="10"
width="192"
label="Price: L$"
label_width="75"
left="120"
width="170"
min_val="1"
height="19"
height="23"
max_val="999999999"
top_pad="5"/>
<text
type="string"
length="1"
height="15"
follows="left|top"
layout="topleft"
left_delta="82"
name="CurrencySymbol"
top_delta="1"
width="18">
L$
</text>
top_pad="10"/>
<!--line_editor
border_style="line"
border_thickness="1"
@ -480,31 +510,4 @@
Price: L$
</text-->
</panel>
<panel
height="25"
layout="bottomright"
help_topic="button_tab"
name="button_panel"
left="5"
bottom="5"
width="313">
<button
follows="bottom|right"
height="25"
label="Cancel"
layout="topleft"
name="cancel_btn"
right="-1"
top="0"
width="70" />
<button
follows="bottom|right"
height="25"
label="Save"
layout="topleft"
name="save_btn"
left_pad="-135"
top="0"
width="60" />
</panel>
</panel>