CHUI-258: Adding a method to better whether nearby chat is visible or not.
parent
209fd15176
commit
b57d8e9c06
|
|
@ -419,6 +419,35 @@ void LLNearbyChat::show()
|
|||
setVisible(TRUE);
|
||||
}
|
||||
|
||||
bool LLNearbyChat::isChatVisible() const
|
||||
{
|
||||
bool isVisible = false;
|
||||
|
||||
if (isChatMultiTab())
|
||||
{
|
||||
LLIMFloaterContainer* im_box = LLIMFloaterContainer::getInstance();
|
||||
// Is the IM floater container ever null?
|
||||
llassert(im_box != NULL);
|
||||
if (im_box != NULL)
|
||||
{
|
||||
if (gSavedSettings.getBOOL("NearbyChatIsNotTornOff"))
|
||||
{
|
||||
isVisible = (im_box->getVisible() && !im_box->isMinimized());
|
||||
}
|
||||
else
|
||||
{
|
||||
isVisible = (getVisible() && !isMinimized());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
isVisible = (getVisible() && !isMinimized());
|
||||
}
|
||||
|
||||
return isVisible;
|
||||
}
|
||||
|
||||
void LLNearbyChat::showHistory()
|
||||
{
|
||||
openFloater();
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ public:
|
|||
|
||||
void addToHost();
|
||||
void show();
|
||||
bool isChatVisible() const;
|
||||
|
||||
/** @param archive true - to save a message to the chat history log */
|
||||
void addMessage (const LLChat& message,bool archive = true, const LLSD &args = LLSD());
|
||||
|
|
@ -99,8 +100,6 @@ protected:
|
|||
|
||||
/* virtual */ bool applyRectControl();
|
||||
|
||||
void onToggleNearbyChatPanel();
|
||||
|
||||
/*virtual*/ void onTearOffClicked();
|
||||
|
||||
static LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ bool LLTipHandler::processNotification(const LLNotificationPtr& notification)
|
|||
|
||||
// don't show toast if Nearby Chat is opened
|
||||
LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
|
||||
if (!nearby_chat->isMinimized() && nearby_chat->getVisible())
|
||||
if (nearby_chat->isChatVisible())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4204,6 +4204,8 @@ Are you sure you want to change the Estate Covenant?
|
|||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="RegionEntryAccessBlocked_Notify"
|
||||
log_to_im="false"
|
||||
log_to_chat="true"
|
||||
type="notifytip">
|
||||
<tag>fail</tag>
|
||||
The region you're trying to visit contains [REGIONMATURITY] content, but your current preferences are set to exclude [REGIONMATURITY] content.
|
||||
|
|
@ -4212,6 +4214,8 @@ The region you're trying to visit contains [REGIONMATURITY] content, but your cu
|
|||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="RegionEntryAccessBlocked_NotifyAdultsOnly"
|
||||
log_to_im="false"
|
||||
log_to_chat="true"
|
||||
type="notifytip">
|
||||
<tag>fail</tag>
|
||||
The region you're trying to visit contains [REGIONMATURITY] content, which is accessible to adults only.
|
||||
|
|
@ -4283,6 +4287,8 @@ The region you're trying to visit contains [REGIONMATURITY] content, but your cu
|
|||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="TeleportEntryAccessBlocked_Notify"
|
||||
log_to_im="false"
|
||||
log_to_chat="true"
|
||||
type="notifytip">
|
||||
<unique>
|
||||
<context>REGIONMATURITY</context>
|
||||
|
|
@ -4294,6 +4300,8 @@ The region you're trying to visit contains [REGIONMATURITY] content, but your cu
|
|||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="TeleportEntryAccessBlocked_NotifyAdultsOnly"
|
||||
log_to_im="false"
|
||||
log_to_chat="true"
|
||||
type="notifytip">
|
||||
<unique>
|
||||
<context>REGIONMATURITY</context>
|
||||
|
|
@ -4414,6 +4422,8 @@ You won't receive any more notifications that you're about to visit a region wit
|
|||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="LandClaimAccessBlocked_Notify"
|
||||
log_to_im="false"
|
||||
log_to_chat="true"
|
||||
type="notifytip">
|
||||
The land you're trying to claim contains [REGIONMATURITY] content, but your current preferences are set to exclude [REGIONMATURITY] content.
|
||||
<tag>fail</tag>
|
||||
|
|
@ -4422,6 +4432,8 @@ You won't receive any more notifications that you're about to visit a region wit
|
|||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="LandClaimAccessBlocked_NotifyAdultsOnly"
|
||||
log_to_im="false"
|
||||
log_to_chat="true"
|
||||
type="notifytip">
|
||||
<tag>fail</tag>
|
||||
The land you're trying to claim contains [REGIONMATURITY] content, which is accessible to adults only.
|
||||
|
|
@ -4479,6 +4491,8 @@ You won't receive any more notifications that you're about to visit a region wit
|
|||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="LandBuyAccessBlocked_Notify"
|
||||
log_to_im="false"
|
||||
log_to_chat="true"
|
||||
type="notifytip">
|
||||
The land you're trying to buy contains [REGIONMATURITY] content, but your current preferences are set to exclude [REGIONMATURITY] content.
|
||||
<tag>fail</tag>
|
||||
|
|
@ -4487,6 +4501,8 @@ You won't receive any more notifications that you're about to visit a region wit
|
|||
<notification
|
||||
icon="notifytip.tga"
|
||||
name="LandBuyAccessBlocked_NotifyAdultsOnly"
|
||||
log_to_im="false"
|
||||
log_to_chat="true"
|
||||
type="notifytip">
|
||||
<tag>fail</tag>
|
||||
The land you're trying to buy contains [REGIONMATURITY] content, which is accessible to adults only.
|
||||
|
|
|
|||
Loading…
Reference in New Issue