From 1a334a1005d116b99eca45c1e4a1a475c9dba68d Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 16 Sep 2014 10:39:23 -0700 Subject: 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 --- indra/newview/llviewermessage.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') 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; } -- cgit v1.2.3 From 406ba92fe2968f7fb2e05851eccc5fc0cca2a67d Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 16 Sep 2014 12:59:30 -0700 Subject: DD-23 : Final cleanup after testing using staging marketplace --- indra/newview/llviewermessage.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 24c341d73d..b5da9c3ca7 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5956,9 +5956,6 @@ 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") { -- cgit v1.2.3 From f99dbd9be0f631ee9135ac89d8322c359711d626 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 21 Oct 2014 21:46:16 -0700 Subject: DD-224 : WIP : Add a deleteListing method, call SLM_UPDATE_FOLDER notification if state is deleted --- indra/newview/llviewermessage.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 871ed8c0df..931b16ccb7 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5968,9 +5968,18 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) // Special Marketplace update notification if (notificationID == "SLM_UPDATE_FOLDER") { + std::string state = llsdBlock["state"].asString(); + llinfos << "Merov : SLM_UPDATE_FOLDER, state = " << state << ", id = " << llsdBlock["listing_id"].asInteger() << llendl; // 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()); + // If getListing() or deleteListing() fails though, the message of the alert will be shown by the caller of attempt_standard_notification() + if (state == "deleted") + { + return LLMarketplaceData::instance().deleteListing(llsdBlock["listing_id"].asInteger()); + } + else + { + return LLMarketplaceData::instance().getListing(llsdBlock["listing_id"].asInteger()); + } } LLNotificationsUtil::add(notificationID, llsdBlock); -- cgit v1.2.3 From b2c7fb9aeead8d1c549c0bb96a9a986686a1211d Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 23 Oct 2014 19:45:48 -0700 Subject: DD-224, DD-246 : Clean up code when receiving delete notification. Display DAMA alert when associating listing --- indra/newview/llviewermessage.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 931b16ccb7..31bd022b50 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5968,10 +5968,9 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) // Special Marketplace update notification if (notificationID == "SLM_UPDATE_FOLDER") { - std::string state = llsdBlock["state"].asString(); - llinfos << "Merov : SLM_UPDATE_FOLDER, state = " << state << ", id = " << llsdBlock["listing_id"].asInteger() << llendl; // In general, no message will be displayed, all we want is to get the listing updated in the marketplace floater // If getListing() or deleteListing() fails though, the message of the alert will be shown by the caller of attempt_standard_notification() + std::string state = llsdBlock["state"].asString(); if (state == "deleted") { return LLMarketplaceData::instance().deleteListing(llsdBlock["listing_id"].asInteger()); -- cgit v1.2.3 From 23a5b43cb923654f7779f4424c1bb2a374bbd2a5 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Sat, 8 Nov 2014 11:48:35 -0800 Subject: DD-260 : Silence the SLM delete message so to prevent server notification to show up when deleting or unassociating things from the viewer --- indra/newview/llviewermessage.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 31bd022b50..75a5688827 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5968,15 +5968,17 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) // 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() or deleteListing() fails though, the message of the alert will be shown by the caller of attempt_standard_notification() std::string state = llsdBlock["state"].asString(); if (state == "deleted") { - return LLMarketplaceData::instance().deleteListing(llsdBlock["listing_id"].asInteger()); + // Perform the deletion viewer side, no alert shown in this case + LLMarketplaceData::instance().deleteListing(llsdBlock["listing_id"].asInteger()); + return true; } else { + // 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()); } } -- cgit v1.2.3