diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 66 | ||||
-rw-r--r-- | indra/newview/llfloatersocial.h | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_social.xml | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_social_photo.xml | 29 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/strings.xml | 6 |
5 files changed, 43 insertions, 73 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 6d4262a599..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" @@ -155,8 +156,6 @@ LLSocialPhotoPanel::LLSocialPhotoPanel() : mSnapshotPanel(NULL), mResolutionComboBox(NULL), mRefreshBtn(NULL), -mRefreshLabel(NULL), -mWorkingIndicator(NULL), mWorkingLabel(NULL), mThumbnailPlaceholder(NULL), mCaptionTextBox(NULL), @@ -183,8 +182,6 @@ BOOL LLSocialPhotoPanel::postBuild() mResolutionComboBox->setCommitCallback(boost::bind(&LLSocialPhotoPanel::updateResolution, this, TRUE)); mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn"); childSetAction("new_snapshot_btn", boost::bind(&LLSocialPhotoPanel::onClickNewSnapshot, this)); - mRefreshLabel = getChild<LLUICtrl>("refresh_lbl"); - mWorkingIndicator = getChild<LLLoadingIndicator>("working_indicator"); mWorkingLabel = getChild<LLUICtrl>("working_lbl"); mThumbnailPlaceholder = getChild<LLUICtrl>("thumbnail_placeholder"); mCaptionTextBox = getChild<LLUICtrl>("caption"); @@ -226,23 +223,10 @@ void LLSocialPhotoPanel::draw() previewp->drawPreviewRect(offset_x, offset_y) ; } - // Update the visibility of the working (computing preview) indicators - if (previewp && previewp->getSnapshotUpToDate()) - { - if (mWorkingIndicator->getVisible()) - { - mWorkingIndicator->setVisible(false); - mWorkingIndicator->stop(); - mWorkingLabel->setVisible(false); - } - } - else if (!mWorkingIndicator->getVisible()) - { - mWorkingIndicator->setVisible(true); - mWorkingIndicator->start(); - mWorkingLabel->setVisible(true); - } + // Update the visibility of the working (computing preview) label + mWorkingLabel->setVisible(!(previewp && previewp->getSnapshotUpToDate())); + // Draw the rest of the panel on top of it LLPanel::draw(); } @@ -439,7 +423,7 @@ void LLSocialPhotoPanel::updateResolution(BOOL do_update) { lldebugs << "Will update controls" << llendl; updateControls(); - setNeedRefresh(true); + LLSocialPhotoPanel::onClickNewSnapshot(); } } @@ -467,12 +451,6 @@ void LLSocialPhotoPanel::checkAspectRatio(S32 index) } } -void LLSocialPhotoPanel::setNeedRefresh(bool need) -{ - mRefreshLabel->setVisible(need); - mNeedRefresh = need; -} - LLUICtrl* LLSocialPhotoPanel::getRefreshBtn() { return mRefreshBtn; @@ -644,9 +622,6 @@ void LLFloaterSocial::preUpdate() { //Will set file size text to 'unknown' instance->mSocialPhotoPanel->updateControls(); - - //Hides the refresh text - instance->mSocialPhotoPanel->setNeedRefresh(false); } } @@ -659,9 +634,6 @@ void LLFloaterSocial::postUpdate() //Will set the file size text instance->mSocialPhotoPanel->updateControls(); - //Hides the refresh text - instance->mSocialPhotoPanel->setNeedRefresh(false); - // The refresh button is initially hidden. We show it after the first update, // i.e. after snapshot is taken LLUICtrl * refresh_button = instance->mSocialPhotoPanel->getRefreshBtn(); @@ -682,22 +654,42 @@ void LLFloaterSocial::draw() mStatusLoadingText->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: - case LLFacebookConnect::FB_POSTING: + // Connection loading indicator mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialFacebookConnecting"); + mStatusLoadingText->setValue(status_text); mStatusLoadingIndicator->setVisible(true); break; - case LLFacebookConnect::FB_CONNECTED: + case LLFacebookConnect::FB_POSTING: + // Posting indicator + mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialFacebookPosting"); + mStatusLoadingText->setValue(status_text); + mStatusLoadingIndicator->setVisible(true); break; - case LLFacebookConnect::FB_POSTED: - 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 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 a39210108a..0fc5ea520a 100644 --- a/indra/newview/llfloatersocial.h +++ b/indra/newview/llfloatersocial.h @@ -28,7 +28,6 @@ #define LL_LLFLOATERSOCIAL_H #include "llfloater.h" -#include "llloadingindicator.h" #include "lltextbox.h" #include "llviewertexture.h" @@ -74,7 +73,6 @@ public: void updateControls(); void updateResolution(BOOL do_update); void checkAspectRatio(S32 index); - void setNeedRefresh(bool need); LLUICtrl* getRefreshBtn(); private: @@ -83,15 +81,11 @@ private: LLUICtrl * mSnapshotPanel; LLUICtrl * mResolutionComboBox; LLUICtrl * mRefreshBtn; - LLUICtrl * mRefreshLabel; - LLLoadingIndicator * mWorkingIndicator; LLUICtrl * mWorkingLabel; LLUICtrl * mThumbnailPlaceholder; LLUICtrl * mCaptionTextBox; LLUICtrl * mLocationCheckbox; LLUICtrl * mPostButton; - - bool mNeedRefresh; }; class LLSocialCheckinPanel : public LLPanel @@ -132,7 +126,7 @@ private: LLSocialPhotoPanel* mSocialPhotoPanel; LLTextBox* mStatusErrorText; LLTextBox* mStatusLoadingText; - LLUICtrl* mStatusLoadingIndicator; + 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 cd5609b0f8..0a7014c876 100644 --- a/indra/newview/skins/default/xui/en/floater_social.xml +++ b/indra/newview/skins/default/xui/en/floater_social.xml @@ -69,9 +69,9 @@ wrap="true" halign="left" valign="center" - text_color="Yellow" + text_color="DrYellow" font="SansSerif"> - Problem Connecting to Facebook + Error </text> <loading_indicator follows="left|top" @@ -92,8 +92,9 @@ wrap="true" halign="left" valign="center" + text_color="EmphasisColor" font="SansSerif"> - Connecting to Facebook... + Loading... </text> </panel> </floater> diff --git a/indra/newview/skins/default/xui/en/panel_social_photo.xml b/indra/newview/skins/default/xui/en/panel_social_photo.xml index 069e86c5f8..ddf2e5e613 100644 --- a/indra/newview/skins/default/xui/en/panel_social_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_social_photo.xml @@ -70,14 +70,6 @@ top="33" follows="left|top" left="9"> - <loading_indicator - follows="left|top" - height="24" - name="working_indicator" - left="113" - top="59" - visible="false" - width="24" /> <text follows="left|top|right" font="SansSerifBold" @@ -91,33 +83,18 @@ translate="false" type="string" visible="false"> - Working + Refreshing... </text> <button follows="left|top" height="22" image_overlay="Refresh_Off" - left="10" + left="20" name="new_snapshot_btn" + tool_tip="Click to refresh" bottom="-10" visible="false" width="22" /> - <text - follows="left|top" - font="SansSerifBold" - halign="left" - height="18" - left_pad="10" - length="1" - name="refresh_lbl" - text_color="red" - top_delta="4" - translate="false" - type="string" - visible="false" - width="130"> - Refresh to save - </text> </panel> <text length="1" 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 --> |