summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-06-06 15:06:52 -0700
committerMerov Linden <merov@lindenlab.com>2013-06-06 15:06:52 -0700
commit4163603a1118a9c1e220e56f22e757d162932ebe (patch)
tree874ef627ee03ab0261d49f840b381f3784e2e20d
parent3680f0332fa0e7262315d52fbd204beb2ecbc782 (diff)
ACME-464 : WIP : Post in the snapshot Panel correctly disabled / enabled according to FB connection status
-rwxr-xr-xindra/newview/llpanelsnapshotfacebook.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llpanelsnapshotfacebook.cpp b/indra/newview/llpanelsnapshotfacebook.cpp
index b434741538..faeabf0a07 100755
--- a/indra/newview/llpanelsnapshotfacebook.cpp
+++ b/indra/newview/llpanelsnapshotfacebook.cpp
@@ -55,6 +55,7 @@ public:
/*virtual*/ void onOpen(const LLSD& key);
private:
+ /*virtual*/ void updateCustomResControls(); ///< Show/hide facebook custom controls
/*virtual*/ std::string getWidthSpinnerName() const { return "facebook_snapshot_width"; }
/*virtual*/ std::string getHeightSpinnerName() const { return "facebook_snapshot_height"; }
/*virtual*/ std::string getAspectRatioCBName() const { return "facebook_keep_aspect_check"; }
@@ -84,6 +85,7 @@ BOOL LLPanelSnapshotFacebook::postBuild()
// virtual
void LLPanelSnapshotFacebook::onOpen(const LLSD& key)
{
+ updateControls(key);
LLPanelSnapshot::onOpen(key);
}
@@ -95,6 +97,13 @@ void LLPanelSnapshotFacebook::updateControls(const LLSD& info)
getChild<LLUICtrl>("post_btn")->setEnabled(have_snapshot && is_connected);
}
+// virtual
+void LLPanelSnapshotFacebook::updateCustomResControls()
+{
+ const bool is_connected = LLFacebookConnect::instance().getConnected();
+ getChild<LLUICtrl>("post_btn")->setEnabled(is_connected);
+}
+
void LLPanelSnapshotFacebook::onSend()
{
std::string caption = getChild<LLUICtrl>("caption")->getValue().asString();