summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2010-03-10 22:12:20 +0000
committerMatthias Melcher <fltk@matthiasm.com>2010-03-10 22:12:20 +0000
commit7499728266922099e810a10ae3dfc074c9ba6fba (patch)
treefc9ed8317d1a20098831ff96b512c28b26e66635
parent68dc1adc908cbe22547227156e654e68dbe8c9f7 (diff)
Remove one OS X warning about deprecates function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7238 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/fl_ask.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx
index 9d35447e0..1b69c39f6 100644
--- a/src/fl_ask.cxx
+++ b/src/fl_ask.cxx
@@ -48,7 +48,9 @@
#include <FL/fl_draw.H>
#ifdef __APPLE__
-//# include <AudioToolbox/AudioToolbox.h>
+# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+# include <AudioToolbox/AudioServices.h>
+# endif
#endif
static Fl_Window *message_form;
@@ -279,9 +281,24 @@ void fl_beep(int type) {
case FL_BEEP_ERROR :
// How Apple is not any better than Microsoft:
/* MacOS 8 */ // SysBeep(30);
- /* OS X 10.1 */ AlertSoundPlay();
+ /* OS X 10.1 */ // AlertSoundPlay();
/* OS X 10.5 */ // AudioServicesPlayAlertSound(kUserPreferredAlert);
/* OS X 10.6 */ // AudioServicesPlayAlertSound(kSystemSoundID_UserPreferredAlert);
+# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ if (AudioServicesPlayAlertSound!=0L)
+# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ AudioServicesPlayAlertSound(kSystemSoundID_UserPreferredAlert);
+# else
+ AudioServicesPlayAlertSound(kUserPreferredAlert);
+# endif
+ else
+# endif
+#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
+ AlertSoundPlay();
+#else
+ {
+ }
+#endif
break;
default :
break;