Commit b6186ffc authored by Kitty Barnett's avatar Kitty Barnett

Merged with .Catznip tip

--HG--
branch : Catznip
parents 48fd2983 b34c69f0
031649e39fb59dc0ea66957e41faef8482892cb6
\ No newline at end of file
d5f0711c4630e32e057806b1aa57efe0d96e3a99
\ No newline at end of file
4ef383e7a5cdbf1dedd7458a56a9d13ebb7fddf2
\ No newline at end of file
122a412775c7f038fd13a3d9a0e11b54e85c54cc
\ No newline at end of file
[UI/Base]
- added : static registration of an LLPanel derived class with a custom class creator
-> used in the UI-SidepanelOutfits patch branch
- added : registration of an LLFloater derived class with a callback for the XML filename
* Registration of an LLFloater derived class with a callback for the XML filename
-> used in the Chat-Misc patch branch
-> used in the Chat-NearbyChat patch branch
* Static registration of an LLPanel derived class with a custom class creator
-> used in the Appearance-Wearing patch branch
......@@ -489,6 +489,7 @@ class LLFlatListViewEx : public LLFlatListView
* Sets up new filter string and filters the list.
*/
void setFilterSubString(const std::string& filter_str);
// std::string getFilterSubString() { return mFilterSubString; }
// [SL:KB] - Patch: Appearance-EditInvPanel | Checked: 2012-07-19 (Catznip-3.3)
const std::string& getFilterSubString() { return mFilterSubString; }
// [/SL:KB]
......
......@@ -157,7 +157,7 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key)
{
const LLFloaterBuildFunc& build_func = sBuildMap[name].mFunc;
// const std::string& xui_file = sBuildMap[name].mFile;
// [SL:KB] - Patch: UI-Base | Checked: 2010-12-01 (Catznip-2.5)
// [SL:KB] - Patch: UI-Base | Checked: Catznip-2.5
const std::string& xui_file = (!sBuildMap[name].mFileFunc) ? sBuildMap[name].mFile : sBuildMap[name].mFileFunc();
// [/SL:KB]
if (build_func)
......
......@@ -49,7 +49,7 @@ class LLModalDialog;
// [/SL:KB]
typedef boost::function<LLFloater* (const LLSD& key)> LLFloaterBuildFunc;
// [SL:KB] - Patch: UI-Base | Checked: 2010-12-01 (Catznip-2.4)
// [SL:KB] - Patch: UI-Base | Checked: Catznip-2.4
typedef boost::function<const std::string& (void)> LLFloaterFileFunc;
// [/SL:KB]
......@@ -66,7 +66,7 @@ class LLFloaterReg
struct BuildData
{
LLFloaterBuildFunc mFunc;
// [SL:KB] - Patch: UI-Base | Checked: 2010-12-01 (Catznip-2.4)
// [SL:KB] - Patch: UI-Base | Checked: Catznip-2.4
LLFloaterFileFunc mFileFunc;
// [/SL:KB]
std::string mFile;
......
......@@ -501,18 +501,20 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
mPriority(p.priority),
mPersist(p.persist),
mDefaultFunctor(p.functor.isProvided() ? p.functor() : p.name()),
// [SL:KB] - Patch: Notification-Logging | Checked: 2012-01-29 (Catznip-3.2)
mCanLogTo(getLogTypeFromString(p.can_logto)),
// [SL:KB] - Patch: Notification-Logging | Checked: Catznip-3.2
mCanLogTo(0),
// [/SL:KB]
// mLogToChat(p.log_to_chat),
// mLogToIM(p.log_to_im),
mShowToast(p.show_toast),
mSoundName("")
{
// [SL:KB] - Patch: Notification-Logging | Checked: 2012-01-29 (Catznip-3.2)
U32 nLogTo = (p.logto.isProvided() ? getLogTypeFromString(p.logto) : mCanLogTo);
if ( (nLogTo) || ("notifytip" == mType) )
// [SL:KB] - Patch: Notification-Logging | Checked: Catznip-3.2
if ( (p.can_logto.isProvided()) || (p.logto.isProvided()) )
{
mCanLogTo = (p.can_logto.isProvided()) ? getLogTypeFromString(p.can_logto)
: ("notifytip" == mType) ? LLNotificationTemplate::LOG_CHAT : 0;
U32 nLogTo = (p.logto.isProvided() ? getLogTypeFromString(p.logto) : mCanLogTo);
LLUI::sSettingGroups["config"]->declareU32("Log" + mName, nLogTo, "Specifies where this notification will be logged to");
}
......
......@@ -304,8 +304,8 @@ template<typename T>
public:
// register with either the provided builder, or the generic templated builder
LLPanelInjector(const std::string& tag);
// [SL:KB] - Patch: UI-Base | Checked: 2010-12-01 (Catznip-2.4)
LLPanelInjector(const std::string& tag, LLPanelClassCreatorFunc func);
// [SL:KB] - Patch: UI-Base | Checked: Catznip-2.4
LLPanelInjector(const std::string& tag, const LLPanelClassCreatorFunc& func);
// [/SL:KB]
};
......@@ -316,9 +316,9 @@ template<typename T>
LLRegisterPanelClass::instance().addPanelClass(tag,&LLRegisterPanelClass::defaultPanelClassBuilder<T>);
}
// [SL:KB] - Patch: UI-Base | Checked: 2010-12-01 (Catznip-2.4)
// [SL:KB] - Patch: UI-Base | Checked: Catznip-2.4
template<typename T>
LLPanelInjector<T>::LLPanelInjector(const std::string& tag, LLPanelClassCreatorFunc func)
LLPanelInjector<T>::LLPanelInjector(const std::string& tag, const LLPanelClassCreatorFunc& func)
{
LLRegisterPanelClass::instance().addPanelClass(tag, func);
}
......
......@@ -42,7 +42,7 @@
#include "llfloateropenobject.h"
#include "llfloaterreg.h"
#include "llfloatermarketplacelistings.h"
#include "llfloateroutfitphotopreview.h"
//#include "llfloateroutfitphotopreview.h"
#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
#include "llfolderview.h"
......@@ -5119,19 +5119,19 @@ void LLFolderBridge::dropToFavorites(LLInventoryItem* inv_item)
void LLFolderBridge::dropToOutfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit)
{
// if((inv_item->getInventoryType() == LLInventoryType::IT_TEXTURE) || (inv_item->getInventoryType() == LLInventoryType::IT_SNAPSHOT))
// {
// const LLUUID &my_outifts_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS, false);
// if(mUUID != my_outifts_id)
// {
// LLFloaterOutfitPhotoPreview* photo_preview = LLFloaterReg::showTypedInstance<LLFloaterOutfitPhotoPreview>("outfit_photo_preview", inv_item->getUUID());
// if(photo_preview)
// {
// photo_preview->setOutfitID(mUUID);
// }
// }
// return;
// }
if((inv_item->getInventoryType() == LLInventoryType::IT_TEXTURE) || (inv_item->getInventoryType() == LLInventoryType::IT_SNAPSHOT))
{
//const LLUUID &my_outifts_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS, false);
//if(mUUID != my_outifts_id)
//{
// LLFloaterOutfitPhotoPreview* photo_preview = LLFloaterReg::showTypedInstance<LLFloaterOutfitPhotoPreview>("outfit_photo_preview", inv_item->getUUID());
// if(photo_preview)
// {
// photo_preview->setOutfitID(mUUID);
// }
//}
return;
}
// BAP - should skip if dup.
if (move_is_into_current_outfit)
......
......@@ -39,23 +39,23 @@ class LLOutfitsView : public LLPanelOutfitsTab
void closeAllFolders();
LLInventoryPanel* getInventoryPanel() { return mInvPanel; }
bool onIdle();
/*virtual*/ void onOpen(const LLSD& info);
/*virtual*/ BOOL postBuild();
bool onIdle();
void onOpen(const LLSD& info) override;
BOOL postBuild() override;
// LLPanelAppearanceTab overrides
/*virtual*/ void setFilterSubString(const std::string& string);
/*virtual*/ bool isActionEnabled(const LLSD& userdata);
/*virtual*/ void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const;
void setFilterSubString(const std::string& string) override;
bool isActionEnabled(const LLSD& userdata) override;
void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const override;
// LLPanelOutfitsTab overrides
/*virtual*/ bool hasItemSelected();
/*virtual*/ void performAction(std::string action);
/*virtual*/ void removeSelected();
/*virtual*/ void setSelectedOutfitByUUID(const LLUUID& outfit_uuid);
/*virtual*/ void wearSelectedItems();
bool hasItemSelected() override;
void performAction(std::string action) override;
void removeSelected() override;
void setSelectedOutfitByUUID(const LLUUID& outfit_uuid) override;
void wearSelectedItems() override;
/*virtual*/ boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb);
boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb) override;
protected:
void highlightBaseOutfit();
......
......@@ -290,24 +290,16 @@ LLWornItemsList::LLWornItemsList(const LLWornItemsList::Params& p)
{
}
void LLWornItemsList::addNewItem(LLViewerInventoryItem* pItem, bool rearrange)
// virtual
LLPanel* LLWornItemsList::createNewItem(LLViewerInventoryItem* pItem)
{
if (!pItem)
{
LL_WARNS() << "No inventory item. Couldn't create new item." << LL_ENDL;
llassert(pItem != NULL);
}
LLWornListItem* pListItem = LLWornListItem::create(pItem);
if (!pListItem)
return;
bool fAdded = addItem(pListItem, pItem->getUUID(), ADD_BOTTOM, rearrange);
if (!fAdded)
{
LL_WARNS() << "Couldn't add new item." << LL_ENDL;
llassert(fAdded);
llassert(pItem != nullptr);
return nullptr;
}
return LLWornListItem::create(pItem);
}
void LLWornItemsList::setSortOrder(ESortOrder sortOrder, bool sortNow)
......
......@@ -65,9 +65,9 @@ class LLWornItemsList : public LLWearableItemsList
LLWornItemsList(const LLWornItemsList::Params& p);
public:
/*virtual*/ void setSortOrder(ESortOrder sortOrder, bool sortNow = true);
void setSortOrder(ESortOrder sortOrder, bool sortNow = true) override;
protected:
/*virtual*/ void addNewItem(LLViewerInventoryItem* item, bool rearrange /*= true*/);
LLPanel* createNewItem(LLViewerInventoryItem* pItem) override;
};
//////////////////////////////////////////////////////////////////////////
......
......@@ -9277,7 +9277,10 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
// add the cost of each individual texture in the linkset
attachment_texture_cost += volume_texture->second;
}
attachment_total_cost = attachment_volume_cost + attachment_texture_cost + attachment_children_cost;
// [SL:KB] - Patch: Appearance-Complexity | Checked: Catznip-4.1
attachment_total_cost = llclamp(attachment_volume_cost + attachment_texture_cost + attachment_children_cost, MIN_ATTACHMENT_COMPLEXITY, MAX_ATTACHMENT_COMPLEXITY);
// [/SL:KB]
// attachment_total_cost = attachment_volume_cost + attachment_texture_cost + attachment_children_cost;
LL_DEBUGS("ARCdetail") << "Attachment costs " << attached_object->getAttachmentItemID()
<< " total: " << attachment_total_cost
<< ", volume: " << attachment_volume_cost
......@@ -9285,11 +9288,12 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
<< ", " << volume->numChildren()
<< " children: " << attachment_children_cost
<< LL_ENDL;
// Limit attachment complexity to avoid signed integer flipping of the wearer's ACI
// [SL:KB] - Patch: Appearance-Complexity | Checked: Catznip-4.1
attached_object->setAttachmentComplexity(attachment_total_cost);
cost += (U32)attachment_total_cost;
// [/SL:KB]
// Limit attachment complexity to avoid signed integer flipping of the wearer's ACI
cost += (U32)llclamp(attachment_total_cost, MIN_ATTACHMENT_COMPLEXITY, MAX_ATTACHMENT_COMPLEXITY);
// cost += (U32)llclamp(attachment_total_cost, MIN_ATTACHMENT_COMPLEXITY, MAX_ATTACHMENT_COMPLEXITY);
}
}
}
......
......@@ -818,7 +818,9 @@ bool LLWearableItemComplexityComparator::doCompare(const LLPanelInventoryListIte
{
const LLViewerObject* pObjLHS = gAgentAvatarp->getWornAttachment(pLHS->getItemID());
const LLViewerObject* pObjRHS = gAgentAvatarp->getWornAttachment(pRHS->getItemID());
if (pObjLHS->getAttachmentComplexity() != pObjRHS->getAttachmentComplexity())
if ( (!pObjLHS) || (!pObjRHS) )
return (pObjLHS) && (!pObjRHS);
else if (pObjLHS->getAttachmentComplexity() != pObjRHS->getAttachmentComplexity())
return pObjLHS->getAttachmentComplexity() > pObjRHS->getAttachmentComplexity();
}
}
......
......@@ -323,7 +323,7 @@ class LLWearableItemTypeNameComparator : public LLWearableItemNameComparator
void setOrder(LLAssetType::EType items_of_type, ETypeListOrder order_priority, bool sort_items_by_name, bool sort_wearable_items_by_name);
// [SL:KB] - Patch: Appearance-Wearing | Checked: 2012-07-14 (Catznip-3.3)
virtual bool areWearablesOrdered() const { return true; }
bool areWearablesOrdered() const override { return true; }
// [/SL:KB]
protected:
/**
......
......@@ -90,12 +90,13 @@
<texture_picker
allow_no_texture="true"
default_image_name="None"
enabled="false"
enabled="true"
fallback_image="Generic_Person_Large"
follows="top|left"
height="124"
layout="topleft"
left="0"
mode="zoom"
name="2nd_life_pic"
top="10"
width="102" />
......@@ -137,12 +138,13 @@
<texture_picker
allow_no_texture="true"
default_image_name="None"
enabled="false"
enabled="true"
fallback_image="Generic_Person_Large"
follows="top|left"
height="124"
layout="topleft"
left="0"
mode="zoom"
name="real_world_pic"
width="102" />
<text
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment