Removed unused code for old outbox error reporting
parent
12819b6637
commit
263fd13458
|
|
@ -46,50 +46,6 @@ static LLDefaultChildRegistry::Register<LLOutboxInventoryPanel> r1("outbox_inven
|
|||
static LLDefaultChildRegistry::Register<LLOutboxFolderViewFolder> r2("outbox_folder_view_folder");
|
||||
|
||||
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
|
@ -206,63 +162,18 @@ 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();
|
||||
}
|
||||
|
||||
void LLOutboxFolderViewFolder::setErrorString(const std::string& errorString)
|
||||
{
|
||||
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)
|
||||
{
|
||||
mError = errorCode;
|
||||
|
||||
if (hasError())
|
||||
{
|
||||
setToolTip(LLTrans::getString(MARKETPLACE_ERROR_NAMES[mError]));
|
||||
}
|
||||
else
|
||||
{
|
||||
setToolTip(LLStringExplicit(""));
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// LLOutboxFolderViewItem Implementation
|
||||
//
|
||||
|
||||
LLOutboxFolderViewItem::LLOutboxFolderViewItem(const Params& p)
|
||||
: LLFolderViewItem(p)
|
||||
{
|
||||
}
|
||||
|
||||
BOOL LLOutboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
return TRUE;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#define LL_OUTBOXINVENTORYPANEL_H
|
||||
|
||||
|
||||
#include "llbadgeowner.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "llfolderviewitem.h"
|
||||
|
||||
|
|
@ -53,41 +52,22 @@ public:
|
|||
};
|
||||
|
||||
|
||||
class LLOutboxFolderViewFolder : public LLFolderViewFolder, public LLBadgeOwner
|
||||
class LLOutboxFolderViewFolder : public LLFolderViewFolder
|
||||
{
|
||||
public:
|
||||
struct Params : public LLInitParam::Block<Params, LLFolderViewFolder::Params>
|
||||
{
|
||||
Optional<LLBadge::Params> error_badge;
|
||||
|
||||
Params()
|
||||
: error_badge("error_badge")
|
||||
{
|
||||
}
|
||||
Params() {}
|
||||
};
|
||||
|
||||
LLOutboxFolderViewFolder(const Params& p);
|
||||
~LLOutboxFolderViewFolder();
|
||||
|
||||
void draw();
|
||||
|
||||
void setErrorString(const std::string& errorString);
|
||||
void setError(S32 errorCode);
|
||||
|
||||
bool hasError() const { return (mError != 0); }
|
||||
|
||||
protected:
|
||||
S32 mError;
|
||||
};
|
||||
|
||||
|
||||
class LLOutboxFolderViewItem : public LLFolderViewItem
|
||||
{
|
||||
public:
|
||||
LLOutboxFolderViewItem(const Params& p)
|
||||
: LLFolderViewItem(p)
|
||||
{
|
||||
}
|
||||
LLOutboxFolderViewItem(const Params& p);
|
||||
|
||||
// virtual
|
||||
BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
|
||||
|
|
|
|||
|
|
@ -6,14 +6,4 @@
|
|||
item_top_pad="4"
|
||||
selection_image="Rounded_Square"
|
||||
>
|
||||
<error_badge
|
||||
label=" "
|
||||
label_offset_horiz="-1"
|
||||
location="right"
|
||||
padding_horiz="12.5"
|
||||
padding_vert="2"
|
||||
location_offset_hcenter="-23"
|
||||
image="Error_Tag_Background"
|
||||
image_color="Black"
|
||||
/>
|
||||
</outbox_folder_view_folder>
|
||||
|
|
|
|||
Loading…
Reference in New Issue