Added sounds when message has arrived and download was finished.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5717 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-10-23 20:54:07 +00:00
parent c1c9894daf
commit b3d1e75455
5 changed files with 53 additions and 8 deletions

View File

@ -26,6 +26,8 @@
#define SOUND_NEW_CHAT_MESSAGE "NewChatMessage"
#define SOUND_USER_ONLINE "User_go_Online"
#define SOUND_MESSAGE_ARRIVED "MessageArrived"
#define SOUND_DOWNLOAD_READY "DownloadReady"
class SoundEvents
{

View File

@ -640,6 +640,8 @@ void NotifyQt::UpdateGUI()
switch(type)
{
case RS_POPUP_MSG:
soundManager->play(SOUND_MESSAGE_ARRIVED);
if (popupflags & RS_POPUP_MSG)
{
toaster = new Toaster(new MessageToaster(id, QString::fromUtf8(title.c_str()), QString::fromUtf8(msg.c_str())));
@ -654,6 +656,8 @@ void NotifyQt::UpdateGUI()
}
break;
case RS_POPUP_DOWNLOAD:
soundManager->play(SOUND_DOWNLOAD_READY);
if (popupflags & RS_POPUP_DOWNLOAD)
{
/* id = file hash */

View File

@ -130,6 +130,12 @@ void SoundPage::load()
groupItem = addGroup(tr("Chatmessage"));
addItem(groupItem, tr("New Msg"), SOUND_NEW_CHAT_MESSAGE);
groupItem = addGroup(tr("Message"));
addItem(groupItem, tr("Message arrived"), SOUND_MESSAGE_ARRIVED);
groupItem = addGroup(tr("Download"));
addItem(groupItem, tr("Download ready"), SOUND_DOWNLOAD_READY);
/* add plugin events */
int pluginCount = rsPlugins->nbPlugins();
for (int i = 0; i < pluginCount; ++i) {

View File

@ -3392,7 +3392,7 @@ Das ist nützlich, wenn du eine externe Festplatte freigibst und die Dateien nic
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Arial&apos;; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:9pt; font-weight:600;&quot;&gt;Friends&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
<translation type="obsolete">&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Arial&apos;; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:9pt; font-weight:600;&quot;&gt;Freunde&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
@ -4849,6 +4849,10 @@ p, li { white-space: pre-wrap; }
<source>Friends</source>
<translation>Freunde</translation>
</message>
<message>
<source>Search</source>
<translation type="unfinished">Suchen</translation>
</message>
</context>
<context>
<name>GamesDialog</name>
@ -10657,6 +10661,22 @@ p, li { white-space: pre-wrap; }
<source>Sound</source>
<translation>Ton</translation>
</message>
<message>
<source>Message</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Message arrived</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Download</source>
<translation type="unfinished">Herunterladen</translation>
</message>
<message>
<source>Download ready</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SoundStatus</name>

View File

@ -3333,13 +3333,6 @@ you plug it in.</source>
</context>
<context>
<name>ExampleDialog</name>
<message>
<source>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Arial&apos;; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:9pt; font-weight:600;&quot;&gt;Friends&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>#</source>
<translation type="unfinished"></translation>
@ -4792,6 +4785,10 @@ p, li { white-space: pre-wrap; }
<source>Friends</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GamesDialog</name>
@ -10406,6 +10403,22 @@ p, li { white-space: pre-wrap; }
<source>Sound</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Message</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Message arrived</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Download</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Download ready</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SoundStatus</name>