Browse Source

Merge pull request #3348

a68366 (1):
      fix(widget): open a chat window instead of contacts list in multi-window mode
pull/3368/merge
sudden6 9 years ago
parent
commit
e8a4599f69
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
  1. 25
      src/widget/widget.cpp

25
src/widget/widget.cpp

@ -1189,8 +1189,28 @@ bool Widget::newFriendMessageAlert(int friendId, bool sound) @@ -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) { @@ -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);

Loading…
Cancel
Save