diff options
author | Merov Linden <merov@lindenlab.com> | 2013-07-07 22:59:51 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-07-07 22:59:51 -0700 |
commit | 5c88b679bd2f66fd6fa358ca93047c0aba781e22 (patch) | |
tree | b05e4382a0d788588ee6493a390ec8cb4b50c291 /indra/newview | |
parent | 8494e04a759ef1d91d30663eb7da84ef271c65be (diff) |
ACME-626 : More snapshot code cleanup, suppress failure/success indicators since we have a bottom message for that, show/hide the progress indicator
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloatersocial.cpp | 27 | ||||
-rw-r--r-- | indra/newview/llfloatersocial.h | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_social_photo.xml | 52 |
3 files changed, 26 insertions, 58 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 58a9edc524..6d4262a599 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -156,8 +156,8 @@ mSnapshotPanel(NULL), mResolutionComboBox(NULL), mRefreshBtn(NULL), mRefreshLabel(NULL), -mSucceessLblPanel(NULL), -mFailureLblPanel(NULL), +mWorkingIndicator(NULL), +mWorkingLabel(NULL), mThumbnailPlaceholder(NULL), mCaptionTextBox(NULL), mLocationCheckbox(NULL), @@ -184,8 +184,8 @@ BOOL LLSocialPhotoPanel::postBuild() mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn"); childSetAction("new_snapshot_btn", boost::bind(&LLSocialPhotoPanel::onClickNewSnapshot, this)); mRefreshLabel = getChild<LLUICtrl>("refresh_lbl"); - mSucceessLblPanel = getChild<LLUICtrl>("succeeded_panel"); - mFailureLblPanel = getChild<LLUICtrl>("failed_panel"); + mWorkingIndicator = getChild<LLLoadingIndicator>("working_indicator"); + mWorkingLabel = getChild<LLUICtrl>("working_lbl"); mThumbnailPlaceholder = getChild<LLUICtrl>("thumbnail_placeholder"); mCaptionTextBox = getChild<LLUICtrl>("caption"); mLocationCheckbox = getChild<LLUICtrl>("add_location_cb"); @@ -198,6 +198,7 @@ void LLSocialPhotoPanel::draw() { LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get()); + // Display the preview if one is available if (previewp && previewp->getThumbnailImage()) { const LLRect& thumbnail_rect = mThumbnailPlaceholder->getRect(); @@ -224,6 +225,24 @@ 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); + } + LLPanel::draw(); } diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloatersocial.h index 5e1ee6be0e..a39210108a 100644 --- a/indra/newview/llfloatersocial.h +++ b/indra/newview/llfloatersocial.h @@ -28,6 +28,7 @@ #define LL_LLFLOATERSOCIAL_H #include "llfloater.h" +#include "llloadingindicator.h" #include "lltextbox.h" #include "llviewertexture.h" @@ -83,8 +84,8 @@ private: LLUICtrl * mResolutionComboBox; LLUICtrl * mRefreshBtn; LLUICtrl * mRefreshLabel; - LLUICtrl * mSucceessLblPanel; - LLUICtrl * mFailureLblPanel; + LLLoadingIndicator * mWorkingIndicator; + LLUICtrl * mWorkingLabel; LLUICtrl * mThumbnailPlaceholder; LLUICtrl * mCaptionTextBox; LLUICtrl * mLocationCheckbox; 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 72e5286fe6..d14e9ec82f 100644 --- a/indra/newview/skins/default/xui/en/panel_social_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_social_photo.xml @@ -70,58 +70,6 @@ top="33" follows="left|top" left="9"> - <panel - background_visible="true" - bg_alpha_color="0.9 1 0.9 1" - follows="left|top" - height="20" - width="250" - top="0" - left="0" - name="succeeded_panel" - visible="false"> - <text - follows="all" - font="SansSerif" - halign="center" - height="18" - left="1" - length="1" - name="succeeded_lbl" - right="-1" - text_color="0.2 0.5 0.2 1" - top="4" - translate="false" - type="string"> - Succeeded - </text> - </panel> - <panel - background_visible="true" - bg_alpha_color="1 0.9 0.9 1" - follows="left|top" - height="20" - width="250" - top="0" - left="0" - name="failed_panel" - visible="false"> - <text - follows="all" - font="SansSerif" - halign="center" - height="18" - left="1" - length="1" - name="failed_lbl" - right="-1" - text_color="0.5 0.2 0.2 1" - top="4" - translate="false" - type="string"> - Failed - </text> - </panel> <loading_indicator follows="left|top" height="24" |