From d017588386fd4da84f5842a247a443bf6df14d71 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Sat, 15 May 2004 16:46:31 +0000 Subject: [PATCH] Added sound Crash to debugger if given an invalid screen in AlertPosition git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7588 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Alert.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/kits/interface/Alert.cpp b/src/kits/interface/Alert.cpp index 83f86db777..02e8535d21 100644 --- a/src/kits/interface/Alert.cpp +++ b/src/kits/interface/Alert.cpp @@ -38,7 +38,7 @@ #include // TODO: Fix // This is hacked in because something in Accelerant.h or SupportDefs.h is lame! -typedef unsigned int uint; +//typedef unsigned int uint; #include #include #include @@ -47,6 +47,7 @@ typedef unsigned int uint; #include #include #include +#include #include @@ -255,7 +256,8 @@ char BAlert::Shortcut(int32 index) const //------------------------------------------------------------------------------ int32 BAlert::Go() { - // TODO: Add sound? + system_beep(NULL); // forces the "beep" event + fAlertSem = create_sem(0, "AlertSem"); if (fAlertSem < B_OK) { @@ -424,9 +426,9 @@ BPoint BAlert::AlertPosition(float width, float height) BScreen Screen(Window); if (!Screen.IsValid()) { - // ... then we're in deep trouble - // But what to say about it? - // debugger(???); + // We should never be here because a BScreen object will return + // a valid screen. + debugger("Couldn't find the screen!"); } BRect screenRect = Screen.Frame();