ACME-626 : Implement status and progress update text
parent
00ef5e101c
commit
8c4a39b202
|
|
@ -73,6 +73,7 @@ public:
|
|||
const LLSD& getContent() const;
|
||||
|
||||
void setConnectionState(EConnectionState connection_state) { mConnectionState = connection_state; }
|
||||
EConnectionState getConnectionState() { return mConnectionState; }
|
||||
bool isConnected() { return (mConnectionState == FB_CONNECTED); }
|
||||
S32 generation() { return mGeneration; }
|
||||
|
||||
|
|
|
|||
|
|
@ -524,7 +524,10 @@ void LLSocialCheckinPanel::onSend()
|
|||
////////////////////////
|
||||
|
||||
LLFloaterSocial::LLFloaterSocial(const LLSD& key) : LLFloater(key),
|
||||
mSocialPhotoPanel(NULL)
|
||||
mSocialPhotoPanel(NULL),
|
||||
mStatusErrorText(NULL),
|
||||
mStatusLoadingText(NULL),
|
||||
mStatusLoadingIndicator(NULL)
|
||||
{
|
||||
mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterSocial::onCancel, this));
|
||||
}
|
||||
|
|
@ -540,6 +543,10 @@ BOOL LLFloaterSocial::postBuild()
|
|||
LLFacebookConnect::instance().getConnectionToFacebook(true);
|
||||
// Keep tab of the Photo Panel
|
||||
mSocialPhotoPanel = static_cast<LLSocialPhotoPanel*>(getChild<LLUICtrl>("panel_social_photo"));
|
||||
// Connection status widgets
|
||||
mStatusErrorText = getChild<LLTextBox>("connection_error_text");
|
||||
mStatusLoadingText = getChild<LLTextBox>("connection_loading_text");
|
||||
mStatusLoadingIndicator = getChild<LLUICtrl>("connection_loading_indicator");
|
||||
return LLFloater::postBuild();
|
||||
}
|
||||
|
||||
|
|
@ -580,3 +587,30 @@ void LLFloaterSocial::postUpdate()
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterSocial::draw()
|
||||
{
|
||||
if (mStatusErrorText && mStatusLoadingText && mStatusLoadingIndicator)
|
||||
{
|
||||
mStatusErrorText->setVisible(false);
|
||||
mStatusLoadingText->setVisible(false);
|
||||
mStatusLoadingIndicator->setVisible(false);
|
||||
LLFacebookConnect::EConnectionState connection_state = LLFacebookConnect::instance().getConnectionState();
|
||||
switch (connection_state)
|
||||
{
|
||||
case LLFacebookConnect::FB_NOT_CONNECTED:
|
||||
break;
|
||||
case LLFacebookConnect::FB_CONNECTION_IN_PROGRESS:
|
||||
mStatusLoadingText->setVisible(true);
|
||||
mStatusLoadingIndicator->setVisible(true);
|
||||
break;
|
||||
case LLFacebookConnect::FB_CONNECTED:
|
||||
break;
|
||||
case LLFacebookConnect::FB_CONNECTION_FAILED:
|
||||
mStatusErrorText->setVisible(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#define LL_LLFLOATERSOCIAL_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llviewertexture.h"
|
||||
|
||||
class LLIconCtrl;
|
||||
|
|
@ -109,13 +110,17 @@ class LLFloaterSocial : public LLFloater
|
|||
public:
|
||||
LLFloaterSocial(const LLSD& key);
|
||||
BOOL postBuild();
|
||||
void draw();
|
||||
void onCancel();
|
||||
|
||||
static void preUpdate();
|
||||
static void postUpdate();
|
||||
|
||||
private:
|
||||
LLSocialPhotoPanel * mSocialPhotoPanel;
|
||||
LLSocialPhotoPanel* mSocialPhotoPanel;
|
||||
LLTextBox* mStatusErrorText;
|
||||
LLTextBox* mStatusLoadingText;
|
||||
LLUICtrl* mStatusLoadingIndicator;
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATERSOCIAL_H
|
||||
|
|
|
|||
|
|
@ -57,6 +57,21 @@
|
|||
name="connection_status_panel"
|
||||
follows="left|top"
|
||||
height="26">
|
||||
<text
|
||||
name="connection_error_text"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
top="3"
|
||||
left="12"
|
||||
width="250"
|
||||
height="20"
|
||||
wrap="true"
|
||||
halign="left"
|
||||
valign="center"
|
||||
text_color="Yellow"
|
||||
font="SansSerif">
|
||||
Problem Connecting to Facebook
|
||||
</text>
|
||||
<loading_indicator
|
||||
follows="left|top"
|
||||
height="24"
|
||||
|
|
@ -66,7 +81,7 @@
|
|||
left="9"
|
||||
visible="true"/>
|
||||
<text
|
||||
name="connection_status_text"
|
||||
name="connection_loading_text"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
top="3"
|
||||
|
|
@ -77,7 +92,7 @@
|
|||
halign="left"
|
||||
valign="center"
|
||||
font="SansSerif">
|
||||
Test text
|
||||
Connecting to Facebook...
|
||||
</text>
|
||||
</panel>
|
||||
</floater>
|
||||
|
|
|
|||
Loading…
Reference in New Issue