diff options
-rw-r--r-- | indra/newview/llimconversation.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llimconversation.h | 1 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.h | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_im_session.xml | 1 |
5 files changed, 30 insertions, 25 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index 3c6c5c3898..4774cc2d5a 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -219,16 +219,39 @@ void LLIMConversation::updateHeaderAndToolbar() { bool is_hosted = getHost() != NULL; - if (is_hosted) + if (mWasHosted != is_hosted) { - for (S32 i = 0; i < BUTTON_COUNT; i++) + mWasHosted = is_hosted; + LLView* floater_contents = getChild<LLView>("contents_view"); + LLRect contents_rect = floater_contents->getRect(); + + if (is_hosted) { - if (mButtons[i]) + for (S32 i = 0; i < BUTTON_COUNT; i++) { - // Hide the standard header buttons in a docked IM floater. - mButtons[i]->setVisible(false); + if (mButtons[i]) + { + // Hide the standard header buttons in a docked IM floater. + mButtons[i]->setVisible(false); + } } + + // we don't show the header when the floater is hosted, so reshape floater contents + // to occupy the header space. + LLRect floater_rect = getRect(); + contents_rect.setOriginAndSize( + contents_rect.mLeft, + contents_rect.mBottom, + floater_rect.getWidth(), + floater_rect.getHeight()); } + else + { + // reduce the floater contents height by header height + contents_rect.mTop -= getHeaderHeight(); + } + + floater_contents->setShape(contents_rect); } // Participant list should be visible only in torn off floaters. diff --git a/indra/newview/llimconversation.h b/indra/newview/llimconversation.h index 682779a44b..19d1e523f0 100644 --- a/indra/newview/llimconversation.h +++ b/indra/newview/llimconversation.h @@ -91,6 +91,7 @@ protected: bool mIsNearbyChat; bool mIsP2PChat; + bool mWasHosted; LLLayoutPanel* mParticipantListPanel; LLParticipantList* mParticipantList; diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index f54b3672e5..bf0fc2f6c0 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -154,12 +154,6 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, // Add a conversation list item in the left pane addConversationListItem(floaterp->getTitle(), session_id, floaterp); - LLView* floater_contents = floaterp->getChild<LLView>("contents_view"); - - // we don't show the header when the floater is hosted, - // so reshape floater contents to occupy the header space - floater_contents->setShape(floaterp->getRect()); - LLIconCtrl* icon = 0; if(gAgent.isInGroup(session_id, TRUE)) @@ -185,19 +179,6 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, mTabContainer->setTabImage(floaterp, icon); } -// virtual -void LLIMFloaterContainer::removeFloater(LLFloater* floaterp) -{ - LLMultiFloater::removeFloater(floaterp); - - LLRect contents_rect = floaterp->getRect(); - - // reduce the floater contents height by header height - contents_rect.mTop -= floaterp->getHeaderHeight(); - - LLView* floater_contents = floaterp->getChild<LLView>("contents_view"); - floater_contents->setShape(contents_rect); -} void LLIMFloaterContainer::onCloseFloater(LLUUID& id) { diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index 0d988b5b73..b624b7558a 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -220,7 +220,6 @@ public: /*virtual*/ void addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); - /*virtual*/ void removeFloater(LLFloater* floaterp); /*virtual*/ void tabClose(); diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 32eb4ebdae..95f6708e96 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -9,6 +9,7 @@ can_dock="false" can_minimize="true" can_close="true" + save_rect="true" visible="false" width="394" can_resize="true" |