diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-03-27 10:29:23 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-03-27 10:29:23 -0700 |
commit | ba757c18f83ce36a0420832f158cac6c760104e0 (patch) | |
tree | 88a9615315b775446bece7f5110a0df1eb76c91e /indra | |
parent | 04372382d69705979fd54fc2131ba09dbc9473dc (diff) | |
parent | 9e180d9c8f05349a67797db85cca3f978e81b5ce (diff) |
merge
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/settings_per_account.xml | 11 | ||||
-rw-r--r-- | indra/newview/llfloaterimsessiontab.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llfloaterimsessiontab.h | 1 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 6 |
4 files changed, 34 insertions, 4 deletions
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index ada374f892..590f41283b 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -292,6 +292,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>NearbyChatIsNotCollapsed</key> + <map> + <key>Comment</key> + <string>Saving expanded/collapsed state of the nearby chat between sessions</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>ShowFavoritesOnLogin</key> <map> <key>Comment</key> diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index d15c73a4a3..64c1f50074 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -132,6 +132,12 @@ void LLFloaterIMSessionTab::setVisible(BOOL visible) LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container")->setVisible(true); } LLFloaterIMSessionTab::addToHost(mSessionID); + LLFloaterIMSessionTab* conversp = LLFloaterIMSessionTab::getConversation(mSessionID); + + if (conversp && conversp->isNearbyChat() && gSavedPerAccountSettings.getBOOL("NearbyChatIsNotCollapsed")) + { + onCollapseToLine(this); + } mInputButtonPanel->setVisible(isTornOff()); } @@ -356,7 +362,7 @@ void LLFloaterIMSessionTab::draw() // Restart the refresh timer mRefreshTimer->setTimerExpirySec(REFRESH_INTERVAL); } - + LLTransientDockableFloater::draw(); } @@ -866,7 +872,7 @@ void LLFloaterIMSessionTab::reshapeFloater(bool collapse) enableResizeCtrls(true, true, true); } - + saveCollapsedState(); setShape(floater_rect, true); mBodyStack->updateLayout(); @@ -876,6 +882,7 @@ void LLFloaterIMSessionTab::restoreFloater() { if(checkIfTornOff() && !isMessagePaneExpanded()) { + if(isMinimized()) { setMinimized(false); @@ -888,6 +895,7 @@ void LLFloaterIMSessionTab::restoreFloater() mBodyStack->updateLayout(); mExpandCollapseLineBtn->setImageOverlay(getString("expandline_icon")); setMessagePaneExpanded(true); + saveCollapsedState(); enableResizeCtrls(true, true, true); } } @@ -1063,6 +1071,14 @@ LLConversationItem* LLFloaterIMSessionTab::getCurSelectedViewModelItem() return conversationItem; } +void LLFloaterIMSessionTab::saveCollapsedState() +{ + LLFloaterIMSessionTab* conversp = LLFloaterIMSessionTab::getConversation(mSessionID); + if(conversp->isNearbyChat()) + { + gSavedPerAccountSettings.setBOOL("NearbyChatIsNotCollapsed", isMessagePaneExpanded()); + } +} BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) { if(mask == MASK_ALT) diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index f0899a3c09..c7e73bd70d 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -101,6 +101,7 @@ public: bool isMessagePaneExpanded(){return mMessagePaneExpanded;} void setMessagePaneExpanded(bool expanded){mMessagePaneExpanded = expanded;} void restoreFloater(); + void saveCollapsedState(); protected: diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index a84dbcd84a..ca04d27d11 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -224,8 +224,9 @@ void on_new_message(const LLSD& msg) // actions: // 0. nothing - exit - if ("none" == user_preferences || + if (("none" == user_preferences || ON_TOP_AND_ITEM_IS_SELECTED == conversations_floater_status) + && session_floater->isMessagePaneExpanded()) { return; } @@ -294,9 +295,10 @@ void on_new_message(const LLSD& msg) } // 4. Toast - if ("toast" == user_preferences && + if (("toast" == user_preferences && (CLOSED == conversations_floater_status || NOT_ON_TOP == conversations_floater_status)) + || !session_floater->isMessagePaneExpanded()) { //Show IM toasts (upper right toasts) // Skip toasting for system messages and for nearby chat |