mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -05:00
Merge pull request #806 from PhenomRetroShare/Fix_LobbySoundNotification
Fix Lobby's sound notification.
This commit is contained in:
commit
d74bb2abad
@ -19,41 +19,37 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* ccr . 2016 Jan 26
|
||||
*
|
||||
* Play sound on incoming messages.
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QInputDialog>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QWidgetAction>
|
||||
|
||||
#include "ChatLobbyDialog.h"
|
||||
#include "util/QtVersion.h"
|
||||
#include "gui/ChatLobbyWidget.h"
|
||||
|
||||
#include "ChatTabWidget.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "gui/settings/RsharePeerSettings.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "gui/ChatLobbyWidget.h"
|
||||
#include "gui/FriendsDialog.h"
|
||||
#include "gui/msgs/MessageComposer.h"
|
||||
#include <gui/common/html.h>
|
||||
#include "gui/common/RSTreeWidgetItem.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "gui/common/html.h"
|
||||
#include "gui/common/FriendSelectionDialog.h"
|
||||
#include "gui/gxs/GxsIdTreeWidgetItem.h"
|
||||
#include "gui/common/RSTreeWidgetItem.h"
|
||||
#include "gui/gxs/GxsIdChooser.h"
|
||||
#include "gui/gxs/GxsIdDetails.h"
|
||||
#include "util/HandleRichText.h"
|
||||
#include "gui/SoundManager.h"
|
||||
#include "gui/gxs/GxsIdTreeWidgetItem.h"
|
||||
#include "gui/Identity/IdDialog.h"
|
||||
#include "gui/msgs/MessageComposer.h"
|
||||
#include "gui/settings/RsharePeerSettings.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "util/HandleRichText.h"
|
||||
#include "util/QtVersion.h"
|
||||
|
||||
#include <retroshare/rsnotify.h>
|
||||
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define COLUMN_NAME 0
|
||||
#define COLUMN_ACTIVITY 1
|
||||
@ -477,7 +473,6 @@ 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;
|
||||
|
@ -21,15 +21,19 @@
|
||||
|
||||
#include <QTime>
|
||||
#include <QMenu>
|
||||
|
||||
#include "ChatLobbyUserNotify.h"
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/MainWindow.h"
|
||||
|
||||
#include "gui/ChatLobbyWidget.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/SoundManager.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "util/DateTime.h"
|
||||
#include <retroshare/rsidentity.h>
|
||||
#include <util/HandleRichText.h>
|
||||
|
||||
#include <retroshare/rsidentity.h>
|
||||
|
||||
ChatLobbyUserNotify::ChatLobbyUserNotify(QObject *parent) :
|
||||
UserNotify(parent)
|
||||
{
|
||||
@ -274,7 +278,8 @@ void ChatLobbyUserNotify::chatLobbyNewMessage(ChatLobbyId lobby_id, QDateTime ti
|
||||
_listMsg[lobby_id][strAnchor]=msgData;
|
||||
emit countChanged(lobby_id, _listMsg[lobby_id].size());
|
||||
updateIcon();
|
||||
}
|
||||
SoundManager::play(SOUND_NEW_LOBBY_MESSAGE);
|
||||
}
|
||||
}
|
||||
|
||||
bool ChatLobbyUserNotify::checkWord(QString message, QString word)
|
||||
|
Loading…
Reference in New Issue
Block a user