mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added sound event to lobbies (patch from Manuel Davis)
This commit is contained in:
parent
3bc444b087
commit
b1f165fec8
@ -85,6 +85,7 @@ void SoundManager::soundEvents(SoundEvents &events)
|
||||
events.addEvent(tr("Chatmessage"), tr("New Msg"), SOUND_NEW_CHAT_MESSAGE, QFileInfo(baseDir, "incomingchat.wav").absoluteFilePath());
|
||||
events.addEvent(tr("Message"), tr("Message arrived"), SOUND_MESSAGE_ARRIVED, QFileInfo(baseDir, "receive.wav").absoluteFilePath());
|
||||
events.addEvent(tr("Download"), tr("Download complete"), SOUND_DOWNLOAD_COMPLETE, QFileInfo(baseDir, "ft_complete.wav").absoluteFilePath());
|
||||
events.addEvent(tr("Lobby"), tr("Message arrived"), SOUND_NEW_LOBBY_MESSAGE, QFileInfo(baseDir, "incomingchat.wav").absoluteFilePath());
|
||||
|
||||
/* add plugin events */
|
||||
int pluginCount = rsPlugins->nbPlugins();
|
||||
|
@ -29,6 +29,7 @@
|
||||
#define SOUND_USER_ONLINE "User_go_Online"
|
||||
#define SOUND_MESSAGE_ARRIVED "MessageArrived"
|
||||
#define SOUND_DOWNLOAD_COMPLETE "DownloadComplete"
|
||||
#define SOUND_NEW_LOBBY_MESSAGE "NewLobbyMessage"
|
||||
|
||||
class SoundEvents
|
||||
{
|
||||
|
@ -18,6 +18,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* ccr . 2016 Jan 26
|
||||
*
|
||||
* Play sound on incoming messages.
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
#include <unistd.h>
|
||||
@ -42,6 +47,7 @@
|
||||
#include "gui/gxs/GxsIdChooser.h"
|
||||
#include "gui/gxs/GxsIdDetails.h"
|
||||
#include "util/HandleRichText.h"
|
||||
#include "gui/SoundManager.h"
|
||||
|
||||
#include <retroshare/rsnotify.h>
|
||||
|
||||
@ -401,6 +407,7 @@ void ChatLobbyDialog::addChatMsg(const ChatMessage& msg)
|
||||
|
||||
ui.chatWidget->addChatMsg(msg.incoming, name, gxs_id, sendTime, recvTime, message, ChatWidget::MSGTYPE_NORMAL);
|
||||
emit messageReceived(msg.incoming, id(), sendTime, name, message) ;
|
||||
SoundManager::play(SOUND_NEW_LOBBY_MESSAGE);
|
||||
|
||||
// This is a trick to translate HTML into text.
|
||||
QTextEdit editor;
|
||||
|
Loading…
Reference in New Issue
Block a user