From 3d6a98d845c871377a52fc924ce06329db34a776 Mon Sep 17 00:00:00 2001 From: Cho Date: Wed, 17 Jul 2013 02:59:40 +0100 Subject: created floater_fbc_web for ACME-734 and ACME-735 --- indra/newview/llfacebookconnect.cpp | 12 ++++++++++-- indra/newview/llviewerfloaterreg.cpp | 2 +- indra/newview/skins/default/xui/en/floater_fbc_web.xml | 9 +++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/floater_fbc_web.xml (limited to 'indra') diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index cf77dd365b..ac92fc6ed5 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -52,7 +52,7 @@ void log_facebook_connect_error(const std::string& request, U32 status, const st // Note: 302 (redirect) is *not* an error that warrants logging if (status != 302) { - LL_WARNS("FacebookConnect") << request << " request failed with a " << status << " " << reason << ". Reason: " << code << "(" << description << ")" << LL_ENDL; + LL_WARNS("FacebookConnect") << request << " request failed with a " << status << " " << reason << ". Reason: " << code << " (" << description << ")" << LL_ENDL; } } @@ -76,10 +76,18 @@ public: { if (tokens[0].asString() == "connect") { + // connect to facebook if (query_map.has("code")) { LLFacebookConnect::instance().connectToFacebook(query_map["code"], query_map.get("state")); } + + // this command probably came from the fbc_web browser, so close it + LLFloater* fbc_web = LLFloaterReg::getInstance("fbc_web"); + if (fbc_web) + { + fbc_web->closeFloater(); + } return true; } } @@ -280,7 +288,7 @@ void LLFacebookConnect::openFacebookWeb(std::string url) // Open the URL in an internal browser window without navigation UI LLFloaterWebContent::Params p; p.url(url).show_chrome(false); - LLFloaterReg::showInstance("web_content", p); + LLFloaterReg::showInstance("fbc_web", p); //LLUrlAction::openURLExternal(url); } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 69bda2c11c..4ce049df03 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -313,7 +313,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("my_profile", "floater_my_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create); LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create); LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); - + LLFloaterReg::add("fbc_web", "floater_fbc_web.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); LLFloaterUIPreviewUtil::registerFloater(); LLFloaterReg::add("upload_anim_bvh", "floater_animation_bvh_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); diff --git a/indra/newview/skins/default/xui/en/floater_fbc_web.xml b/indra/newview/skins/default/xui/en/floater_fbc_web.xml new file mode 100644 index 0000000000..0d35e22a19 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_fbc_web.xml @@ -0,0 +1,9 @@ + + -- cgit v1.2.3