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/llfloatersocial.cpp | |
| 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/llfloatersocial.cpp')
| -rw-r--r-- | indra/newview/llfloatersocial.cpp | 27 |
1 files changed, 23 insertions, 4 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(); } |
