EXP-1452 FIX minimum height of NEARBY CHAT window can be circumvented by minimizing it.
parent
d86def6f03
commit
b6b463dd39
|
|
@ -60,13 +60,9 @@ static const S32 RESIZE_BAR_THICKNESS = 3;
|
|||
|
||||
static LLRegisterPanelClassWrapper<LLNearbyChat> t_panel_nearby_chat("panel_nearby_chat");
|
||||
|
||||
LLNearbyChat::LLNearbyChat()
|
||||
: LLPanel()
|
||||
,mChatHistory(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
LLNearbyChat::~LLNearbyChat()
|
||||
LLNearbyChat::LLNearbyChat(const LLNearbyChat::Params& p)
|
||||
: LLPanel(p),
|
||||
mChatHistory(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -178,15 +174,20 @@ bool LLNearbyChat::onNearbyChatCheckContextMenuItem(const LLSD& userdata)
|
|||
return false;
|
||||
}
|
||||
|
||||
void LLNearbyChat::removeScreenChat()
|
||||
{
|
||||
LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
|
||||
if(chat_channel)
|
||||
{
|
||||
chat_channel->removeToastsFromChannel();
|
||||
}
|
||||
}
|
||||
|
||||
void LLNearbyChat::setVisible(BOOL visible)
|
||||
{
|
||||
if(visible)
|
||||
{
|
||||
LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
|
||||
if(chat_channel)
|
||||
{
|
||||
chat_channel->removeToastsFromChannel();
|
||||
}
|
||||
removeScreenChat();
|
||||
}
|
||||
|
||||
LLPanel::setVisible(visible);
|
||||
|
|
|
|||
|
|
@ -37,8 +37,7 @@ class LLChatHistory;
|
|||
class LLNearbyChat: public LLPanel
|
||||
{
|
||||
public:
|
||||
LLNearbyChat();
|
||||
~LLNearbyChat();
|
||||
LLNearbyChat(const Params& p = LLPanel::getDefaultParams());
|
||||
|
||||
BOOL postBuild ();
|
||||
|
||||
|
|
@ -63,13 +62,14 @@ public:
|
|||
void loadHistory();
|
||||
|
||||
static LLNearbyChat* getInstance();
|
||||
void removeScreenChat();
|
||||
|
||||
private:
|
||||
|
||||
void getAllowedRect (LLRect& rect);
|
||||
|
||||
void onNearbySpeakers ();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
LLHandle<LLView> mPopupMenuHandle;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#include "llviewerwindow.h"
|
||||
#include "llrootview.h"
|
||||
#include "llviewerchat.h"
|
||||
#include "llnearbychat.h"
|
||||
|
||||
#include "llresizehandle.h"
|
||||
|
||||
|
|
@ -401,11 +402,13 @@ void LLNearbyChatBar::onToggleNearbyChatPanel()
|
|||
|
||||
void LLNearbyChatBar::setMinimized(BOOL b)
|
||||
{
|
||||
if (b != LLFloater::isMinimized())
|
||||
LLNearbyChat* nearby_chat = getChild<LLNearbyChat>("nearby_chat");
|
||||
// when unminimizing with nearby chat visible, go ahead and kill off screen chats
|
||||
if (!b && nearby_chat->getVisible())
|
||||
{
|
||||
LLFloater::setMinimized(b);
|
||||
getChildView("nearby_chat")->setVisible(!b);
|
||||
nearby_chat->removeScreenChat();
|
||||
}
|
||||
LLFloater::setMinimized(b);
|
||||
}
|
||||
|
||||
void LLNearbyChatBar::onChatBoxCommit()
|
||||
|
|
|
|||
Loading…
Reference in New Issue