mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #137 from F1ynn/Misc-GUI-stuff
Fix status on F1ynn's theme, notify on non-active window (like uTox)
This commit is contained in:
commit
8599fb4a5a
|
@ -575,7 +575,7 @@ void Widget::onFriendMessageReceived(int friendId, const QString& message)
|
||||||
if (activeFriendWidget != nullptr)
|
if (activeFriendWidget != nullptr)
|
||||||
{
|
{
|
||||||
Friend* f2 = FriendList::findFriend(activeFriendWidget->friendId);
|
Friend* f2 = FriendList::findFriend(activeFriendWidget->friendId);
|
||||||
if (((f->friendId != f2->friendId) || isFriendWidgetActive == 0) || isWindowMinimized)
|
if (((f->friendId != f2->friendId) || isFriendWidgetActive == 0) || isWindowMinimized || !isActiveWindow())
|
||||||
{
|
{
|
||||||
f->hasNewMessages = 1;
|
f->hasNewMessages = 1;
|
||||||
newMessageAlert();
|
newMessageAlert();
|
||||||
|
@ -667,7 +667,7 @@ void Widget::onGroupMessageReceived(int groupnumber, int friendgroupnumber, cons
|
||||||
|
|
||||||
g->chatForm->addGroupMessage(message, friendgroupnumber);
|
g->chatForm->addGroupMessage(message, friendgroupnumber);
|
||||||
|
|
||||||
if ((isGroupWidgetActive != 1 || (g->groupId != activeGroupWidget->groupId)) || isWindowMinimized)
|
if ((isGroupWidgetActive != 1 || (g->groupId != activeGroupWidget->groupId)) || isWindowMinimized || !isActiveWindow())
|
||||||
{
|
{
|
||||||
if (message.contains(core->getUsername(), Qt::CaseInsensitive))
|
if (message.contains(core->getUsername(), Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
|
@ -769,8 +769,8 @@ Group *Widget::createGroup(int groupId)
|
||||||
QWidget* widget = ui->friendList->widget();
|
QWidget* widget = ui->friendList->widget();
|
||||||
QLayout* layout = widget->layout();
|
QLayout* layout = widget->layout();
|
||||||
layout->addWidget(newgroup->widget);
|
layout->addWidget(newgroup->widget);
|
||||||
if (useNativeTheme)
|
if (!useNativeTheme)
|
||||||
newgroup->widget->statusPic.setPixmap(QPixmap(":img/status/dot_online.png"));
|
newgroup->widget->statusPic.setPixmap(QPixmap(":img/status/dot_groupchat.png"));
|
||||||
updateFriendListWidth();
|
updateFriendListWidth();
|
||||||
connect(newgroup->widget, SIGNAL(groupWidgetClicked(GroupWidget*)), this, SLOT(onGroupWidgetClicked(GroupWidget*)));
|
connect(newgroup->widget, SIGNAL(groupWidgetClicked(GroupWidget*)), this, SLOT(onGroupWidgetClicked(GroupWidget*)));
|
||||||
connect(newgroup->widget, SIGNAL(removeGroup(int)), this, SLOT(removeGroup(int)));
|
connect(newgroup->widget, SIGNAL(removeGroup(int)), this, SLOT(removeGroup(int)));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user