Merge pull request #1767 from Fizztastic/fix_1764
Sounds on buddy login & logout.
This commit is contained in:
commit
14e94f1f8b
4 changed files with 10 additions and 0 deletions
|
@ -170,6 +170,8 @@ void SoundEngine::themeChangedSlot()
|
|||
<< "player_join" << "player_leave" << "player_disconnect" << "player_reconnect" << "player_concede"
|
||||
// Spectator
|
||||
<< "spectator_join" << "spectator_leave"
|
||||
// Buddy
|
||||
<< "buddy_join" << "buddy_leave"
|
||||
// Chat & UI
|
||||
<< "chat_mention" << "all_mention" << "private_message";
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "userlist.h"
|
||||
#include "userinfobox.h"
|
||||
#include "abstractclient.h"
|
||||
#include "soundengine.h"
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QPushButton>
|
||||
|
@ -146,12 +147,19 @@ void TabUserLists::processUserJoinedEvent(const Event_UserJoined &event)
|
|||
ignoreList->sortItems();
|
||||
buddyList->sortItems();
|
||||
|
||||
if (buddyList->getUsers().keys().contains(userName))
|
||||
soundEngine->playSound("buddy_join");
|
||||
|
||||
emit userJoined(info);
|
||||
}
|
||||
|
||||
void TabUserLists::processUserLeftEvent(const Event_UserLeft &event)
|
||||
{
|
||||
QString userName = QString::fromStdString(event.name());
|
||||
|
||||
if (buddyList->getUsers().keys().contains(userName))
|
||||
soundEngine->playSound("buddy_leave");
|
||||
|
||||
if (allUsersList->deleteUser(userName)) {
|
||||
ignoreList->setUserOnline(userName, false);
|
||||
buddyList->setUserOnline(userName, false);
|
||||
|
|
BIN
sounds/Default/buddy_join.wav
Normal file
BIN
sounds/Default/buddy_join.wav
Normal file
Binary file not shown.
BIN
sounds/Default/buddy_leave.wav
Normal file
BIN
sounds/Default/buddy_leave.wav
Normal file
Binary file not shown.
Loading…
Reference in a new issue