summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-06-07 18:05:14 -0700
committerMerov Linden <merov@lindenlab.com>2013-06-07 18:05:14 -0700
commit2b138990f8531df51f38e5e15309e1c92483dd05 (patch)
tree8e8a8d530710b12e894075f12d93b4acd46a63d3
parentbee5369b2f2fc0208b1a0645c2702ed1cea43c55 (diff)
ACME-508 : Surface facebook connection errors in a modal notification dialog
-rw-r--r--indra/newview/llfacebookconnect.cpp29
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml11
2 files changed, 40 insertions, 0 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp
index 668ba04406..4c9de17e2e 100644
--- a/indra/newview/llfacebookconnect.cpp
+++ b/indra/newview/llfacebookconnect.cpp
@@ -33,6 +33,7 @@
#include "llcallingcard.h" // for LLAvatarTracker
#include "llcommandhandler.h"
#include "llhttpclient.h"
+#include "llnotificationsutil.h"
#include "llurlaction.h"
///////////////////////////////////////////////////////////////////////////////
@@ -80,6 +81,11 @@ public:
}
else
{
+ LLSD args(LLSD::emptyMap());
+ std::stringstream msg;
+ msg << reason << " (Code " << status << ")";
+ args["FAIL_REASON"] = msg.str();
+ LLNotificationsUtil::add("FacebookCannotConnect",args);
LL_WARNS("FacebookConnect") << "Failed to get a response. reason: " << reason << " status: " << status << LL_ENDL;
}
}
@@ -109,6 +115,11 @@ public:
}
else
{
+ LLSD args(LLSD::emptyMap());
+ std::stringstream msg;
+ msg << reason << " (Code " << status << ")";
+ args["FAIL_REASON"] = msg.str();
+ LLNotificationsUtil::add("FacebookCannotConnect",args);
LL_WARNS("FacebookConnect") << "Failed to get a post response. reason: " << reason << " status: " << status << LL_ENDL;
}
}
@@ -142,6 +153,11 @@ public:
}
else
{
+ LLSD args(LLSD::emptyMap());
+ std::stringstream msg;
+ msg << reason << " (Code " << status << ")";
+ args["FAIL_REASON"] = msg.str();
+ LLNotificationsUtil::add("FacebookCannotConnect",args);
LL_WARNS("FacebookConnect") << "Failed to get a response. reason: " << reason << " status: " << status << LL_ENDL;
}
}
@@ -175,6 +191,14 @@ public:
{
LLFacebookConnect::instance().connectToFacebook();
}
+ else
+ {
+ LLSD args(LLSD::emptyMap());
+ std::stringstream msg;
+ msg << reason << " (Code " << status << ")";
+ args["FAIL_REASON"] = msg.str();
+ LLNotificationsUtil::add("FacebookCannotConnect",args);
+ }
}
}
@@ -198,6 +222,11 @@ public:
}
else
{
+ LLSD args(LLSD::emptyMap());
+ std::stringstream msg;
+ msg << reason << " (Code " << status << ")";
+ args["FAIL_REASON"] = msg.str();
+ LLNotificationsUtil::add("FacebookCannotConnect",args);
LL_WARNS("FacebookConnect") << "Failed to get a response. reason: " << reason << " status: " << status << LL_ENDL;
}
}
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 9d1973f267..b0203b5694 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5442,6 +5442,17 @@ Sorry, the settings couldn't be applied to the region. Leaving the region and t
<notification
functor="GenericAcknowledge"
icon="alertmodal.tga"
+ name="FacebookCannotConnect"
+ type="alertmodal">
+Connection to Facebook failed. Reason: [FAIL_REASON].
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ functor="GenericAcknowledge"
+ icon="alertmodal.tga"
name="EnvCannotDeleteLastDayCycleKey"
type="alertmodal">
Unable to delete the last key in this day cycle because you cannot have an empty day cycle. You should modify the last remaining key instead of attempting to delete it and then to create a new one.