From 77baf98d12c75621f8b1d69824abf01b9aa260f7 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 7 Aug 2013 18:45:50 -0700 Subject: ACME-820 : Let checkin checkbox be available and swap tile map / default tile when toggling --- indra/newview/llfloatersocial.cpp | 11 +++++------ indra/newview/llfloatersocial.h | 2 +- .../default/textures/icons/map_placeholder.jpg | Bin 25641 -> 12931 bytes .../skins/default/xui/en/panel_social_place.xml | 13 ++++++++++++- 4 files changed, 18 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 937f76648d..66a586b16b 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -499,8 +499,8 @@ BOOL LLSocialCheckinPanel::postBuild() mMessageTextEditor = getChild("place_caption"); mMapLoadingIndicator = getChild("map_loading_indicator"); mMapPlaceholder = getChild("map_placeholder"); + mMapDefault = getChild("map_default"); mMapCheckBox = getChild("add_place_view_cb"); - mMapCheckBoxValue = mMapCheckBox->get(); return LLPanel::postBuild(); } @@ -511,6 +511,7 @@ void LLSocialCheckinPanel::draw() mPostButton->setEnabled(no_ongoing_connection); mCancelButton->setEnabled(no_ongoing_connection); mMessageTextEditor->setEnabled(no_ongoing_connection); + mMapCheckBox->setEnabled(no_ongoing_connection); std::string map_url = get_map_url(); // Did we change location? @@ -524,9 +525,6 @@ void LLSocialCheckinPanel::draw() // In the meantime, put the "loading" indicator on, hide the tile map and disable the checkbox mMapLoadingIndicator->setVisible(true); mMapPlaceholder->setVisible(false); - mMapCheckBoxValue = mMapCheckBox->get(); - mMapCheckBox->set(false); - mMapCheckBox->setEnabled(false); } // Are we done loading the map tile? if (mReloadingMapTexture && mMapTexture->isFullyLoaded()) @@ -540,9 +538,10 @@ void LLSocialCheckinPanel::draw() // Now hide the loading indicator, bring the tile in view and reenable the checkbox with its previous value mMapLoadingIndicator->setVisible(false); mMapPlaceholder->setVisible(true); - mMapCheckBox->setEnabled(no_ongoing_connection); - mMapCheckBox->set(mMapCheckBoxValue); } + // Show the default icon if that's the checkbox value (the real one...) + // This will hide/show the loading indicator and/or tile underneath + mMapDefault->setVisible(!(mMapCheckBox->get())); LLPanel::draw(); } diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloatersocial.h index e7ad9ac12e..bbe07c9704 100644 --- a/indra/newview/llfloatersocial.h +++ b/indra/newview/llfloatersocial.h @@ -110,9 +110,9 @@ private: LLUICtrl* mMessageTextEditor; LLUICtrl* mMapLoadingIndicator; LLIconCtrl* mMapPlaceholder; + LLIconCtrl* mMapDefault; LLCheckBoxCtrl* mMapCheckBox; bool mReloadingMapTexture; - bool mMapCheckBoxValue; }; class LLSocialAccountPanel : public LLPanel diff --git a/indra/newview/skins/default/textures/icons/map_placeholder.jpg b/indra/newview/skins/default/textures/icons/map_placeholder.jpg index 0cb86c58d3..57204e2261 100644 Binary files a/indra/newview/skins/default/textures/icons/map_placeholder.jpg and b/indra/newview/skins/default/textures/icons/map_placeholder.jpg differ diff --git a/indra/newview/skins/default/xui/en/panel_social_place.xml b/indra/newview/skins/default/xui/en/panel_social_place.xml index b53a41487a..13e94f6998 100644 --- a/indra/newview/skins/default/xui/en/panel_social_place.xml +++ b/indra/newview/skins/default/xui/en/panel_social_place.xml @@ -71,9 +71,20 @@ visible="true" name="map_placeholder"> + +