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 <stdio.h>
#include <string.h> #include <string.h>
#include <Alert.h>
#include <Catalog.h> #include <Catalog.h>
#include <OS.h> #include <OS.h>
#define PNG_NO_PEDANTIC_WARNINGS #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) void alert_warning(png_structp ppng, png_const_charp error_msg)
{ {
BAlert* alert = new BAlert("alert", error_msg, // These are only warnings and the image can still be decoded. We have no
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_LABEL, // way to convey this to the calling app using the current translator API,
B_WARNING_ALERT); // so the warnings are just ignored.
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
alert->Go();
} }
status_t status_t