diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llfloatersocial.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_social.xml | 34 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/strings.xml | 6 |
4 files changed, 26 insertions, 49 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 1d47213a3a..b90cc004d3 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -40,6 +40,7 @@ #include "llsdserialize.h" #include "llloadingindicator.h" #include "llslurl.h" +#include "lltrans.h" #include "llsnapshotlivepreview.h" #include "llviewerregion.h" #include "llviewercontrol.h" @@ -591,9 +592,7 @@ void LLSocialCheckinPanel::clearAndClose() LLFloaterSocial::LLFloaterSocial(const LLSD& key) : LLFloater(key), mSocialPhotoPanel(NULL), mStatusErrorText(NULL), - mStatusPostingErrorText(NULL), mStatusLoadingText(NULL), - mStatusPostingText(NULL), mStatusLoadingIndicator(NULL) { mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterSocial::onCancel, this)); @@ -610,9 +609,7 @@ BOOL LLFloaterSocial::postBuild() mSocialPhotoPanel = static_cast<LLSocialPhotoPanel*>(getChild<LLUICtrl>("panel_social_photo")); // Connection status widgets mStatusErrorText = getChild<LLTextBox>("connection_error_text"); - mStatusPostingErrorText = getChild<LLTextBox>("connection_error_posting_text"); mStatusLoadingText = getChild<LLTextBox>("connection_loading_text"); - mStatusPostingText = getChild<LLTextBox>("connection_posting_text"); mStatusLoadingIndicator = getChild<LLUICtrl>("connection_loading_indicator"); return LLFloater::postBuild(); } @@ -651,42 +648,48 @@ void LLFloaterSocial::postUpdate() void LLFloaterSocial::draw() { - if (mStatusErrorText && mStatusPostingErrorText && mStatusLoadingText && mStatusPostingText && mStatusLoadingIndicator) + if (mStatusErrorText && mStatusLoadingText && mStatusLoadingIndicator) { mStatusErrorText->setVisible(false); - mStatusPostingErrorText->setVisible(false); mStatusLoadingText->setVisible(false); - mStatusPostingText->setVisible(false); mStatusLoadingIndicator->setVisible(false); LLFacebookConnect::EConnectionState connection_state = LLFacebookConnect::instance().getConnectionState(); + std::string status_text; + switch (connection_state) { case LLFacebookConnect::FB_NOT_CONNECTED: // No status displayed when first opening the panel and no connection done + case LLFacebookConnect::FB_CONNECTED: + // When successfully connected, no message is displayed + case LLFacebookConnect::FB_POSTED: + // No success message to show since we actually close the floater after successful posting completion break; case LLFacebookConnect::FB_CONNECTION_IN_PROGRESS: // Connection loading indicator mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialFacebookConnecting"); + mStatusLoadingText->setValue(status_text); mStatusLoadingIndicator->setVisible(true); break; case LLFacebookConnect::FB_POSTING: // Posting indicator - mStatusPostingText->setVisible(true); + mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialFacebookPosting"); + mStatusLoadingText->setValue(status_text); mStatusLoadingIndicator->setVisible(true); - break; - case LLFacebookConnect::FB_CONNECTED: - // When successfully connected, no message is displayed break; - case LLFacebookConnect::FB_POSTED: - // No success message to show since we actually close the floater after successful posting completion - break; case LLFacebookConnect::FB_CONNECTION_FAILED: // Error connecting to the service mStatusErrorText->setVisible(true); + status_text = LLTrans::getString("SocialFacebookErrorConnecting"); + mStatusErrorText->setValue(status_text); break; case LLFacebookConnect::FB_POST_FAILED: // Error posting to the service - mStatusPostingErrorText->setVisible(true); + mStatusErrorText->setVisible(true); + status_text = LLTrans::getString("SocialFacebookErrorPosting"); + mStatusErrorText->setValue(status_text); break; } } diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloatersocial.h index 76f7d080cc..0fc5ea520a 100644 --- a/indra/newview/llfloatersocial.h +++ b/indra/newview/llfloatersocial.h @@ -125,9 +125,7 @@ public: private: LLSocialPhotoPanel* mSocialPhotoPanel; LLTextBox* mStatusErrorText; - LLTextBox* mStatusPostingErrorText; LLTextBox* mStatusLoadingText; - LLTextBox* mStatusPostingText; LLUICtrl* mStatusLoadingIndicator; }; diff --git a/indra/newview/skins/default/xui/en/floater_social.xml b/indra/newview/skins/default/xui/en/floater_social.xml index 52840c5435..781c48729c 100644 --- a/indra/newview/skins/default/xui/en/floater_social.xml +++ b/indra/newview/skins/default/xui/en/floater_social.xml @@ -67,22 +67,7 @@ valign="center" text_color="DrYellow" font="SansSerif"> - Problem connecting to Facebook - </text> - <text - name="connection_error_posting_text" - type="string" - follows="left|top" - top="3" - left="12" - width="250" - height="20" - wrap="true" - halign="left" - valign="center" - text_color="DrYellow" - font="SansSerif"> - Problem posting to Facebook + Error </text> <loading_indicator follows="left|top" @@ -105,22 +90,7 @@ valign="center" text_color="EmphasisColor" font="SansSerif"> - Connecting to Facebook... - </text> - <text - name="connection_posting_text" - type="string" - follows="left|top" - top="3" - left="38" - width="250" - height="20" - wrap="true" - halign="left" - valign="center" - text_color="EmphasisColor" - font="SansSerif"> - Posting... + Loading... </text> </panel> </floater> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 0f3f4619f6..5067922b88 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -148,6 +148,12 @@ Please try logging in again in a minute.</string> <string name="SentToInvalidRegion">You were sent to an invalid region.</string> <string name="TestingDisconnect">Testing viewer disconnect</string> + <!-- Facebook Connect and, eventually, other Social Network --> + <string name="SocialFacebookConnecting">Connecting to Facebook...</string> + <string name="SocialFacebookPosting">Posting...</string> + <string name="SocialFacebookErrorConnecting">Problem connecting to Facebook</string> + <string name="SocialFacebookErrorPosting">Problem posting to Facebook</string> + <!-- Tooltip --> <string name="TooltipPerson">Person</string><!-- Object under mouse pointer is an avatar --> <string name="TooltipNoName">(no name)</string> <!-- No name on an object --> |