From a78b3a34de86d181f845f352b3c4a58e6ff03872 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 4 Oct 2012 01:47:16 +0300 Subject: Fix sounds in npc and quit dialogs. --- src/gui/npcdialog.cpp | 2 ++ src/gui/quitdialog.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp index 4298d8b68..1333842bb 100644 --- a/src/gui/npcdialog.cpp +++ b/src/gui/npcdialog.cpp @@ -25,6 +25,7 @@ #include "being.h" #include "configuration.h" #include "client.h" +#include "sound.h" #include "gui/gui.h" #include "gui/sdlfont.h" @@ -161,6 +162,7 @@ NpcDialog::NpcDialog(const int npcId) : setVisible(true); requestFocus(); enableVisibleSound(true); + sound.playGuiSound(SOUND_SHOW_WINDOW); config.addListener("logNpcInGui", this); } diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp index 8e3bc4d25..907a26493 100644 --- a/src/gui/quitdialog.cpp +++ b/src/gui/quitdialog.cpp @@ -105,7 +105,6 @@ QuitDialog::QuitDialog(QuitDialog **const pointerToMe): QuitDialog::~QuitDialog() { - sound.playGuiSound(SOUND_HIDE_WINDOW); if (mMyPointer) *mMyPointer = nullptr; // Optional widgets, so delete them by hand. @@ -161,6 +160,10 @@ void QuitDialog::action(const gcn::ActionEvent &event) } } } + else + { + sound.playGuiSound(SOUND_HIDE_WINDOW); + } scheduleDelete(); } -- cgit v1.2.3-70-g09d2