Commit 5477404d authored by Cinder's avatar Cinder
Browse files

Random scrubbing bubbles

parent bef7bbac
......@@ -47,10 +47,10 @@ class LLFloaterProperties : public LLFloater
{
public:
LLFloaterProperties(const LLUUID& item_id);
/*virtual*/ ~LLFloaterProperties();
~LLFloaterProperties();
/*virtual*/ BOOL postBuild() override;
/*virtual*/ void onOpen(const LLSD& key) override;
BOOL postBuild() override;
void onOpen(const LLSD& key) override;
void setObjectID(const LLUUID& object_id) { mObjectID = object_id; }
void dirty() { mDirty = TRUE; }
......
......@@ -27,20 +27,13 @@
*/
#include "llviewerprecompiledheaders.h"
#include <utility> // for std::pair<>
#include "llinventoryfunctions.h"
// library includes
#include "llagent.h"
#include "llagentwearables.h"
#include "llcallingcard.h"
#include "llfloaterreg.h"
#include "llinventorydefines.h"
#include "llsdserialize.h"
#include "llfiltereditor.h"
#include "llspinctrl.h"
#include "llui.h"
#include "message.h"
......@@ -51,40 +44,24 @@
#include "llclipboard.h"
#include "lldonotdisturbnotificationstorage.h"
#include "llfloatersidepanelcontainer.h"
#include "llfocusmgr.h"
#include "llfolderview.h"
#include "llgesturemgr.h"
#include "lliconctrl.h"
#include "llimview.h"
#include "llinventorybridge.h"
#include "llinventorymodel.h"
#include "llinventorypanel.h"
#include "lllineeditor.h"
#include "llmarketplacenotifications.h"
#include "llmarketplacefunctions.h"
#include "llmenugl.h"
#include "llnotificationsutil.h"
#include "llpanelmaininventory.h"
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
#include "llpreviewnotecard.h"
#include "llpreviewscript.h"
#include "llpreviewsound.h"
#include "llpreviewtexture.h"
#include "llresmgr.h"
#include "llscrollbar.h"
#include "llscrollcontainer.h"
#include "llselectmgr.h"
#include "llsidepanelinventory.h"
#include "lltabcontainer.h"
#include "lltooldraganddrop.h"
#include "lltrans.h"
#include "llviewermessage.h"
#include "llviewerfoldertype.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
#include "llvoavatarself.h"
#include "llwearablelist.h"
BOOL LLInventoryState::sWearNewClothing = FALSE;
LLUUID LLInventoryState::sWearNewClothingTransactionID;
......@@ -153,7 +130,7 @@ S32 count_descendants_items(const LLUUID& cat_id)
S32 count = item_array->size();
LLInventoryModel::cat_array_t cat_array_copy = *cat_array;
for (LLInventoryModel::cat_array_t::iterator iter = cat_array_copy.begin(); iter != cat_array_copy.end(); iter++)
for (LLInventoryModel::cat_array_t::iterator iter = cat_array_copy.begin(); iter != cat_array_copy.end(); ++iter)
{
LLViewerInventoryCategory* category = *iter;
count += count_descendants_items(category->getUUID());
......@@ -175,7 +152,7 @@ bool contains_nocopy_items(const LLUUID& id)
gInventory.getDirectDescendentsOf(id,cat_array,item_array);
// Check all the items: returns true upon encountering a nocopy item
for (LLInventoryModel::item_array_t::iterator iter = item_array->begin(); iter != item_array->end(); iter++)
for (LLInventoryModel::item_array_t::iterator iter = item_array->begin(); iter != item_array->end(); ++iter)
{
LLInventoryItem* item = *iter;
LLViewerInventoryItem * inv_item = (LLViewerInventoryItem *) item;
......@@ -186,7 +163,7 @@ bool contains_nocopy_items(const LLUUID& id)
}
// Check all the sub folders recursively
for (LLInventoryModel::cat_array_t::iterator iter = cat_array->begin(); iter != cat_array->end(); iter++)
for (LLInventoryModel::cat_array_t::iterator iter = cat_array->begin(); iter != cat_array->end(); ++iter)
{
LLViewerInventoryCategory* cat = *iter;
if (contains_nocopy_items(cat->getUUID()))
......@@ -580,7 +557,6 @@ BOOL get_can_item_be_worn(const LLUUID& id)
// Not being worn yet.
return TRUE;
}
break;
}
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_CLOTHING:
......@@ -594,7 +570,6 @@ BOOL get_can_item_be_worn(const LLUUID& id)
// Not being worn yet.
return TRUE;
}
break;
default:
break;
}
......@@ -1252,7 +1227,7 @@ bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_fol
LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) inv_item;
LLViewerInventoryCategory * linked_category = viewer_inv_item->getLinkedCategory();
if (linked_category != NULL)
if (linked_category != nullptr)
{
// Move the linked folder directly
return move_folder_to_marketplacelistings(linked_category, dest_folder, copy);
......@@ -1261,7 +1236,7 @@ bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_fol
{
// Grab the linked item if any
LLViewerInventoryItem * linked_item = viewer_inv_item->getLinkedItem();
viewer_inv_item = (linked_item != NULL ? linked_item : viewer_inv_item);
viewer_inv_item = (linked_item != nullptr ? linked_item : viewer_inv_item);
// If we want to copy but the item is no copy, fail silently (this is a common case that doesn't warrant notification)
if (copy && !viewer_inv_item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID()))
......@@ -1408,13 +1383,6 @@ void dump_trace(std::string& message, S32 depth, LLError::ELevel log_level)
// The only inventory changes that are done is to move and sort folders containing no-copy items to stock folders.
bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_t cb, bool fix_hierarchy, S32 depth)
{
#if 0
// Used only for debug
if (!cb)
{
cb = boost::bind(&dump_trace, _1, _2, _3);
}
#endif
// Folder is valid unless issue is raised
bool result = true;
......@@ -1689,7 +1657,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
}
// Scan each item and report if there's a problem
LLInventoryModel::item_array_t item_array_copy = *item_array;
for (LLInventoryModel::item_array_t::iterator iter = item_array_copy.begin(); iter != item_array_copy.end(); iter++)
for (LLInventoryModel::item_array_t::iterator iter = item_array_copy.begin(); iter != item_array_copy.end(); ++iter)
{
LLInventoryItem* item = *iter;
LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) item;
......@@ -1770,7 +1738,6 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(const LLInventoryIte
break;
default:
return true;
break;
}
return false;
}
......@@ -2197,7 +2164,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
if (user_confirm && (("delete" == action) || ("cut" == action) || ("rename" == action) || ("properties" == action) || ("task_properties" == action) || ("open" == action)))
{
std::set<LLFolderViewItem*>::iterator set_iter = selected_items.begin();
LLFolderViewModelItemInventory * viewModel = NULL;
LLFolderViewModelItemInventory * viewModel = nullptr;
for (; set_iter != selected_items.end(); ++set_iter)
{
viewModel = dynamic_cast<LLFolderViewModelItemInventory *>((*set_iter)->getViewModelItem());
......@@ -2312,8 +2279,8 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
}
LLMultiPreview* multi_previewp = NULL;
LLMultiProperties* multi_propertiesp = NULL;
LLMultiPreview* multi_previewp = nullptr;
LLMultiProperties* multi_propertiesp = nullptr;
if (("task_open" == action || "open" == action) && selected_items.size() > 1)
{
......@@ -2431,7 +2398,7 @@ void LLInventoryAction::buildMarketplaceFolders(LLFolderView* root)
std::set<LLFolderViewItem*> selected_items = root->getSelectionList();
std::set<LLFolderViewItem*>::iterator set_iter = selected_items.begin();
LLFolderViewModelItemInventory * viewModel = NULL;
LLFolderViewModelItemInventory * viewModel = nullptr;
for (; set_iter != selected_items.end(); ++set_iter)
{
viewModel = dynamic_cast<LLFolderViewModelItemInventory *>((*set_iter)->getViewModelItem());
......
......@@ -105,7 +105,7 @@ public:
LLInventoryObject* object);
void showProperties() override;
void buyItem();
S32 getPrice();
S32 getPrice() const;
static bool commitBuyItem(const LLSD& notification, const LLSD& response);
// LLFolderViewModelItemInventory functionality
......@@ -250,17 +250,12 @@ void LLTaskInvFVBridge::buyItem()
}
}
S32 LLTaskInvFVBridge::getPrice()
S32 LLTaskInvFVBridge::getPrice() const
{
LLInventoryItem* item = findItem();
if(item)
{
return item->getSaleInfo().getSalePrice();
}
else
{
return -1;
}
return item
? item->getSaleInfo().getSalePrice()
: -1;
}
// static
......
......@@ -32,7 +32,6 @@
#include "llpointer.h"
#include "lluuid.h"
#include "llinventoryobserver.h"
#include "llextendedstatus.h"
class LLInventoryItem;
class LLLineEditor;
......@@ -44,9 +43,9 @@ class LLMultiPreview : public LLMultiFloater
public:
LLMultiPreview();
/*virtual*/void onOpen(const LLSD& key) override;
/*virtual*/void tabOpen(LLFloater* opened_floater, bool from_click) override;
/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false) override;
void onOpen(const LLSD& key) override;
void tabOpen(LLFloater* opened_floater, bool from_click) override;
void handleReshape(const LLRect& new_rect, bool by_user = false) override;
};
......@@ -62,11 +61,11 @@ public:
PREVIEW_ASSET_LOADING,
PREVIEW_ASSET_LOADED
} EAssetStatus;
public:
LLPreview(const LLSD& key );
virtual ~LLPreview();
/*virtual*/ BOOL postBuild() override;
BOOL postBuild() override;
virtual void setObjectID(const LLUUID& object_id);
void setItem( LLInventoryItem* item );
......@@ -86,18 +85,15 @@ public:
static void onBtnCopyToInv(void* userdata);
void addKeepDiscardButtons();
static void onKeepBtn(void* data);
static void onDiscardBtn(void* data);
/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false) override;
void handleReshape(const LLRect& new_rect, bool by_user = false) override;
void userResized() { mUserResized = TRUE; };
virtual void loadAsset() { mAssetStatus = PREVIEW_ASSET_LOADED; }
virtual EAssetStatus getAssetStatus() { return mAssetStatus;}
static LLPreview* getFirstPreviewForSource(const LLUUID& source_id);
// Why is this at the LLPreview level? JC
void setNotecardInfo(const LLUUID& notecard_inv_id, const LLUUID& object_id);
......@@ -112,8 +108,6 @@ public:
protected:
void onCommit() override;
void addDescriptionUI();
static void onText(LLUICtrl*, void* userdata);
static void onRadio(LLUICtrl*, void* userdata);
......@@ -121,7 +115,6 @@ protected:
void changed(U32 mask) override;
BOOL mDirty;
protected:
LLUUID mItemUUID;
// mObjectUUID will have a value if it is associated with a task in
......
......@@ -35,8 +35,8 @@ class LLPreviewAnim : public LLPreview
public:
LLPreviewAnim(const LLSD& key);
/*virtual*/ BOOL postBuild() override;
/*virtual*/ void onClose(bool app_quitting) override;
BOOL postBuild() override;
void onClose(bool app_quitting) override;
void draw() override;
void cleanup();
void play(const LLSD& param);
......
......@@ -30,6 +30,7 @@
#include "llpreview.h"
#include "llinventory.h"
#include "llframetimer.h"
#include "llextendedstatus.h"
class LLLiveLSLFile;
class LLMessageSystem;
......@@ -74,13 +75,11 @@ protected:
public:
~LLScriptEdCore();
void initializeKeywords();
void initMenu();
void processKeywords();
void processLoaded();
void draw() override;
/*virtual*/ BOOL postBuild() override;
void draw() override;
BOOL postBuild() override;
BOOL canClose();
void setEnableEditing(bool enable);
bool canLoadOrSaveToFile( void* userdata );
......@@ -109,7 +108,7 @@ public:
static bool enableSaveToFileMenu(void* userdata);
static bool enableLoadFromFileMenu(void* userdata);
bool hasAccelerators() const override { return true; }
bool hasAccelerators() const override { return true; }
LLUUID getAssociatedExperience()const;
void setAssociatedExperience( const LLUUID& experience_id );
......
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