Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(widget): open a chat window instead of contacts list in multi-win…
Browse files Browse the repository at this point in the history
…dow mode

Closes #3212
  • Loading branch information
a68366 committed Jun 3, 2016
1 parent 431a10f commit fdf0cbb
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions src/widget/widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1188,8 +1188,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))
Expand Down Expand Up @@ -1390,7 +1410,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);
Expand Down

0 comments on commit fdf0cbb

Please sign in to comment.