Revert "Add-ons: Add alert warning to PNGTranslator"

This reverts commit 450208975b.

The alert is not appropriate because applications cannot intercept it.

Fixes #15734

Change-Id: I5be98367ae615a572193406a559e5d34617e445c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2626
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Adrien Destugues
2020-05-09 19:27:07 +00:00
committed by waddlesplash
parent 75ffe22658
commit fc86ef2cef
@@ -36,7 +36,6 @@
#include <stdio.h>
#include <string.h>
#include <Alert.h>
#include <Catalog.h>
#include <OS.h>
#define PNG_NO_PEDANTIC_WARNINGS
@@ -300,11 +299,9 @@ void throw_error(png_structp ppng, png_const_charp error_msg)
void alert_warning(png_structp ppng, png_const_charp error_msg)
{
BAlert* alert = new BAlert("alert", error_msg,
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_LABEL,
B_WARNING_ALERT);
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
alert->Go();
// These are only warnings and the image can still be decoded. We have no
// way to convey this to the calling app using the current translator API,
// so the warnings are just ignored.
}
status_t