summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-03-01 01:34:36 +0300
committerAndrei Karas <akaras@inbox.ru>2018-03-01 01:34:36 +0300
commit36a4928c12024d7dd3771951d8b1f5dbb62702d5 (patch)
treec79dfc361baa5eb82064c57f73fee02a8591064b
parentb308b360adcb644814360f88daf722a34c11f29d (diff)
downloadmv-36a4928c12024d7dd3771951d8b1f5dbb62702d5.tar.gz
mv-36a4928c12024d7dd3771951d8b1f5dbb62702d5.tar.bz2
mv-36a4928c12024d7dd3771951d8b1f5dbb62702d5.tar.xz
mv-36a4928c12024d7dd3771951d8b1f5dbb62702d5.zip
Add separate configurable sound for new chat message in party and clan tabs.
-rw-r--r--src/const/sound.h2
-rw-r--r--src/defaults.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/clantab.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/partytab.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_audio.cpp12
5 files changed, 17 insertions, 3 deletions
diff --git a/src/const/sound.h b/src/const/sound.h
index 5cae8c7d9..fab305ab2 100644
--- a/src/const/sound.h
+++ b/src/const/sound.h
@@ -31,6 +31,8 @@ static const std::string SOUND_WHISPER = "soundwhisper";
static const std::string SOUND_HIGHLIGHT = "soundhighlight";
static const std::string SOUND_GLOBAL = "soundglobal";
static const std::string SOUND_GUILD = "soundguild";
+static const std::string SOUND_PARTY = "soundparty";
+static const std::string SOUND_CLAN = "soundclan";
static const std::string SOUND_SHOW_WINDOW = "soundshowwindow";
static const std::string SOUND_HIDE_WINDOW = "soundhidewindow";
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 888778dbb..2132df36b 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -289,6 +289,8 @@ void setConfigDefaults(Configuration &cfg)
AddDEF("soundinfo", "notify");
AddDEF("soundrequest", "attention");
AddDEF("soundguild", "newmessage");
+ AddDEF("soundparty", "newmessage");
+ AddDEF("soundclan", "newmessage");
AddDEF("soundshowwindow", "page");
AddDEF("soundhidewindow", "book");
AddDEF("autohideButtons", true);
diff --git a/src/gui/widgets/tabs/chat/clantab.cpp b/src/gui/widgets/tabs/chat/clantab.cpp
index 0f34d30c3..ffc5524b7 100644
--- a/src/gui/widgets/tabs/chat/clantab.cpp
+++ b/src/gui/widgets/tabs/chat/clantab.cpp
@@ -52,5 +52,5 @@ void ClanTab::handleInput(const std::string &msg)
void ClanTab::playNewMessageSound() const
{
- soundManager.playGuiSound(SOUND_GUILD);
+ soundManager.playGuiSound(SOUND_CLAN);
}
diff --git a/src/gui/widgets/tabs/chat/partytab.cpp b/src/gui/widgets/tabs/chat/partytab.cpp
index 986533f6d..d2d9ca821 100644
--- a/src/gui/widgets/tabs/chat/partytab.cpp
+++ b/src/gui/widgets/tabs/chat/partytab.cpp
@@ -141,7 +141,7 @@ void PartyTab::getAutoCompleteCommands(StringVect &names) const
void PartyTab::playNewMessageSound() const
{
- soundManager.playGuiSound(SOUND_GUILD);
+ soundManager.playGuiSound(SOUND_PARTY);
}
void PartyTab::optionChanged(const std::string &value)
diff --git a/src/gui/widgets/tabs/setup_audio.cpp b/src/gui/widgets/tabs/setup_audio.cpp
index b11a67287..2a9d63eba 100644
--- a/src/gui/widgets/tabs/setup_audio.cpp
+++ b/src/gui/widgets/tabs/setup_audio.cpp
@@ -140,11 +140,21 @@ Setup_Audio::Setup_Audio(const Widget2 *const widget) :
150, OnTheFly_false, MainConfig_true);
// TRANSLATORS: settings option
- new SetupItemSound(_("Guild / party / clan message sound"), "",
+ new SetupItemSound(_("Guild message sound"), "",
"soundguild", this, "soundguildEvent", mSoundModel,
150, OnTheFly_false, MainConfig_true);
// TRANSLATORS: settings option
+ new SetupItemSound(_("Party message sound"), "",
+ "soundparty", this, "soundpartyEvent", mSoundModel,
+ 150, OnTheFly_false, MainConfig_true);
+
+ // TRANSLATORS: settings option
+ new SetupItemSound(_("Clan message sound"), "",
+ "soundclan", this, "soundclanEvent", mSoundModel,
+ 150, OnTheFly_false, MainConfig_true);
+
+ // TRANSLATORS: settings option
new SetupItemSound(_("Highlight message sound"), "",
"soundhighlight", this, "soundhighlightEvent", mSoundModel,
150, OnTheFly_false, MainConfig_true);