mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix #104
This commit is contained in:
parent
cfbc73e435
commit
7d15ae48aa
|
@ -642,12 +642,18 @@ void Widget::onGroupMessageReceived(int groupnumber, int friendgroupnumber, cons
|
||||||
newMessageAlert();
|
newMessageAlert();
|
||||||
g->hasNewMessages = 1;
|
g->hasNewMessages = 1;
|
||||||
g->userWasMentioned = 1;
|
g->userWasMentioned = 1;
|
||||||
|
if (useNativeTheme)
|
||||||
|
g->widget->statusPic.setPixmap(QPixmap(":img/status/dot_online_notification.png"));
|
||||||
|
else
|
||||||
g->widget->statusPic.setPixmap(QPixmap(":img/status/dot_groupchat_notification.png"));
|
g->widget->statusPic.setPixmap(QPixmap(":img/status/dot_groupchat_notification.png"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (g->hasNewMessages == 0)
|
if (g->hasNewMessages == 0)
|
||||||
{
|
{
|
||||||
g->hasNewMessages = 1;
|
g->hasNewMessages = 1;
|
||||||
|
if (useNativeTheme)
|
||||||
|
g->widget->statusPic.setPixmap(QPixmap(":img/status/dot_online_notification.png"));
|
||||||
|
else
|
||||||
g->widget->statusPic.setPixmap(QPixmap(":img/status/dot_groupchat_newmessages.png"));
|
g->widget->statusPic.setPixmap(QPixmap(":img/status/dot_groupchat_newmessages.png"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -692,6 +698,9 @@ void Widget::onGroupWidgetClicked(GroupWidget* widget)
|
||||||
{
|
{
|
||||||
g->hasNewMessages = 0;
|
g->hasNewMessages = 0;
|
||||||
g->userWasMentioned = 0;
|
g->userWasMentioned = 0;
|
||||||
|
if (useNativeTheme)
|
||||||
|
g->widget->statusPic.setPixmap(QPixmap(":img/status/dot_online.png"));
|
||||||
|
else
|
||||||
g->widget->statusPic.setPixmap(QPixmap(":img/status/dot_groupchat.png"));
|
g->widget->statusPic.setPixmap(QPixmap(":img/status/dot_groupchat.png"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -728,6 +737,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)
|
||||||
|
newgroup->widget->statusPic.setPixmap(QPixmap(":img/status/dot_online.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)));
|
||||||
|
@ -795,6 +806,9 @@ bool Widget::event(QEvent * e)
|
||||||
Group* g = GroupList::findGroup(activeGroupWidget->groupId);
|
Group* g = GroupList::findGroup(activeGroupWidget->groupId);
|
||||||
g->hasNewMessages = 0;
|
g->hasNewMessages = 0;
|
||||||
g->userWasMentioned = 0;
|
g->userWasMentioned = 0;
|
||||||
|
if (useNativeTheme)
|
||||||
|
g->widget->statusPic.setPixmap(QPixmap(":img/status/dot_online.png"));
|
||||||
|
else
|
||||||
g->widget->statusPic.setPixmap(QPixmap(":img/status/dot_groupchat.png"));
|
g->widget->statusPic.setPixmap(QPixmap(":img/status/dot_groupchat.png"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user