viewer#2296 Don't show 'are you sure you want to leave the call' when shutting down

master
Andrey Kleshchev 2024-08-16 19:27:48 +03:00 committed by Andrey Kleshchev
parent 2a81ebba53
commit 7cc3ff55b9
5 changed files with 20 additions and 5 deletions

View File

@ -1926,6 +1926,14 @@ void LLFloater::onClickClose( LLFloater* self )
self->onClickCloseBtn();
}
// static
void LLFloater::onClickClose(LLFloater* self, bool app_quitting)
{
if (!self)
return;
self->onClickCloseBtn(app_quitting);
}
void LLFloater::onClickCloseBtn(bool app_quitting)
{
closeFloater(false);

View File

@ -363,6 +363,7 @@ public:
// }
static void onClickClose(LLFloater* floater);
static void onClickClose(LLFloater* floater, bool app_quitting);
static void onClickMinimize(LLFloater* floater);
static void onClickTearOff(LLFloater* floater);
static void onClickDock(LLFloater* floater);

View File

@ -2432,7 +2432,7 @@ void LLFloaterIMContainer::closeHostedFloater()
onClickCloseBtn();
}
void LLFloaterIMContainer::closeAllConversations()
void LLFloaterIMContainer::closeAllConversations(bool app_quitting)
{
std::vector<LLUUID> ids;
for (conversations_items_map::iterator it_session = mConversationsItems.begin(); it_session != mConversationsItems.end(); it_session++)
@ -2447,7 +2447,7 @@ void LLFloaterIMContainer::closeAllConversations()
for (std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
{
LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(*it);
LLFloater::onClickClose(conversationFloater);
LLFloater::onClickClose(conversationFloater, app_quitting);
}
}
@ -2470,7 +2470,7 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
{
if(app_quitting)
{
closeAllConversations();
closeAllConversations(app_quitting);
onClickCloseBtn(app_quitting);
}
else

View File

@ -117,7 +117,7 @@ public:
void assignResizeLimits();
virtual bool handleKeyHere(KEY key, MASK mask );
/*virtual*/ void closeFloater(bool app_quitting = false);
void closeAllConversations();
void closeAllConversations(bool app_quitting);
void closeSelectedConversations(const uuid_vec_t& ids);
/*virtual*/ bool isFrontmost();

View File

@ -138,8 +138,14 @@ void LLFloaterIMSession::onTearOffClicked()
}
// virtual
void LLFloaterIMSession::onClickCloseBtn(bool)
void LLFloaterIMSession::onClickCloseBtn(bool app_qutting)
{
if (app_qutting)
{
LLFloaterIMSessionTab::onClickCloseBtn();
return;
}
LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSessionID);
if (session != NULL)