CHUI-362 WIP (Torn off conversation name is highlighted when selected in conversation list with different conversation showing in message panel): implemented the stub panel and a control of it's visibility

meow-7.2.2
AlexanderP ProductEngine 2012-11-09 17:04:21 +02:00
parent 2813e49d19
commit 3d42133ecb
4 changed files with 57 additions and 1 deletions

View File

@ -141,6 +141,8 @@ BOOL LLFloaterIMContainer::postBuild()
// mTabContainer will be initialized in LLMultiFloater::addChild()
setTabContainer(getChild<LLTabContainer>("im_box_tab_container"));
mStubPanel = getChild<LLPanel>("stub_panel");
mStubTextBox = getChild<LLTextBox>("stub_textbox");
mConversationsStack = getChild<LLLayoutStack>("conversations_stack");
mConversationsPane = getChild<LLLayoutPanel>("conversations_layout_panel");
@ -494,6 +496,16 @@ void LLFloaterIMContainer::tabClose()
}
}
void LLFloaterIMContainer::showStub(bool stub_is_visible)
{
if (stub_is_visible)
{
mTabContainer->hideAllTabs();
}
mStubPanel->setVisible(stub_is_visible);
}
void LLFloaterIMContainer::setVisible(BOOL visible)
{ LLFloaterIMNearbyChat* nearby_chat;
if (visible)

View File

@ -71,6 +71,7 @@ public:
BOOL selectConversationPair(const LLUUID& session_id, bool select_widget);
/*virtual*/ void tabClose();
void showStub(bool visible);
static LLFloater* getCurrentVoiceFloater();
static LLFloaterIMContainer* findInstance();
@ -146,6 +147,8 @@ private:
void openNearbyChat();
LLButton* mExpandCollapseBtn;
LLPanel* mStubPanel;
LLTextBox* mStubTextBox;
LLLayoutPanel* mMessagesPane;
LLLayoutPanel* mConversationsPane;
LLLayoutStack* mConversationsStack;

View File

@ -313,6 +313,7 @@ void LLFloaterIMSessionTab::onFocusReceived()
if (container)
{
container->selectConversationPair(mSessionID, true);
container->showStub(! getHost());
}
}

View File

@ -124,7 +124,47 @@
left="0"
name="im_box_tab_container"
top="0"
width="412"/>
width="412">
<panel
follows="all"
layout="topleft"
name="stub_panel"
opaque="true"
top_pad="0"
left="0"
height="430"
width="412">
<text
type="string"
clip_partial="false"
follows="left|top"
layout="topleft"
left="20"
right="-20"
name="stub_textbox_1"
top="10"
height="20"
valign="center"
wrap="true">
This conversation is in a separate window.
</text>
<text
type="string"
clip_partial="false"
follows="left|top"
layout="topleft"
left="20"
right="-20"
name="stub_textbox_2"
top="40"
height="20"
valign="center"
parse_urls="false"
wrap="true">
Bring it back.
</text>
</panel>
</panel_container>
</layout_panel>
</layout_stack>
</multi_floater>