separated web floaters for Facebook, Flickr, and Twitter to fix ACME-1151
parent
181a7d2296
commit
1a1826a4f7
|
|
@ -80,15 +80,15 @@ public:
|
|||
{
|
||||
if (tokens[0].asString() == "connect")
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
|
||||
if (tokens.size() >= 2 && tokens[1].asString() == "flickr")
|
||||
{
|
||||
// this command probably came from the flickr_web browser, so close it
|
||||
LLFloater* flickr_web = LLFloaterReg::getInstance("flickr_web");
|
||||
if (flickr_web)
|
||||
{
|
||||
flickr_web->closeFloater();
|
||||
}
|
||||
|
||||
// connect to flickr
|
||||
if (query_map.has("oauth_token"))
|
||||
{
|
||||
|
|
@ -98,6 +98,13 @@ public:
|
|||
}
|
||||
else if (tokens.size() >= 2 && tokens[1].asString() == "twitter")
|
||||
{
|
||||
// this command probably came from the twitter_web browser, so close it
|
||||
LLFloater* twitter_web = LLFloaterReg::getInstance("twitter_web");
|
||||
if (twitter_web)
|
||||
{
|
||||
twitter_web->closeFloater();
|
||||
}
|
||||
|
||||
// connect to twitter
|
||||
if (query_map.has("oauth_token"))
|
||||
{
|
||||
|
|
@ -107,6 +114,13 @@ public:
|
|||
}
|
||||
else //if (tokens.size() >= 2 && tokens[1].asString() == "facebook")
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
|
||||
// connect to facebook
|
||||
if (query_map.has("code"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -280,11 +280,11 @@ void LLFlickrConnect::openFlickrWeb(std::string url)
|
|||
p.url(url).allow_address_entry(false);
|
||||
p.url(url).allow_back_forward_navigation(false);
|
||||
p.url(url).trusted_content(true);
|
||||
LLFloater *floater = LLFloaterReg::showInstance("fbc_web", p);
|
||||
LLFloater *floater = LLFloaterReg::showInstance("flickr_web", p);
|
||||
//the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems).
|
||||
//So when showing the internal web browser, set focus to it's containing floater "fbc_web". When a mouse event
|
||||
//So when showing the internal web browser, set focus to it's containing floater "flickr_web". When a mouse event
|
||||
//occurs on the "webbrowser" panel part of the floater, a mouse cursor will properly show and the "webbrowser" will gain focus.
|
||||
//fbc_web floater contains the "webbrowser" panel. JIRA: ACME-744
|
||||
//flickr_web floater contains the "webbrowser" panel. JIRA: ACME-744
|
||||
gFocusMgr.setKeyboardFocus( floater );
|
||||
|
||||
//LLUrlAction::openURLExternal(url);
|
||||
|
|
|
|||
|
|
@ -299,16 +299,25 @@ void LLFloaterWebContent::onClose(bool app_quitting)
|
|||
{
|
||||
LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_CONNECTION_FAILED);
|
||||
}
|
||||
}
|
||||
// Same with Flickr
|
||||
LLFloater* flickr_web = LLFloaterReg::getInstance("flickr_web");
|
||||
if (flickr_web == this)
|
||||
{
|
||||
if (!LLFlickrConnect::instance().isConnected())
|
||||
{
|
||||
LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_FAILED);
|
||||
}
|
||||
}
|
||||
// And Twitter
|
||||
LLFloater* twitter_web = LLFloaterReg::getInstance("twitter_web");
|
||||
if (twitter_web == this)
|
||||
{
|
||||
if (!LLTwitterConnect::instance().isConnected())
|
||||
{
|
||||
LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
LLViewerMedia::proxyWindowClosed(mUUID);
|
||||
destroy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -280,11 +280,11 @@ void LLTwitterConnect::openTwitterWeb(std::string url)
|
|||
p.url(url).allow_address_entry(false);
|
||||
p.url(url).allow_back_forward_navigation(false);
|
||||
p.url(url).trusted_content(true);
|
||||
LLFloater *floater = LLFloaterReg::showInstance("fbc_web", p);
|
||||
LLFloater *floater = LLFloaterReg::showInstance("twitter_web", p);
|
||||
//the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems).
|
||||
//So when showing the internal web browser, set focus to it's containing floater "fbc_web". When a mouse event
|
||||
//So when showing the internal web browser, set focus to it's containing floater "twitter_web". When a mouse event
|
||||
//occurs on the "webbrowser" panel part of the floater, a mouse cursor will properly show and the "webbrowser" will gain focus.
|
||||
//fbc_web floater contains the "webbrowser" panel. JIRA: ACME-744
|
||||
//twitter_web floater contains the "webbrowser" panel. JIRA: ACME-744
|
||||
gFocusMgr.setKeyboardFocus( floater );
|
||||
|
||||
//LLUrlAction::openURLExternal(url);
|
||||
|
|
|
|||
|
|
@ -316,8 +316,10 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
|
||||
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("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
|
||||
LLFloaterReg::add("fbc_web", "floater_fbc_web.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
|
||||
LLFloaterReg::add("flickr_web", "floater_fbc_web.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
|
||||
LLFloaterReg::add("twitter_web", "floater_fbc_web.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
|
||||
|
||||
LLFloaterUIPreviewUtil::registerFloater();
|
||||
LLFloaterReg::add("upload_anim_bvh", "floater_animation_bvh_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBvhPreview>, "upload");
|
||||
|
|
|
|||
Loading…
Reference in New Issue