diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfacebookconnect.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 36 | ||||
-rw-r--r-- | indra/newview/llfloatersocial.h | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_social.xml | 19 |
4 files changed, 59 insertions, 4 deletions
diff --git a/indra/newview/llfacebookconnect.h b/indra/newview/llfacebookconnect.h index abd6fb385d..1044c05e45 100644 --- a/indra/newview/llfacebookconnect.h +++ b/indra/newview/llfacebookconnect.h @@ -73,6 +73,7 @@ public: const LLSD& getContent() const; void setConnectionState(EConnectionState connection_state) { mConnectionState = connection_state; } + EConnectionState getConnectionState() { return mConnectionState; } bool isConnected() { return (mConnectionState == FB_CONNECTED); } S32 generation() { return mGeneration; } diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 4660644969..ddbaa2d704 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -524,7 +524,10 @@ void LLSocialCheckinPanel::onSend() //////////////////////// LLFloaterSocial::LLFloaterSocial(const LLSD& key) : LLFloater(key), - mSocialPhotoPanel(NULL) + mSocialPhotoPanel(NULL), + mStatusErrorText(NULL), + mStatusLoadingText(NULL), + mStatusLoadingIndicator(NULL) { mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterSocial::onCancel, this)); } @@ -540,6 +543,10 @@ BOOL LLFloaterSocial::postBuild() LLFacebookConnect::instance().getConnectionToFacebook(true); // Keep tab of the Photo Panel mSocialPhotoPanel = static_cast<LLSocialPhotoPanel*>(getChild<LLUICtrl>("panel_social_photo")); + // Connection status widgets + mStatusErrorText = getChild<LLTextBox>("connection_error_text"); + mStatusLoadingText = getChild<LLTextBox>("connection_loading_text"); + mStatusLoadingIndicator = getChild<LLUICtrl>("connection_loading_indicator"); return LLFloater::postBuild(); } @@ -580,3 +587,30 @@ void LLFloaterSocial::postUpdate() } } + +void LLFloaterSocial::draw() +{ + if (mStatusErrorText && mStatusLoadingText && mStatusLoadingIndicator) + { + mStatusErrorText->setVisible(false); + mStatusLoadingText->setVisible(false); + mStatusLoadingIndicator->setVisible(false); + LLFacebookConnect::EConnectionState connection_state = LLFacebookConnect::instance().getConnectionState(); + switch (connection_state) + { + case LLFacebookConnect::FB_NOT_CONNECTED: + break; + case LLFacebookConnect::FB_CONNECTION_IN_PROGRESS: + mStatusLoadingText->setVisible(true); + mStatusLoadingIndicator->setVisible(true); + break; + case LLFacebookConnect::FB_CONNECTED: + break; + case LLFacebookConnect::FB_CONNECTION_FAILED: + mStatusErrorText->setVisible(true); + break; + } + } + LLFloater::draw(); +} + diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloatersocial.h index 89b9e2016a..f90deb9f85 100644 --- a/indra/newview/llfloatersocial.h +++ b/indra/newview/llfloatersocial.h @@ -28,6 +28,7 @@ #define LL_LLFLOATERSOCIAL_H #include "llfloater.h" +#include "lltextbox.h" #include "llviewertexture.h" class LLIconCtrl; @@ -109,13 +110,17 @@ class LLFloaterSocial : public LLFloater public: LLFloaterSocial(const LLSD& key); BOOL postBuild(); + void draw(); void onCancel(); static void preUpdate(); static void postUpdate(); private: - LLSocialPhotoPanel * mSocialPhotoPanel; + LLSocialPhotoPanel* mSocialPhotoPanel; + LLTextBox* mStatusErrorText; + LLTextBox* mStatusLoadingText; + LLUICtrl* mStatusLoadingIndicator; }; #endif // LL_LLFLOATERSOCIAL_H diff --git a/indra/newview/skins/default/xui/en/floater_social.xml b/indra/newview/skins/default/xui/en/floater_social.xml index c571497769..61210135ee 100644 --- a/indra/newview/skins/default/xui/en/floater_social.xml +++ b/indra/newview/skins/default/xui/en/floater_social.xml @@ -57,6 +57,21 @@ name="connection_status_panel" follows="left|top" height="26"> + <text + name="connection_error_text" + type="string" + follows="left|top" + top="3" + left="12" + width="250" + height="20" + wrap="true" + halign="left" + valign="center" + text_color="Yellow" + font="SansSerif"> + Problem Connecting to Facebook + </text> <loading_indicator follows="left|top" height="24" @@ -66,7 +81,7 @@ left="9" visible="true"/> <text - name="connection_status_text" + name="connection_loading_text" type="string" follows="left|top" top="3" @@ -77,7 +92,7 @@ halign="left" valign="center" font="SansSerif"> - Test text + Connecting to Facebook... </text> </panel> </floater> |