summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-09-16 10:39:23 -0700
committerMerov Linden <merov@lindenlab.com>2014-09-16 10:39:23 -0700
commit1a334a1005d116b99eca45c1e4a1a475c9dba68d (patch)
tree2936669f108d49548c6c40b284bafc4a2f2ac668
parent221c184ebb5e20440cde974ac2bc5eab84690dd4 (diff)
DD-23 : WIP : Catch the SLM_UPDATE_FOLDER notification and trigger the GET /listing route so to get the updated SLM status for the listing
-rwxr-xr-xindra/newview/llmarketplacefunctions.cpp12
-rwxr-xr-xindra/newview/llmarketplacefunctions.h1
-rwxr-xr-xindra/newview/llviewermessage.cpp16
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml7
4 files changed, 34 insertions, 2 deletions
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 650b587091..794bb62834 100755
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -1372,6 +1372,18 @@ bool LLMarketplaceData::getListing(const LLUUID& folder_id)
return true;
}
+bool LLMarketplaceData::getListing(S32 listing_id)
+{
+ if (listing_id == 0)
+ {
+ return false;
+ }
+
+ // Get listing data from SLM
+ getSLMListing(listing_id);
+ return true;
+}
+
bool LLMarketplaceData::activateListing(const LLUUID& folder_id, bool activate)
{
// Folder id can be the root of the listing or not so we need to retrieve the root first
diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h
index 85e60c04a2..d9e222e05d 100755
--- a/indra/newview/llmarketplacefunctions.h
+++ b/indra/newview/llmarketplacefunctions.h
@@ -194,6 +194,7 @@ public:
bool setVersionFolder(const LLUUID& folder_id, const LLUUID& version_id);
bool associateListing(const LLUUID& folder_id, const LLUUID& source_folder_id, S32 listing_id);
bool getListing(const LLUUID& folder_id);
+ bool getListing(S32 listing_id);
// Probe the Marketplace data set to identify folders
bool isListed(const LLUUID& folder_id); // returns true if folder_id is a Listing folder
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 332d04a1f4..24c341d73d 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -71,6 +71,7 @@
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
#include "llfloaterimnearbychat.h"
+#include "llmarketplacefunctions.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llpanelgrouplandmoney.h"
@@ -5873,7 +5874,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
LL_WARNS() << "attempt_standard_notification: Attempted to read notification parameter data into LLSD but failed:" << llsdRaw << LL_ENDL;
}
}
-
+
if (
(notificationID == "RegionEntryAccessBlocked") ||
(notificationID == "LandClaimAccessBlocked") ||
@@ -5954,7 +5955,18 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
make_ui_sound("UISndRestart");
}
-
+
+ // WIP for DD-23 : Suppress those printouts once tested
+ llinfos << "Merov : notificationID = " << notificationID << llendl;
+ llinfos << "Merov : listing_id = " << llsdBlock["listing_id"].asInteger() << llendl;
+ // Special Marketplace update notification
+ if (notificationID == "SLM_UPDATE_FOLDER")
+ {
+ // In general, no message will be displayed, all we want is to get the listing updated in the marketplace floater
+ // If getListing() fails though, the message of the alert will be shown by the caller of attempt_standard_notification()
+ return LLMarketplaceData::instance().getListing(llsdBlock["listing_id"].asInteger());
+ }
+
LLNotificationsUtil::add(notificationID, llsdBlock);
return true;
}
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 1aafbd4b11..fd9547fd76 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4552,6 +4552,13 @@ Are you sure you want to change the Estate Covenant?
</notification>
<notification
+ icon="alertmodal.tga"
+ name="SLM_UPDATE_FOLDER"
+ type="alertmodal">
+ [MESSAGE]
+ </notification>
+
+ <notification
icon="alertmodal.tga"
name="RegionEntryAccessBlocked_AdultsOnlyContent"
type="alertmodal">