diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-03-13 17:35:37 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-03-13 17:35:37 -0700 |
commit | 3a08b4e3889753e74b35a643b4753912cebe3c5a (patch) | |
tree | 1346d94d97c1baccfa65d407a87e375762d14c1c | |
parent | 352138a8486623575ee015c89f3263103b30bef4 (diff) |
Now using the FBC Test panel you can select the '+' button to view FBC app settings, send a FBC app invite or send a facebook message.
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 37 | ||||
-rw-r--r-- | indra/newview/llpanelpeople.h | 4 |
2 files changed, 41 insertions, 0 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 491b8dd7c5..dfc48145dc 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -557,6 +557,8 @@ LLPanelPeople::LLPanelPeople() mButtonsUpdater = new LLButtonsUpdater(boost::bind(&LLPanelPeople::updateButtons, this)); mCommitCallbackRegistrar.add("People.addFriend", boost::bind(&LLPanelPeople::onAddFriendButtonClicked, this)); mCommitCallbackRegistrar.add("People.loginFBC", boost::bind(&LLPanelPeople::onLoginFbcButtonClicked, this)); + mCommitCallbackRegistrar.add("People.requestFBC", boost::bind(&LLPanelPeople::onFacebookAppRequestClicked, this)); + mCommitCallbackRegistrar.add("People.sendFBC", boost::bind(&LLPanelPeople::onFacebookAppSendClicked, this)); } LLPanelPeople::~LLPanelPeople() @@ -717,6 +719,7 @@ BOOL LLPanelPeople::postBuild() mFriendsGearButton = getChild<LLMenuButton>("friends_viewsort_btn"); mGroupsGearButton = getChild<LLMenuButton>("groups_viewsort_btn"); mRecentGearButton = getChild<LLMenuButton>("recent_viewsort_btn"); + mFBCGearButton = getChild<LLMenuButton>("fbc_options_btn"); LLMenuGL* plus_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_group_plus.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mGroupPlusMenuHandle = plus_menu->getHandle(); @@ -749,6 +752,13 @@ BOOL LLPanelPeople::postBuild() mRecentGearButton->setMenu(recent_view_sort); } + LLToggleableMenu* fbc_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_gear_fbc.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + if(fbc_menu) + { + mFBCMenuHandle = fbc_menu->getHandle(); + mFBCGearButton->setMenu(fbc_menu); + } + LLVoiceClient::getInstance()->addObserver(this); // call this method in case some list is empty and buttons can be in inconsistent state @@ -1656,4 +1666,31 @@ void LLPanelPeople::onLoginFbcButtonClicked() } } +void LLPanelPeople::onFacebookAppRequestClicked() +{ + LLFloaterWebContent::Params p; + p.url("http://www.facebook.com/dialog/apprequests?app_id=565771023434202&message=Test&redirect_uri=https://cryptic-ridge-1632.herokuapp.com/"); + LLFloater* browser = LLFloaterReg::showInstance("web_content", p); + + if (browser) + { + // start checking the browser to see if the data is available yet + mFbcTestBrowserHandle = browser->getHandle(); + mFbcTestListUpdater->setActive(true); + } +} + +void LLPanelPeople::onFacebookAppSendClicked() +{ + LLFloaterWebContent::Params p; + p.url("https://www.facebook.com/dialog/send?app_id=565771023434202&name=Test&link=http://www.cnet.com&redirect_uri=https://cryptic-ridge-1632.herokuapp.com/"); + LLFloater* browser = LLFloaterReg::showInstance("web_content", p); + + if (browser) + { + // start checking the browser to see if the data is available yet + mFbcTestBrowserHandle = browser->getHandle(); + mFbcTestListUpdater->setActive(true); + } +} // EOF diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 010fb5ca77..feb32d1f69 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -115,6 +115,8 @@ private: void onRecentViewSortMenuItemClicked(const LLSD& userdata); void onLoginFbcButtonClicked(); + void onFacebookAppRequestClicked(); + void onFacebookAppSendClicked(); //returns false only if group is "none" bool isRealGroup(); @@ -154,6 +156,7 @@ private: LLHandle<LLView> mFriendsViewSortMenuHandle; LLHandle<LLView> mGroupsViewSortMenuHandle; LLHandle<LLView> mRecentViewSortMenuHandle; + LLHandle<LLView> mFBCMenuHandle; LLHandle<LLFloater> mFbcTestBrowserHandle; Updater* mFriendListUpdater; @@ -166,6 +169,7 @@ private: LLMenuButton* mFriendsGearButton; LLMenuButton* mGroupsGearButton; LLMenuButton* mRecentGearButton; + LLMenuButton* mFBCGearButton; std::string mFilterSubString; std::string mFilterSubStringOrig; |