diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llimfloater.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llimfloater.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index cb489627fb..1ca3545aae 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -391,6 +391,12 @@ BOOL LLIMFloater::postBuild() } } +void LLIMFloater::onTearOffClicked(LLIMFloater* self) +{ + onClickTearOff(self); + updateTitleButtons(); +} + void LLIMFloater::boundVoiceChannel() { LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID); @@ -1377,6 +1383,7 @@ void LLIMFloater::updateTitleButtons() } bool is_hosted = getHost() != NULL; + if (is_hosted) ///< floater is hosted { for (S32 i = 0; i < BUTTON_COUNT; i++) @@ -1391,6 +1398,7 @@ void LLIMFloater::updateTitleButtons() } mExpandCollapseBtn->setImageOverlay(getString("collapse_icon")); + } else ///< floater is torn off { @@ -1403,6 +1411,8 @@ void LLIMFloater::updateTitleButtons() } } + getChild<LLButton>("close_btn")->setVisible(is_hosted); + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSessionID); if (session) { diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index 60b392952f..03f52fb316 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -93,6 +93,7 @@ public: // called when docked floater's position has been set by chiclet void setPositioned(bool b) { mPositioned = b; }; + void onVisibilityChange(const LLSD& new_visibility); // Implements LLVoiceClientStatusObserver::onChange() to enable the call @@ -139,6 +140,8 @@ private: /* virtual */ void onFocusLost(); /* virtual */ void onFocusReceived(); + void onTearOffClicked(LLIMFloater *self); + // Update the window title, input field help text, etc. void updateSessionName(const std::string& ui_title, const std::string& ui_label); |