Feature Request/Bug Fix: On login, open Local Chat, Communicate, and Contacts if they were open last session.

This commit is contained in:
Inusaito Sayori
2014-04-21 18:31:41 -04:00
parent 4230127459
commit 4a3763d8d1
5 changed files with 27 additions and 9 deletions

View File

@@ -14606,6 +14606,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>ShowContacts</key>
<map>
<key>Comment</key>
<string/>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<boolean>0</boolean>
</map>
<key>ShowConsoleWindow</key>
<map>
<key>Comment</key>

View File

@@ -102,13 +102,6 @@ LLFloaterChat::~LLFloaterChat()
// Children all cleaned up by default view destructor.
}
void LLFloaterChat::setVisible(BOOL visible)
{
LLFloater::setVisible( visible );
gSavedSettings.setBOOL("ShowChatHistory", visible);
}
void LLFloaterChat::draw()
{
// enable say and shout only when text available
@@ -140,6 +133,11 @@ BOOL LLFloaterChat::postBuild()
return TRUE;
}
void LLFloaterChat::onOpen()
{
gSavedSettings.setBOOL("ShowChatHistory", true);
}
// public virtual
void LLFloaterChat::onClose(bool app_quitting)
{

View File

@@ -59,9 +59,9 @@ public:
LLFloaterChat(const LLSD& seed);
~LLFloaterChat();
virtual void setVisible( BOOL b );
virtual void draw();
virtual BOOL postBuild();
virtual void onOpen();
virtual void onClose(bool app_quitting);
virtual void onFocusReceived();
virtual void handleVisibilityChange(BOOL cur_visibility);

View File

@@ -78,9 +78,14 @@ BOOL LLFloaterMyFriends::postBuild()
return TRUE;
}
void LLFloaterMyFriends::onOpen()
{
gSavedSettings.setBOOL("ShowContacts", true);
}
void LLFloaterMyFriends::onClose(bool app_quitting)
{
if (!app_quitting) gSavedSettings.setBOOL("ShowContacts", false);
setVisible(FALSE);
}
@@ -113,6 +118,7 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) :
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chatterbox_wolf.xml", NULL, FALSE);
}
if (gSavedSettings.getBOOL("ShowCommunicate")) open();
if (gSavedSettings.getBOOL("ContactsTornOff"))
{
@@ -122,6 +128,7 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) :
removeFloater(floater_contacts);
// reparent to floater view
gFloaterView->addChild(floater_contacts);
if (gSavedSettings.getBOOL("ShowContacts")) floater_contacts->open();
}
else
{
@@ -136,6 +143,7 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) :
removeFloater(floater_chat);
// reparent to floater view
gFloaterView->addChild(floater_chat);
if (gSavedSettings.getBOOL("ShowChatHistory")) floater_chat->open();
}
else
{

View File

@@ -126,7 +126,8 @@ public:
virtual BOOL postBuild();
void onClose(bool app_quitting);
virtual void onOpen();
virtual void onClose(bool app_quitting);
static void* createFriendsPanel(void* data);
static void* createGroupsPanel(void* data);