Browse Source

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

pull/14/head
Flynn 11 years ago
parent
commit
aab44382c5
  1. BIN
      img/status/dot_groupchat.png
  2. BIN
      img/status/dot_groupchat_newmessages.png
  3. BIN
      img/status/dot_groupchat_notification.png
  4. 9
      widget/widget.cpp
  5. 2
      widget/widget.h

BIN
img/status/dot_groupchat.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 605 B

After

Width:  |  Height:  |  Size: 613 B

BIN
img/status/dot_groupchat_newmessages.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 764 B

After

Width:  |  Height:  |  Size: 796 B

BIN
img/status/dot_groupchat_notification.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 B

After

Width:  |  Height:  |  Size: 814 B

9
widget/widget.cpp

@ -350,13 +350,13 @@ void Widget::onFriendMessageReceived(int friendId, const QString& message) @@ -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) @@ -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 @@ -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"));

2
widget/widget.h

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

Loading…
Cancel
Save