1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #3348

a68366 (1):
      fix(widget): open a chat window instead of contacts list in multi-window mode
This commit is contained in:
sudden6 2016-06-08 22:35:24 +02:00
commit e8a4599f69
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -1189,8 +1189,28 @@ bool Widget::newFriendMessageAlert(int friendId, bool sound)
}
else
{
currentWindow = window();
hasActive = f->getFriendWidget() == activeChatroomWidget;
if (Settings::getInstance().getSeparateWindow())
{
if (Settings::getInstance().getDontGroupWindows())
{
contentDialog = createContentDialog();
}
else
{
contentDialog = ContentDialog::current();
if (!contentDialog)
contentDialog = createContentDialog();
}
addFriendDialog(f, contentDialog);
currentWindow = contentDialog->window();
hasActive = ContentDialog::isFriendWidgetActive(friendId);
}
else
{
currentWindow = window();
hasActive = f->getFriendWidget() == activeChatroomWidget;
}
}
if (newMessageAlert(currentWindow, hasActive, sound))
@ -1391,7 +1411,6 @@ void Widget::updateScroll(GenericChatroomWidget *widget) {
ContentDialog* Widget::createContentDialog() const
{
ContentDialog* contentDialog = new ContentDialog(settingsWidget);
contentDialog->show();
#ifdef Q_OS_MAC
connect(contentDialog, &ContentDialog::destroyed, &Nexus::getInstance(), &Nexus::updateWindowsClosed);
connect(contentDialog, &ContentDialog::windowStateChanged, &Nexus::getInstance(), &Nexus::onWindowStateChanged);