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

Added alerts and modified groupchat status light to better fit with theme

This commit is contained in:
Flynn 2014-06-27 18:35:39 -07:00
parent d92ae3c0fe
commit aab44382c5
5 changed files with 6 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 605 B

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 764 B

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 B

After

Width:  |  Height:  |  Size: 814 B

View File

@ -350,13 +350,13 @@ void Widget::onFriendMessageReceived(int friendId, const QString& message)
if ((f->friendId != f2->friendId) || isFriendWidgetActive == 0)
{
f->hasNewMessages = 1;
playMessageNotification();
newMessageAlert();
}
}
else
{
f->hasNewMessages = 1;
playMessageNotification();
newMessageAlert();
}
updateFriendStatusLights(friendId);
@ -380,8 +380,9 @@ void Widget::updateFriendStatusLights(int friendId)
f->widget->statusPic.setPixmap(QPixmap("img/status/dot_away_notification.png"));
}
void Widget::playMessageNotification()
void Widget::newMessageAlert()
{
QApplication::alert(this, 1000);
QSound::play("audio/notification.wav");
}
@ -427,7 +428,7 @@ void Widget::onGroupMessageReceived(int groupnumber, int friendgroupnumber, cons
{
if (message.contains(Settings::getInstance().getUsername(), Qt::CaseInsensitive))
{
playMessageNotification();
newMessageAlert();
g->hasNewMessages = 1;
g->userWasMentioned = 1;
g->widget->statusPic.setPixmap(QPixmap("img/status/dot_groupchat_notification.png"));

View File

@ -84,7 +84,7 @@ private:
GroupWidget* activeGroupWidget;
void updateFriendStatusLights(int friendId);
int isFriendWidgetActive, isGroupWidgetActive;
void playMessageNotification();
void newMessageAlert();
};
#endif // WIDGET_H