Reworked SoundManager and SoundPage in the settings.

Added new icon in the statusbar to switch off the sound.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4832 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-01-22 22:58:23 +00:00
parent 4422d6557b
commit 3cba51abf4
24 changed files with 749 additions and 642 deletions

View file

@ -29,7 +29,6 @@
#include <QFontDialog>
#include <QMenu>
#include <QScrollBar>
#include <QSound>
#include "retroshare/rsinit.h"
#include "retroshare/rsnotify.h"
@ -792,21 +791,6 @@ void FriendsDialog::setCurrentFileName(const QString &fileName)
setWindowModified(false);
}
////play sound when recv a message
void FriendsDialog::playsound(){
Settings->beginGroup("Sound");
Settings->beginGroup("SoundFilePath");
QString OnlineSound = Settings->value("NewChatMessage","").toString();
Settings->endGroup();
Settings->beginGroup("Enable");
bool flag = Settings->value("NewChatMessage",false).toBool();
Settings->endGroup();
Settings->endGroup();
if(!OnlineSound.isEmpty()&&flag)
if(QSound::isAvailable())
QSound::play(OnlineSound);
}
void FriendsDialog::on_actionMessageHistory_triggered()
{
ImHistoryBrowser imBrowser("", ui.lineEdit, this);