Fix for bug 51507. Remove "Netscape" from warning dialog. r=timeless, sr=slecf,a=dbaron.

This commit is contained in:
bnesse%netscape.com 2001-06-08 20:45:07 +00:00
parent c59f26cf43
commit 64d4a2e2a2
2 changed files with 16 additions and 6 deletions

View File

@ -1946,7 +1946,12 @@ pref_ErrorReporter(JSContext *cx, const char *message,
last = PR_sprintf_append(0, "An error occurred reading the startup configuration file. "
"Please contact your administrator.");
#if defined(XP_MAC)
// StandardAlert doesn't handle linefeeds. Use spaces to avoid garbage characters.
last = PR_sprintf_append(last, " ");
#else
last = PR_sprintf_append(last, LINEBREAK LINEBREAK);
#endif
if (!report)
last = PR_sprintf_append(last, "%s\n", message);
else
@ -1990,7 +1995,7 @@ void pref_Alert(char* msg)
SInt16 itemHit;
pmsg[0] = PL_strlen(msg);
BlockMoveData(msg, pmsg + 1, pmsg[0]);
StandardAlert(kAlertPlainAlert, "\pNetscape -- JS Preference Warning", pmsg, NULL, &itemHit);
StandardAlert(kAlertPlainAlert, "\pConfiguration Warning", pmsg, NULL, &itemHit);
}
#else
@ -2005,9 +2010,9 @@ void pref_Alert(char* msg)
fputs(msg, stderr);
#endif
#if defined(XP_WIN)
MessageBox (NULL, msg, "Netscape -- JS Preference Warning", MB_OK);
MessageBox (NULL, msg, "Configuration Warning", MB_OK);
#elif defined(XP_OS2)
WinMessageBox (HWND_DESKTOP, 0, msg, "Netscape -- JS Preference Warning", 0, MB_WARNING | MB_OK | MB_APPLMODAL | MB_MOVEABLE);
WinMessageBox (HWND_DESKTOP, 0, msg, "Configuration Warning", 0, MB_WARNING | MB_OK | MB_APPLMODAL | MB_MOVEABLE);
#endif
}

View File

@ -1946,7 +1946,12 @@ pref_ErrorReporter(JSContext *cx, const char *message,
last = PR_sprintf_append(0, "An error occurred reading the startup configuration file. "
"Please contact your administrator.");
#if defined(XP_MAC)
// StandardAlert doesn't handle linefeeds. Use spaces to avoid garbage characters.
last = PR_sprintf_append(last, " ");
#else
last = PR_sprintf_append(last, LINEBREAK LINEBREAK);
#endif
if (!report)
last = PR_sprintf_append(last, "%s\n", message);
else
@ -1990,7 +1995,7 @@ void pref_Alert(char* msg)
SInt16 itemHit;
pmsg[0] = PL_strlen(msg);
BlockMoveData(msg, pmsg + 1, pmsg[0]);
StandardAlert(kAlertPlainAlert, "\pNetscape -- JS Preference Warning", pmsg, NULL, &itemHit);
StandardAlert(kAlertPlainAlert, "\pConfiguration Warning", pmsg, NULL, &itemHit);
}
#else
@ -2005,9 +2010,9 @@ void pref_Alert(char* msg)
fputs(msg, stderr);
#endif
#if defined(XP_WIN)
MessageBox (NULL, msg, "Netscape -- JS Preference Warning", MB_OK);
MessageBox (NULL, msg, "Configuration Warning", MB_OK);
#elif defined(XP_OS2)
WinMessageBox (HWND_DESKTOP, 0, msg, "Netscape -- JS Preference Warning", 0, MB_WARNING | MB_OK | MB_APPLMODAL | MB_MOVEABLE);
WinMessageBox (HWND_DESKTOP, 0, msg, "Configuration Warning", 0, MB_WARNING | MB_OK | MB_APPLMODAL | MB_MOVEABLE);
#endif
}