From 97ed3d69c3128df2a7d8e52eb309b228ec7ff2fb Mon Sep 17 00:00:00 2001 From: "arougthopher%lizardland.net" Date: Wed, 25 Jun 2003 02:25:44 +0000 Subject: [PATCH] Bug#173469 Implement a BeOS native dialog for pref_Alert r=timeless sr=alecf git-svn-id: svn://10.0.0.236/trunk@144132 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/libpref/src/prefapi.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mozilla/modules/libpref/src/prefapi.cpp b/mozilla/modules/libpref/src/prefapi.cpp index 3e669567564..5a4210474f0 100644 --- a/mozilla/modules/libpref/src/prefapi.cpp +++ b/mozilla/modules/libpref/src/prefapi.cpp @@ -78,6 +78,10 @@ #include #endif +#ifdef XP_BEOS +#include "Alert.h" +#endif + extern JSRuntime* PREF_GetJSRuntime(); #define BOGUS_DEFAULT_INT_PREF_VALUE (-5632) @@ -1239,7 +1243,7 @@ void pref_Alert(char* msg) void pref_Alert(char* msg) { #if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS) -#if defined(XP_UNIX) || defined(XP_OS2) +#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS) if ( getenv("NO_PREF_SPAM") == NULL ) #endif fputs(msg, stderr); @@ -1248,6 +1252,10 @@ void pref_Alert(char* msg) MessageBox (NULL, msg, "Configuration Warning", MB_OK); #elif defined(XP_OS2) WinMessageBox (HWND_DESKTOP, 0, msg, "Configuration Warning", 0, MB_WARNING | MB_OK | MB_APPLMODAL | MB_MOVEABLE); +#elif defined(XP_BEOS) + BAlert *alert = new BAlert("Configuration Warning", msg, "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + // Calling Go() runs the BAlert and waits for the user to close the window. Go will delete the BAlert when it finishes. + alert->Go(); #endif }