Merge remote-tracking branch 'lirusaito/master'
This commit is contained in:
@@ -86,7 +86,7 @@ public:
|
|||||||
|
|
||||||
if (added_category_type == LLFolderType::FT_OUTBOX)
|
if (added_category_type == LLFolderType::FT_OUTBOX)
|
||||||
{
|
{
|
||||||
mOutboxFloater->setupOutbox(added_category->getUUID());
|
mOutboxFloater->initializeMarketPlace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -152,13 +152,17 @@ BOOL LLFloaterOutbox::postBuild()
|
|||||||
//
|
//
|
||||||
// Set up the outbox inventory view
|
// Set up the outbox inventory view
|
||||||
//
|
//
|
||||||
|
|
||||||
mOutboxInventoryPanel = getChild<LLInventoryPanel>("panel_outbox_inventory");
|
mOutboxInventoryPanel = getChild<LLInventoryPanel>("panel_outbox_inventory");
|
||||||
|
llassert(mOutboxInventoryPanel);
|
||||||
|
|
||||||
mOutboxTopLevelDropZone = getChild<LLPanel>("outbox_generic_drag_target");
|
mOutboxTopLevelDropZone = getChild<LLPanel>("outbox_generic_drag_target");
|
||||||
|
|
||||||
LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLFloaterOutbox::onFocusReceived, this));
|
LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLFloaterOutbox::onFocusReceived, this));
|
||||||
|
|
||||||
|
// Observe category creation to catch outbox creation (moot if already existing)
|
||||||
|
mCategoryAddedObserver = new LLOutboxAddedObserver(this);
|
||||||
|
gInventory.addObserver(mCategoryAddedObserver);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,34 +183,26 @@ void LLFloaterOutbox::onClose(bool app_quitting)
|
|||||||
void LLFloaterOutbox::onOpen()
|
void LLFloaterOutbox::onOpen()
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Look for an outbox and set up the inventory API
|
// Initialize the Market Place or go update the outbox
|
||||||
//
|
//
|
||||||
|
|
||||||
if (mOutboxId.isNull())
|
if (LLMarketplaceInventoryImporter::getInstance()->getMarketPlaceStatus() == MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED)
|
||||||
{
|
{
|
||||||
const bool do_not_create_folder = false;
|
initializeMarketPlace();
|
||||||
const bool do_not_find_in_library = false;
|
}
|
||||||
|
else
|
||||||
const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, do_not_create_folder, do_not_find_in_library);
|
{
|
||||||
|
setupOutbox();
|
||||||
if (outbox_id.isNull())
|
|
||||||
{
|
|
||||||
// Observe category creation to catch outbox creation
|
|
||||||
mCategoryAddedObserver = new LLOutboxAddedObserver(this);
|
|
||||||
gInventory.addObserver(mCategoryAddedObserver);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setupOutbox(outbox_id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Update the floater view
|
||||||
|
//
|
||||||
updateView();
|
updateView();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Trigger fetch of outbox contents
|
// Trigger fetch of outbox contents
|
||||||
//
|
//
|
||||||
|
|
||||||
fetchOutboxContents();
|
fetchOutboxContents();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,13 +219,22 @@ void LLFloaterOutbox::fetchOutboxContents()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId)
|
void LLFloaterOutbox::setupOutbox()
|
||||||
{
|
{
|
||||||
llassert(outboxId.notNull());
|
if (LLMarketplaceInventoryImporter::getInstance()->getMarketPlaceStatus() != MarketplaceStatusCodes::MARKET_PLACE_MERCHANT)
|
||||||
llassert(mOutboxId.isNull());
|
{
|
||||||
llassert(mCategoriesObserver == NULL);
|
// If we are *not* a merchant or we have no market place connection established yet, do nothing
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mOutboxId = outboxId;
|
// We are a merchant. Get the outbox, create it if needs be.
|
||||||
|
mOutboxId = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, true, false);
|
||||||
|
if (mOutboxId.isNull())
|
||||||
|
{
|
||||||
|
// We should never get there unles inventory fails badly
|
||||||
|
llerrs << "Inventory problem: failure to create the outbox for a merchant!" << llendl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// No longer need to observe new category creation
|
// No longer need to observe new category creation
|
||||||
if (mCategoryAddedObserver && gInventory.containsObserver(mCategoryAddedObserver))
|
if (mCategoryAddedObserver && gInventory.containsObserver(mCategoryAddedObserver))
|
||||||
@@ -238,14 +243,19 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId)
|
|||||||
delete mCategoryAddedObserver;
|
delete mCategoryAddedObserver;
|
||||||
mCategoryAddedObserver = NULL;
|
mCategoryAddedObserver = NULL;
|
||||||
}
|
}
|
||||||
|
llassert(!mCategoryAddedObserver);
|
||||||
|
|
||||||
// Create observer for outbox modifications
|
// Create observer for outbox modifications
|
||||||
mCategoriesObserver = new LLInventoryCategoriesObserver();
|
if (mCategoriesObserver == NULL)
|
||||||
gInventory.addObserver(mCategoriesObserver);
|
{
|
||||||
|
mCategoriesObserver = new LLInventoryCategoriesObserver();
|
||||||
|
gInventory.addObserver(mCategoriesObserver);
|
||||||
|
mCategoriesObserver->addCategory(mOutboxId, boost::bind(&LLFloaterOutbox::onOutboxChanged, this));
|
||||||
|
}
|
||||||
|
llassert(mCategoriesObserver);
|
||||||
|
|
||||||
mCategoriesObserver->addCategory(mOutboxId, boost::bind(&LLFloaterOutbox::onOutboxChanged, this));
|
// Set up the outbox inventory view
|
||||||
|
// Singu Note: we handle this in postBuild, grabbing the panel from the built xml.
|
||||||
llassert(mOutboxInventoryPanel);
|
|
||||||
|
|
||||||
// Reshape the inventory to the proper size
|
// Reshape the inventory to the proper size
|
||||||
LLRect inventory_placeholder_rect = mInventoryPlaceholder->getRect();
|
LLRect inventory_placeholder_rect = mInventoryPlaceholder->getRect();
|
||||||
@@ -255,8 +265,12 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId)
|
|||||||
mOutboxInventoryPanel->setSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME);
|
mOutboxInventoryPanel->setSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME);
|
||||||
mOutboxInventoryPanel->getFilter()->markDefault();
|
mOutboxInventoryPanel->getFilter()->markDefault();
|
||||||
|
|
||||||
|
// Get the content of the outbox
|
||||||
fetchOutboxContents();
|
fetchOutboxContents();
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLFloaterOutbox::initializeMarketPlace()
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Initialize the marketplace import API
|
// Initialize the marketplace import API
|
||||||
//
|
//
|
||||||
@@ -330,6 +344,7 @@ void LLFloaterOutbox::updateView()
|
|||||||
{
|
{
|
||||||
mOutboxInventoryPanel->setVisible(TRUE);
|
mOutboxInventoryPanel->setVisible(TRUE);
|
||||||
mInventoryPlaceholder->setVisible(FALSE);
|
mInventoryPlaceholder->setVisible(FALSE);
|
||||||
|
mOutboxTopLevelDropZone->setVisible(TRUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -338,13 +353,18 @@ void LLFloaterOutbox::updateView()
|
|||||||
mOutboxInventoryPanel->setVisible(FALSE);
|
mOutboxInventoryPanel->setVisible(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show the drop zone if there is an outbox folder
|
||||||
|
mOutboxTopLevelDropZone->setVisible(mOutboxId.notNull());
|
||||||
|
|
||||||
mInventoryPlaceholder->setVisible(TRUE);
|
mInventoryPlaceholder->setVisible(TRUE);
|
||||||
|
|
||||||
std::string outbox_text;
|
std::string outbox_text;
|
||||||
|
std::string outbox_text2;
|
||||||
std::string outbox_title;
|
std::string outbox_title;
|
||||||
std::string outbox_tooltip;
|
std::string outbox_tooltip;
|
||||||
|
|
||||||
const LLSD& subs = getMarketplaceStringSubstitutions();
|
const LLSD& subs = getMarketplaceStringSubstitutions();
|
||||||
|
U32 mkt_status = LLMarketplaceInventoryImporter::getInstance()->getMarketPlaceStatus();
|
||||||
|
|
||||||
// Text styles for marketplace hyperlinks
|
// Text styles for marketplace hyperlinks
|
||||||
std::string subs_link;
|
std::string subs_link;
|
||||||
@@ -352,28 +372,54 @@ void LLFloaterOutbox::updateView()
|
|||||||
|
|
||||||
if (mOutboxId.notNull())
|
if (mOutboxId.notNull())
|
||||||
{
|
{
|
||||||
|
// "Outbox is empty!" message strings
|
||||||
outbox_text = LLTrans::getString("InventoryOutboxNoItems");
|
outbox_text = LLTrans::getString("InventoryOutboxNoItems");
|
||||||
subs_link = "[MARKETPLACE_DASHBOARD_URL]";
|
subs_link = "[MARKETPLACE_DASHBOARD_URL]";
|
||||||
subs_text = " " + LLTrans::getString("InventoryOutboxNoItemsSubs");
|
subs_text = " " + LLTrans::getString("InventoryOutboxNoItemsSubs");
|
||||||
|
outbox_text2 = LLTrans::getString("InventoryOutboxNoItems2");
|
||||||
outbox_title = LLTrans::getString("InventoryOutboxNoItemsTitle");
|
outbox_title = LLTrans::getString("InventoryOutboxNoItemsTitle");
|
||||||
outbox_tooltip = LLTrans::getString("InventoryOutboxNoItemsTooltip");
|
outbox_tooltip = LLTrans::getString("InventoryOutboxNoItemsTooltip");
|
||||||
}
|
}
|
||||||
else
|
else if (mkt_status <= MarketplaceStatusCodes::MARKET_PLACE_INITIALIZING)
|
||||||
{
|
{
|
||||||
|
// "Initializing!" message strings
|
||||||
|
outbox_text = LLTrans::getString("InventoryOutboxInitializing");
|
||||||
|
subs_link = "[MARKETPLACE_CREATE_STORE_URL]";
|
||||||
|
subs_text = " " + LLTrans::getString("InventoryOutboxInitializingSubs");
|
||||||
|
outbox_text2 = LLTrans::getString("InventoryOutboxInitializing2");
|
||||||
|
outbox_title = LLTrans::getString("InventoryOutboxInitializingTitle");
|
||||||
|
outbox_tooltip = LLTrans::getString("InventoryOutboxInitializingTooltip");
|
||||||
|
}
|
||||||
|
else if (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_NOT_MERCHANT)
|
||||||
|
{
|
||||||
|
// "Not a merchant!" message strings
|
||||||
outbox_text = LLTrans::getString("InventoryOutboxNotMerchant");
|
outbox_text = LLTrans::getString("InventoryOutboxNotMerchant");
|
||||||
subs_link = "[MARKETPLACE_CREATE_STORE_URL]";
|
subs_link = "[MARKETPLACE_CREATE_STORE_URL]";
|
||||||
subs_text = " " + LLTrans::getString("InventoryOutboxNotMerchantSubs");
|
subs_text = " " + LLTrans::getString("InventoryOutboxNotMerchantSubs");
|
||||||
|
outbox_text2 = LLTrans::getString("InventoryOutboxNotMerchant2");
|
||||||
outbox_title = LLTrans::getString("InventoryOutboxNotMerchantTitle");
|
outbox_title = LLTrans::getString("InventoryOutboxNotMerchantTitle");
|
||||||
outbox_tooltip = LLTrans::getString("InventoryOutboxNotMerchantTooltip");
|
outbox_tooltip = LLTrans::getString("InventoryOutboxNotMerchantTooltip");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// "Errors!" message strings
|
||||||
|
outbox_text = LLTrans::getString("InventoryOutboxError");
|
||||||
|
subs_link = "[MARKETPLACE_CREATE_STORE_URL]";
|
||||||
|
subs_text = " " + LLTrans::getString("InventoryOutboxErrorSubs");
|
||||||
|
outbox_text2 = " " + LLTrans::getString("InventoryOutboxError2");
|
||||||
|
outbox_title = LLTrans::getString("InventoryOutboxErrorTitle");
|
||||||
|
outbox_tooltip = LLTrans::getString("InventoryOutboxErrorTooltip");
|
||||||
|
}
|
||||||
|
|
||||||
mInventoryText->clear();
|
mInventoryText->clear();
|
||||||
mInventoryText->appendColoredText(outbox_text, false, false, gColors.getColor("TextFgReadOnlyColor"));
|
const LLColor4 color = gColors.getColor("TextFgReadOnlyColor");
|
||||||
|
mInventoryText->appendColoredText(outbox_text, false, false, color);
|
||||||
LLStringUtil::format(subs_link, subs);
|
LLStringUtil::format(subs_link, subs);
|
||||||
LLStyleSP subs_link_style(new LLStyle);
|
LLStyleSP subs_link_style(new LLStyle);
|
||||||
subs_link_style->setLinkHREF(subs_link);
|
subs_link_style->setLinkHREF(subs_link);
|
||||||
subs_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor"));
|
subs_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor"));
|
||||||
mInventoryText->appendStyledText(subs_text, false, false, subs_link_style);
|
mInventoryText->appendStyledText(subs_text, false, false, subs_link_style);
|
||||||
|
mInventoryText->appendColoredText(outbox_text2, false, false, color);
|
||||||
mInventoryTitle->setValue(outbox_title);
|
mInventoryTitle->setValue(outbox_title);
|
||||||
mInventoryPlaceholder->getParent()->setToolTip(outbox_tooltip);
|
mInventoryPlaceholder->getParent()->setToolTip(outbox_tooltip);
|
||||||
}
|
}
|
||||||
@@ -498,6 +544,11 @@ void LLFloaterOutbox::importReportResults(U32 status, const LLSD& content)
|
|||||||
|
|
||||||
void LLFloaterOutbox::importStatusChanged(bool inProgress)
|
void LLFloaterOutbox::importStatusChanged(bool inProgress)
|
||||||
{
|
{
|
||||||
|
if (mOutboxId.isNull() && (LLMarketplaceInventoryImporter::getInstance()->getMarketPlaceStatus() == MarketplaceStatusCodes::MARKET_PLACE_MERCHANT))
|
||||||
|
{
|
||||||
|
setupOutbox();
|
||||||
|
}
|
||||||
|
|
||||||
if (inProgress)
|
if (inProgress)
|
||||||
{
|
{
|
||||||
if (mImportBusy)
|
if (mImportBusy)
|
||||||
@@ -515,6 +566,7 @@ void LLFloaterOutbox::importStatusChanged(bool inProgress)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
setStatusString("");
|
||||||
mImportBusy = false;
|
mImportBusy = false;
|
||||||
mImportButton->setEnabled(mOutboxItemCount > 0);
|
mImportButton->setEnabled(mOutboxItemCount > 0);
|
||||||
mInventoryImportInProgress->setVisible(false);
|
mInventoryImportInProgress->setVisible(false);
|
||||||
@@ -525,7 +577,7 @@ void LLFloaterOutbox::importStatusChanged(bool inProgress)
|
|||||||
|
|
||||||
void LLFloaterOutbox::initializationReportError(U32 status, const LLSD& content)
|
void LLFloaterOutbox::initializationReportError(U32 status, const LLSD& content)
|
||||||
{
|
{
|
||||||
if (status != MarketplaceErrorCodes::IMPORT_DONE)
|
if (status >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST)
|
||||||
{
|
{
|
||||||
char status_string[16];
|
char status_string[16];
|
||||||
sprintf(status_string, "%d", status);
|
sprintf(status_string, "%d", status);
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public:
|
|||||||
LLFloaterOutbox(const LLSD& key);
|
LLFloaterOutbox(const LLSD& key);
|
||||||
~LLFloaterOutbox();
|
~LLFloaterOutbox();
|
||||||
|
|
||||||
void setupOutbox(const LLUUID& outboxId);
|
void initializeMarketPlace();
|
||||||
|
|
||||||
// virtuals
|
// virtuals
|
||||||
BOOL postBuild();
|
BOOL postBuild();
|
||||||
@@ -71,6 +71,7 @@ public:
|
|||||||
// void onMouseLeave(S32 x, S32 y, MASK mask);
|
// void onMouseLeave(S32 x, S32 y, MASK mask);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void setupOutbox();
|
||||||
void fetchOutboxContents();
|
void fetchOutboxContents();
|
||||||
|
|
||||||
void importReportResults(U32 status, const LLSD& content);
|
void importReportResults(U32 status, const LLSD& content);
|
||||||
|
|||||||
@@ -166,20 +166,25 @@ namespace LLMarketplaceImport
|
|||||||
llinfos << " SLM POST status: " << status << llendl;
|
llinfos << " SLM POST status: " << status << llendl;
|
||||||
llinfos << " SLM POST reason: " << reason << llendl;
|
llinfos << " SLM POST reason: " << reason << llendl;
|
||||||
llinfos << " SLM POST content: " << content.asString() << llendl;
|
llinfos << " SLM POST content: " << content.asString() << llendl;
|
||||||
|
|
||||||
llinfos << " SLM POST timer: " << slmPostTimer.getElapsedTimeF32() << llendl;
|
llinfos << " SLM POST timer: " << slmPostTimer.getElapsedTimeF32() << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((status == MarketplaceErrorCodes::IMPORT_REDIRECT) ||
|
// MAINT-2301 : we determined we can safely ignore that error in that context
|
||||||
(status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) ||
|
if (status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT)
|
||||||
(status == MarketplaceErrorCodes::IMPORT_JOB_LOW_SPEED) ||
|
|
||||||
(status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT))
|
|
||||||
{
|
{
|
||||||
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
||||||
{
|
{
|
||||||
llinfos << " SLM POST clearing marketplace cookie due to authentication failure or timeout" << llendl;
|
llinfos << " SLM POST : Ignoring time out status and treating it as success" << llendl;
|
||||||
}
|
}
|
||||||
|
status = MarketplaceErrorCodes::IMPORT_DONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST)
|
||||||
|
{
|
||||||
|
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
||||||
|
{
|
||||||
|
llinfos << " SLM POST clearing marketplace cookie due to client or server error" << llendl;
|
||||||
|
}
|
||||||
sMarketplaceCookie.clear();
|
sMarketplaceCookie.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,21 +229,23 @@ namespace LLMarketplaceImport
|
|||||||
llinfos << " SLM GET status: " << status << llendl;
|
llinfos << " SLM GET status: " << status << llendl;
|
||||||
llinfos << " SLM GET reason: " << reason << llendl;
|
llinfos << " SLM GET reason: " << reason << llendl;
|
||||||
llinfos << " SLM GET content: " << content.asString() << llendl;
|
llinfos << " SLM GET content: " << content.asString() << llendl;
|
||||||
|
|
||||||
llinfos << " SLM GET timer: " << slmGetTimer.getElapsedTimeF32() << llendl;
|
llinfos << " SLM GET timer: " << slmGetTimer.getElapsedTimeF32() << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) ||
|
// MAINT-2452 : Do not clear the cookie on IMPORT_DONE_WITH_ERRORS
|
||||||
(status == MarketplaceErrorCodes::IMPORT_JOB_LOW_SPEED) ||
|
if ((status >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST) &&
|
||||||
(status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT))
|
(status != MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS))
|
||||||
{
|
{
|
||||||
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
||||||
{
|
{
|
||||||
llinfos << " SLM GET clearing marketplace cookie due to authentication failure or timeout (" << status << " / " << reason << ")." << llendl;
|
llinfos << " SLM GET clearing marketplace cookie due to client or server error (" << status << " / " << reason << ")." << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
sMarketplaceCookie.clear();
|
sMarketplaceCookie.clear();
|
||||||
}
|
}
|
||||||
|
else if (gSavedSettings.getBOOL("InventoryOutboxLogging") && (status == MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS))
|
||||||
|
{
|
||||||
|
llinfos << " SLM GET : Got IMPORT_DONE_WITH_ERRORS, marketplace cookie not cleared." << llendl;
|
||||||
|
}
|
||||||
|
|
||||||
sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_PROCESSING);
|
sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_PROCESSING);
|
||||||
sImportGetPending = false;
|
sImportGetPending = false;
|
||||||
@@ -334,7 +341,9 @@ namespace LLMarketplaceImport
|
|||||||
|
|
||||||
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
||||||
{
|
{
|
||||||
llinfos << " SLM GET: " << url << llendl;
|
llinfos << " SLM GET: pollStatus, LLHTTPClient::get, url = " << url << llendl;
|
||||||
|
llinfos << " SLM GET: headers " << llendl;
|
||||||
|
llinfos << headers << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
slmGetTimer.start();
|
slmGetTimer.start();
|
||||||
@@ -368,7 +377,9 @@ namespace LLMarketplaceImport
|
|||||||
|
|
||||||
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
||||||
{
|
{
|
||||||
llinfos << " SLM POST: " << url << llendl;
|
llinfos << " SLM POST: triggerImport, LLHTTPClient::post, url = " << url << llendl;
|
||||||
|
llinfos << " SLM POST: headers " << llendl;
|
||||||
|
llinfos << headers << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
slmPostTimer.start();
|
slmPostTimer.start();
|
||||||
@@ -404,6 +415,7 @@ LLMarketplaceInventoryImporter::LLMarketplaceInventoryImporter()
|
|||||||
: mAutoTriggerImport(false)
|
: mAutoTriggerImport(false)
|
||||||
, mImportInProgress(false)
|
, mImportInProgress(false)
|
||||||
, mInitialized(false)
|
, mInitialized(false)
|
||||||
|
, mMarketPlaceStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED)
|
||||||
, mErrorInitSignal(NULL)
|
, mErrorInitSignal(NULL)
|
||||||
, mStatusChangedSignal(NULL)
|
, mStatusChangedSignal(NULL)
|
||||||
, mStatusReportSignal(NULL)
|
, mStatusReportSignal(NULL)
|
||||||
@@ -446,16 +458,20 @@ void LLMarketplaceInventoryImporter::initialize()
|
|||||||
|
|
||||||
if (!LLMarketplaceImport::hasSessionCookie())
|
if (!LLMarketplaceImport::hasSessionCookie())
|
||||||
{
|
{
|
||||||
|
mMarketPlaceStatus = MarketplaceStatusCodes::MARKET_PLACE_INITIALIZING;
|
||||||
LLMarketplaceImport::establishMarketplaceSessionCookie();
|
LLMarketplaceImport::establishMarketplaceSessionCookie();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mMarketPlaceStatus = MarketplaceStatusCodes::MARKET_PLACE_MERCHANT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLMarketplaceInventoryImporter::reinitializeAndTriggerImport()
|
void LLMarketplaceInventoryImporter::reinitializeAndTriggerImport()
|
||||||
{
|
{
|
||||||
mInitialized = false;
|
mInitialized = false;
|
||||||
|
mMarketPlaceStatus = MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED;
|
||||||
initialize();
|
initialize();
|
||||||
|
|
||||||
mAutoTriggerImport = true;
|
mAutoTriggerImport = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -507,17 +523,30 @@ void LLMarketplaceInventoryImporter::updateImport()
|
|||||||
|
|
||||||
if (mInitialized)
|
if (mInitialized)
|
||||||
{
|
{
|
||||||
|
mMarketPlaceStatus = MarketplaceStatusCodes::MARKET_PLACE_MERCHANT;
|
||||||
// Follow up with auto trigger of import
|
// Follow up with auto trigger of import
|
||||||
if (mAutoTriggerImport)
|
if (mAutoTriggerImport)
|
||||||
{
|
{
|
||||||
mAutoTriggerImport = false;
|
mAutoTriggerImport = false;
|
||||||
|
|
||||||
mImportInProgress = triggerImport();
|
mImportInProgress = triggerImport();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (mErrorInitSignal)
|
else
|
||||||
{
|
{
|
||||||
(*mErrorInitSignal)(LLMarketplaceImport::getResultStatus(), LLMarketplaceImport::getResults());
|
U32 status = LLMarketplaceImport::getResultStatus();
|
||||||
|
if ((status == MarketplaceErrorCodes::IMPORT_FORBIDDEN) ||
|
||||||
|
(status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR))
|
||||||
|
{
|
||||||
|
mMarketPlaceStatus = MarketplaceStatusCodes::MARKET_PLACE_NOT_MERCHANT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mMarketPlaceStatus = MarketplaceStatusCodes::MARKET_PLACE_CONNECTION_FAILURE;
|
||||||
|
}
|
||||||
|
if (mErrorInitSignal && (mMarketPlaceStatus == MarketplaceStatusCodes::MARKET_PLACE_CONNECTION_FAILURE))
|
||||||
|
{
|
||||||
|
(*mErrorInitSignal)(LLMarketplaceImport::getResultStatus(), LLMarketplaceImport::getResults());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,11 +48,28 @@ namespace MarketplaceErrorCodes
|
|||||||
IMPORT_DONE = HTTP_OK,
|
IMPORT_DONE = HTTP_OK,
|
||||||
IMPORT_PROCESSING = HTTP_ACCEPTED,
|
IMPORT_PROCESSING = HTTP_ACCEPTED,
|
||||||
IMPORT_REDIRECT = HTTP_FOUND,
|
IMPORT_REDIRECT = HTTP_FOUND,
|
||||||
|
IMPORT_BAD_REQUEST = HTTP_BAD_REQUEST,
|
||||||
IMPORT_AUTHENTICATION_ERROR = HTTP_UNAUTHORIZED,
|
IMPORT_AUTHENTICATION_ERROR = HTTP_UNAUTHORIZED,
|
||||||
|
IMPORT_FORBIDDEN = HTTP_FORBIDDEN,
|
||||||
|
IMPORT_NOT_FOUND = HTTP_NOT_FOUND,
|
||||||
IMPORT_DONE_WITH_ERRORS = HTTP_CONFLICT,
|
IMPORT_DONE_WITH_ERRORS = HTTP_CONFLICT,
|
||||||
IMPORT_JOB_FAILED = HTTP_GONE,
|
IMPORT_JOB_FAILED = HTTP_GONE,
|
||||||
IMPORT_JOB_LOW_SPEED = HTTP_INTERNAL_ERROR_LOW_SPEED,
|
IMPORT_JOB_LOW_SPEED = HTTP_INTERNAL_ERROR_LOW_SPEED,
|
||||||
IMPORT_JOB_TIMEOUT = HTTP_INTERNAL_ERROR_CURL_TIMEOUT
|
IMPORT_JOB_TIMEOUT = HTTP_INTERNAL_ERROR_CURL_TIMEOUT,
|
||||||
|
IMPORT_SERVER_SITE_DOWN = HTTP_INTERNAL_SERVER_ERROR,
|
||||||
|
IMPORT_SERVER_API_DISABLED = HTTP_SERVICE_UNAVAILABLE,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace MarketplaceStatusCodes
|
||||||
|
{
|
||||||
|
enum sCode
|
||||||
|
{
|
||||||
|
MARKET_PLACE_NOT_INITIALIZED = 0,
|
||||||
|
MARKET_PLACE_INITIALIZING = 1,
|
||||||
|
MARKET_PLACE_CONNECTION_FAILURE = 2,
|
||||||
|
MARKET_PLACE_MERCHANT = 3,
|
||||||
|
MARKET_PLACE_NOT_MERCHANT = 4,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,6 +92,7 @@ public:
|
|||||||
void initialize();
|
void initialize();
|
||||||
bool triggerImport();
|
bool triggerImport();
|
||||||
bool isImportInProgress() const { return mImportInProgress; }
|
bool isImportInProgress() const { return mImportInProgress; }
|
||||||
|
U32 getMarketPlaceStatus() const { return mMarketPlaceStatus; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void reinitializeAndTriggerImport();
|
void reinitializeAndTriggerImport();
|
||||||
@@ -84,6 +102,7 @@ private:
|
|||||||
bool mAutoTriggerImport;
|
bool mAutoTriggerImport;
|
||||||
bool mImportInProgress;
|
bool mImportInProgress;
|
||||||
bool mInitialized;
|
bool mInitialized;
|
||||||
|
U32 mMarketPlaceStatus;
|
||||||
|
|
||||||
status_report_signal_t * mErrorInitSignal;
|
status_report_signal_t * mErrorInitSignal;
|
||||||
status_changed_signal_t * mStatusChangedSignal;
|
status_changed_signal_t * mStatusChangedSignal;
|
||||||
|
|||||||
@@ -3,10 +3,9 @@
|
|||||||
* @brief Message popup preferences panel
|
* @brief Message popup preferences panel
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
||||||
*
|
* Second Life Viewer Source Code
|
||||||
* Copyright (c) 2003-2009, Linden Research, Inc.
|
* Copyright (c) 2003-2009, Linden Research, Inc.
|
||||||
*
|
*
|
||||||
* Second Life Viewer Source Code
|
|
||||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||||
* to you under the terms of the GNU General Public License, version 2.0
|
* to you under the terms of the GNU General Public License, version 2.0
|
||||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||||
@@ -34,36 +33,30 @@
|
|||||||
|
|
||||||
#include "llpanelmsgs.h"
|
#include "llpanelmsgs.h"
|
||||||
|
|
||||||
#include "llnotificationsutil.h"
|
|
||||||
#include "llscrolllistctrl.h"
|
#include "llscrolllistctrl.h"
|
||||||
#include "llviewerwindow.h"
|
|
||||||
#include "llviewercontrol.h"
|
|
||||||
#include "lluictrlfactory.h"
|
#include "lluictrlfactory.h"
|
||||||
#include "llfirstuse.h"
|
#include "llfirstuse.h"
|
||||||
#include "llnotificationtemplate.h"
|
#include "llnotificationtemplate.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
LLPanelMsgs::LLPanelMsgs()
|
||||||
LLPanelMsgs::LLPanelMsgs() :
|
|
||||||
LLPanel("Messages Panel")
|
|
||||||
{
|
{
|
||||||
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_popups.xml");
|
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_popups.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LLPanelMsgs::~LLPanelMsgs()
|
LLPanelMsgs::~LLPanelMsgs()
|
||||||
{ }
|
{
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// postBuild()
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
BOOL LLPanelMsgs::postBuild()
|
BOOL LLPanelMsgs::postBuild()
|
||||||
{
|
{
|
||||||
childSetAction("enable_popup", onClickEnablePopup, this);
|
getChild<LLUICtrl>("enable_popup")->setCommitCallback(boost::bind(&LLPanelMsgs::onClickEnablePopup, this));
|
||||||
childSetAction("reset_dialogs_btn", onClickResetDialogs, this);
|
getChild<LLUICtrl>("disable_popup")->setCommitCallback(boost::bind(&LLPanelMsgs::onClickDisablePopup, this));
|
||||||
childSetAction("skip_dialogs_btn", onClickSkipDialogs, this);
|
getChild<LLUICtrl>("reset_dialogs_btn")->setCommitCallback(boost::bind(&LLPanelMsgs::onClickResetDialogs, this));
|
||||||
childSetAction("skip_frst_btn", onClickSkipFirstTime, this);
|
getChild<LLUICtrl>("skip_dialogs_btn")->setCommitCallback(boost::bind(&LLPanelMsgs::onClickSkipDialogs, this));
|
||||||
|
getChild<LLUICtrl>("skip_frst_btn")->setCommitCallback(boost::bind(&LLPanelMsgs::onClickSkipFirstTime, this));
|
||||||
|
|
||||||
buildLists();
|
buildPopupLists();
|
||||||
|
|
||||||
childSetValue("accept_new_inventory", gSavedSettings.getBOOL("AutoAcceptNewInventory"));
|
childSetValue("accept_new_inventory", gSavedSettings.getBOOL("AutoAcceptNewInventory"));
|
||||||
childSetValue("show_new_inventory", gSavedSettings.getBOOL("ShowNewInventory"));
|
childSetValue("show_new_inventory", gSavedSettings.getBOOL("ShowNewInventory"));
|
||||||
@@ -72,8 +65,18 @@ BOOL LLPanelMsgs::postBuild()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLPanelMsgs::draw()
|
||||||
|
{
|
||||||
|
BOOL has_first_selected = (getChildRef<LLScrollListCtrl>("disabled_popups").getFirstSelected()!=NULL);
|
||||||
|
childSetEnabled("enable_popup", has_first_selected);
|
||||||
|
|
||||||
void LLPanelMsgs::buildLists() //void LLFloaterPreference::buildPopupLists() in v3
|
has_first_selected = (getChildRef<LLScrollListCtrl>("enabled_popups").getFirstSelected()!=NULL);
|
||||||
|
childSetEnabled("disable_popup", has_first_selected);
|
||||||
|
|
||||||
|
LLPanel::draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLPanelMsgs::buildPopupLists() //void LLFloaterPreference::buildPopupLists() in v3
|
||||||
{
|
{
|
||||||
LLScrollListCtrl& disabled_popups =
|
LLScrollListCtrl& disabled_popups =
|
||||||
getChildRef<LLScrollListCtrl>("disabled_popups");
|
getChildRef<LLScrollListCtrl>("disabled_popups");
|
||||||
@@ -103,7 +106,7 @@ void LLPanelMsgs::buildLists() //void LLFloaterPreference::buildPopupLists() in
|
|||||||
LLStringUtil::format(ignore_msg,notification->getSubstitutions());
|
LLStringUtil::format(ignore_msg,notification->getSubstitutions());
|
||||||
row["columns"][0]["value"] = ignore_msg;
|
row["columns"][0]["value"] = ignore_msg;
|
||||||
row["columns"][0]["font"] = "SANSSERIF_SMALL";
|
row["columns"][0]["font"] = "SANSSERIF_SMALL";
|
||||||
row["columns"][0]["width"] = 300;
|
row["columns"][0]["width"] = 500;
|
||||||
|
|
||||||
LLScrollListItem* item = NULL;
|
LLScrollListItem* item = NULL;
|
||||||
|
|
||||||
@@ -129,13 +132,11 @@ void LLPanelMsgs::buildLists() //void LLFloaterPreference::buildPopupLists() in
|
|||||||
row["columns"][1]["font"] = "SANSSERIF_SMALL";
|
row["columns"][1]["font"] = "SANSSERIF_SMALL";
|
||||||
row["columns"][1]["width"] = 160;
|
row["columns"][1]["width"] = 160;
|
||||||
}
|
}
|
||||||
item = disabled_popups.addElement(row,
|
item = disabled_popups.addElement(row, ADD_SORTED);
|
||||||
ADD_SORTED);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
item = enabled_popups.addElement(row,
|
item = enabled_popups.addElement(row, ADD_SORTED);
|
||||||
ADD_SORTED);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item)
|
if (item)
|
||||||
@@ -145,22 +146,6 @@ void LLPanelMsgs::buildLists() //void LLFloaterPreference::buildPopupLists() in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelMsgs::draw()
|
|
||||||
{
|
|
||||||
LLScrollListCtrl& disabled_popups = getChildRef<LLScrollListCtrl>("disabled_popups");
|
|
||||||
|
|
||||||
if (disabled_popups.getFirstSelected())
|
|
||||||
{
|
|
||||||
childEnable("enable_popup");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
childDisable("enable_popup");
|
|
||||||
}
|
|
||||||
|
|
||||||
LLPanel::draw();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LLPanelMsgs::apply()
|
void LLPanelMsgs::apply()
|
||||||
{
|
{
|
||||||
@@ -173,6 +158,36 @@ void LLPanelMsgs::cancel()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLPanelMsgs::onClickEnablePopup()
|
||||||
|
{
|
||||||
|
LLScrollListCtrl& disabled_popups = getChildRef<LLScrollListCtrl>("disabled_popups");
|
||||||
|
|
||||||
|
std::vector<LLScrollListItem*> items = disabled_popups.getAllSelected();
|
||||||
|
std::vector<LLScrollListItem*>::iterator itor;
|
||||||
|
for (itor = items.begin(); itor != items.end(); ++itor)
|
||||||
|
{
|
||||||
|
LLNotificationTemplatePtr templatep = LLNotificationTemplates::instance().getTemplate(*(std::string*)((*itor)->getUserdata()));
|
||||||
|
gSavedSettings.setWarning(templatep->mName, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
buildPopupLists();
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLPanelMsgs::onClickDisablePopup()
|
||||||
|
{
|
||||||
|
LLScrollListCtrl& enabled_popups = getChildRef<LLScrollListCtrl>("enabled_popups");
|
||||||
|
|
||||||
|
std::vector<LLScrollListItem*> items = enabled_popups.getAllSelected();
|
||||||
|
std::vector<LLScrollListItem*>::iterator itor;
|
||||||
|
for (itor = items.begin(); itor != items.end(); ++itor)
|
||||||
|
{
|
||||||
|
LLNotificationTemplatePtr templatep = LLNotificationTemplates::instance().getTemplate(*(std::string*)((*itor)->getUserdata()));
|
||||||
|
gSavedSettings.setWarning(templatep->mName, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
buildPopupLists();
|
||||||
|
}
|
||||||
|
|
||||||
void LLPanelMsgs::resetAllIgnored()
|
void LLPanelMsgs::resetAllIgnored()
|
||||||
{
|
{
|
||||||
for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin();
|
for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin();
|
||||||
@@ -199,70 +214,22 @@ void LLPanelMsgs::setAllIgnored()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
void LLPanelMsgs::onClickResetDialogs()
|
||||||
void LLPanelMsgs::onClickEnablePopup(void* user_data)
|
|
||||||
{
|
{
|
||||||
LLPanelMsgs* panelp = (LLPanelMsgs*)user_data;
|
resetAllIgnored();
|
||||||
|
LLFirstUse::resetFirstUse();
|
||||||
LLScrollListCtrl& disabled_popups = panelp->getChildRef<LLScrollListCtrl>("disabled_popups");
|
buildPopupLists();
|
||||||
|
|
||||||
std::vector<LLScrollListItem*> items = disabled_popups.getAllSelected();
|
|
||||||
std::vector<LLScrollListItem*>::iterator itor;
|
|
||||||
for (itor = items.begin(); itor != items.end(); ++itor)
|
|
||||||
{
|
|
||||||
LLNotificationTemplatePtr templatep = LLNotificationTemplates::instance().getTemplate(*(std::string*)((*itor)->getUserdata()));
|
|
||||||
gSavedSettings.setWarning(templatep->mName, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
panelp->buildLists();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLPanelMsgs* panelp)
|
void LLPanelMsgs::onClickSkipDialogs()
|
||||||
{
|
{
|
||||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
setAllIgnored();
|
||||||
if (0 == option)
|
LLFirstUse::disableFirstUse();
|
||||||
{
|
buildPopupLists();
|
||||||
if ( panelp )
|
|
||||||
{
|
|
||||||
panelp->resetAllIgnored();
|
|
||||||
LLFirstUse::resetFirstUse();
|
|
||||||
panelp->buildLists();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
void LLPanelMsgs::onClickSkipFirstTime()
|
||||||
void LLPanelMsgs::onClickResetDialogs(void* user_data)
|
|
||||||
{
|
|
||||||
LLNotificationsUtil::add("ResetShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_reset_dialogs, _1, _2, (LLPanelMsgs*)user_data));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLPanelMsgs* panelp)
|
|
||||||
{
|
|
||||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
|
||||||
if (0 == option)
|
|
||||||
{
|
|
||||||
if ( panelp )
|
|
||||||
{
|
|
||||||
panelp->setAllIgnored();
|
|
||||||
LLFirstUse::disableFirstUse();
|
|
||||||
panelp->buildLists();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
|
||||||
void LLPanelMsgs::onClickSkipDialogs(void* user_data)
|
|
||||||
{
|
|
||||||
LLNotificationsUtil::add("SkipShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_skip_dialogs, _1, _2, (LLPanelMsgs*)user_data));
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
|
||||||
void LLPanelMsgs::onClickSkipFirstTime(void* user_data)
|
|
||||||
{
|
{
|
||||||
LLFirstUse::disableFirstUse();
|
LLFirstUse::disableFirstUse();
|
||||||
LLPanelMsgs* panelp = (LLPanelMsgs*)user_data;
|
buildPopupLists();
|
||||||
if(panelp) panelp->buildLists();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,9 @@
|
|||||||
* @brief Message popup preferences panel
|
* @brief Message popup preferences panel
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
||||||
*
|
* Second Life Viewer Source Code
|
||||||
* Copyright (c) 2003-2009, Linden Research, Inc.
|
* Copyright (c) 2003-2009, Linden Research, Inc.
|
||||||
*
|
*
|
||||||
* Second Life Viewer Source Code
|
|
||||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||||
* to you under the terms of the GNU General Public License, version 2.0
|
* to you under the terms of the GNU General Public License, version 2.0
|
||||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||||
@@ -35,29 +34,26 @@
|
|||||||
|
|
||||||
#include "llpanel.h"
|
#include "llpanel.h"
|
||||||
|
|
||||||
class LLScrollListCtrl;
|
|
||||||
|
|
||||||
class LLPanelMsgs : public LLPanel
|
class LLPanelMsgs : public LLPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLPanelMsgs();
|
LLPanelMsgs();
|
||||||
/*virtual*/ ~LLPanelMsgs();
|
/*virtual*/ ~LLPanelMsgs();
|
||||||
|
|
||||||
/*virtual*/ BOOL postBuild();
|
|
||||||
/*virtual*/ void draw();
|
|
||||||
|
|
||||||
void apply();
|
void apply();
|
||||||
void cancel();
|
void cancel();
|
||||||
|
/*virtual*/ void draw();
|
||||||
|
/*virtual*/ BOOL postBuild();
|
||||||
|
|
||||||
static void onClickEnablePopup(void* user_data);
|
void onClickEnablePopup();
|
||||||
static void onClickResetDialogs(void* user_data);
|
void onClickDisablePopup();
|
||||||
static void onClickSkipDialogs(void* user_data);
|
|
||||||
static void onClickSkipFirstTime(void* user_data);
|
|
||||||
|
|
||||||
void buildLists();
|
|
||||||
|
|
||||||
void resetAllIgnored();
|
void resetAllIgnored();
|
||||||
void setAllIgnored();
|
void setAllIgnored();
|
||||||
|
void onClickResetDialogs();
|
||||||
|
void onClickSkipDialogs();
|
||||||
|
void onClickSkipFirstTime();
|
||||||
|
|
||||||
|
void buildPopupLists();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LL_PANEL_MSGS
|
#endif // LL_PANEL_MSGS
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ extern bool gShiftFrame;
|
|||||||
|
|
||||||
// function prototypes
|
// function prototypes
|
||||||
bool check_offer_throttle(const std::string& from_name, bool check_only);
|
bool check_offer_throttle(const std::string& from_name, bool check_only);
|
||||||
|
bool check_asset_previewable(const LLAssetType::EType asset_type);
|
||||||
void callbackCacheEstateOwnerName(const LLUUID& id, const LLAvatarName& av_name);
|
void callbackCacheEstateOwnerName(const LLUUID& id, const LLAvatarName& av_name);
|
||||||
static void process_money_balance_reply_extended(LLMessageSystem* msg);
|
static void process_money_balance_reply_extended(LLMessageSystem* msg);
|
||||||
|
|
||||||
@@ -1147,46 +1148,78 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name)
|
// Return "true" if we have a preview method for that asset type, "false" otherwise
|
||||||
|
bool check_asset_previewable(const LLAssetType::EType asset_type)
|
||||||
{
|
{
|
||||||
uuid_vec_t::const_iterator it = items.begin();
|
return (asset_type == LLAssetType::AT_NOTECARD) ||
|
||||||
uuid_vec_t::const_iterator end = items.end();
|
(asset_type == LLAssetType::AT_LANDMARK) ||
|
||||||
LLInventoryItem* item;
|
(asset_type == LLAssetType::AT_TEXTURE) ||
|
||||||
for(; it != end; ++it)
|
(asset_type == LLAssetType::AT_ANIMATION) ||
|
||||||
{
|
(asset_type == LLAssetType::AT_SCRIPT) ||
|
||||||
item = gInventory.getItem(*it);
|
(asset_type == LLAssetType::AT_SOUND);
|
||||||
if(!item)
|
}
|
||||||
{
|
|
||||||
LL_WARNS("Messaging") << "Unable to show inventory item: " << *it << LL_ENDL;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if(!highlight_offered_object(item->getUUID()))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
LLAssetType::EType asset_type = item->getType();
|
|
||||||
|
|
||||||
//if we are throttled, don't display them
|
void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_name)
|
||||||
if (check_offer_throttle(from_name, false))
|
{
|
||||||
|
for (uuid_vec_t::const_iterator obj_iter = objects.begin();
|
||||||
|
obj_iter != objects.end();
|
||||||
|
++obj_iter)
|
||||||
|
{
|
||||||
|
const LLUUID& obj_id = (*obj_iter);
|
||||||
|
if(!highlight_offered_object(obj_id))
|
||||||
{
|
{
|
||||||
// I'm not sure this is a good idea - Definitely a bad idea. HB
|
continue;
|
||||||
//bool show_keep_discard = item->getPermissions().getCreator() != gAgent.getID();
|
}
|
||||||
bool show_keep_discard = true;
|
|
||||||
switch(asset_type)
|
const LLInventoryObject *obj = gInventory.getObject(obj_id);
|
||||||
|
if (!obj)
|
||||||
|
{
|
||||||
|
llwarns << "Cannot find object [ itemID:" << obj_id << " ] to open." << llendl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const LLAssetType::EType asset_type = obj->getActualType();
|
||||||
|
|
||||||
|
// Either an inventory item or a category.
|
||||||
|
const LLInventoryItem* item = dynamic_cast<const LLInventoryItem*>(obj);
|
||||||
|
if (item && check_asset_previewable(asset_type))
|
||||||
|
{
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Special handling for various types.
|
||||||
|
if (check_offer_throttle(from_name, false)) // If we are throttled, don't display
|
||||||
{
|
{
|
||||||
case LLAssetType::AT_NOTECARD:
|
// I'm not sure this is a good idea - Definitely a bad idea. HB
|
||||||
open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(), LLUUID::null, show_keep_discard, LLUUID::null, FALSE);
|
//bool show_keep_discard = item->getPermissions().getCreator() != gAgent.getID();
|
||||||
break;
|
bool show_keep_discard = true;
|
||||||
case LLAssetType::AT_LANDMARK:
|
switch(asset_type)
|
||||||
open_landmark((LLViewerInventoryItem*)item, std::string("Landmark: ") + item->getName(), show_keep_discard, LLUUID::null, FALSE);
|
{
|
||||||
break;
|
case LLAssetType::AT_NOTECARD:
|
||||||
case LLAssetType::AT_TEXTURE:
|
{
|
||||||
open_texture(*it, std::string("Texture: ") + item->getName(), show_keep_discard, LLUUID::null, FALSE);
|
open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(), LLUUID::null, show_keep_discard, LLUUID::null, FALSE);
|
||||||
break;
|
break;
|
||||||
default:
|
}
|
||||||
break;
|
case LLAssetType::AT_LANDMARK:
|
||||||
|
{
|
||||||
|
open_landmark((LLViewerInventoryItem*)item, std::string("Landmark: ") + item->getName(), show_keep_discard, LLUUID::null, FALSE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LLAssetType::AT_TEXTURE:
|
||||||
|
{
|
||||||
|
open_texture(obj_id, std::string("Texture: ") + item->getName(), show_keep_discard, LLUUID::null, FALSE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LLAssetType::AT_ANIMATION:
|
||||||
|
case LLAssetType::AT_SCRIPT:
|
||||||
|
case LLAssetType::AT_SOUND:
|
||||||
|
LLInvFVBridgeAction::doAction(asset_type, obj_id, &gInventory);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
LL_DEBUGS("Messaging") << "No preview method for previewable asset type : " << LLAssetType::lookupHumanReadable(asset_type) << LL_ENDL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//highlight item, if it's not in the trash or lost+found
|
//highlight item, if it's not in the trash or lost+found
|
||||||
|
|
||||||
// Don't auto-open the inventory floater
|
// Don't auto-open the inventory floater
|
||||||
@@ -1196,42 +1229,28 @@ void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gSavedSettings.getBOOL("ShowInInventory") &&
|
//Trash Check
|
||||||
|
if ((gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH)))
|
||||||
|
// don't select lost and found items if the user is active
|
||||||
|
|| (gAwayTimer.getStarted() && gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND))))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gSavedSettings.getBOOL("ShowInInventory") &&
|
||||||
asset_type != LLAssetType::AT_CALLINGCARD &&
|
asset_type != LLAssetType::AT_CALLINGCARD &&
|
||||||
item->getInventoryType() != LLInventoryType::IT_ATTACHMENT &&
|
item->getInventoryType() != LLInventoryType::IT_ATTACHMENT &&
|
||||||
!from_name.empty())
|
!from_name.empty())
|
||||||
{
|
{
|
||||||
LLInventoryView::showAgentInventory(TRUE);
|
LLInventoryView::showAgentInventory(TRUE);
|
||||||
}
|
}
|
||||||
//Trash Check
|
|
||||||
LLUUID trash_id;
|
|
||||||
trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
|
|
||||||
if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
LLUUID lost_and_found_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
|
|
||||||
//BOOL inventory_has_focus = gFocusMgr.childHasKeyboardFocus(view);
|
|
||||||
BOOL user_is_away = gAwayTimer.getStarted();
|
|
||||||
|
|
||||||
// don't select lost and found items if the user is active
|
|
||||||
if (gInventory.isObjectDescendentOf(item->getUUID(), lost_and_found_id)
|
|
||||||
&& !user_is_away)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Highlight item
|
// Highlight item
|
||||||
//Not sure about this check. Could make it easy to miss incoming items.
|
LL_DEBUGS("Messaging") << "Highlighting" << obj_id << LL_ENDL;
|
||||||
//don't dick with highlight while the user is working
|
|
||||||
//if(inventory_has_focus && !user_is_away)
|
|
||||||
// break;
|
|
||||||
LL_DEBUGS("Messaging") << "Highlighting" << item->getUUID() << LL_ENDL;
|
|
||||||
|
|
||||||
LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus();
|
LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus();
|
||||||
view->getPanel()->setSelection(item->getUUID(), TAKE_FOCUS_NO);
|
view->getPanel()->setSelection(obj_id, TAKE_FOCUS_NO);
|
||||||
gFocusMgr.setKeyboardFocus(focus_ctrl);
|
gFocusMgr.setKeyboardFocus(focus_ctrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||||
<panel border="true" bottom="0" height="500" label="Popups" left="0" name="popups" title="Popups" width="400">
|
<panel border="true" bottom="0" height="500" label="Popups" left="0" name="popups" title="Popups" width="400">
|
||||||
<text bottom="-20" follows="top" left="15" name="dont_show_label">Do not show these popups:</text>
|
<check_box bottom="-22" left="16" follows="top" height="16" label="Automatically accept item offers" name="accept_new_inventory"/>
|
||||||
<scroll_list follows="top" height="88" name="disabled_popups" width="480"/>
|
<check_box bottom_delta="0" left_delta="250" follows="top" height="16" label="View previewable items after accepting" name="show_new_inventory"/>
|
||||||
<button follows="top" height="20" label="Enable this popup" name="enable_popup" width="175"/>
|
<check_box bottom_delta="-20" left="16" follows="top" height="16" label="Show newly accepted objects in inventory" name="show_in_inventory"/>
|
||||||
<button follows="top" height="20" label="Enable all popups..." left="200" name="reset_dialogs_btn" tool_tip="Enable all of the optional popups and 'first time use' notifications." width="175" bottom_delta="0"/>
|
<text bottom_delta="-12" follows="top" left="15" name="show_label">Always show:</text>
|
||||||
<text follows="top" left="15" name="show_label" bottom_delta="-24">Show these popups:</text>
|
<scroll_list follows="top" multi_select="true" height="169" name="enabled_popups" width="480"/>
|
||||||
<scroll_list follows="top" height="88" left="15" name="enabled_popups" width="480"/>
|
<button follows="top" height="20" label="Enable all" left="25" name="reset_dialogs_btn" tool_tip="Enable all of the optional popups and 'first time use' notifications." width="100"/>
|
||||||
<button follows="top" height="20" label="Disable first time popups..." name="skip_frst_btn" tool_tip="Disable all of the first time use notifications." width="175"/>
|
<button follows="top" height="20" label="" image_overlay="arrow_up.tga" left_delta="105" name="enable_popup" width="30" bottom_delta="0"/>
|
||||||
<button bottom_delta="0" follows="top" height="20" label="Disable all these popups..." left="200" name="skip_dialogs_btn" tool_tip="Disable all of the optional popups and 'first time use' notifications." width="175"/>
|
<button follows="top" height="20" label="Disable first time popups..." left_delta="35" name="skip_frst_btn" tool_tip="Disable all of the first time use notifications." width="175" bottom_delta="0"/>
|
||||||
<text bottom_delta="-24" follows="top" height="10" left="15" name="text_box2">Offers of notecards, textures and landmarks:</text>
|
<button follows="top" height="20" label="" image_overlay="arrow_down.tga" left_delta="180" name="disable_popup" width="30" bottom_delta="0"/>
|
||||||
<check_box bottom_delta="-25" follows="top" height="16" initial_value="false" label="Automatically accept" left="40" name="accept_new_inventory"/>
|
<button bottom_delta="0" follows="top" height="20" label="Disable all" left_delta="35" name="skip_dialogs_btn" tool_tip="Disable all of the optional popups and 'first time use' notifications." width="100"/>
|
||||||
<check_box bottom_delta="-20" follows="top" height="16" initial_value="true" label="Automatically view after accepting" name="show_new_inventory"/>
|
<text follows="top" left="15" name="dont_show_label" bottom_delta="-12">Never show:</text>
|
||||||
<check_box bottom_delta="-20" follows="top" height="16" initial_value="true" label="Automatically show newly accepted objects in inventory" left="18" name="show_in_inventory"/>
|
<scroll_list follows="top" multi_select="true" height="169" left="15" name="disabled_popups" width="480"/>
|
||||||
</panel>
|
</panel>
|
||||||
|
|||||||
@@ -3010,13 +3010,29 @@ Where tag = tag string to match. Removes bot's matching the tag.
|
|||||||
<string name="InventoryOutboxNotMerchant">
|
<string name="InventoryOutboxNotMerchant">
|
||||||
If you'd like to become a merchant, you'll need to
|
If you'd like to become a merchant, you'll need to
|
||||||
</string>
|
</string>
|
||||||
<string name="InventoryOutboxNotMerchantSubs">create a Marketplace store.</string>
|
<string name="InventoryOutboxNotMerchantSubs">create a Marketplace store</string>
|
||||||
|
<string name="InventoryOutboxNotMerchant2">.</string>
|
||||||
<string name="InventoryOutboxNoItemsTitle">Your outbox is empty.</string>
|
<string name="InventoryOutboxNoItemsTitle">Your outbox is empty.</string>
|
||||||
<string name="InventoryOutboxNoItemsTooltip"></string>
|
<string name="InventoryOutboxNoItemsTooltip"></string>
|
||||||
<string name="InventoryOutboxNoItems">
|
<string name="InventoryOutboxNoItems">
|
||||||
Drag folders to this area and click "Send to Marketplace" to list them for sale on the
|
Drag folders to this area and click "Send to Marketplace" to list them for sale on the
|
||||||
</string>
|
</string>
|
||||||
<string name="InventoryOutboxNoItemsSubs">Marketplace.</string>
|
<string name="InventoryOutboxNoItemsSubs">Marketplace</string>
|
||||||
|
<string name="InventoryOutboxNoItems2">.</string>
|
||||||
|
<string name="InventoryOutboxInitializingTitle">Initializing Marketplace.</string>
|
||||||
|
<string name="InventoryOutboxInitializingTooltip"></string>
|
||||||
|
<string name="InventoryOutboxInitializing">
|
||||||
|
We are accessing your account on the
|
||||||
|
</string>
|
||||||
|
<string name="InventoryOutboxInitializingSubs">Marketplace store</string>
|
||||||
|
<string name="InventoryOutboxInitializing2">.</string>
|
||||||
|
<string name="InventoryOutboxErrorTitle">Marketplace Errors.</string>
|
||||||
|
<string name="InventoryOutboxErrorTooltip"></string>
|
||||||
|
<string name="InventoryOutboxError">
|
||||||
|
The
|
||||||
|
</string>
|
||||||
|
<string name="InventoryOutboxErrorSubs">Marketplace store</string>
|
||||||
|
<string name="InventoryOutboxError2">is returning errors.</string>
|
||||||
|
|
||||||
<!-- use value="" because they have preceding spaces -->
|
<!-- use value="" because they have preceding spaces -->
|
||||||
<string name="no_transfer" value=" (no transfer)" />
|
<string name="no_transfer" value=" (no transfer)" />
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ usage() {
|
|||||||
echo "Usage: repackage PLATFORM FILEIN.tar.bz2 [FILEOUT.tar.bz2]
|
echo "Usage: repackage PLATFORM FILEIN.tar.bz2 [FILEOUT.tar.bz2]
|
||||||
Repackage an archive from llautobuild format into singularity format
|
Repackage an archive from llautobuild format into singularity format
|
||||||
|
|
||||||
PLATTFORM can be one of windows, linux, mac.
|
PLATTFORM can be one of windows, linux, linux64, mac.
|
||||||
"
|
"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user