summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmarketplaceoutboxinventory.cpp
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2012-01-30 22:27:01 -0500
committerDebi King (Dessie) <dessie@lindenlab.com>2012-01-30 22:27:01 -0500
commita39937f9303ce2100ebb40d6fcaa8d36a14e3cb7 (patch)
tree3c0d951cafadbd90c736cfbb9e2e4329d05407c7 /indra/newview/llpanelmarketplaceoutboxinventory.cpp
parent6298daf266369dbd3600c5fdf287f9c680b2a897 (diff)
parentbd4c629e38aa2ab7223a5ef3b8e23ad91229b512 (diff)
merge
Diffstat (limited to 'indra/newview/llpanelmarketplaceoutboxinventory.cpp')
-rw-r--r--indra/newview/llpanelmarketplaceoutboxinventory.cpp133
1 files changed, 9 insertions, 124 deletions
diff --git a/indra/newview/llpanelmarketplaceoutboxinventory.cpp b/indra/newview/llpanelmarketplaceoutboxinventory.cpp
index ed1206aec8..ff62cb23db 100644
--- a/indra/newview/llpanelmarketplaceoutboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceoutboxinventory.cpp
@@ -47,50 +47,6 @@ static LLDefaultChildRegistry::Register<LLOutboxFolderViewFolder> r2("outbox_fol
//
-// Marketplace errors
-//
-
-enum
-{
- MKTERR_NONE = 0,
-
- MKTERR_NOT_MERCHANT,
- MKTERR_FOLDER_EMPTY,
- MKTERR_UNASSOCIATED_PRODUCTS,
- MKTERR_OBJECT_LIMIT,
- MKTERR_FOLDER_DEPTH,
- MKTERR_UNSELLABLE_ITEM,
- MKTERR_INTERNAL_IMPORT,
-
- MKTERR_COUNT
-};
-
-static const std::string MARKETPLACE_ERROR_STRINGS[MKTERR_COUNT] =
-{
- "NO_ERROR",
- "NOT_MERCHANT_ERROR",
- "FOLDER_EMPTY_ERROR",
- "UNASSOCIATED_PRODUCTS_ERROR",
- "OBJECT_LIMIT_ERROR",
- "FOLDER_DEPTH_ERROR",
- "UNSELLABLE_ITEM_FOUND",
- "INTERNAL_IMPORT_ERROR",
-};
-
-static const std::string MARKETPLACE_ERROR_NAMES[MKTERR_COUNT] =
-{
- "Marketplace Error None",
- "Marketplace Error Not Merchant",
- "Marketplace Error Empty Folder",
- "Marketplace Error Unassociated Products",
- "Marketplace Error Object Limit",
- "Marketplace Error Folder Depth",
- "Marketplace Error Unsellable Item",
- "Marketplace Error Internal Import",
-};
-
-
-//
// LLOutboxInventoryPanel Implementation
//
@@ -111,37 +67,6 @@ void LLOutboxInventoryPanel::buildFolderView(const LLInventoryPanel::Params& par
LLUUID root_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false);
- // leslie -- temporary HACK to work around sim not creating outbox with proper system folder type
- if (root_id.isNull())
- {
- std::string start_folder_name(params.start_folder());
-
- LLInventoryModel::cat_array_t* cats;
- LLInventoryModel::item_array_t* items;
-
- gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), cats, items);
-
- if (cats)
- {
- for (LLInventoryModel::cat_array_t::const_iterator cat_it = cats->begin(); cat_it != cats->end(); ++cat_it)
- {
- LLInventoryCategory* cat = *cat_it;
-
- if (cat->getName() == start_folder_name)
- {
- root_id = cat->getUUID();
- break;
- }
- }
- }
-
- if (root_id == LLUUID::null)
- {
- llwarns << "No category found that matches outbox inventory panel start_folder: " << start_folder_name << llendl;
- }
- }
- // leslie -- end temporary HACK
-
if (root_id == LLUUID::null)
{
llwarns << "Outbox inventory panel has no root folder!" << llendl;
@@ -206,66 +131,26 @@ LLFolderViewItem * LLOutboxInventoryPanel::createFolderViewItem(LLInvFVBridge *
LLOutboxFolderViewFolder::LLOutboxFolderViewFolder(const Params& p)
: LLFolderViewFolder(p)
- , LLBadgeOwner(getHandle())
- , mError(0)
-{
- initBadgeParams(p.error_badge());
-}
-
-LLOutboxFolderViewFolder::~LLOutboxFolderViewFolder()
{
}
-// virtual
-void LLOutboxFolderViewFolder::draw()
-{
- if (!badgeHasParent())
- {
- addBadgeToParentPanel();
- }
-
- setBadgeVisibility(hasError());
-
- LLFolderViewFolder::draw();
-}
+//
+// LLOutboxFolderViewItem Implementation
+//
-void LLOutboxFolderViewFolder::setErrorString(const std::string& errorString)
+LLOutboxFolderViewItem::LLOutboxFolderViewItem(const Params& p)
+ : LLFolderViewItem(p)
{
- S32 error_code = MKTERR_NONE;
-
- for (S32 i = 1; i < MKTERR_COUNT; ++i)
- {
- if (MARKETPLACE_ERROR_STRINGS[i] == errorString)
- {
- error_code = i;
- break;
- }
- }
-
- setError(error_code);
}
-void LLOutboxFolderViewFolder::setError(S32 errorCode)
+BOOL LLOutboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
- mError = errorCode;
-
- if (hasError())
- {
- setToolTip(LLTrans::getString(MARKETPLACE_ERROR_NAMES[mError]));
- }
- else
- {
- setToolTip(LLStringExplicit(""));
- }
+ return TRUE;
}
-//
-// LLOutboxFolderViewItem Implementation
-//
-
-BOOL LLOutboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask)
+void LLOutboxFolderViewItem::openItem()
{
- return TRUE;
+ // Intentionally do nothing to block attaching items from the outbox
}
// eof