summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authordmitrykproductengine <none@none>2013-09-13 14:40:22 +0300
committerdmitrykproductengine <none@none>2013-09-13 14:40:22 +0300
commite3963666fd54f5cb1b43bc70b77660079bad5ab5 (patch)
tree93585cc34acfd190f8e1e5233885f1d11e336670 /indra/newview
parenta6c4863a6a14123d59955ad8fb0df82a8ac74faf (diff)
MAINT-3133 FIXED Expand Nearby Chat participant list on first open of Conversations floater, per login session
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/settings_per_account.xml11
-rwxr-xr-xindra/newview/llfloaterimcontainer.cpp19
-rwxr-xr-xindra/newview/llfloaterimcontainer.h1
3 files changed, 31 insertions, 0 deletions
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 636caf5ef3..500151c935 100755
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -77,6 +77,17 @@
<key>Value</key>
<integer>412</integer>
</map>
+ <key>ConversationsParticipantListCollapsed</key>
+ <map>
+ <key>Comment</key>
+ <string>Stores the expanded/collapsed state of Nearby chat participant list</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>true</integer>
+ </map>
<key>InstantMessageLogPath</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 2b4585cc47..3ef0cc63b1 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -101,6 +101,7 @@ LLFloaterIMContainer::~LLFloaterIMContainer()
gSavedPerAccountSettings.setBOOL("ConversationsListPaneCollapsed", mConversationsPane->isCollapsed());
gSavedPerAccountSettings.setBOOL("ConversationsMessagePaneCollapsed", mMessagesPane->isCollapsed());
+ gSavedPerAccountSettings.setBOOL("ConversationsParticipantListCollapsed", !isParticipantListExpanded());
if (!LLSingleton<LLIMMgr>::destroyed())
{
@@ -250,6 +251,11 @@ BOOL LLFloaterIMContainer::postBuild()
// Init the sort order now that the root had been created
setSortOrder(LLConversationSort(gSavedSettings.getU32("ConversationSortOrder")));
+ //We should expand nearby chat participants list for the new user
+ if(gAgent.isFirstLogin() || !gSavedPerAccountSettings.getBOOL("ConversationsParticipantListCollapsed"))
+ {
+ expandConversation();
+ }
// Keep the xml set title around for when we have to overwrite it
mGeneralTitle = getTitle();
@@ -2082,6 +2088,19 @@ void LLFloaterIMContainer::expandConversation()
}
}
}
+bool LLFloaterIMContainer::isParticipantListExpanded()
+{
+ bool is_expanded = false;
+ if(!mConversationsPane->isCollapsed())
+ {
+ LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,getSelectedSession()));
+ if (widget)
+ {
+ is_expanded = widget->isOpen();
+ }
+ }
+ return is_expanded;
+}
// By default, if torn off session is currently frontmost, LLFloater::isFrontmost() will return FALSE, which can lead to some bugs
// So LLFloater::isFrontmost() is overriden here to check both selected session and the IM floater itself
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index a118ab51d2..5d88b7881a 100755
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -172,6 +172,7 @@ private:
void toggleAllowTextChat(const LLUUID& participant_uuid);
void toggleMute(const LLUUID& participant_id, U32 flags);
void openNearbyChat();
+ bool isParticipantListExpanded();
LLButton* mExpandCollapseBtn;
LLButton* mStubCollapseBtn;