aboutsummaryrefslogtreecommitdiff
path: root/guilib
diff options
context:
space:
mode:
authoralwinus <alwinus@svn>2010-03-02 13:30:57 +0000
committeralwinus <alwinus@svn>2010-03-02 13:30:57 +0000
commit5c761f69d368263f273b10349af01e89e1c60322 (patch)
tree440c39bcd670da260789f033759e2c54579fea58 /guilib
parenta178b5523bffe54145073c420dd957adb87dd58d (diff)
added: Ticket #8926, different levels to KaiToast and different images for the levels
added: Notification for non present teletext during selection changed: Reworked all notifications to use the new levels git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@28310 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib')
-rw-r--r--guilib/GUIDialog.cpp9
-rw-r--r--guilib/GUIDialog.h3
2 files changed, 9 insertions, 3 deletions
diff --git a/guilib/GUIDialog.cpp b/guilib/GUIDialog.cpp
index 2c114d5a65..dbd1988743 100644
--- a/guilib/GUIDialog.cpp
+++ b/guilib/GUIDialog.cpp
@@ -35,6 +35,7 @@ CGUIDialog::CGUIDialog(int id, const CStdString &xmlFile)
m_dialogClosing = false;
m_renderOrder = 1;
m_autoClosing = false;
+ m_enableSound = true;
}
CGUIDialog::~CGUIDialog(void)
@@ -116,7 +117,7 @@ void CGUIDialog::Close_Internal(bool forceClose /*= false*/)
if (!m_bRunning) return;
// Play the window specific deinit sound
- if(!m_dialogClosing)
+ if(!m_dialogClosing && m_enableSound)
g_audioManager.PlayWindowSound(GetID(), SOUND_DEINIT);
// don't close if we should be animating
@@ -150,7 +151,8 @@ void CGUIDialog::DoModal_Internal(int iWindowID /*= WINDOW_INVALID */, const CSt
g_windowManager.RouteToWindow(this);
// Play the window specific init sound
- g_audioManager.PlayWindowSound(GetID(), SOUND_INIT);
+ if (m_enableSound)
+ g_audioManager.PlayWindowSound(GetID(), SOUND_INIT);
// active this window...
CGUIMessage msg(GUI_MSG_WINDOW_INIT, 0, 0, WINDOW_INVALID, iWindowID);
@@ -189,7 +191,8 @@ void CGUIDialog::Show_Internal()
g_windowManager.AddModeless(this);
// Play the window specific init sound
- g_audioManager.PlayWindowSound(GetID(), SOUND_INIT);
+ if (m_enableSound)
+ g_audioManager.PlayWindowSound(GetID(), SOUND_INIT);
// active this window...
CGUIMessage msg(GUI_MSG_WINDOW_INIT, 0, 0);
diff --git a/guilib/GUIDialog.h b/guilib/GUIDialog.h
index 6b54e31a48..3213513759 100644
--- a/guilib/GUIDialog.h
+++ b/guilib/GUIDialog.h
@@ -56,6 +56,8 @@ public:
virtual bool IsAnimating(ANIMATION_TYPE animType);
void SetAutoClose(unsigned int timeoutMs);
+ void SetSound(bool OnOff) { m_enableSound = OnOff; };
+
protected:
virtual bool RenderAnimation(unsigned int time);
virtual void SetDefaults();
@@ -70,6 +72,7 @@ protected:
bool m_bModal;
bool m_dialogClosing;
bool m_autoClosing;
+ bool m_enableSound;
unsigned int m_showStartTime;
unsigned int m_showDuration;
};