Implement a BeOS native dialog for pref_Alert

r=timeless
sr=alecf
This commit is contained in:
arougthopher%lizardland.net 2003-06-25 02:25:44 +00:00
Родитель 67bf2159da
Коммит 6e38514d1e
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -78,6 +78,10 @@
#include <os2.h>
#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
}