CHUI-835 (ctrl-h does not select nearby chat conversation in list): Modified setVisibleAndFrontMost() to now take a arguement for the key that was pressed (if one was pressed). This allows the floater to select the converation line item when becoming visible/frontmost.
parent
014376b49a
commit
24e650b403
|
|
@ -1621,7 +1621,7 @@ void LLFloater::bringToFront( S32 x, S32 y )
|
|||
|
||||
|
||||
// virtual
|
||||
void LLFloater::setVisibleAndFrontmost(BOOL take_focus)
|
||||
void LLFloater::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key)
|
||||
{
|
||||
LLMultiFloater* hostp = getHost();
|
||||
if (hostp)
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ public:
|
|||
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); // do not override
|
||||
|
||||
void setFrontmost(BOOL take_focus = TRUE);
|
||||
virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE);
|
||||
virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD());
|
||||
|
||||
// Defaults to false.
|
||||
virtual BOOL canSaveAs() const { return FALSE; }
|
||||
|
|
|
|||
|
|
@ -488,12 +488,12 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
|
|||
{
|
||||
host->setMinimized(FALSE);
|
||||
instance->openFloater(key);
|
||||
instance->setVisibleAndFrontmost();
|
||||
instance->setVisibleAndFrontmost(true, key);
|
||||
}
|
||||
else if (!instance->getVisible())
|
||||
{
|
||||
instance->openFloater(key);
|
||||
instance->setVisibleAndFrontmost();
|
||||
instance->setVisibleAndFrontmost(true, key);
|
||||
instance->setFocus(TRUE);
|
||||
}
|
||||
else
|
||||
|
|
@ -506,16 +506,16 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
|
|||
if (instance->isMinimized())
|
||||
{
|
||||
instance->setMinimized(FALSE);
|
||||
instance->setVisibleAndFrontmost();
|
||||
instance->setVisibleAndFrontmost(true, key);
|
||||
}
|
||||
else if (!instance->isShown())
|
||||
{
|
||||
instance->openFloater(key);
|
||||
instance->setVisibleAndFrontmost();
|
||||
instance->setVisibleAndFrontmost(true, key);
|
||||
}
|
||||
else if (!instance->isFrontmost())
|
||||
{
|
||||
instance->setVisibleAndFrontmost();
|
||||
instance->setVisibleAndFrontmost(true, key);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -257,6 +257,17 @@ void LLFloaterIMNearbyChat::setVisible(BOOL visible)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterIMNearbyChat::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key)
|
||||
{
|
||||
LLFloaterIMSessionTab::setVisibleAndFrontmost(take_focus, key);
|
||||
|
||||
if(!isTornOff() && matchesKey(key))
|
||||
{
|
||||
LLFloaterIMContainer::getInstance()->selectConversationPair(mSessionID, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLFloaterIMNearbyChat::onTearOffClicked()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ public:
|
|||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
/*virtual*/ void setVisible(BOOL visible);
|
||||
/*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD());
|
||||
/*virtual*/ void closeHostedFloater();
|
||||
|
||||
void loadHistory();
|
||||
|
|
|
|||
Loading…
Reference in New Issue