Skip to content
Snippets Groups Projects
Commit e2824864 authored by AlexanderP ProductEngine's avatar AlexanderP ProductEngine
Browse files

CHUI-105 WIP Hide an additional close button for undocked state of an IM floater

parent 0ed7966b
No related branches found
No related tags found
No related merge requests found
...@@ -391,6 +391,12 @@ BOOL LLIMFloater::postBuild() ...@@ -391,6 +391,12 @@ BOOL LLIMFloater::postBuild()
} }
} }
void LLIMFloater::onTearOffClicked(LLIMFloater* self)
{
onClickTearOff(self);
updateTitleButtons();
}
void LLIMFloater::boundVoiceChannel() void LLIMFloater::boundVoiceChannel()
{ {
LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID); LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID);
...@@ -1377,6 +1383,7 @@ void LLIMFloater::updateTitleButtons() ...@@ -1377,6 +1383,7 @@ void LLIMFloater::updateTitleButtons()
} }
bool is_hosted = getHost() != NULL; bool is_hosted = getHost() != NULL;
if (is_hosted) ///< floater is hosted if (is_hosted) ///< floater is hosted
{ {
for (S32 i = 0; i < BUTTON_COUNT; i++) for (S32 i = 0; i < BUTTON_COUNT; i++)
...@@ -1391,6 +1398,7 @@ void LLIMFloater::updateTitleButtons() ...@@ -1391,6 +1398,7 @@ void LLIMFloater::updateTitleButtons()
} }
mExpandCollapseBtn->setImageOverlay(getString("collapse_icon")); mExpandCollapseBtn->setImageOverlay(getString("collapse_icon"));
} }
else ///< floater is torn off else ///< floater is torn off
{ {
...@@ -1403,6 +1411,8 @@ void LLIMFloater::updateTitleButtons() ...@@ -1403,6 +1411,8 @@ void LLIMFloater::updateTitleButtons()
} }
} }
getChild<LLButton>("close_btn")->setVisible(is_hosted);
LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSessionID); LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSessionID);
if (session) if (session)
{ {
......
...@@ -93,6 +93,7 @@ class LLIMFloater ...@@ -93,6 +93,7 @@ class LLIMFloater
// called when docked floater's position has been set by chiclet // called when docked floater's position has been set by chiclet
void setPositioned(bool b) { mPositioned = b; }; void setPositioned(bool b) { mPositioned = b; };
void onVisibilityChange(const LLSD& new_visibility); void onVisibilityChange(const LLSD& new_visibility);
// Implements LLVoiceClientStatusObserver::onChange() to enable the call // Implements LLVoiceClientStatusObserver::onChange() to enable the call
...@@ -139,6 +140,8 @@ class LLIMFloater ...@@ -139,6 +140,8 @@ class LLIMFloater
/* virtual */ void onFocusLost(); /* virtual */ void onFocusLost();
/* virtual */ void onFocusReceived(); /* virtual */ void onFocusReceived();
void onTearOffClicked(LLIMFloater *self);
// Update the window title, input field help text, etc. // Update the window title, input field help text, etc.
void updateSessionName(const std::string& ui_title, const std::string& ui_label); void updateSessionName(const std::string& ui_title, const std::string& ui_label);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment