From fc86ef2cef7b440577edddbd6db02399a423a1d6 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sat, 9 May 2020 15:11:16 +0200 Subject: [PATCH] Revert "Add-ons: Add alert warning to PNGTranslator" This reverts commit 450208975b6a059e645e8c2b4a77c346b9b03b71. 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 --- src/add-ons/translators/png/PNGTranslator.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/add-ons/translators/png/PNGTranslator.cpp b/src/add-ons/translators/png/PNGTranslator.cpp index 3c95d76fe3..2628d96d79 100644 --- a/src/add-ons/translators/png/PNGTranslator.cpp +++ b/src/add-ons/translators/png/PNGTranslator.cpp @@ -36,7 +36,6 @@ #include #include -#include #include #include #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