summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterfacebook.cpp7
-rw-r--r--indra/newview/llfloaterfacebook.h2
-rwxr-xr-xindra/newview/llfloatersnapshot.cpp19
3 files changed, 15 insertions, 13 deletions
diff --git a/indra/newview/llfloaterfacebook.cpp b/indra/newview/llfloaterfacebook.cpp
index d4f727e1df..33422fb5fd 100644
--- a/indra/newview/llfloaterfacebook.cpp
+++ b/indra/newview/llfloaterfacebook.cpp
@@ -156,7 +156,8 @@ void LLFacebookStatusPanel::onSend()
{
LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLFacebookStatusPanel"); // just in case it is already listening
LLEventPumps::instance().obtain("FacebookConnectState").listen("LLFacebookStatusPanel", boost::bind(&LLFacebookStatusPanel::onFacebookConnectStateChange, this, _1));
-
+
+ pressedConnect = FALSE;
// Connect to Facebook if necessary and then post
if (LLFacebookConnect::instance().isConnected())
{
@@ -186,7 +187,8 @@ bool LLFacebookStatusPanel::onFacebookConnectStateChange(const LLSD& data)
switch (data.get("enum").asInteger())
{
case LLFacebookConnect::FB_CONNECTED:
- sendStatus();
+ if(!pressedConnect)
+ sendStatus();
break;
case LLFacebookConnect::FB_POSTED:
@@ -293,6 +295,7 @@ void LLFacebookStatusPanel::onConnect()
{
LLFacebookConnect::instance().checkConnectionToFacebook(true);
+ pressedConnect = TRUE;
//Clear only the facebook browser cookies so that the facebook login screen appears
LLViewerMedia::getCookieStore()->removeCookiesByDomain(".facebook.com");
}
diff --git a/indra/newview/llfloaterfacebook.h b/indra/newview/llfloaterfacebook.h
index f5a27dd5e7..6fe7a6541b 100644
--- a/indra/newview/llfloaterfacebook.h
+++ b/indra/newview/llfloaterfacebook.h
@@ -62,6 +62,8 @@ private:
void showDisconnectedLayout();
void showConnectedLayout();
+ bool pressedConnect;
+
LLTextBox * mAccountCaptionLabel;
LLTextBox * mAccountNameLabel;
LLUICtrl * mPanelButtons;
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 3f9243381c..8677028942 100755
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -1,4 +1,4 @@
-/**
+/**
* @file llfloatersnapshot.cpp
* @brief Snapshot preview window, allowing saving, e-mailing, etc.
*
@@ -813,16 +813,11 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
previewp->getSize(width, height);
- bool width_changed;
- if(original_width != width)
- {
- width_changed = TRUE;
- }
- else
- {
- width_changed = FALSE;
- }
- updateSpinners(view, previewp, width, height, width_changed); // may change width and height
+ // We use the height spinner here because we come here via the aspect ratio
+ // checkbox as well and we want height always changing to width by default.
+ // If we use the width spinner we would change width according to height by
+ // default, that is not what we want.
+ updateSpinners(view, previewp, width, height, !getHeightSpinner(view)->isDirty()); // may change width and height
if(getWidthSpinner(view)->getValue().asInteger() != width || getHeightSpinner(view)->getValue().asInteger() != height)
{
@@ -952,6 +947,8 @@ void LLFloaterSnapshot::Impl::setImageSizeSpinnersValues(LLFloaterSnapshot *view
// static
void LLFloaterSnapshot::Impl::updateSpinners(LLFloaterSnapshot* view, LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL is_width_changed)
{
+ getWidthSpinner(view)->resetDirty();
+ getHeightSpinner(view)->resetDirty();
if (checkImageSize(previewp, width, height, is_width_changed, previewp->getMaxImageSize()))
{
setImageSizeSpinnersValues(view, width, height);