From 55e8fd1fa6e0d67ca5df68e4ea630c53677023e0 Mon Sep 17 00:00:00 2001 From: me_desk Date: Sat, 9 Aug 2014 18:42:42 +0000 Subject: playing sound on new message arrival - added wav file, new class Sound, menu item in systray menu for muting git-svn-id: svn://localhost/project_picapica/trunk@318 fb96df88-216d-11de-830c-f3023f12d8ac --- pica-client/picaactioncenter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pica-client/picaactioncenter.cpp') diff --git a/pica-client/picaactioncenter.cpp b/pica-client/picaactioncenter.cpp index b88960c..5cd7b40 100644 --- a/pica-client/picaactioncenter.cpp +++ b/pica-client/picaactioncenter.cpp @@ -6,6 +6,7 @@ #include "../PICA_proto.h" #include "accounts.h" #include "dialogs/showpicaiddialog.h" +#include "sound.h" #include @@ -22,6 +23,10 @@ PicaActionCenter::PicaActionCenter(QObject *parent) : showmyidAct = new QAction(tr("Show My Pica Pica ID"), this); connect(showmyidAct, SIGNAL(triggered()), this, SLOT(showmyid())); + + muteSoundsAct = new QAction(tr("&Mute Sounds"), this); + muteSoundsAct->setCheckable(true); + connect(muteSoundsAct, SIGNAL(triggered(bool)), this, SLOT(muteSounds(bool))); } void PicaActionCenter::about() @@ -55,3 +60,8 @@ void PicaActionCenter::showmyid() ShowPicaIdDialog d(Accounts::GetCurrentAccount().name, Accounts::GetCurrentAccount().id, tr("My Current Account")); d.exec(); } + +void PicaActionCenter::muteSounds(bool yes) +{ + Sound::mute(yes); +} -- cgit v1.2.1